[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C1F30D58FPFYTAM3ADH811":3,"skill-same:01M7C1F30D58FPFYTAM3ADH811":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7C1F30D58FPFYTAM3ADH811","extract-requirements",null,"Use when starting an iterate run on human spec collateral — reads the spec, produces per-epic requirement files with proof obligations and behavior scenario cards with stable IDs.","zak-keown\u002Fmoe","zak-keown","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F320717241?v=4","01M7BZFXME0NW6TQX0H7AZM2KS","01M7BZFXN32VR0JN5AATRD53H4",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fextract-requirements\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: extract-requirements\ndescription: Use when starting an iterate run on human spec collateral — reads the spec, produces per-epic requirement files with proof obligations and behavior scenario cards with stable IDs.\n---\n\n# Extracting Requirements\n\n## Overview\n\nReads arbitrary human spec collateral and produces two artifact sets:\n1. **Per-epic requirement files** in `docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F` — story cards with proof obligations per AC\n2. **Behavior scenarios** in `docs\u002Fmoe\u002Fiterations\u002Fbehavior-scenarios.md` — reusable observable-behavior contracts with stable IDs\n\nUses a chunking + parallel-dispatch + aggregation pipeline so that no single agent holds the entire spec in context. Handles specs from a single page up to ~100K tokens across dozens of files.\n\n## When to Use\n\nInvoked by `iterate` during bootstrap, or standalone when you need to regenerate requirements from human spec collateral.\n\n## Script Location\n\nAll scripts referenced below live in this skill's `scripts\u002F` directory, next to this SKILL.md file.\n\n## Key Concept: Spec Taxonomy\n\nThe spec directory structure drives proof seam classification. Resolve [skills\u002F_shared\u002Fbehavior-evidence-formats.md](..\u002F_shared\u002Fbehavior-evidence-formats.md) relative to this loaded document for the full taxonomy. Summary:\n\n| Spec directory | Default proof seam |\n|---|---|\n| `test-vectors\u002F` | unit |\n| `contracts\u002F` | integration |\n| `domains\u002F` | integration or app-level |\n| `journeys\u002F` | e2e |\n\nExtraction subagents use the appropriate prompt variant based on source file location.\n\n## Pipeline\n\n### 1. Inventory\n\nEnumerate the spec files without reading full contents:\n\nResolve [skills\u002Fextract-requirements\u002Fscripts\u002Fchunk_spec.mjs](scripts\u002Fchunk_spec.mjs) relative to this loaded document, then invoke it as `node \"\u003Cresolved-chunk_spec.mjs>\" \u003Cspec-path>`.\n\nThis produces a JSON array of chunks. Each chunk has `source_file`, `heading`, `start_line`, `end_line`, `content`, and `estimated_tokens`. Small files (\u003C 4K tokens) are kept whole. Larger files are split by `##` headings, or `###` if sections are still too large.\n\n**Classify each chunk by spec taxonomy:** note whether the source file is under `journeys\u002F`, `contracts\u002F`, `domains\u002F`, or `test-vectors\u002F`. This determines which extraction prompt variant to use.\n\n### 2. Dispatch extraction subagents\n\nFor each chunk (or batch of small chunks), dispatch an extraction subagent using the appropriate template from `extraction-subagent-prompt.md`:\n\n- Chunks from `journeys\u002F` → use the **Journey Extraction** prompt variant\n- All other chunks → use the **Standard Extraction** prompt variant\n\nPass the chunk content inline — do NOT make the subagent read the file.\n\n**Payload integrity:** If your platform has output token limits that could truncate the chunk before it reaches the subagent prompt, stage each chunk individually and verify the subagent received the complete content (e.g., by checking that the extracted stories reference lines from the full range of the chunk). Partial payloads are easy to miss and cause silent under-extraction.\n\n**Dispatch strategy:**\n- Dispatch subagents in waves of 3-5 (runtime agent thread limits are typically 6; keep headroom). Do not fan out all chunks at once.\n- **Persist immediately:** as soon as each subagent returns, write its output to a temp file (e.g., a scratch directory under the project root) before dispatching more work. Subagent results that only exist in conversation state can be lost if the session fails.\n- **Wait semantics:** loop until every dispatched agent in the wave has reached a final state, persisting each result as it arrives.\n\n  OpenCode's `task` tool call blocks until the subagent returns its\n  result in the tool response — there is no separate polling step. Read\n  the returned result directly; for multiple independent `task`\n  dispatches issued in one turn, each result arrives before you\n  continue.\n\n- Close completed agents promptly to free thread slots for the next wave.\n- **Track completion:** maintain a checklist of chunk-to-agent mappings. After all waves finish, verify every chunk produced a persisted output file. Re-dispatch any missing chunks before proceeding.\n\n### 3. PAR omission review\n\nBefore aggregation, run a PAR omission review. The sole job of this review is to find requirements AND scenarios that the extraction subagents dropped.\n\nFor each chunk (or batch of chunks), dispatch two reviewers in parallel following [skills\u002F_shared\u002Fparallel-adversarial-review.md](..\u002F_shared\u002Fparallel-adversarial-review.md), resolved relative to this loaded document:\n\n1. Give each reviewer the **original chunk text** and the **extracted stories + scenarios** for that chunk\n2. Prompt: \"Compare the source text against the extracted stories and scenarios. Find every requirement, acceptance criterion, behavioral constraint, or observable behavior in the source that is NOT represented by any extracted story or scenario. Score 5 points for each omission found. Pay special attention to: (a) ACs missing proof obligations, (b) observable behavior with no scenario, (c) journey steps that were summarized or skipped.\"\n3. Aggregate findings across both reviewers\n4. For each confirmed omission: either add a new story\u002Fscenario to the extraction output or document why it's intentionally excluded\n\nThis pass is required, not optional. Extraction subagents optimize for what they notice; omission reviewers optimize for what's missing.\n\n### 4. Aggregate stories\n\nRun the story aggregation script on all extracted story JSONs (including any added by the omission review):\n\nResolve [skills\u002Fextract-requirements\u002Fscripts\u002Faggregate_stories.mjs](scripts\u002Faggregate_stories.mjs) relative to this loaded document, then invoke it as `node \"\u003Cresolved-aggregate_stories.mjs>\" -o docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F \u003Cjson-file-1> \u003Cjson-file-2> ...`.\n\nThe script combines stories, deduplicates matching theme + trimmed title + body identities (never blank titles), groups them into epics, assigns stable STORY\u002FEPIC IDs, and outputs per-epic files with proof obligations preserved.\n\n### 5. Aggregate scenarios\n\nRun the scenario aggregation script:\n\nResolve [skills\u002Fextract-requirements\u002Fscripts\u002Faggregate_scenarios.mjs](scripts\u002Faggregate_scenarios.mjs) relative to this loaded document, then invoke it as `node \"\u003Cresolved-aggregate_scenarios.mjs>\" -o docs\u002Fmoe\u002Fiterations\u002Fbehavior-scenarios.md --stories-dir docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F \u003Cjson-file-1> \u003Cjson-file-2> ...`.\n\nThe script combines, deduplicates by title, assigns stable SCENARIO\u002FJOURNEY IDs, resolves story title references to STORY-IDs, and outputs `behavior-scenarios.md`.\n\n### 6. Consolidate epics\n\nSame as before: review the epic list, merge near-duplicates, re-run aggregation. See the consolidation rules in the original extraction skill documentation.\n\n**Additional consolidation check:** after merging, verify that scenario `owning_story_titles` still resolve correctly. If stories were deduplicated during re-aggregation, re-run scenario aggregation to update resolved refs.\n\n### 7. Back-link scenarios to stories\n\nAfter both aggregations complete, run the back-linking script to update per-epic story files with scenario references:\n\nResolve [skills\u002Fextract-requirements\u002Fscripts\u002Fbacklink_scenarios.mjs](scripts\u002Fbacklink_scenarios.mjs) relative to this loaded document, then invoke it as `node \"\u003Cresolved-backlink_scenarios.mjs>\" docs\u002Fmoe\u002Fiterations\u002Fbehavior-scenarios.md docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F`.\n\nThe script reads scenario → owning-story mappings from `behavior-scenarios.md` and appends `scenario:SCENARIO-NNNN` or `scenario:JOURNEY-NNNN` to AC lines in the epic files that have observable behavioral impact. AC lines that already have scenario refs are skipped.\n\nThis creates the bidirectional link: stories → scenarios (via AC lines) and scenarios → stories (via owning_stories field).\n\n### 8. Coverage ledger\n\nBuild a coverage ledger that maps every spec chunk to its extracted stories AND scenarios. This is the traceable proof that extraction is complete.\n\nFor each chunk from the inventory (step 1):\n\n1. List the chunk: `source_file`, `heading`, `start_line`–`end_line`\n2. List every story ID whose `**Sources:**` field cites overlapping lines in that file\n3. List every scenario ID whose `**Sources:**` field cites overlapping lines in that file\n4. Classify the chunk:\n   - **covered** — stories with ACs that correspond to normative content AND scenarios for observable behavior\n   - **story-only** — stories exist but observable behavior has no scenario (needs scenario)\n   - **non-normative** — chunk contains only meta-commentary, table of contents, or boilerplate (explain why)\n   - **duplicate** — chunk's requirements are covered by stories citing a different source\n   - **gap** — normative content with no corresponding story\n\n**Hard gates:**\n- If any chunk is classified as **gap**, extraction is incomplete. Re-extract and repeat.\n- If any chunk is classified as **story-only** and contains observable behavior, extraction is incomplete. Add scenarios for the missing observable behavior.\n\n**Journey coverage check:** every journey spec file MUST produce at least one JOURNEY-NNNN scenario that preserves the complete step sequence. If a journey file only produced stories (no journey scenario), that is a gap.\n\n### 9. Initialize behavior corpus index\n\nCreate the initial `docs\u002Fmoe\u002Fiterations\u002Fbehavior-corpus.md` from the scenario list:\n\n```markdown\n# Behavior Corpus\n\n| Scenario ID | Title | Proof seam | Run cadence | Command | Owning stories |\n|---|---|---|---|---|---|\n```\n\nPopulate with all scenarios. Set run cadence:\n- Journey scenarios → `sentinel` (they run every iteration)\n- Surface scenarios → `iteration` (default, refined during scoping)\n\nSet command to `TBD` — the implementing iterations will fill these in.\n\n### 10. Validate\n\nResolve [skills\u002Fextract-requirements\u002Fscripts\u002Fvalidate_requirements_index.mjs](scripts\u002Fvalidate_requirements_index.mjs)\nas `\u003Cresolved-validate_requirements_index.mjs>` and\n[skills\u002Fextract-requirements\u002Fscripts\u002Fvalidate_scenarios.mjs](scripts\u002Fvalidate_scenarios.mjs) as\n`\u003Cresolved-validate_scenarios.mjs>`, relative to this loaded document. Then run:\n\n```bash\nnode \"\u003Cresolved-validate_requirements_index.mjs>\" docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F\nnode \"\u003Cresolved-validate_scenarios.mjs>\" docs\u002Fmoe\u002Fiterations\u002Fbehavior-scenarios.md docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F\n```\n\nIf validation fails, inspect the output, fix formatting issues, and re-validate.\n\n### 11. Commit\n\n```bash\ngit add docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F\ngit add docs\u002Fmoe\u002Fiterations\u002Fbehavior-scenarios.md\ngit add docs\u002Fmoe\u002Fiterations\u002Fbehavior-corpus.md\ngit commit -m \"docs: add requirements with proof obligations, behavior scenarios, and corpus index\"\n```\n\n## Quick Reference\n\n| Step | Tool | Input | Output |\n|---|---|---|---|\n| Chunk | `scripts\u002Fchunk_spec.mjs` | spec path | JSON chunks (stdout) |\n| Extract | Subagent + `extraction-subagent-prompt.md` | chunk content | JSON stories + scenarios (per subagent) |\n| Omission review | PAR (source text vs. stories + scenarios) | chunks + stories + scenarios | Missing requirements and scenarios |\n| Aggregate stories | `scripts\u002Faggregate_stories.mjs -o \u003Cdir>` | JSON files | Per-epic .md files with proof obligations |\n| Aggregate scenarios | `scripts\u002Faggregate_scenarios.mjs -o \u003Cfile>` | JSON files + stories dir | `behavior-scenarios.md` |\n| Back-link | `scripts\u002Fbacklink_scenarios.mjs` | scenarios + stories | Updated AC lines with scenario refs |\n| Coverage ledger | Map chunks → story IDs + scenario IDs | chunk list, stories, scenarios | Gap\u002Fcovered\u002Fstory-only per chunk |\n| Init corpus | Write corpus index | scenario list | `behavior-corpus.md` |\n| Validate | `scripts\u002Fvalidate_requirements_index.mjs` + `scripts\u002Fvalidate_scenarios.mjs` | .md files | OK or errors |\n\n## Deferred to later plans\n\nHierarchical reduce (specs > 1M tokens), huge-spec decomposition, incremental re-extraction.\n","# Extracting Requirements\n\n## Overview\n\nReads arbitrary human spec collateral and produces two artifact sets:\n1. **Per-epic requirement files** in `docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F` — story cards with proof obligations per AC\n2. **Behavior scenarios** in `docs\u002Fmoe\u002Fiterations\u002Fbehavior-scenarios.md` — reusable observable-behavior contracts with stable IDs\n\nUses a chunking + parallel-dispatch + aggregation pipeline so that no single agent holds the entire spec in context. Handles specs from a single page up to ~100K tokens across dozens of files.\n\n## When to Use\n\nInvoked by `iterate` during bootstrap, or standalone when you need to regenerate requirements from human spec collateral.\n\n## Script Location\n\nAll scripts referenced below live in this skill's `scripts\u002F` directory, next to this SKILL.md file.\n\n## Key Concept: Spec Taxonomy\n\nThe spec directory structure drives proof seam classification. Resolve [skills\u002F_shared\u002Fbehavior-evidence-formats.md](..\u002F_shared\u002Fbehavior-evidence-formats.md) relative to this loaded document for the full taxonomy. Summary:\n\n| Spec directory | Default proof seam |\n|---|---|\n| `test-vectors\u002F` | unit |\n| `contracts\u002F` | integration |\n| `domains\u002F` | integration or app-level |\n| `journeys\u002F` | e2e |\n\nExtraction subagents use the appropriate prompt variant based on source file location.\n\n## Pipeline\n\n### 1. Inventory\n\nEnumerate the spec files without reading full contents:\n\nResolve [skills\u002Fextract-requirements\u002Fscripts\u002Fchunk_spec.mjs](scripts\u002Fchunk_spec.mjs) relative to this loaded document, then invoke it as `node \"\u003Cresolved-chunk_spec.mjs>\" \u003Cspec-path>`.\n\nThis produces a JSON array of chunks. Each chunk has `source_file`, `heading`, `start_line`, `end_line`, `content`, and `estimated_tokens`. Small files (\u003C 4K tokens) are kept whole. Larger files are split by `##` headings, or `###` if sections are still too large.\n\n**Classify each chunk by spec taxonomy:** note whether the source file is under `journeys\u002F`, `contracts\u002F`, `domains\u002F`, or `test-vectors\u002F`. This determines which extraction prompt variant to use.\n\n### 2. Dispatch extraction subagents\n\nFor each chunk (or batch of small chunks), dispatch an extraction subagent using the appropriate template from `extraction-subagent-prompt.md`:\n\n- Chunks from `journeys\u002F` → use the **Journey Extraction** prompt variant\n- All other chunks → use the **Standard Extraction** prompt variant\n\nPass the chunk content inline — do NOT make the subagent read the file.\n\n**Payload integrity:** If your platform has output token limits that could truncate the chunk before it reaches the subagent prompt, stage each chunk individually and verify the subagent received the complete content (e.g., by checking that the extracted stories reference lines from the full range of the chunk). Partial payloads are easy to miss and cause silent under-extraction.\n\n**Dispatch strategy:**\n- Dispatch subagents in waves of 3-5 (runtime agent thread limits are typically 6; keep headroom). Do not fan out all chunks at once.\n- **Persist immediately:** as soon as each subagent returns, write its output to a temp file (e.g., a scratch directory under the project root) before dispatching more work. Subagent results that only exist in conversation state can be lost if the session fails.\n- **Wait semantics:** loop until every dispatched agent in the wave has reached a final state, persisting each result as it arrives.\n\n  OpenCode's `task` tool call blocks until the subagent returns its\n  result in the tool response — there is no separate polling step. Read\n  the returned result directly; for multiple independent `task`\n  dispatches issued in one turn, each result arrives before you\n  continue.\n\n- Close completed agents promptly to free thread slots for the next wave.\n- **Track completion:** maintain a checklist of chunk-to-agent mappings. After all waves finish, verify every chunk produced a persisted output file. Re-dispatch any missing chunks before proceeding.\n\n### 3. PAR omission review\n\nBefore aggregation, run a PAR omission review. The sole job of this review is to find requirements AND scenarios that the extraction subagents dropped.\n\nFor each chunk (or batch of chunks), dispatch two reviewers in parallel following [skills\u002F_shared\u002Fparallel-adversarial-review.md](..\u002F_shared\u002Fparallel-adversarial-review.md), resolved relative to this loaded document:\n\n1. Give each reviewer the **original chunk text** and the **extracted stories + scenarios** for that chunk\n2. Prompt: \"Compare the source text against the extracted stories and scenarios. Find every requirement, acceptance criterion, behavioral constraint, or observable behavior in the source that is NOT represented by any extracted story or scenario. Score 5 points for each omission found. Pay special attention to: (a) ACs missing proof obligations, (b) observable behavior with no scenario, (c) journey steps that were summarized or skipped.\"\n3. Aggregate findings across both reviewers\n4. For each confirmed omission: either add a new story\u002Fscenario to the extraction output or document why it's intentionally excluded\n\nThis pass is required, not optional. Extraction subagents optimize for what they notice; omission reviewers optimize for what's missing.\n\n### 4. Aggregate stories\n\nRun the story aggregation script on all extracted story JSONs (including any added by the omission review):\n\nResolve [skills\u002Fextract-requirements\u002Fscripts\u002Faggregate_stories.mjs](scripts\u002Faggregate_stories.mjs) relative to this loaded document, then invoke it as `node \"\u003Cresolved-aggregate_stories.mjs>\" -o docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F \u003Cjson-file-1> \u003Cjson-file-2> ...`.\n\nThe script combines stories, deduplicates matching theme + trimmed title + body identities (never blank titles), groups them into epics, assigns stable STORY\u002FEPIC IDs, and outputs per-epic files with proof obligations preserved.\n\n### 5. Aggregate scenarios\n\nRun the scenario aggregation script:\n\nResolve [skills\u002Fextract-requirements\u002Fscripts\u002Faggregate_scenarios.mjs](scripts\u002Faggregate_scenarios.mjs) relative to this loaded document, then invoke it as `node \"\u003Cresolved-aggregate_scenarios.mjs>\" -o docs\u002Fmoe\u002Fiterations\u002Fbehavior-scenarios.md --stories-dir docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F \u003Cjson-file-1> \u003Cjson-file-2> ...`.\n\nThe script combines, deduplicates by title, assigns stable SCENARIO\u002FJOURNEY IDs, resolves story title references to STORY-IDs, and outputs `behavior-scenarios.md`.\n\n### 6. Consolidate epics\n\nSame as before: review the epic list, merge near-duplicates, re-run aggregation. See the consolidation rules in the original extraction skill documentation.\n\n**Additional consolidation check:** after merging, verify that scenario `owning_story_titles` still resolve correctly. If stories were deduplicated during re-aggregation, re-run scenario aggregation to update resolved refs.\n\n### 7. Back-link scenarios to stories\n\nAfter both aggregations complete, run the back-linking script to update per-epic story files with scenario references:\n\nResolve [skills\u002Fextract-requirements\u002Fscripts\u002Fbacklink_scenarios.mjs](scripts\u002Fbacklink_scenarios.mjs) relative to this loaded document, then invoke it as `node \"\u003Cresolved-backlink_scenarios.mjs>\" docs\u002Fmoe\u002Fiterations\u002Fbehavior-scenarios.md docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F`.\n\nThe script reads scenario → owning-story mappings from `behavior-scenarios.md` and appends `scenario:SCENARIO-NNNN` or `scenario:JOURNEY-NNNN` to AC lines in the epic files that have observable behavioral impact. AC lines that already have scenario refs are skipped.\n\nThis creates the bidirectional link: stories → scenarios (via AC lines) and scenarios → stories (via owning_stories field).\n\n### 8. Coverage ledger\n\nBuild a coverage ledger that maps every spec chunk to its extracted stories AND scenarios. This is the traceable proof that extraction is complete.\n\nFor each chunk from the inventory (step 1):\n\n1. List the chunk: `source_file`, `heading`, `start_line`–`end_line`\n2. List every story ID whose `**Sources:**` field cites overlapping lines in that file\n3. List every scenario ID whose `**Sources:**` field cites overlapping lines in that file\n4. Classify the chunk:\n   - **covered** — stories with ACs that correspond to normative content AND scenarios for observable behavior\n   - **story-only** — stories exist but observable behavior has no scenario (needs scenario)\n   - **non-normative** — chunk contains only meta-commentary, table of contents, or boilerplate (explain why)\n   - **duplicate** — chunk's requirements are covered by stories citing a different source\n   - **gap** — normative content with no corresponding story\n\n**Hard gates:**\n- If any chunk is classified as **gap**, extraction is incomplete. Re-extract and repeat.\n- If any chunk is classified as **story-only** and contains observable behavior, extraction is incomplete. Add scenarios for the missing observable behavior.\n\n**Journey coverage check:** every journey spec file MUST produce at least one JOURNEY-NNNN scenario that preserves the complete step sequence. If a journey file only produced stories (no journey scenario), that is a gap.\n\n### 9. Initialize behavior corpus index\n\nCreate the initial `docs\u002Fmoe\u002Fiterations\u002Fbehavior-corpus.md` from the scenario list:\n\n```markdown\n# Behavior Corpus\n\n| Scenario ID | Title | Proof seam | Run cadence | Command | Owning stories |\n|---|---|---|---|---|---|\n```\n\nPopulate with all scenarios. Set run cadence:\n- Journey scenarios → `sentinel` (they run every iteration)\n- Surface scenarios → `iteration` (default, refined during scoping)\n\nSet command to `TBD` — the implementing iterations will fill these in.\n\n### 10. Validate\n\nResolve [skills\u002Fextract-requirements\u002Fscripts\u002Fvalidate_requirements_index.mjs](scripts\u002Fvalidate_requirements_index.mjs)\nas `\u003Cresolved-validate_requirements_index.mjs>` and\n[skills\u002Fextract-requirements\u002Fscripts\u002Fvalidate_scenarios.mjs](scripts\u002Fvalidate_scenarios.mjs) as\n`\u003Cresolved-validate_scenarios.mjs>`, relative to this loaded document. Then run:\n\n```bash\nnode \"\u003Cresolved-validate_requirements_index.mjs>\" docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F\nnode \"\u003Cresolved-validate_scenarios.mjs>\" docs\u002Fmoe\u002Fiterations\u002Fbehavior-scenarios.md docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F\n```\n\nIf validation fails, inspect the output, fix formatting issues, and re-validate.\n\n### 11. Commit\n\n```bash\ngit add docs\u002Fmoe\u002Fiterations\u002Frequirements\u002F\ngit add docs\u002Fmoe\u002Fiterations\u002Fbehavior-scenarios.md\ngit add docs\u002Fmoe\u002Fiterations\u002Fbehavior-corpus.md\ngit commit -m \"docs: add requirements with proof obligations, behavior scenarios, and corpus index\"\n```\n\n## Quick Reference\n\n| Step | Tool | Input | Output |\n|---|---|---|---|\n| Chunk | `scripts\u002Fchunk_spec.mjs` | spec path | JSON chunks (stdout) |\n| Extract | Subagent + `extraction-subagent-prompt.md` | chunk content | JSON stories + scenarios (per subagent) |\n| Omission review | PAR (source text vs. stories + scenarios) | chunks + stories + scenarios | Missing requirements and scenarios |\n| Aggregate stories | `scripts\u002Faggregate_stories.mjs -o \u003Cdir>` | JSON files | Per-epic .md files with proof obligations |\n| Aggregate scenarios | `scripts\u002Faggregate_scenarios.mjs -o \u003Cfile>` | JSON files + stories dir | `behavior-scenarios.md` |\n| Back-link | `scripts\u002Fbacklink_scenarios.mjs` | scenarios + stories | Updated AC lines with scenario refs |\n| Coverage ledger | Map chunks → story IDs + scenario IDs | chunk list, stories, scenarios | Gap\u002Fcovered\u002Fstory-only per chunk |\n| Init corpus | Write corpus index | scenario list | `behavior-corpus.md` |\n| Validate | `scripts\u002Fvalidate_requirements_index.mjs` + `scripts\u002Fvalidate_scenarios.mjs` | .md files | OK or errors |\n\n## Deferred to later plans\n\nHierarchical reduce (specs > 1M tokens), huge-spec decomposition, incremental re-extraction.\n",{"name":5,"description":7},"main","728894f3f85fbd4e788f015ddfd72bb6155d5dd5","plugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fextract-requirements",1,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe","https:\u002F\u002Fgithub.com\u002Fzak-keown","2026-09-05 06:29:06",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add zak-keown\u002Fmoe --skill extract-requirements",{"tool":36,"command":37},"bunx","bunx skills add zak-keown\u002Fmoe --skill extract-requirements",{"tool":39,"command":40},"pnpm","pnpm dlx skills add zak-keown\u002Fmoe --skill extract-requirements","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fextract-requirements\u002FSKILL.md",true,[44,50,56,60,64,68,72,76],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"extraction-subagent-prompt.md","REFERENCE","参考文档",7366,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fextract-requirements\u002Fextraction-subagent-prompt.md",{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"scripts\u002Faggregate_scenarios.mjs","SCRIPT","脚本",13485,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fextract-requirements\u002Fscripts\u002Faggregate_scenarios.mjs",{"path":57,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":58,"sourceHtmlUrl":59},"scripts\u002Faggregate_stories.mjs",11195,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fextract-requirements\u002Fscripts\u002Faggregate_stories.mjs",{"path":61,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":62,"sourceHtmlUrl":63},"scripts\u002Fbacklink_scenarios.mjs",5338,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fextract-requirements\u002Fscripts\u002Fbacklink_scenarios.mjs",{"path":65,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":66,"sourceHtmlUrl":67},"scripts\u002Fchunk_spec.mjs",9311,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fextract-requirements\u002Fscripts\u002Fchunk_spec.mjs",{"path":69,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":70,"sourceHtmlUrl":71},"scripts\u002Fpython_compat.mjs",2949,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fextract-requirements\u002Fscripts\u002Fpython_compat.mjs",{"path":73,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":74,"sourceHtmlUrl":75},"scripts\u002Fvalidate_requirements_index.mjs",5376,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fextract-requirements\u002Fscripts\u002Fvalidate_requirements_index.mjs",{"path":77,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Fvalidate_scenarios.mjs",6377,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fextract-requirements\u002Fscripts\u002Fvalidate_scenarios.mjs",[81,88,95,102,109,116],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M7C1Z5362Y8NVRZ69HWP0ZD0","write-skill","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-skill\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M7C1YZ9966WK9R6ZRPCGWF3G","write-plan","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-plan\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M7C1YMR4SJD7BPBBPXZCVGVH","write-clearly","Apply Strunk's timeless writing rules to ANY prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Makes your writing clearer, stronger, and more professional.","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-clearly\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":18},"01M7C1YH9805YSM0N20VQAVSXF","windows-vm","Create, manage, or connect to a headless Windows 11 VM running in Docker with SSH access. Use when the user wants to spin up, stop, restart, or SSH into a Windows VM.","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwindows-vm\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":18},"01M7C1YD87SCNEJ2C9B8HFR2NQ","verify-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating MRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fverify-completion\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":18},"01M7C1YARDEHT0TJ9BRG30ZCF4","using-moe","Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fusing-moe\u002FSKILL.md",[],[]]