tercel/spec-forge/propagate
Claude Code and agent skill by tercel/spec-forge
- community
Checking that the SKILL.md file is still in the repository.
Walk an upstream documentation change downstream — when a PRD, SRS, tech-design, or feature spec is edited, find every dependent document, identify which sections are now stale, and interactively update them to keep the entire doc chain consistent. Use after editing any spec-forge document, or run periodically with --since to catch accumulated drift.
Install
npx vskill@latest install tercel/spec-forge/propagateSKILL.md
Spec Forge — Propagate
⚡ Execution Entry Point (READ THIS FIRST)
Begin executing Step 1 immediately; never fall back to a manual workflow or stop to ask what to do.
Walk a doc change downstream and keep the whole chain consistent.
Iron Law
EVERY UPSTREAM CHANGE PROPAGATES OR FAILS LOUDLY. Partial propagation is worse than no propagation — it creates the illusion of consistency where there is none.
When to Use
- After editing a PRD / SRS / tech-design / feature-spec — find and update every doc that references the changed concepts
- After running
/spec-forge:prdor another generator that modified an existing doc in place - Periodically, with
--since {git-ref}, to catch accumulated drift across recent commits - Before a release, to make sure no doc is silently stale relative to its upstream
- When
spec-forge:analyzeorspec-forge:auditflags inconsistencies between upstream and downstream docs
This skill is the symmetric counterpart to code-forge:fix --review (which propagates code review findings into code changes). Where code-forge:fix walks up from a bug to the spec, spec-forge:propagate walks down from a spec change to the docs and code that depend on it.
Command Format
| Argument / Flag | Default | Description | |
|---|---|---|---|
@source-doc.md | — | The upstream doc whose changes should propagate. If omitted, auto-detect from git diff HEAD (uncommitted changes) or git diff HEAD~1 HEAD (last commit). | |
--since {git-ref} | — | Compute the diff between {git-ref} and HEAD instead of using uncommitted changes. Useful for catching drift across multiple commits. | |
--scope | docs | What to propagate into. docs = downstream documentation only. code = also flag code that references changed requirement IDs. all = both. | |
--dry-run | off | Generate the impact report and per-downstream proposed changes, but do NOT apply any edits. The user reviews the report and re-runs without --dry-run to apply. | |
--save | off | Save the propagation report to docs/propagate-report-{timestamp}.md in addition to displaying it. |
Workflow
Detailed Steps
Step 1: Determine Source Document and Change Scope
1.1 Resolve the Source
Parse $ARGUMENTS:
- If `@source-doc.md` is provided: use it as the source. Verify the file exists.
- If `--since {ref}` is provided: the source is the set of all
.mdfiles indocs/that changed between{ref}andHEAD. Usegit diff --name-only {ref}...HEAD -- 'docs/**/*.md' '*.md'to enumerate. - If neither is provided:
- Run
git status --porcelain -- 'docs/**/*.md' '*.md'to find uncommitted doc changes. - If non-empty: those files are the source.
- If empty: run
git diff --name-only HEAD~1 HEAD -- 'docs/**/*.md' '*.md'(the last commit's doc changes). - If still empty: display
No doc changes detected. Provide an explicit @source-doc.md or use --since {ref}.and stop.
If the source is auto-detected, display the resolved file list and use AskUserQuestion:
- "Propagate from these {N} files" → continue to 1.2
- "Pick a different source" → re-prompt with
AskUserQuestionlisting nearby docs
1.2 Compute Change Scope
For each source file, compute the diff:
- Uncommitted source:
git diff HEAD -- {file} - `--since` source:
git diff {ref}...HEAD -- {file} - Last-commit source:
git diff HEAD~1 HEAD -- {file}
Display the diff summary:
Store the per-file diffs in memory for Step 2.
Step 2: Extract Changed Concepts (Sub-agent)
Offload to a sub-agent so the diff content stays out of the main context.
Spawn an Agent tool call:
subagent_type:"general-purpose"description:"Extract changed concepts from doc diff"
Sub-agent prompt must include:
- The source file paths
- The full diff for each (paste verbatim)
- The instruction: "Extract every concept the diff introduces, modifies, or removes. A concept is anything a downstream document might reference: requirement ID (FR-XXX-NNN, NFR-XXX-NNN, REQ-NNN), defined term, component name, module name, API endpoint, data field, success metric, decision, dependency, persona, or numeric threshold. For each concept, classify it as ADDED, MODIFIED, REMOVED, or RENAMED. For RENAMED, provide both the old and new name."
- The required structured return format below
Sub-agent must return:
Main context retains: Only this report (~3-5KB).
Step 3: Discover Downstream References (Sub-agent)
Offload to a sub-agent so the grep output stays out of the main context.
Deterministic assist: the ID-shaped SEARCH_TERMs (FR-XXX-NNN, NFR-XXX-NNN, REQ-NNN) can be extracted and located mechanically — python3 "<sf_scripts>/sf-trace.py" ids <file...> (resolve <sf_scripts> via @../shared/scripts.md) pulls the exact IDs each doc declares, and python3 "<sf_scripts>/sf-scan.py" --root "<root>" --docs-only gives the doc inventory those terms are located across. Feed those to the sub-agent as the deterministic starting point; the STALE vs STILL_VALID vs AMBIGUOUS judgement (Step 4) stays with the model. Fall back to grep by hand if the scripts are unavailable.
Spawn an Agent tool call:
subagent_type:"general-purpose"description:"Discover downstream references"
Sub-agent prompt must include:
- The
CONCEPTS_REPORTfrom Step 2 (paste verbatim) - The project root path
- The scope flag (
docs,code, orall) - The instruction: "For every entry in SEARCH_TERMS, grep the project for references and produce a list of downstream files and locations that mention any of these concepts. Exclude the source files themselves (they are upstream). For docs scope, search `/*.md
excluding the source files. For code scope, also search source files (/*.{py,ts,js,tsx,jsx,go,rs,java,rb,php}`). Group results by downstream file." - The instruction: "For each downstream file, list which concepts it references, with line numbers. Distinguish RENAMED concepts: a downstream file that mentions only the OLD name is now stale; one that mentions only the NEW name is current; one that mentions both is in the middle of an update."
- The required structured return format below
Sub-agent must return:
Main context retains: Only this report (~5-10KB depending on project size).
Step 4: Per-Downstream Impact Analysis (Parallel Sub-agents)
For each entry in DOWNSTREAM_REPORT.DOC_REFERENCES (and optionally CODE_REFERENCES), spawn a sub-agent to determine what specific changes the downstream needs. Fan out per-downstream in parallel — one Agent tool call per downstream file — batching to stay within your tool-call budget.
Each sub-agent receives:
- The downstream file path
- The relevant slice of
CONCEPTS_REPORT(only the concepts this downstream references) - The relevant slice of
DOWNSTREAM_REPORT(only this file's references) - The instruction below
Sub-agent prompt:
After all sub-agents complete, aggregate into a single IMPACT_REPORT keyed by downstream file.
Step 5: Interactive Review
Walk the IMPACT_REPORT with the user. For each downstream file with CHANGES_NEEDED, display the proposed changes and use AskUserQuestion to choose:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/propagate/SKILL.md
Popularity
- Repository stars
- 10
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tercel/spec-forge/propagate)