ワンクリックで
mspec-archive
archive step of mspec workflow — deterministic merge into SoT spec and archive move
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
archive step of mspec workflow — deterministic merge into SoT spec and archive move
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
archive ステップ完了後に Lessons を分析し constitution.md への追加提案を生成するサブエージェント
archive ステップ完了後に Next Steps を評価し優先度付きのチェンジ登録提案を生成するサブエージェント
proposal step of mspec workflow — clarify intent and write proposal.md
archive step of mspec workflow — deterministic merge into SoT spec and archive move
checklist step of mspec workflow — produce checklist.md via subagent
delta step of mspec workflow — generate Delta Spec with auto-numbered FR-NNN
| name | mspec-archive |
| description | archive step of mspec workflow — deterministic merge into SoT spec and archive move |
| when_to_use | User runs /mspec:archive, or workflow auto-continues to archive |
mspec status --change <change-dir> --json and confirm all prior steps are done or skipped.mspec archive <change-dir> --dry-run and show the diff to the user.
3b. Read the full content of the change directory — all artifacts (proposal, research, design, design-rationale, checklist, tasks) and the confirmed Delta Spec requirements. Generate a ## Summary (Lessons / Next Steps) section with:
### Lessons — 3-5 bullet points (1-2 lines each) summarizing: what was learned, what worked well, what was surprising, Constitution Check ⚠️/❌ items and their resolution.### Next Steps — 2-4 bullet points (1 line + related FR-ID link) identifying: follow-up changes needed, open choices left unresolved, RENAMED requirements deferred.
Keep total length ≤ 30 lines / 1,500 characters.
Replace the placeholder comment <!-- archive ステップで AI が生成 --> (or <!-- archive step will auto-fill -->) in changes/<change-dir>/readme.md with this generated content.
This step MUST complete before step 3 (the mspec archive -y call) so that the filled readme is present when the CLI validates and moves the change directory.mspec archive <change-dir> -y. The CLI:
specs/<capability>/spec.md (no LLM involved).changes/<change-dir>/ → changes/archive/<change-dir>/ via git mv.mspec anchor check to confirm anchors still resolve.3c. [ポストモーテムフック] archive 完了後、以下の 2 フローを順番に実行する。
Lessons 分析フロー:
changes/archive/<change-dir>/readme.md### Lessons セクションの存在と内容を確認するmspec-lessons-analyzer サブエージェントを Agent tool でインライン起動する:
Agent(prompt="...", subagent_type="mspec-lessons-analyzer")
入力: { readme_path: "<絶対パス>" }
LessonsProposal[] が空の場合はスキップして通知するQ: constitution.md に追加する原則・制約を選択してください(複数選択可)
Options: 各提案の text と target_section と source_lesson を表示
memory/constitution.md の指定セクションに追記する:
target_section = "Core Principles" → ## Core Principles セクション末尾に追記target_section = "Additional Constraints" → ## Additional Constraints の箇条書き末尾に追記Next Steps 評価フロー:
### Next Steps セクションの存在と内容を確認するmspec-nextaction-planner サブエージェントを Agent tool でインライン起動する:
Agent(prompt="...", subagent_type="mspec-nextaction-planner")
入力: { readme_path: "<絶対パス>" }
NextActionProposal[] が空の場合はスキップして通知するQ: 新しいチェンジとして登録する Next Steps を選択してください(複数選択可)
Options: [HIGH/MEDIUM/LOW] kebab_name: summary
request_summary フィールドが存在する場合は mspec new <kebab_name> --request "<request_summary>" を実行し、存在しない場合は mspec new <kebab_name> にフォールバックする(changes/ 配下のみ)
"・$・バックティック・\ を含まないことが保証済み)mspec new を実行しない3d. [Purpose 自動生成] archive 完了後、以下の手順でアーカイブ対象 capability の ## Purpose フィールドを自動生成する:
Delta Spec のパス(changes/archive/<change>/specs/*/spec.md)から capability 名を抽出する
各 capability について specs/<capability>/spec.md を読む
## Purpose セクションの内容がテンプレートプレースホルダー(<このスペックがカバーする外部から観測可能な振る舞いの概要>)と完全一致する場合:
a. ## Requirements セクション以下の内容を読む
b. Requirements を基に、このスペックが外部から観測可能な振る舞いを 1〜2 文で要約する(locale 設定に従い ja→日本語/en→英語)
c. プレースホルダーを生成した文章で置き換えて specs/<capability>/spec.md に書き込む
Purpose が既にプレースホルダー以外のテキストで記述済みの場合はスキップする(べき等性)
複数 capability のうち一部の生成が失敗した場合は skip-and-continue とし、失敗した capability を「Purpose 未生成: <capability>」としてマージサマリーに記録して残りを続行する
Report the merge summary to the user. Workflow complete.
mspec archive <change> --dry-run — マージ差分の事前確認mspec anchor check — アーカイブ後のアンカー解決確認mspec validate --change <change> — アーティファクト整合性チェックこのスキルの実行で発生した学習候補を記録する:
<!-- LEARNING: <パターン説明> | source: <FR-ID> | confidence: low|medium|high -->
mspec learn コマンドが archive 済み changes からこれらを収集してpost-condition候補をproposeする。