User Story Mapping
deanpeters/Product-Manager-Skills
Lays out a user journey as activities, steps, and tasks on a two-dimensional map that then informs backlog slicing.
Layer 3 deep documentation methodology. An agent skill from prime-radiant-inc/greenfield.
$ npx skills add prime-radiant-inc/greenfield --skill behavioral-spec-writing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install prime-radiant-inc/greenfield behavioral-spec-writing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/behavioral-spec-writing .claude/skills/behavioral-spec-writing && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "behavioral-spec-writing" agent skill from https://github.com/prime-radiant-inc/greenfield/tree/main/skills/behavioral-spec-writing into .claude/skills/behavioral-spec-writing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "behavioral-spec-writing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/prime-radiant-inc/greenfield/tree/main/skills/behavioral-spec-writingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add prime-radiant-inc/greenfield --skill behavioral-spec-writing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install prime-radiant-inc/greenfield behavioral-spec-writing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/behavioral-spec-writing .agents/skills/behavioral-spec-writing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "behavioral-spec-writing" agent skill from https://github.com/prime-radiant-inc/greenfield/tree/main/skills/behavioral-spec-writing into .agents/skills/behavioral-spec-writing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "behavioral-spec-writing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add prime-radiant-inc/greenfield --skill behavioral-spec-writing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install prime-radiant-inc/greenfield behavioral-spec-writing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/behavioral-spec-writing .cursor/skills/behavioral-spec-writing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "behavioral-spec-writing" agent skill from https://github.com/prime-radiant-inc/greenfield/tree/main/skills/behavioral-spec-writing into .cursor/skills/behavioral-spec-writing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "behavioral-spec-writing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/prime-radiant-inc/greenfield.git --path skills/behavioral-spec-writing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add prime-radiant-inc/greenfield --skill behavioral-spec-writing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install prime-radiant-inc/greenfield behavioral-spec-writing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/behavioral-spec-writing .gemini/skills/behavioral-spec-writing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "behavioral-spec-writing" agent skill from https://github.com/prime-radiant-inc/greenfield/tree/main/skills/behavioral-spec-writing into .gemini/skills/behavioral-spec-writing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "behavioral-spec-writing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install prime-radiant-inc/greenfield behavioral-spec-writingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add prime-radiant-inc/greenfield --skill behavioral-spec-writing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/behavioral-spec-writing .github/skills/behavioral-spec-writing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "behavioral-spec-writing" agent skill from https://github.com/prime-radiant-inc/greenfield/tree/main/skills/behavioral-spec-writing into .github/skills/behavioral-spec-writing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "behavioral-spec-writing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add prime-radiant-inc/greenfield --skill behavioral-spec-writing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install prime-radiant-inc/greenfield behavioral-spec-writing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/behavioral-spec-writing .opencode/skills/behavioral-spec-writing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "behavioral-spec-writing" agent skill from https://github.com/prime-radiant-inc/greenfield/tree/main/skills/behavioral-spec-writing into .opencode/skills/behavioral-spec-writing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "behavioral-spec-writing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
behavioral-spec-writingLayer 3 deep documentation methodology. An agent skill from prime-radiant-inc/greenfield.
Behavioral Spec Writing is an agent skill from prime-radiant-inc/greenfield. Layer 3 deep documentation methodology. Per-module behavioral specifications, external and behavioral integration contracts, behavior documentation, end-to-end user journey analysis. Transforms Layer 2 synthesis into implementable behavioral specifications. Loaded by the analyzer agent during Layer 3.
Its SKILL.md is about 14k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Product & Project Management, covering Customer journey mapping. The repository describes itself as: A Claude Code plugin that reverse-engineers clean behavioral specs, test vectors, and acceptance criteria from any codebase, producing a provenance trail so a fresh team can… The licence is Apache-2.0.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 6e6d4b4. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown and dot).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Behavioral Spec Writing loads about 14k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 3,812 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from prime-radiant-inc/greenfield at commit 6e6d4b4, republished under its Apache-2.0 licence (© prime-radiant-inc). 3,812 words, ~13,698 tokens.
.claude/skills/behavioral-spec-writing/SKILL.md (or your agent's skills folder).Layer 3 transforms Layer 2 synthesis (module map, feature inventory, architecture doc, API surface, behavioral summaries) into specifications detailed enough that a developer can reimplement the target WITHOUT seeing the original code. This skill carries all methodology for deep-dive-analyzer, contract-extractor, behavior-documenter, and user-journey-analyzer.
digraph layer3_pipeline {
rankdir=TB;
compound=true;
"Layer 2 synthesis complete" [shape=doublecircle];
"Layer 3 complete — proceed to Gate 1" [shape=doublecircle];
subgraph cluster_phase1 {
label="Phase 1: Per-Module Deep Dives (parallel across modules)";
style=dashed;
"deep-dive-analyzer: Module A" [shape=box];
"deep-dive-analyzer: Module B" [shape=box];
"deep-dive-analyzer: Module N" [shape=box];
}
subgraph cluster_phase2 {
label="Phase 2: Cross-Cutting Documentation (parallel)";
style=dashed;
"contract-extractor: external + integration contracts" [shape=box];
"behavior-documenter: behavioral domain synthesis" [shape=box];
"user-journey-analyzer: end-to-end journeys" [shape=box];
}
"Layer 2 synthesis complete" -> "deep-dive-analyzer: Module A";
"Layer 2 synthesis complete" -> "deep-dive-analyzer: Module B";
"Layer 2 synthesis complete" -> "deep-dive-analyzer: Module N";
"deep-dive-analyzer: Module A" -> "contract-extractor: external + integration contracts" [lhead=cluster_phase2];
"deep-dive-analyzer: Module B" -> "behavior-documenter: behavioral domain synthesis" [lhead=cluster_phase2];
"deep-dive-analyzer: Module N" -> "user-journey-analyzer: end-to-end journeys" [lhead=cluster_phase2];
"contract-extractor: external + integration contracts" -> "Layer 3 complete — proceed to Gate 1";
"behavior-documenter: behavioral domain synthesis" -> "Layer 3 complete — proceed to Gate 1";
"user-journey-analyzer: end-to-end journeys" -> "Layer 3 complete — proceed to Gate 1";
}Phase 1 runs deep-dive-analyzer in parallel across every module from the module map. Each instance produces a per-module behavioral specification.
Phase 2 runs three agents in parallel. They consume Phase 1 output plus Layer 2 synthesis to produce contracts, behavioral documentation, and user journeys.
| Path | What It Contains |
|---|---|
workspace/raw/synthesis/module-map.md | Module inventory: name, description, priority, dependencies |
workspace/raw/synthesis/features/ | Feature inventory across all sources |
workspace/raw/synthesis/architecture/ | Architecture document: component relationships |
workspace/raw/synthesis/api/ | API surface: all discovered interfaces |
workspace/raw/synthesis/behavioral-summaries/ | Merged intelligence from all Layer 1 modes |
workspace/raw/synthesis/reimplementation-essentials.md | Compact summary for the implementer: happy path, edge cases, dependency contracts |
| Path | What It Contains | Origin |
|---|---|---|
workspace/raw/source/analysis/ | Source code analysis (chunk analysis, function analysis) | RAW |
workspace/public/docs/ | Official documentation findings | PUBLIC |
workspace/public/ecosystem/ | SDK and ecosystem analysis | PUBLIC |
workspace/public/community/ | Community intelligence (forums, tutorials, issues) | PUBLIC |
workspace/raw/runtime/ | Runtime observations (CLI, web UI, behavior) | RAW |
workspace/raw/binary/ | Binary analysis findings | RAW |
Claims supported by multiple independent intelligence sources earn confirmed confidence.
This is the primary Layer 3 deliverable. Each module in the module map gets a complete behavioral specification written to workspace/raw/specs/modules/{module-name}.md.
You read source code to understand behavior. You NEVER reference source code in specs.
Even though you analyze code, your output must read as if you only observed the system externally. The test: "Can someone implement this from my spec alone, never having seen the source?"
| Contamination | Example | Why Forbidden |
|---|---|---|
| Internal function names | parseArgs(), loadConfig() | Implementation detail |
| Internal variable names | _configKey, configMap | Implementation detail |
| Internal class names | ConfigLoader, SettingsReader | Implementation detail |
| Minified identifiers | a(), x1, Qz, sp, r0 | Implementation detail |
| Line numbers | "at line 234" | Implementation detail |
| Source file paths | "in src/cli.ts" | Implementation detail |
| Code structure | "calls X then Y" | Implementation detail |
| Module counts | "52 modules", "8 components" | Structural leak |
| IPC channel names | task-completed, sync-channel | Internal messaging |
| Store property names | store.documentBody, useActiveDocument | State management internals |
| Feature flag names | FF_NEW_INDEX_FORMAT, ff_batch_commit_v2, isEnabled('feature') | Internal gating — describe what the gate controls, not its name |
| Telemetry event names | request_rate_limited, job_timeout_warning | Internal analytics — describe what is measured, not the event name |
| CSS class names | .toolbar__button, styled.Button | Styling implementation |
| Database schema details (app-owned) | CREATE TABLE sessions, column names | Storage implementation — but see External System Exception below |
| Internal filenames | auth-handler.ts, session.js | Source organization |
When the target application depends on external systems it does not own — shared databases, third-party APIs, CLI tools it shells out to, file formats imposed by other systems, hardware interfaces — the details of those systems are behavioral constraints, not implementation details.
The test: Can the reimplementor redesign this interface? If NO (it's external/shared/imposed), treat its details as external contracts and INCLUDE them. If YES (the app owns it), treat them as implementation details and EXCLUDE them.
Examples of external constraints that MUST be preserved:
Document external system contracts in dedicated files under workspace/raw/specs/contracts/ (see Contract Extraction section). These contracts flow through to the implementer unchanged.
| Behavioral Element | Example | Why Included |
|---|---|---|
| Environment variables | DATABASE_URL, DEBUG | External API |
| CLI flags | --format, --workers | External API |
| Config file keys | upstreams, log_level | External API |
| API field names | request_id, batch_size | Protocol spec |
| File paths (user-facing) | ~/.app/config.toml | Behavioral contract |
| Protocol names | SSE, gRPC, OAuth | Behavioral contract |
| Error messages | "Error: Invalid API key" | UX contract |
| HTTP headers/codes | Authorization, 200, 401 | Protocol spec |
| Dependency API contracts | esbuild.transform(code, {loader: 'ts'}) | How target talks to its dependencies |
The rule: If a user or external system needs to know it, INCLUDE it. If only the code needs to know it, EXCLUDE it.
WRONG:
Entry point: main() at src/cli.ts:45
Calls parseArgs() which returns Config object
Variable requestId = generateUUID()RIGHT:
Entry point: Command-line invocation
Behavior:
1. Parse arguments into configuration
2. Generate session identifier (UUID v4 format)
3. Initialize modules based on config
Session ID: UUID v4, generated once at startup, immutableEvery behavioral claim gets a unique ID: SPEC-{DOMAIN}-{NNN}
Where {DOMAIN} is a short uppercase token for the behavioral domain (use tokens that describe exposed behavior, NOT internal module names) and {NNN} is a zero-padded sequential number starting at 001.
Pick tokens that describe the target's exposed behavior. The set below is a starting vocabulary; delete what doesn't apply and add tokens that do.
| Domain Token | Covers |
|---|---|
CLI | Command-line parsing, flags, subcommands, exit codes |
CONFIG | Configuration loading, merging, defaults, validation |
AUTH | API keys, OAuth, tokens, credentials |
API | Wire protocol, streaming, retries, headers, request/response handling |
OUTPUT | Terminal rendering, formatting, progress indicators, themes |
DATA | Data models, storage, serialization |
NET | Network, HTTP, WebSocket, protocols |
UI | User interface elements, layouts, interaction flows |
For any behavior the starting set doesn't cover, create a descriptive token — for example: CACHE, MIGRATE, HEALTH, LOADER, WATCH, AUDIO, PARSER, SYNC, PLUGIN, SESSION, TOOL. Tokens describe the target's actual surface; a speech-to-text app probably needs AUDIO and UI; a web service probably needs NET and DATA; a code-loading tool probably needs PARSER and CONFIG. Don't carry tokens you don't need.
If a module's behavior spans multiple domains, use multiple tokens (one per behavioral block). IDs MUST be unique across the entire spec file. Examples: SPEC-CLI-001, SPEC-CONFIG-042, SPEC-API-003, SPEC-AUDIO-007.
Every behavioral claim in the spec MUST be annotated with a requirement level:
Apply requirement levels to every entry point behavior, every decision tree outcome, every error condition, and every state transition. If a claim lacks a requirement level, it is ambiguous and must be clarified.
Each per-module spec covers the following sections. All sections are required; write "Not applicable" or "Stateless" where a section genuinely does not apply, but never omit sections.
2-3 paragraphs: what the module does from a user/system perspective, why it exists, key responsibilities.
For each capability this module makes available:
- **Capability:** [behavioral name -- what it does, not what it's called internally]
- **Trigger:** [what causes this capability to activate]
- **Preconditions:** [what MUST be true before invocation]
- **Postconditions:** [what is guaranteed after completion]
- **Error conditions:** [what errors can occur and when]
- **Requirement Level:** MUST | SHOULD | MAYFor each capability or data this module needs to function:
- **What is needed:** [capability or data description]
- **When:** [at what point this prerequisite is consumed]
- **Failure behavior:** [what happens if the prerequisite is unavailable]CRITICAL: Do NOT name which module provides the prerequisite. Describe WHAT is needed, not WHERE it comes from. A "From module" field would be structural contamination. The implementer decides its own module boundaries.
For each way to invoke this module:
#### SPEC-{DOMAIN}-{NNN}: [Descriptive Name]
**Requirement Level:** MUST | SHOULD | MAY
### Trigger
[What causes this to be invoked -- user action, event, timer, etc.]
### Input
- Parameter 1: [type] - [what it represents]
- Parameter 2: [type] - [what it represents]
- Required state: [what must be true before invocation]
### Behavior
1. **Validation**
- Check: [what condition] -> if invalid: [error message]
- Check: [what condition] -> if invalid: [error message]
2. **Processing**
- [Step-by-step behavioral description]
- Decision: if [condition in behavioral terms]
- Then: [behavior]
- Else: [behavior]
3. **Completion**
- Output: [what is returned/emitted]
- State change: [what persists]
- Side effects: [files written, network calls, etc.]For every significant decision, document in behavioral terms:
#### SPEC-{DOMAIN}-{NNN}: [What is being decided]
**Requirement Level:** MUST | SHOULD | MAY
### Conditions (evaluated in order)
1. If [behavioral condition]: -> [behavioral outcome]
2. Else if [behavioral condition]: -> [behavioral outcome]
3. Default: -> [behavioral outcome]
### Outcomes
- **Outcome 1**: [detailed behavioral description]
- **Outcome 2**: [detailed behavioral description]Describe conditions by what they MEAN, not how they are coded:
if (x.length > 0 && x[0] === '-')Pay special attention to behaviors that differ based on HOW a feature was triggered. A common pattern:
When the same feature has different error handling based on whether it was explicitly requested vs. automatically discovered, document BOTH paths explicitly:
#### SPEC-{DOMAIN}-{NNN}: Configuration Error Handling
**Requirement Level:** MUST
### Conditions
1. If configuration was auto-detected AND loading fails: -> Log warning, continue without it
2. If configuration was user-specified (via flag/option) AND loading fails: -> Report error, abort
3. If configuration loads but is invalid: -> [behavior depends on which fields are invalid]This pattern appears frequently in config file loading, plugin/extension discovery, and feature detection with fallback.
If the module maintains state, this section is MANDATORY. Every stateful module must document its states, transitions, and invariants explicitly — implementers need the state model to preserve behavior across a rewrite.
## State Model (State Box)
### State Variables
| Variable | Type | Initial Value | Description |
|----------|------|---------------|-------------|
| [name] | [type] | [initial] | [what it represents] |
### State Invariants
[What MUST always be true about the state, regardless of transitions]
### States
- **Idle**: [what this state means, invariants]
- **Processing**: [what this state means, invariants]
- **Complete**: [what this state means, invariants]
### Transitions
| From | Event | Condition | Action | To |
|------|-------|-----------|--------|-----|
| Idle | request received | valid input | begin processing | Processing |
| Processing | work complete | success | emit result | Complete |
| Processing | error occurs | - | emit error | Idle |
### State Persistence
[Where state lives (memory, disk, database), lifetime, serialization format]
### Initialization
[How the state machine starts]
### Termination
[How/when the state machine ends]If the module is stateless, write: "Stateless -- This module maintains no state between invocations."
Error specification MUST be as detailed as normal operation. For every entry point, the error paths must have the same depth as the happy path. Incomplete error documentation is a spec gap.
For EVERY error condition:
#### SPEC-{DOMAIN}-{NNN}: [Descriptive Error Name]
**Requirement Level:** MUST | SHOULD | MAY
### Trigger
[What situation causes this error]
### Detection
[How the system knows this error occurred]
### Response
1. [First action -- e.g., "Log error details"]
2. [Second action -- e.g., "Clean up partial state"]
3. [Final action -- e.g., "Return error to caller"]
### User-Visible Message
"[Exact error text the user sees]"
### Recovery
[Can the operation be retried? Under what conditions?]## Edge Cases
### Empty Input
- Behavior: [what happens]
- Output: [what is returned]
### Maximum Size
- Limit: [what the limit is]
- Exceeded behavior: [what happens]
### Concurrent Access
- Behavior: [how handled]
- Guarantees: [what is guaranteed]
### Interruption
- Cleanup: [what cleanup occurs]
- Resumability: [can it resume?]How configuration values alter this module's behavior. For each relevant config key:
| Config Key / Env Var | Effect on This Module | Default | Requirement Level |
|---------------------|----------------------|---------|-------------------|
| `SOME_ENV_VAR` | Enables debug output for this module | unset (disabled) | MAY |
| `configKey` | Controls retry count | 3 | SHOULD |## Data Format: [Name]
### Input
{
field1: string (required, 1-100 chars),
field2: number (optional, default: 0),
field3: array of strings (required, non-empty)
}
### Transformations
1. Validate all required fields present
2. Apply defaults to optional fields
3. Normalize field1 to lowercase
### Output
{
field1: string (normalized),
field2: number,
field3: array of strings,
computed: boolean (true if field2 > 0)
}When the target delegates critical behavior to a third-party library, document the exact API contract used. These are behavioral contracts between the target and external systems -- equivalent to wire protocols -- NOT implementation details.
digraph dependency_contract_decision {
rankdir=TB;
"Target calls dependency?" [shape=diamond];
"Is behavior delegated?" [shape=diamond];
"Document API contract" [shape=box];
"Skip -- internal detail" [shape=box];
"Target calls dependency?" -> "Is behavior delegated?" [label="yes"];
"Target calls dependency?" -> "Skip -- internal detail" [label="no"];
"Is behavior delegated?" -> "Document API contract" [label="yes: critical behavior\ndepends on correct API usage"];
"Is behavior delegated?" -> "Skip -- internal detail" [label="no: wrapper only"];
}For each critical dependency contract, document:
API Surface Used:
Failure Modes:
Version Constraints:
Example:
## Dependency Contract: esbuild Transform API
### API Surface Used
- `esbuild.transform(code, options)` -- transforms TypeScript/JSX to JavaScript
- Required option: `loader` must be set explicitly ('ts', 'tsx', 'jsx') based on source file extension
- Required option: `sourcefile` OR explicit `loader` -- without either, esbuild defaults to JavaScript parsing
- The `transform()` API receives code as a string (no filename), so it cannot infer the loader automatically
### Failure Mode
- If `loader` is 'default' and no `sourcefile` is provided: TypeScript syntax (`interface`, `enum`, type annotations) causes parse errors
- Error: "Expected ';' but found 'Identifier'"
### Version Constraint
- Requires esbuild >= 0.14.0 for stable transform APIThe rule: If the target's correctness depends on calling a dependency's API with specific parameters, that is a behavioral contract. Document it.
Explicitly categorize gaps using the POSIX three-category model:
## Implementation-Defined Behavior
[Areas where the implementor has freedom to choose, with any constraints.
The implementor MUST document their choice.]
## Unspecified Behavior
[Valid behaviors the spec does not prescribe -- any correct approach is acceptable.
The implementor need not document their choice.]
## Undefined Behavior
[Inputs or states the spec does not cover -- implementation may do anything.
No guarantees are made about these scenarios.]You MUST read every single line of code in the module. No exceptions.
Checklist before proceeding:
If you cannot check these boxes, GO BACK and read more.
Do not pursue exhaustive analysis past the point of diminishing returns. When successive analysis passes stop revealing new behavioral observations for a module, document current understanding and move on. P0 modules warrant more thoroughness than P2/P3 modules, but even P0 analysis should stop when saturated. The goal is "sufficient to reimplement," not "every conceivable edge case."
For each behavior, you must answer:
WRONG: "It validates the input" -- TOO VAGUE
RIGHT: "It checks: field X is non-empty string (error: 'X required'), field Y is positive integer (error: 'Y must be positive'), field Z matches pattern /^[a-z]+$/ (error: 'Z must be lowercase letters')" -- COMPLETE
When extraction analysis files from multiple agents exist for overlapping topics:
If you find a contradiction you cannot resolve from the source, record it with a disputed citation:
<!-- cite: source=source-code, ref=workspace/raw/source/analysis/chunk-0024.md:105, confidence=disputed, agent=deep-dive-analyzer, contradiction=workspace/raw/source/exploration/auth-layer/findings.md:23 -->When other intelligence sources have run, consult their findings:
workspace/public/docs/ -- official documentation claimsworkspace/public/ecosystem/ -- SDK analysis findingsworkspace/public/community/ -- tutorials, reviews, forums, issue tracker observationsworkspace/raw/runtime/ -- runtime observation dataworkspace/raw/binary/ -- binary analysis findingsClaims supported by multiple independent sources earn confirmed confidence.
Every per-module spec file MUST end with this checklist:
## Verification Checklist
- [ ] All entry points documented
- [ ] All decision trees traced (every branch, including error paths)
- [ ] All state machines documented (states, transitions, triggers)
- [ ] All error conditions listed with observable symptoms
- [ ] All edge cases identified and documented
- [ ] Auto-detected vs user-specified behavior differences documented
- [ ] Zero source code identifiers in this document
- [ ] All behavioral claims have provenance citations
- [ ] Assumed claims are a small minority; most claims have direct evidence
- [ ] No sections are empty or placeholder-only
- [ ] Cross-references to other specs are valid
- [ ] Every behavioral claim has a SPEC-{DOMAIN}-{NNN} ID
- [ ] Every behavioral claim has a requirement level (MUST/SHOULD/MAY)
- [ ] Error conditions have equal depth to normal operations
- [ ] All stateful modules have State Box documentation
- [ ] Uncertainty sections (implementation-defined/unspecified/undefined) present
- [ ] Behavioral Interfaces section (Exposed Capabilities/Prerequisites) present
- [ ] Dependency API contracts documented for all critical third-party calls
- [ ] Contamination Self-Check completed (all checks pass)HARD STOP: Review your output file BEFORE writing it. Read every line and apply the reimplementor test from the spec-sanitization skill. Do NOT write the file until all checks pass.
For every identifier, name, or reference in your spec, ask: "Could the reimplementor reasonably redesign this?"
Check each paragraph for:
External contracts to PRESERVE (not contamination):
If any implementation detail is found: rewrite the line using behavioral language, then re-check. Only write the file when the spec reads cleanly to someone who has never seen the source.
# Module: [Descriptive Name]
## Overview
[2-3 paragraphs: what it does, why it exists, key responsibilities]
## Behavioral Interfaces
### Exposed Capabilities
[For each capability: name, trigger, preconditions, postconditions, errors, req level]
### Prerequisites
[For each need: what is needed, when, failure behavior -- NO "From module" field]
## Entry Points
[Each entry point with full behavioral spec, including SPEC-{DOMAIN}-{NNN} IDs]
## Decision Logic
[All significant decision trees with SPEC IDs]
## State Model (State Box)
[State variables, invariants, transitions if stateful, or "Stateless" if not]
## Error Handling
[All error conditions with equal depth to normal operations]
## Edge Cases
[Boundary conditions]
## Configuration Effects
[How config values alter behavior]
## Data Formats
[Input/output schemas]
## Dependency API Contracts
[Third-party library contracts]
## Implementation-Defined Behavior
[Areas where the implementor has freedom to choose]
## Unspecified Behavior
[Valid behaviors the spec does not prescribe]
## Undefined Behavior
[Inputs or states the spec does not cover]
## Verification Checklist
[Self-assessment checklist -- see above]The contract-extractor produces two categories of output: contracts that cross the analysis/implementation boundary to the implementer, and inter-module contracts that stay in analysis for verification purposes only.
Observable interfaces between the target and the outside world. These are things a user or external system can observe without seeing source code.
Document every command and subcommand, every flag, required vs optional arguments, default values, and exit codes.
## Main Command
Usage: `target [options] [command]`
### Global Flags
| Flag | Short | Type | Default | Description |
|------|-------|------|---------|-------------|
| `--help` | `-h` | boolean | false | Show help |
| `--version` | `-v` | boolean | false | Show version |
### Subcommands
#### `target init`
[Arguments, flags, exit codes]
### Exit Codes
| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | General error |
| 2 | Usage error |Output: workspace/raw/specs/contracts/cli.md
| Variable | Purpose | Expected Values | Default |
|---|---|---|---|
API_KEY | Authentication | string | (required) |
DEBUG | Enable debug logging | true/false | false |
Output: workspace/raw/specs/contracts/environment.md
Document file paths, file formats, all keys with types and descriptions, default values, and validation rules.
Output: workspace/raw/specs/contracts/configuration.md
For HTTP APIs, WebSocket connections, gRPC protocol, or any wire protocol the target uses: document request/response formats, headers, status codes, error responses.
Output: workspace/raw/specs/contracts/{protocol}.md
When the target application depends on external systems it does not own — shared databases, third-party APIs, CLI tools, imposed file formats — the details of those systems are behavioral constraints, not implementation choices. Document each as an external contract.
When to produce: If analysis reveals the target depends on a system whose interface is imposed externally (shared database, third-party API, external CLI tool, imposed file format), produce a contract for each.
For shared/external databases the application does not own:
# External Database Contract
## Ownership
This database is NOT owned by the application. The schema is an external constraint.
The reimplementation MUST conform to this schema exactly.
## Tables
### {TableName}
| Column | Type | Nullable | Purpose |
|--------|------|----------|---------|
| {col} | {type} | {yes/no} | {behavioral purpose} |
**Cardinality:** {e.g., "Multiple rows per product — one per pricing region"}
**Primary key:** {columns}
**Used by:** {which application behaviors query this table}
### Naming Collisions
| Name | Table 1 Purpose | Table 2 Purpose | Disambiguation |
|------|----------------|----------------|----------------|
| {name} | {purpose in context A} | {purpose in context B} | {how the app distinguishes them} |
## Query-Correctness Constraints
| Constraint | Affected Behavior | Why |
|-----------|-------------------|-----|
| {e.g., "One price per product in search results"} | {Product search} | {Pricing table has multiple rows per product (one per region); naive join produces duplicates} |
## Derived/Reference Data
| Target | Source | Derivation |
|--------|--------|-----------|
| {e.g., "Category dropdown values"} | {e.g., "SELECT DISTINCT Category FROM FinancialCategory"} | {How the data is derived} |
## Stored Procedures
| Procedure | Parameters | Returns | Purpose |
|-----------|-----------|---------|---------|
| {name} | {params} | {return type} | {behavioral purpose} |Output: workspace/raw/specs/contracts/database.md
For third-party APIs the application calls but does not own:
# External API Contract: {Service Name}
## Ownership
This API is NOT owned by the application. The reimplementation MUST call the same endpoints
with the same field names.
## Endpoints
### {METHOD} {path}
**Request:**
| Field | Type | Required | Purpose |
|-------|------|----------|---------|
| {field} | {type} | {yes/no} | {purpose} |
**Response:**
| Field | Type | Purpose |
|-------|------|---------|
| {field} | {type} | {purpose} |
**Error Responses:**
| Status | Body | Meaning |
|--------|------|---------|
| {code} | {shape} | {when returned} |
## Authentication
{Auth scheme, token format, refresh flow}
## Pagination
{Pagination scheme: cursor-based, offset, etc.}
## Rate Limits
{Rate limit rules and retry behavior}Output: workspace/raw/specs/contracts/api-{service}.md
For external CLI tools the application invokes:
# External CLI Contract: {Tool Name}
## Ownership
This tool is NOT owned by the application. The reimplementation MUST invoke the same commands.
## Commands
### {command} {subcommand}
| Flag | Type | Purpose |
|------|------|---------|
| {flag} | {type} | {purpose} |
**Output format:** {stdout format the app parses}
**Exit codes:** {codes the app checks}Output: workspace/raw/specs/contracts/cli-{tool}.md
For file formats imposed by external systems:
# External File Format Contract: {Format Name}
## Ownership
This format is NOT owned by the application. The reimplementation MUST read/write the same structure.
## Structure
{Field names, encoding, version headers, layout}Output: workspace/raw/specs/contracts/format-{name}.md
Ordering, sequencing, and failure relationships expressed WITHOUT naming internal modules. The implementer receives this to understand sequencing constraints while remaining free to choose its own architecture.
Output format:
# Behavioral Integration Requirements
These requirements define ordering and failure dependencies between behavioral capabilities.
They do NOT prescribe internal architecture -- the implementer is free to organize these capabilities
however it chooses.
## BIR Table
| BIR ID | Before (prerequisite) | After (dependent capability) | Failure if Violated | Req Level |
|--------|----------------------|------------------------------|---------------------|-----------|
| BIR-001 | Configuration loaded from all sources | Session created with valid context | Fatal: no config defaults available | MUST |
| BIR-002 | Arguments parsed into structured format | Execution mode determined | Fatal: cannot route to handler | MUST |
| BIR-003 | Active session established | API requests sent to backend | Fatal: no session context | MUST |
## BIR Details
### BIR-001: Configuration Before Session
- **Before:** Configuration loaded and merged from all sources (files, env vars, defaults)
- **After:** Session created with valid configuration context
- **Failure if violated:** Session cannot initialize without configuration; fatal error, abort
- **Requirement Level:** MUSTOutput: workspace/raw/specs/contracts/behavioral-integration.md
Internal wiring between the original's modules. Stays in workspace/raw/. Used ONLY for Gate 1 verification to ensure complete analysis coverage. This is structural contamination -- it encodes the original's internal module boundaries.
Read the module specs in workspace/raw/specs/modules/ and the module map at workspace/raw/synthesis/module-map.md. For every cross-module dependency, document the integration contract.
Identify cross-module calls by looking for:
Output format:
# Inter-Module Contracts (Analysis Internal -- Does NOT Cross Into Implementation)
## Call Table
| Caller Module | Callee Module | Trigger | API Used | Failure Mode |
|--------------|--------------|---------|----------|-------------|
| CLI Parsing | Session Mgmt | startup | createSession() | fatal: abort |
| Session Mgmt | Config | session init | loadConfig() | warn: use defaults |
## Contract Details
### CLI Parsing -> Session Mgmt
- **Trigger:** Application startup, after argument parsing
- **API:** Create a new session or resume an existing one
- **Input:** Parsed CLI arguments, environment context
- **Output:** Active session handle
- **Failure behavior:** If session creation fails, application MUST abort with error message
- **Requirement Level:** MUSTOutput: workspace/raw/specs/contracts/inter-module.md
The behavior-documenter is a pure synthesis agent. It does NOT read source code or run the target. It consumes the output of agents that did and synthesizes findings into unified behavioral documents.
digraph behavior_synthesis {
rankdir=TB;
"Gather all Layer 1 and Phase 1 evidence" [shape=box];
"Group claims by behavioral domain" [shape=box];
"Corroborate: multiple sources agree?" [shape=diamond];
"Assign confirmed confidence" [shape=box];
"Propagate original confidence" [shape=box];
"Sources disagree?" [shape=diamond];
"Apply resolution hierarchy" [shape=box];
"Flag as disputed" [shape=box];
"Write synthesized behavioral spec per domain" [shape=box];
"All domains documented" [shape=doublecircle];
"Gather all Layer 1 and Phase 1 evidence" -> "Group claims by behavioral domain";
"Group claims by behavioral domain" -> "Corroborate: multiple sources agree?";
"Corroborate: multiple sources agree?" -> "Assign confirmed confidence" [label="yes"];
"Corroborate: multiple sources agree?" -> "Propagate original confidence" [label="single source"];
"Corroborate: multiple sources agree?" -> "Sources disagree?" [label="conflict"];
"Sources disagree?" -> "Apply resolution hierarchy" [label="resolvable"];
"Sources disagree?" -> "Flag as disputed" [label="unresolvable"];
"Assign confirmed confidence" -> "Write synthesized behavioral spec per domain";
"Propagate original confidence" -> "Write synthesized behavioral spec per domain";
"Apply resolution hierarchy" -> "Write synthesized behavioral spec per domain";
"Flag as disputed" -> "Write synthesized behavioral spec per domain";
"Write synthesized behavioral spec per domain" -> "All domains documented";
}Read all available input sources. For each behavioral domain (state management, error handling, networking, etc.), collect claims from all modes:
## Evidence Collection: [Domain]
| Claim | Source Mode | Source File | Confidence |
|-------|-----------|------------|------------|
| Session timeout is 30 min | source-code | chunk-0031.md:51 | inferred |
| Session timeout is 30 min | runtime-observation | cli/timeout-test.md:5 | confirmed |
| Session timeout is 30 min | official-docs | claims-by-topic.md:12 | inferred |For each claim:
confirmeddisputed confidenceOrganize by behavioral domain, NOT by module. Group related behaviors. Remove all source code identifiers. Focus on observable behavior, not implementation.
For each behavioral domain, produce:
# [Domain] Behavior
## Overview
[2-3 paragraphs: what it does, why it exists, key responsibilities]
## Triggers
- [What causes this behavior to activate]
- [Events it responds to]
- [Inputs it accepts]
## Normal Behavior
1. When [trigger], the system [does X]
<!-- cite: source=source-code, ref=..., confidence=confirmed, agent=behavior-documenter, corroborated_by=runtime-observation -->
2. It then [does Y]
<!-- cite: source=source-code, ref=..., confidence=inferred, agent=behavior-documenter -->
## State
- Maintains: [what state it keeps]
- Initial state: [starting conditions]
- Terminal states: [end conditions]
## Error Behavior
- When [error condition]: [what happens]
- Error recovery: [how it recovers]
## Observable Outputs
- [What the user sees]
- [What gets written]You MUST produce behavioral documentation.
Output: workspace/raw/specs/behavioral-docs/
End-to-end user workflows that exercise multiple modules. Component specs explain the pieces. User journeys explain how pieces connect.
| Journey Type | What It Covers | Examples |
|---|---|---|
| Happy path | Normal successful workflows | First run, normal startup, primary workflow completion |
| Error recovery | What happens when things go wrong | Auth failure, network timeout, invalid input |
| First-time setup | Initial configuration and onboarding | OAuth flow, config creation, first interaction |
| Power user workflows | Advanced multi-step operations | Resumable operations, piped input, scripted usage |
| Interruption handling | Mid-operation cancellation | Ctrl+C at various points, terminal close |
For each journey, write a complete trace:
## Journey: [Name]
### Trigger
[What initiates this journey -- user action, event, timer]
### Preconditions
- [What must be true before this journey can happen]
- [Required state, config, etc.]
### Step-by-Step Flow
**Step 1: [Name]**
- Action: [what the user does]
- Expected Response: [what the system does in response]
- What user sees: [exact UI/output text]
- State Changes: [what changes in system state]
- Errors Possible: [what can go wrong at this step]
**Step 2: [Name]**
- Action: [what the user does or what the system does next]
- Expected Response: [system response]
- What user sees: [exact UI/output text]
- State Changes: [state changes]
- Errors Possible: [error conditions]
[Continue for all steps...]
### Completion
- Final state: [what is different after this journey]
- User feedback: [what user sees at the end]
### Error Paths
- If [condition at step N]: [what happens, what user sees, recovery options]
- If [condition at step M]: [what happens, what user sees, recovery options]
### Alternative Paths
- With flag X: [how the journey differs]
- In state Y: [how the journey differs]
### Journey Provenance
| Step | Primary Source | Confidence |
|------|---------------|------------|
| Step 1 | source-code | inferred |
| Step 2 | runtime-observation + source-code | confirmed |For each step, document:
For each journey, ask: "If I only had this document, could I build UI that looks and feels identical?"
If NO -- you are missing UX details. Go deeper.
Before documenting journeys, discover ALL entry points:
When runtime observation output exists at workspace/raw/runtime/, incorporate actual observed journeys rather than inferring them from code. Runtime-observed journeys have higher confidence because they represent actual behavior, not inferred behavior.
Output: workspace/raw/specs/journeys/{journey-name}.md
CRITICAL for all Layer 3 output. Every Layer 3 agent must enforce these rules.
Ask: Can a developer implement this spec without knowing ANYTHING about the original's code?
digraph implementation_boundary {
rankdir=LR;
subgraph cluster_crosses {
label="FLOWS to implementation";
style=filled;
fillcolor="#e8f5e9";
"Per-module behavioral specs" [shape=box];
"External contracts (CLI, env, config, protocol)" [shape=box];
"Behavioral Integration Requirements (BIR table)" [shape=box];
"Behavioral domain documentation" [shape=box];
"User journey specs" [shape=box];
}
subgraph cluster_stays {
label="STAYS in analysis (raw/)";
style=filled;
fillcolor="#ffebee";
"Inter-module integration contracts" [shape=box];
"Source code analysis artifacts" [shape=box];
"Raw runtime observation logs" [shape=box];
}
}Every behavioral claim MUST have an inline provenance citation immediately after the claim:
- Sessions expire after 30 minutes of inactivity
<!-- cite: source=source-code, ref=workspace/raw/source/analysis/chunk-0007.md:88, confidence=confirmed, agent=deep-dive-analyzer, corroborated_by=runtime-observation -->| Field | Type | Description |
|---|---|---|
source | enum | Source type: official-docs, public-api, sdk-analysis, community-knowledge, runtime-observation, source-code, binary-analysis, inferred |
ref | string | Specific location: URL, workspace/ file path with optional :line, or session timestamp |
confidence | enum | confirmed, inferred, or assumed |
agent | string | Your agent name |
| Field | Type | Description |
|---|---|---|
corroborated_by | comma-separated list | Other source types that independently confirm this claim |
contradiction | string | Path to contradicting evidence (for disputed confidence) |
| Situation | Confidence |
|---|---|
| Claim supported by source code analysis only | inferred |
| Claim supported by source + one other mode (docs, runtime, SDK) | confirmed |
| Claim is agent's reasoned interpretation of ambiguous code | assumed |
| Claim involves exact algorithm, constant, or field name verified in source | inferred (upgrade to confirmed if corroborated) |
| Multiple Layer 1 sources independently agree | confirmed |
| Agent reasoning with no direct evidence | assumed |
Per spec file:
Layer 3 agents preserve original Layer 1 citations. When multiple sources agree, add corroboration notes:
- Network retries use exponential backoff with jitter
<!-- cite: source=source-code, ref=workspace/raw/source/analysis/chunk-0015.md:89, confidence=confirmed, agent=behavior-documenter, corroborated_by=runtime-observation -->No behavioral claim may exist without a citation. If you cannot cite a claim, it is assumed -- mark it honestly. Unrecorded assumptions look like confirmed facts to downstream agents and the implementer.
workspace/raw/specs/
modules/ # Per-module behavioral specs (deep-dive-analyzer)
{module-name}.md # SPEC-{DOMAIN}-{NNN} claims, full spec template
contracts/
cli.md # External CLI contract (flows to implementation)
environment.md # External environment contract (flows to implementation)
configuration.md # External configuration contract (flows to implementation)
{protocol}.md # External protocol contracts (flows to implementation)
behavioral-integration.md # BIR table (flows to implementation)
inter-module.md # ANALYSIS ONLY -- does NOT cross into implementation
behavioral-docs/ # Pure behavioral documentation by domain (behavior-documenter)
behavior-{domain}.md # Synthesized behavioral spec per domain
journeys/
{journey-name}.md # End-to-end user journeys (user-journey-analyzer)workspace/raw/specs/modules/{module-name}.md<!-- cite: --> provenance citationsworkspace/raw/specs/contracts/<!-- cite: --> provenance citationsworkspace/raw/specs/behavioral-docs/<!-- cite: --> provenance citationsworkspace/raw/specs/journeys/<!-- cite: --> provenance citationsAll Layer 3 agents MUST actually invoke the Write tool to produce output files. Do NOT:
If you show file contents in your response without calling Write, THE DATA IS LOST. Every finding gets written to a file IMMEDIATELY.
© prime-radiant-inc, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/behavioral-spec-writing of prime-radiant-inc/greenfield.
Open the folder on GitHubat commit 6e6d4b4
Behavioral Spec Writing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Behavioral Spec Writing this skillprime-radiant-inc/greenfield | 292 | — | ~14k | Automated safety check: Pass | Apache-2.0 | |
| User Story Mappingdeanpeters/Product-Manager-Skills | 7.2k | 2 repos | ~2.8k | Automated safety check: Pass | Custom licence | |
| QA Critical UXfastrepl/anarlog | 9.5k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Prdjuanandresgs/claude-ctrl | 193 | — | ~2.9k | Automated safety check: Pass | None | |
| Customer Journey Map Builderdeanpeters/Product-Manager-Skills | 7.2k | 1 repos | ~3.7k | Automated safety check: Pass | Custom licence | |
| Super Product Ownersyahiidkamil/Software-Engineer-AI-Agent-Atlas | 401 | — | ~7.9k | Automated safety check: Pass | None |
deanpeters/Product-Manager-Skills
Lays out a user journey as activities, steps, and tasks on a two-dimensional map that then informs backlog slicing.
fastrepl/anarlog
QA Anarlog's critical Pro user journey on a signed staging candidate — onboarding, responsive launch, microphone and system-audio capture, automated summaries, and cloud sync.
juanandresgs/claude-ctrl
Write structured feature specifications with problem statements, user journeys, use cases, functional requirements, and success metrics.
deanpeters/Product-Manager-Skills
Builds a stage-by-stage customer journey map covering actions, touchpoints, emotions, KPIs, goals, and owning teams for one persona and scenario.
syahiidkamil/Software-Engineer-AI-Agent-Atlas
Complete Product Owner / Product Manager capability — a wiki-style knowledge map of product practice in active software development: the role and its boundaries, strategy cascade (vision → OKRs →…
liangdabiao/claude-data-analysis-ultra-main
Perform multi-touch attribution analysis using Markov chains, Shapley values, and custom attribution models.
prime-radiant-inc/greenfield
Master methodology for reverse-engineering a codebase into behavioral specs with cited evidence, reading every line across source, binaries, docs, runtime and git history.
prime-radiant-inc/greenfield
Mines tutorials, forums, reviews, issues and changelogs for observed product behavior, using six search channels and consensus analysis.
prime-radiant-inc/greenfield
Runs untrusted analysis targets inside Docker or Podman containers with memory, CPU and process limits, covering image builds, lifecycle, command execution and cleanup.
prime-radiant-inc/greenfield
Finds OpenAPI, GraphQL, Protobuf and JSON Schema files in a codebase and extracts behavioral claims from them as part of a reverse-engineering workflow.
prime-radiant-inc/greenfield
Method for extracting behavioral specifications from a product's public documentation: tiered search order, claim extraction rules, output structure, stop criteria and gap analysis.
prime-radiant-inc/greenfield
Layer 1 skill for SDK and ecosystem analysis. An agent skill from prime-radiant-inc/greenfield.
Categories
Layer 3 deep documentation methodology. An agent skill from prime-radiant-inc/greenfield. Behavioral Spec Writing is an agent skill from prime-radiant-inc/greenfield. Layer 3 deep documentation methodology.
Behavioral Spec Writing fits situations like: tasks that involve Customer journey mapping.
Run `npx skills add prime-radiant-inc/greenfield --skill behavioral-spec-writing -a claude-code`. Or copy the skill folder (skills/behavioral-spec-writing in prime-radiant-inc/greenfield) into .claude/skills/behavioral-spec-writing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add prime-radiant-inc/greenfield --skill behavioral-spec-writing -a codex`. Or copy the skill folder (skills/behavioral-spec-writing in prime-radiant-inc/greenfield) into .agents/skills/behavioral-spec-writing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add prime-radiant-inc/greenfield --skill behavioral-spec-writing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/behavioral-spec-writing, .gemini/skills/behavioral-spec-writing, .github/skills/behavioral-spec-writing and .opencode/skills/behavioral-spec-writing in your project.
Going by SKILL.md and its folder, Behavioral Spec Writing needs credentials named API_KEY.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Behavioral Spec Writing is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 14k tokens (SKILL.md is roughly 55k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Behavioral Spec Writing: User Story Mapping (deanpeters/Product-Manager-Skills, 7.2k stars), QA Critical UX (fastrepl/anarlog, 9.5k stars), Prd (juanandresgs/claude-ctrl, 193 stars) and Customer Journey Map Builder (deanpeters/Product-Manager-Skills, 7.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
prime-radiant-inc (a GitHub organization) maintains it in prime-radiant-inc/greenfield, which has 292 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on August 6, 2026.
Source: prime-radiant-inc/greenfield on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.