mdfetch 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mdfetch-0.1.0/.claude/skills/speckit-analyze/SKILL.md +260 -0
- mdfetch-0.1.0/.claude/skills/speckit-archive-run/SKILL.md +431 -0
- mdfetch-0.1.0/.claude/skills/speckit-checklist/SKILL.md +372 -0
- mdfetch-0.1.0/.claude/skills/speckit-clarify/SKILL.md +254 -0
- mdfetch-0.1.0/.claude/skills/speckit-constitution/SKILL.md +157 -0
- mdfetch-0.1.0/.claude/skills/speckit-git-commit/SKILL.md +53 -0
- mdfetch-0.1.0/.claude/skills/speckit-git-feature/SKILL.md +72 -0
- mdfetch-0.1.0/.claude/skills/speckit-git-initialize/SKILL.md +54 -0
- mdfetch-0.1.0/.claude/skills/speckit-git-remote/SKILL.md +50 -0
- mdfetch-0.1.0/.claude/skills/speckit-git-validate/SKILL.md +54 -0
- mdfetch-0.1.0/.claude/skills/speckit-implement/SKILL.md +210 -0
- mdfetch-0.1.0/.claude/skills/speckit-plan/SKILL.md +152 -0
- mdfetch-0.1.0/.claude/skills/speckit-reconcile-run/SKILL.md +193 -0
- mdfetch-0.1.0/.claude/skills/speckit-specify/SKILL.md +330 -0
- mdfetch-0.1.0/.claude/skills/speckit-tasks/SKILL.md +202 -0
- mdfetch-0.1.0/.claude/skills/speckit-taskstoissues/SKILL.md +106 -0
- mdfetch-0.1.0/.gemini/commands/speckit.analyze.toml +249 -0
- mdfetch-0.1.0/.gemini/commands/speckit.archive.run.toml +427 -0
- mdfetch-0.1.0/.gemini/commands/speckit.checklist.toml +361 -0
- mdfetch-0.1.0/.gemini/commands/speckit.clarify.toml +243 -0
- mdfetch-0.1.0/.gemini/commands/speckit.constitution.toml +146 -0
- mdfetch-0.1.0/.gemini/commands/speckit.implement.toml +199 -0
- mdfetch-0.1.0/.gemini/commands/speckit.plan.toml +141 -0
- mdfetch-0.1.0/.gemini/commands/speckit.reconcile.run.toml +189 -0
- mdfetch-0.1.0/.gemini/commands/speckit.specify.toml +319 -0
- mdfetch-0.1.0/.gemini/commands/speckit.tasks.toml +191 -0
- mdfetch-0.1.0/.gemini/commands/speckit.taskstoissues.toml +95 -0
- mdfetch-0.1.0/.github/workflows/ci.yml +50 -0
- mdfetch-0.1.0/.github/workflows/publish.yml +55 -0
- mdfetch-0.1.0/.gitignore +218 -0
- mdfetch-0.1.0/.python-version +1 -0
- mdfetch-0.1.0/.specify/extensions/.registry +57 -0
- mdfetch-0.1.0/.specify/extensions/archive/LICENSE +21 -0
- mdfetch-0.1.0/.specify/extensions/archive/README.md +45 -0
- mdfetch-0.1.0/.specify/extensions/archive/commands/archive.md +427 -0
- mdfetch-0.1.0/.specify/extensions/archive/extension.yml +23 -0
- mdfetch-0.1.0/.specify/extensions/git/README.md +100 -0
- mdfetch-0.1.0/.specify/extensions/git/commands/speckit.git.commit.md +48 -0
- mdfetch-0.1.0/.specify/extensions/git/commands/speckit.git.feature.md +67 -0
- mdfetch-0.1.0/.specify/extensions/git/commands/speckit.git.initialize.md +49 -0
- mdfetch-0.1.0/.specify/extensions/git/commands/speckit.git.remote.md +45 -0
- mdfetch-0.1.0/.specify/extensions/git/commands/speckit.git.validate.md +49 -0
- mdfetch-0.1.0/.specify/extensions/git/config-template.yml +62 -0
- mdfetch-0.1.0/.specify/extensions/git/extension.yml +140 -0
- mdfetch-0.1.0/.specify/extensions/git/git-config.yml +62 -0
- mdfetch-0.1.0/.specify/extensions/git/scripts/bash/auto-commit.sh +140 -0
- mdfetch-0.1.0/.specify/extensions/git/scripts/bash/create-new-feature.sh +453 -0
- mdfetch-0.1.0/.specify/extensions/git/scripts/bash/git-common.sh +54 -0
- mdfetch-0.1.0/.specify/extensions/git/scripts/bash/initialize-repo.sh +54 -0
- mdfetch-0.1.0/.specify/extensions/git/scripts/powershell/auto-commit.ps1 +169 -0
- mdfetch-0.1.0/.specify/extensions/git/scripts/powershell/create-new-feature.ps1 +403 -0
- mdfetch-0.1.0/.specify/extensions/git/scripts/powershell/git-common.ps1 +51 -0
- mdfetch-0.1.0/.specify/extensions/git/scripts/powershell/initialize-repo.ps1 +69 -0
- mdfetch-0.1.0/.specify/extensions/reconcile/LICENSE +21 -0
- mdfetch-0.1.0/.specify/extensions/reconcile/README.md +47 -0
- mdfetch-0.1.0/.specify/extensions/reconcile/commands/reconcile.md +189 -0
- mdfetch-0.1.0/.specify/extensions/reconcile/extension.yml +23 -0
- mdfetch-0.1.0/.specify/extensions.yml +148 -0
- mdfetch-0.1.0/.specify/feature.json +3 -0
- mdfetch-0.1.0/.specify/init-options.json +9 -0
- mdfetch-0.1.0/.specify/integration.json +15 -0
- mdfetch-0.1.0/.specify/integrations/claude.manifest.json +16 -0
- mdfetch-0.1.0/.specify/integrations/gemini.manifest.json +16 -0
- mdfetch-0.1.0/.specify/integrations/speckit.manifest.json +17 -0
- mdfetch-0.1.0/.specify/memory/changelog.md +30 -0
- mdfetch-0.1.0/.specify/memory/constitution.md +51 -0
- mdfetch-0.1.0/.specify/memory/plan.md +171 -0
- mdfetch-0.1.0/.specify/memory/spec.md +175 -0
- mdfetch-0.1.0/.specify/scripts/bash/check-prerequisites.sh +192 -0
- mdfetch-0.1.0/.specify/scripts/bash/common.sh +645 -0
- mdfetch-0.1.0/.specify/scripts/bash/create-new-feature.sh +413 -0
- mdfetch-0.1.0/.specify/scripts/bash/setup-plan.sh +75 -0
- mdfetch-0.1.0/.specify/scripts/bash/setup-tasks.sh +96 -0
- mdfetch-0.1.0/.specify/templates/checklist-template.md +40 -0
- mdfetch-0.1.0/.specify/templates/constitution-template.md +50 -0
- mdfetch-0.1.0/.specify/templates/plan-template.md +117 -0
- mdfetch-0.1.0/.specify/templates/spec-template.md +129 -0
- mdfetch-0.1.0/.specify/templates/tasks-template.md +252 -0
- mdfetch-0.1.0/.specify/workflows/speckit/workflow.yml +63 -0
- mdfetch-0.1.0/.specify/workflows/workflow-registry.json +13 -0
- mdfetch-0.1.0/CLAUDE.md +52 -0
- mdfetch-0.1.0/GEMINI.md +1 -0
- mdfetch-0.1.0/LICENSE +21 -0
- mdfetch-0.1.0/Makefile +28 -0
- mdfetch-0.1.0/PKG-INFO +105 -0
- mdfetch-0.1.0/README.md +74 -0
- mdfetch-0.1.0/pyproject.toml +64 -0
- mdfetch-0.1.0/specs/001-mdfetch-medium-extractor/checklists/requirements.md +39 -0
- mdfetch-0.1.0/specs/001-mdfetch-medium-extractor/contracts/api.md +153 -0
- mdfetch-0.1.0/specs/001-mdfetch-medium-extractor/data-model.md +127 -0
- mdfetch-0.1.0/specs/001-mdfetch-medium-extractor/plan.md +100 -0
- mdfetch-0.1.0/specs/001-mdfetch-medium-extractor/quickstart.md +82 -0
- mdfetch-0.1.0/specs/001-mdfetch-medium-extractor/research.md +162 -0
- mdfetch-0.1.0/specs/001-mdfetch-medium-extractor/spec.md +123 -0
- mdfetch-0.1.0/specs/001-mdfetch-medium-extractor/tasks.md +204 -0
- mdfetch-0.1.0/src/mdfetch/__init__.py +35 -0
- mdfetch-0.1.0/src/mdfetch/base.py +93 -0
- mdfetch-0.1.0/src/mdfetch/exceptions.py +40 -0
- mdfetch-0.1.0/src/mdfetch/providers/__init__.py +0 -0
- mdfetch-0.1.0/src/mdfetch/providers/medium.py +67 -0
- mdfetch-0.1.0/src/mdfetch/router.py +65 -0
- mdfetch-0.1.0/tests/__init__.py +0 -0
- mdfetch-0.1.0/tests/conftest.py +0 -0
- mdfetch-0.1.0/tests/integration/__init__.py +0 -0
- mdfetch-0.1.0/tests/integration/snapshots/architecting-the-asynchronous-agent.md +335 -0
- mdfetch-0.1.0/tests/integration/snapshots/from-drift-to-parity.md +132 -0
- mdfetch-0.1.0/tests/integration/snapshots/integration-digest-december-2025.md +131 -0
- mdfetch-0.1.0/tests/integration/test_medium_integration.py +50 -0
- mdfetch-0.1.0/tests/unit/__init__.py +0 -0
- mdfetch-0.1.0/tests/unit/test_fetch_errors.py +93 -0
- mdfetch-0.1.0/tests/unit/test_medium_extractor.py +144 -0
- mdfetch-0.1.0/tests/unit/test_router.py +64 -0
- mdfetch-0.1.0/tests/unit/test_silent.py +80 -0
- mdfetch-0.1.0/uv.lock +484 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "speckit-analyze"
|
|
3
|
+
description: "Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation."
|
|
4
|
+
argument-hint: "Optional focus areas for analysis"
|
|
5
|
+
compatibility: "Requires spec-kit project structure with .specify/ directory"
|
|
6
|
+
metadata:
|
|
7
|
+
author: "github-spec-kit"
|
|
8
|
+
source: "templates/commands/analyze.md"
|
|
9
|
+
user-invocable: true
|
|
10
|
+
disable-model-invocation: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## User Input
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
$ARGUMENTS
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
21
|
+
|
|
22
|
+
## Pre-Execution Checks
|
|
23
|
+
|
|
24
|
+
**Check for extension hooks (before analysis)**:
|
|
25
|
+
- Check if `.specify/extensions.yml` exists in the project root.
|
|
26
|
+
- If it exists, read it and look for entries under the `hooks.before_analyze` key
|
|
27
|
+
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
|
|
28
|
+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
|
|
29
|
+
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
|
|
30
|
+
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
|
|
31
|
+
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
|
|
32
|
+
- When constructing slash commands from hook command names, replace dots (`.`) with hyphens (`-`). For example, `speckit.git.commit` → `/speckit-git-commit`.
|
|
33
|
+
- For each executable hook, output the following based on its `optional` flag:
|
|
34
|
+
- **Optional hook** (`optional: true`):
|
|
35
|
+
```
|
|
36
|
+
## Extension Hooks
|
|
37
|
+
|
|
38
|
+
**Optional Pre-Hook**: {extension}
|
|
39
|
+
Command: `/{command}`
|
|
40
|
+
Description: {description}
|
|
41
|
+
|
|
42
|
+
Prompt: {prompt}
|
|
43
|
+
To execute: `/{command}`
|
|
44
|
+
```
|
|
45
|
+
- **Mandatory hook** (`optional: false`):
|
|
46
|
+
```
|
|
47
|
+
## Extension Hooks
|
|
48
|
+
|
|
49
|
+
**Automatic Pre-Hook**: {extension}
|
|
50
|
+
Executing: `/{command}`
|
|
51
|
+
EXECUTE_COMMAND: {command}
|
|
52
|
+
|
|
53
|
+
Wait for the result of the hook command before proceeding to the Goal.
|
|
54
|
+
```
|
|
55
|
+
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
|
|
56
|
+
|
|
57
|
+
## Goal
|
|
58
|
+
|
|
59
|
+
Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (`spec.md`, `plan.md`, `tasks.md`) before implementation. This command MUST run only after `/speckit-tasks` has successfully produced a complete `tasks.md`.
|
|
60
|
+
|
|
61
|
+
## Operating Constraints
|
|
62
|
+
|
|
63
|
+
**STRICTLY READ-ONLY**: Do **not** modify any files. Output a structured analysis report. Offer an optional remediation plan (user must explicitly approve before any follow-up editing commands would be invoked manually).
|
|
64
|
+
|
|
65
|
+
**Constitution Authority**: The project constitution (`.specify/memory/constitution.md`) is **non-negotiable** within this analysis scope. Constitution conflicts are automatically CRITICAL and require adjustment of the spec, plan, or tasks—not dilution, reinterpretation, or silent ignoring of the principle. If a principle itself needs to change, that must occur in a separate, explicit constitution update outside `/speckit-analyze`.
|
|
66
|
+
|
|
67
|
+
## Execution Steps
|
|
68
|
+
|
|
69
|
+
### 1. Initialize Analysis Context
|
|
70
|
+
|
|
71
|
+
Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:
|
|
72
|
+
|
|
73
|
+
- SPEC = FEATURE_DIR/spec.md
|
|
74
|
+
- PLAN = FEATURE_DIR/plan.md
|
|
75
|
+
- TASKS = FEATURE_DIR/tasks.md
|
|
76
|
+
|
|
77
|
+
Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command).
|
|
78
|
+
For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
|
|
79
|
+
|
|
80
|
+
### 2. Load Artifacts (Progressive Disclosure)
|
|
81
|
+
|
|
82
|
+
Load only the minimal necessary context from each artifact:
|
|
83
|
+
|
|
84
|
+
**From spec.md:**
|
|
85
|
+
|
|
86
|
+
- Overview/Context
|
|
87
|
+
- Functional Requirements
|
|
88
|
+
- Success Criteria (measurable outcomes — e.g., performance, security, availability, user success, business impact)
|
|
89
|
+
- User Stories
|
|
90
|
+
- Edge Cases (if present)
|
|
91
|
+
|
|
92
|
+
**From plan.md:**
|
|
93
|
+
|
|
94
|
+
- Architecture/stack choices
|
|
95
|
+
- Data Model references
|
|
96
|
+
- Phases
|
|
97
|
+
- Technical constraints
|
|
98
|
+
|
|
99
|
+
**From tasks.md:**
|
|
100
|
+
|
|
101
|
+
- Task IDs
|
|
102
|
+
- Descriptions
|
|
103
|
+
- Phase grouping
|
|
104
|
+
- Parallel markers [P]
|
|
105
|
+
- Referenced file paths
|
|
106
|
+
|
|
107
|
+
**From constitution:**
|
|
108
|
+
|
|
109
|
+
- Load `.specify/memory/constitution.md` for principle validation
|
|
110
|
+
|
|
111
|
+
### 3. Build Semantic Models
|
|
112
|
+
|
|
113
|
+
Create internal representations (do not include raw artifacts in output):
|
|
114
|
+
|
|
115
|
+
- **Requirements inventory**: For each Functional Requirement (FR-###) and Success Criterion (SC-###), record a stable key. Use the explicit FR-/SC- identifier as the primary key when present, and optionally also derive an imperative-phrase slug for readability (e.g., "User can upload file" → `user-can-upload-file`). Include only Success Criteria items that require buildable work (e.g., load-testing infrastructure, security audit tooling), and exclude post-launch outcome metrics and business KPIs (e.g., "Reduce support tickets by 50%").
|
|
116
|
+
- **User story/action inventory**: Discrete user actions with acceptance criteria
|
|
117
|
+
- **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
|
|
118
|
+
- **Constitution rule set**: Extract principle names and MUST/SHOULD normative statements
|
|
119
|
+
|
|
120
|
+
### 4. Detection Passes (Token-Efficient Analysis)
|
|
121
|
+
|
|
122
|
+
Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.
|
|
123
|
+
|
|
124
|
+
#### A. Duplication Detection
|
|
125
|
+
|
|
126
|
+
- Identify near-duplicate requirements
|
|
127
|
+
- Mark lower-quality phrasing for consolidation
|
|
128
|
+
|
|
129
|
+
#### B. Ambiguity Detection
|
|
130
|
+
|
|
131
|
+
- Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria
|
|
132
|
+
- Flag unresolved placeholders (TODO, TKTK, ???, `<placeholder>`, etc.)
|
|
133
|
+
|
|
134
|
+
#### C. Underspecification
|
|
135
|
+
|
|
136
|
+
- Requirements with verbs but missing object or measurable outcome
|
|
137
|
+
- User stories missing acceptance criteria alignment
|
|
138
|
+
- Tasks referencing files or components not defined in spec/plan
|
|
139
|
+
|
|
140
|
+
#### D. Constitution Alignment
|
|
141
|
+
|
|
142
|
+
- Any requirement or plan element conflicting with a MUST principle
|
|
143
|
+
- Missing mandated sections or quality gates from constitution
|
|
144
|
+
|
|
145
|
+
#### E. Coverage Gaps
|
|
146
|
+
|
|
147
|
+
- Requirements with zero associated tasks
|
|
148
|
+
- Tasks with no mapped requirement/story
|
|
149
|
+
- Success Criteria requiring buildable work (performance, security, availability) not reflected in tasks
|
|
150
|
+
|
|
151
|
+
#### F. Inconsistency
|
|
152
|
+
|
|
153
|
+
- Terminology drift (same concept named differently across files)
|
|
154
|
+
- Data entities referenced in plan but absent in spec (or vice versa)
|
|
155
|
+
- Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note)
|
|
156
|
+
- Conflicting requirements (e.g., one requires Next.js while other specifies Vue)
|
|
157
|
+
|
|
158
|
+
### 5. Severity Assignment
|
|
159
|
+
|
|
160
|
+
Use this heuristic to prioritize findings:
|
|
161
|
+
|
|
162
|
+
- **CRITICAL**: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality
|
|
163
|
+
- **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion
|
|
164
|
+
- **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case
|
|
165
|
+
- **LOW**: Style/wording improvements, minor redundancy not affecting execution order
|
|
166
|
+
|
|
167
|
+
### 6. Produce Compact Analysis Report
|
|
168
|
+
|
|
169
|
+
Output a Markdown report (no file writes) with the following structure:
|
|
170
|
+
|
|
171
|
+
## Specification Analysis Report
|
|
172
|
+
|
|
173
|
+
| ID | Category | Severity | Location(s) | Summary | Recommendation |
|
|
174
|
+
|----|----------|----------|-------------|---------|----------------|
|
|
175
|
+
| A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
|
|
176
|
+
|
|
177
|
+
(Add one row per finding; generate stable IDs prefixed by category initial.)
|
|
178
|
+
|
|
179
|
+
**Coverage Summary Table:**
|
|
180
|
+
|
|
181
|
+
| Requirement Key | Has Task? | Task IDs | Notes |
|
|
182
|
+
|-----------------|-----------|----------|-------|
|
|
183
|
+
|
|
184
|
+
**Constitution Alignment Issues:** (if any)
|
|
185
|
+
|
|
186
|
+
**Unmapped Tasks:** (if any)
|
|
187
|
+
|
|
188
|
+
**Metrics:**
|
|
189
|
+
|
|
190
|
+
- Total Requirements
|
|
191
|
+
- Total Tasks
|
|
192
|
+
- Coverage % (requirements with >=1 task)
|
|
193
|
+
- Ambiguity Count
|
|
194
|
+
- Duplication Count
|
|
195
|
+
- Critical Issues Count
|
|
196
|
+
|
|
197
|
+
### 7. Provide Next Actions
|
|
198
|
+
|
|
199
|
+
At end of report, output a concise Next Actions block:
|
|
200
|
+
|
|
201
|
+
- If CRITICAL issues exist: Recommend resolving before `/speckit-implement`
|
|
202
|
+
- If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
|
|
203
|
+
- Provide explicit command suggestions: e.g., "Run /speckit-specify with refinement", "Run /speckit-plan to adjust architecture", "Manually edit tasks.md to add coverage for 'performance-metrics'"
|
|
204
|
+
|
|
205
|
+
### 8. Offer Remediation
|
|
206
|
+
|
|
207
|
+
Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)
|
|
208
|
+
|
|
209
|
+
### 9. Check for extension hooks
|
|
210
|
+
|
|
211
|
+
After reporting, check if `.specify/extensions.yml` exists in the project root.
|
|
212
|
+
- If it exists, read it and look for entries under the `hooks.after_analyze` key
|
|
213
|
+
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
|
|
214
|
+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
|
|
215
|
+
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
|
|
216
|
+
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
|
|
217
|
+
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
|
|
218
|
+
- When constructing slash commands from hook command names, replace dots (`.`) with hyphens (`-`). For example, `speckit.git.commit` → `/speckit-git-commit`.
|
|
219
|
+
- For each executable hook, output the following based on its `optional` flag:
|
|
220
|
+
- **Optional hook** (`optional: true`):
|
|
221
|
+
```
|
|
222
|
+
## Extension Hooks
|
|
223
|
+
|
|
224
|
+
**Optional Hook**: {extension}
|
|
225
|
+
Command: `/{command}`
|
|
226
|
+
Description: {description}
|
|
227
|
+
|
|
228
|
+
Prompt: {prompt}
|
|
229
|
+
To execute: `/{command}`
|
|
230
|
+
```
|
|
231
|
+
- **Mandatory hook** (`optional: false`):
|
|
232
|
+
```
|
|
233
|
+
## Extension Hooks
|
|
234
|
+
|
|
235
|
+
**Automatic Hook**: {extension}
|
|
236
|
+
Executing: `/{command}`
|
|
237
|
+
EXECUTE_COMMAND: {command}
|
|
238
|
+
```
|
|
239
|
+
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
|
|
240
|
+
|
|
241
|
+
## Operating Principles
|
|
242
|
+
|
|
243
|
+
### Context Efficiency
|
|
244
|
+
|
|
245
|
+
- **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation
|
|
246
|
+
- **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis
|
|
247
|
+
- **Token-efficient output**: Limit findings table to 50 rows; summarize overflow
|
|
248
|
+
- **Deterministic results**: Rerunning without changes should produce consistent IDs and counts
|
|
249
|
+
|
|
250
|
+
### Analysis Guidelines
|
|
251
|
+
|
|
252
|
+
- **NEVER modify files** (this is read-only analysis)
|
|
253
|
+
- **NEVER hallucinate missing sections** (if absent, report them accurately)
|
|
254
|
+
- **Prioritize constitution violations** (these are always CRITICAL)
|
|
255
|
+
- **Use examples over exhaustive rules** (cite specific instances, not generic patterns)
|
|
256
|
+
- **Report zero issues gracefully** (emit success report with coverage statistics)
|
|
257
|
+
|
|
258
|
+
## Context
|
|
259
|
+
|
|
260
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speckit-archive-run
|
|
3
|
+
description: Archive a feature specification into main project memory after merge,
|
|
4
|
+
resolving gaps and conflicts
|
|
5
|
+
compatibility: Requires spec-kit project structure with .specify/ directory
|
|
6
|
+
metadata:
|
|
7
|
+
author: github-spec-kit
|
|
8
|
+
source: archive:commands/archive.md
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Act as the **Chief Software Architect** and **Documentation Maintainer**.
|
|
12
|
+
A feature has been merged into the `main` branch. Your goal is to **archive** the feature specification into the main project memory — ensuring completeness, resolving conflicts, closing gaps, and respecting the project constitution.
|
|
13
|
+
|
|
14
|
+
## User Input
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
$ARGUMENTS
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
21
|
+
|
|
22
|
+
### Input Parsing
|
|
23
|
+
|
|
24
|
+
Parse `$ARGUMENTS` as follows:
|
|
25
|
+
- **First token**: feature spec directory path (e.g., `specs/007-invoice-settings`)
|
|
26
|
+
- **Remaining tokens**: scope modifiers (optional, space-separated)
|
|
27
|
+
|
|
28
|
+
**Supported scope modifiers** (if none provided, update all artifacts):
|
|
29
|
+
- `--spec-only` — update only `.specify/memory/spec.md`
|
|
30
|
+
- `--plan-only` — update only `.specify/memory/plan.md`
|
|
31
|
+
- `--changelog-only` — update only `.specify/memory/changelog.md`
|
|
32
|
+
- `--agent-only` — update only the agent knowledge file (GEMINI.md / AGENTS.md / CLAUDE.md)
|
|
33
|
+
|
|
34
|
+
If `$ARGUMENTS` is empty, output `ERROR: No feature spec directory provided. Usage: /speckit.archive.run specs/###-feature-name [--scope-modifier]` and stop.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Step 0: Setup & Validation (Gate)
|
|
39
|
+
|
|
40
|
+
### 0.1 Resolve Paths
|
|
41
|
+
|
|
42
|
+
Run `.specify/scripts/bash/check-prerequisites.sh --json --paths-only` to identify the active feature directory and its artifacts. This script is mandatory for path discovery. If the script is missing, stop and inform the user.
|
|
43
|
+
|
|
44
|
+
Derive absolute paths for:
|
|
45
|
+
- `REPO_ROOT` (from `.specify/scripts/bash/check-prerequisites.sh --json --paths-only` output)
|
|
46
|
+
- `FEATURE_DIR` (from `.specify/scripts/bash/check-prerequisites.sh --json --paths-only` output)
|
|
47
|
+
- `MEMORY_DIR` (`REPO_ROOT / .specify/memory`)
|
|
48
|
+
- `TEMPLATES_DIR` (`REPO_ROOT / .specify/templates`)
|
|
49
|
+
|
|
50
|
+
**Path convention**: Feature specs live in `specs/{###-feature-name}/` at repo root. Use absolute paths for all file operations.
|
|
51
|
+
|
|
52
|
+
### 0.2 Validate Feature Directory
|
|
53
|
+
|
|
54
|
+
Verify `FEATURE_DIR` exists and contains:
|
|
55
|
+
- `spec.md` (required)
|
|
56
|
+
- `plan.md` (required)
|
|
57
|
+
|
|
58
|
+
If any required file is missing:
|
|
59
|
+
> ⚠️ Invalid feature spec: Missing required files in `FEATURE_DIR`. Expected:
|
|
60
|
+
> - spec.md
|
|
61
|
+
> - plan.md
|
|
62
|
+
>
|
|
63
|
+
> Run `/speckit.specify` and `/speckit.plan` first.
|
|
64
|
+
|
|
65
|
+
**Then stop. Do not modify any files.**
|
|
66
|
+
|
|
67
|
+
### 0.3 Inventory Optional Artifacts
|
|
68
|
+
|
|
69
|
+
Note which of these exist in `FEATURE_DIR` (for use in later steps):
|
|
70
|
+
- `tasks.md` — archival and task counting
|
|
71
|
+
- `research.md` — knowledge capture, known issues & gotchas
|
|
72
|
+
- `data-model.md` — entity merging
|
|
73
|
+
- `contracts/` — API documentation (non-empty directory)
|
|
74
|
+
- `checklists/` — quality tracking
|
|
75
|
+
- `quickstart.md` — integration scenarios
|
|
76
|
+
|
|
77
|
+
### 0.4 Validate or Bootstrap Memory Directory
|
|
78
|
+
|
|
79
|
+
Check if `MEMORY_DIR` exists:
|
|
80
|
+
|
|
81
|
+
**If `MEMORY_DIR` exists**: Read its contents. Note which files are present (`constitution.md`, `spec.md`, `plan.md`, `changelog.md`).
|
|
82
|
+
|
|
83
|
+
**If `MEMORY_DIR` does not exist**: Create it:
|
|
84
|
+
```
|
|
85
|
+
mkdir -p MEMORY_DIR
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**If `MEMORY_DIR/spec.md` does not exist** (first archival):
|
|
89
|
+
- If `TEMPLATES_DIR/spec-template.md` exists, copy it as the seed and populate from the feature spec
|
|
90
|
+
- Otherwise, create `spec.md` with the feature's spec content as the initial main spec
|
|
91
|
+
- Note in the report: "Bootstrapped `.specify/memory/spec.md` from first feature"
|
|
92
|
+
|
|
93
|
+
**If `MEMORY_DIR/plan.md` does not exist** (first archival):
|
|
94
|
+
- If `TEMPLATES_DIR/plan-template.md` exists, copy it as the seed and populate from the feature plan
|
|
95
|
+
- Otherwise, create `plan.md` with the feature's plan content as the initial main plan
|
|
96
|
+
- Note in the report: "Bootstrapped `.specify/memory/plan.md` from first feature"
|
|
97
|
+
|
|
98
|
+
### 0.5 Load Constitution (Guardrails)
|
|
99
|
+
|
|
100
|
+
Read `MEMORY_DIR/constitution.md` if it exists. Extract:
|
|
101
|
+
- Core Principles (numbered roman numerals or named sections)
|
|
102
|
+
- Architecture Standards
|
|
103
|
+
- Quality Gates
|
|
104
|
+
|
|
105
|
+
**Constitution is non-negotiable.** Any feature content that conflicts with a constitution MUST principle is flagged as CRITICAL and must be resolved before merging. Do not silently override or reinterpret constitution rules.
|
|
106
|
+
|
|
107
|
+
### 0.6 Check Extension Hooks (before archival)
|
|
108
|
+
|
|
109
|
+
Check if `REPO_ROOT/.specify/extensions.yml` exists:
|
|
110
|
+
- If it exists, read it and look for entries under `hooks.before_archive`
|
|
111
|
+
- If the YAML cannot be parsed or is invalid, skip hook checking silently
|
|
112
|
+
- Filter to only hooks where `enabled: true`
|
|
113
|
+
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
|
|
114
|
+
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
|
|
115
|
+
- If the hook defines a non-empty `condition`, skip the hook
|
|
116
|
+
- For each executable hook, output based on its `optional` flag:
|
|
117
|
+
- **Optional hook** (`optional: true`):
|
|
118
|
+
```
|
|
119
|
+
## Extension Hooks
|
|
120
|
+
**Optional Pre-Hook**: {extension}
|
|
121
|
+
Command: `/{command}` — {description}
|
|
122
|
+
To execute: `/{command}`
|
|
123
|
+
```
|
|
124
|
+
- **Mandatory hook** (`optional: false`):
|
|
125
|
+
```
|
|
126
|
+
## Extension Hooks
|
|
127
|
+
**Automatic Pre-Hook**: {extension}
|
|
128
|
+
EXECUTE_COMMAND: /{command}
|
|
129
|
+
Wait for the result before proceeding.
|
|
130
|
+
```
|
|
131
|
+
- If no hooks are registered or the file does not exist, skip silently
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Step 1: Feature Analysis
|
|
136
|
+
|
|
137
|
+
Read the feature specification and extract:
|
|
138
|
+
|
|
139
|
+
**From spec.md:**
|
|
140
|
+
- User Stories / Integration Scenarios (with priorities and acceptance criteria)
|
|
141
|
+
- Functional Requirements (detect the project's ID convention — e.g., FR-XXX, REQ-XXX, or unnumbered)
|
|
142
|
+
- Non-Functional Requirements (if any)
|
|
143
|
+
- Key Entities and their fields
|
|
144
|
+
- Edge cases and error handling
|
|
145
|
+
- Success Criteria
|
|
146
|
+
|
|
147
|
+
**From plan.md:**
|
|
148
|
+
- New dependencies introduced (with versions)
|
|
149
|
+
- New modules/services created
|
|
150
|
+
- Architecture changes (project structure, routing)
|
|
151
|
+
- Configuration changes (env vars, properties)
|
|
152
|
+
- Branch name (from metadata)
|
|
153
|
+
|
|
154
|
+
**From data-model.md (if exists):**
|
|
155
|
+
- New models and their definitions
|
|
156
|
+
- Relationships between entities
|
|
157
|
+
- Validation rules
|
|
158
|
+
|
|
159
|
+
**From research.md (if exists):**
|
|
160
|
+
- Key technical decisions and trade-offs
|
|
161
|
+
- External API integrations
|
|
162
|
+
- Known issues and gotchas (for agent file merging)
|
|
163
|
+
|
|
164
|
+
**From tasks.md (if exists):**
|
|
165
|
+
- Count completed tasks: lines matching `- [X]` or `- [x]`
|
|
166
|
+
- Count total tasks: lines matching `- [ ]` or `- [X]` or `- [x]`
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Step 2: Conflict Detection & Gap Analysis
|
|
171
|
+
|
|
172
|
+
Before merging, systematically check for issues.
|
|
173
|
+
|
|
174
|
+
### 2.1 Constitution Compliance (CRITICAL)
|
|
175
|
+
|
|
176
|
+
For each extracted requirement, user story, and architecture decision, verify it does not conflict with any constitution MUST principle or Architecture Standard.
|
|
177
|
+
|
|
178
|
+
**If a constitution conflict exists**, flag it as CRITICAL:
|
|
179
|
+
```
|
|
180
|
+
🔴 CONSTITUTION CONFLICT:
|
|
181
|
+
- Feature FR-XXX: "[requirement]" conflicts with Principle [N]: "[principle text]"
|
|
182
|
+
→ This MUST be resolved before archival can proceed.
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### 2.2 Conflicts
|
|
186
|
+
|
|
187
|
+
1. **Requirement ID Collisions:** If the feature has an ID that already exists in main spec, flag it.
|
|
188
|
+
2. **Entity Redefinitions:** If an entity is being modified (not just added), highlight the delta.
|
|
189
|
+
3. **Dependency Conflicts:** If a new dependency version conflicts with existing ones, note it.
|
|
190
|
+
|
|
191
|
+
### 2.3 Gaps
|
|
192
|
+
|
|
193
|
+
Categorize discrepancies between the feature spec and main memory:
|
|
194
|
+
|
|
195
|
+
| Category | What to look for |
|
|
196
|
+
|----------|-----------------|
|
|
197
|
+
| **Requirements** | Missing IDs, unmatched acceptance criteria |
|
|
198
|
+
| **Architecture** | Undocumented modules, missing routing/wiring |
|
|
199
|
+
| **Integration** | New contracts not reflected in main plan |
|
|
200
|
+
| **Data Model** | Entity changes without migration notes |
|
|
201
|
+
| **Testing** | New components without test strategy |
|
|
202
|
+
|
|
203
|
+
**If conflicts or significant gaps exist**, list them:
|
|
204
|
+
```
|
|
205
|
+
⚠️ ISSUES DETECTED:
|
|
206
|
+
- FR-005: Main says "X", Feature says "Y" → Recommend: [resolution]
|
|
207
|
+
- Entity `User`: Added field `role` → Verify backward compatibility
|
|
208
|
+
- Gap: New `/api/settings` route not in main plan routing section
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Step 3: Clarify (exactly once; max 5 questions)
|
|
214
|
+
|
|
215
|
+
If conflicts or gaps require human judgment, ask **only questions that materially change scope or correctness**. Skip this step entirely if everything is unambiguous.
|
|
216
|
+
|
|
217
|
+
**Always ask** if any CRITICAL constitution conflicts were detected — these cannot be auto-resolved.
|
|
218
|
+
|
|
219
|
+
Use this format and **wait for answers**:
|
|
220
|
+
|
|
221
|
+
```markdown
|
|
222
|
+
## Question [N]: [Topic]
|
|
223
|
+
**Context**: [Quote the relevant spec/plan/constitution section]
|
|
224
|
+
**Decision Needed**: [1 sentence]
|
|
225
|
+
**Suggested Answers**:
|
|
226
|
+
| Option | Answer | Implications |
|
|
227
|
+
|--------|--------|--------------|
|
|
228
|
+
| A | [Option A] | [Impact] |
|
|
229
|
+
| B | [Option B] | [Impact] |
|
|
230
|
+
| C | [Option C] | [Impact] |
|
|
231
|
+
| Custom | Provide your own | [How it affects scope] |
|
|
232
|
+
|
|
233
|
+
**Your choice**: _[Wait for user response]_
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Rules:**
|
|
237
|
+
- Max 5 questions total.
|
|
238
|
+
- Max 3 unresolved `NEEDS CLARIFICATION` markers in output — beyond that, make reasonable defaults and note them in the report.
|
|
239
|
+
- If no questions are needed, proceed directly to Step 4.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Step 4: Impact Mapping
|
|
244
|
+
|
|
245
|
+
Before making any edits, produce a brief impact map:
|
|
246
|
+
|
|
247
|
+
```markdown
|
|
248
|
+
### Impact Map
|
|
249
|
+
| Artifact | Sections Affected | Change Type |
|
|
250
|
+
|----------|------------------|-------------|
|
|
251
|
+
| `.specify/memory/spec.md` | User Stories, FR-012–FR-015, Entities | Append + Update |
|
|
252
|
+
| `.specify/memory/plan.md` | Dependencies, Project Structure | Append |
|
|
253
|
+
| `.specify/memory/changelog.md` | Merged Features Log | New entry |
|
|
254
|
+
| `GEMINI.md` | Recent Changes, Known Issues | Append |
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
This gives the user a preview before edits are applied.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Step 5: Archival (Apply Edits)
|
|
262
|
+
|
|
263
|
+
### Edit Rules
|
|
264
|
+
- Use absolute paths for all file references.
|
|
265
|
+
- Preserve existing document structure and ordering.
|
|
266
|
+
- Prefer appending over restructuring.
|
|
267
|
+
- Add a `[Source: specs/###-feature-name]` traceability tag to merged content.
|
|
268
|
+
- Add a **Revision note** (date + reason) to each modified artifact.
|
|
269
|
+
- Respect scoping hints — skip artifacts not in scope and explicitly note them.
|
|
270
|
+
- **Detect and follow the project's existing ID convention** (FR-XXX, REQ-XXX, Flow1, US-XX, etc.). Continue the sequence from the highest existing ID in main memory. Never reuse or renumber existing IDs.
|
|
271
|
+
- **Constitution constraints must be respected** — do not merge content that violates them.
|
|
272
|
+
|
|
273
|
+
### 5.1 Update Main Specification (`.specify/memory/spec.md`)
|
|
274
|
+
|
|
275
|
+
1. **Add User Stories / Integration Scenarios** — maintain priority ordering.
|
|
276
|
+
2. **Merge Functional Requirements** — continue from the highest existing ID. Group by domain/module if the spec is large.
|
|
277
|
+
3. **Update Key Entities** — add new entities; update existing ones if fields were added.
|
|
278
|
+
4. **Update Edge Cases and Error Handling.**
|
|
279
|
+
5. **Update Data Flow / Architecture** if the feature changed system data flows.
|
|
280
|
+
6. **Merge Success Criteria** if present.
|
|
281
|
+
7. **Deduplicate** — ensure no duplicate requirements in the final output.
|
|
282
|
+
|
|
283
|
+
### 5.2 Update Main Plan (`.specify/memory/plan.md`)
|
|
284
|
+
|
|
285
|
+
1. **Dependencies:** Add new packages (with versions) to "Primary Dependencies" or equivalent section.
|
|
286
|
+
2. **Project Structure:** Add new modules/services to the structure tree.
|
|
287
|
+
3. **Configuration:** Note new environment variables or config additions.
|
|
288
|
+
4. **Routing & Navigation:** Add new routes, endpoints, or wiring.
|
|
289
|
+
5. **Testing Strategy:** Add test coverage notes for new components.
|
|
290
|
+
6. **Remove from "Future Work"** anything that was just implemented.
|
|
291
|
+
7. Ensure plan reflects the *implemented* state.
|
|
292
|
+
|
|
293
|
+
### 5.3 Update Agent Knowledge File (GEMINI.md / AGENTS.md / CLAUDE.md)
|
|
294
|
+
|
|
295
|
+
1. Find the project's agent knowledge file (check, in order: `GEMINI.md`, `AGENTS.md`, `CLAUDE.md` in REPO_ROOT).
|
|
296
|
+
2. If found, follow the agent-file-template structure and update these sections:
|
|
297
|
+
|
|
298
|
+
**"Active Technologies"** — add any new languages/frameworks/versions from the feature plan.
|
|
299
|
+
|
|
300
|
+
**"Project Structure"** — update if modules were added.
|
|
301
|
+
|
|
302
|
+
**"Commands"** — add new build/run commands if the tech stack changed.
|
|
303
|
+
|
|
304
|
+
**"Recent Changes"** — prepend a new entry:
|
|
305
|
+
```markdown
|
|
306
|
+
- ###-feature-name: [Brief description of what was added]
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**"Known Issues & Gotchas"** — if `research.md` exists in the feature, extract any gotchas/issues and merge them using the standard format:
|
|
310
|
+
```markdown
|
|
311
|
+
### ⚠️ [Issue Title]
|
|
312
|
+
**Issue:** [What went wrong]
|
|
313
|
+
**Root Cause:** [Why it happened]
|
|
314
|
+
**Prevention Rule:** [Actionable rule]
|
|
315
|
+
```
|
|
316
|
+
Deduplicate against existing entries.
|
|
317
|
+
|
|
318
|
+
3. If no agent file exists, skip this step and note it in the report.
|
|
319
|
+
|
|
320
|
+
### 5.4 Archive to Changelog
|
|
321
|
+
|
|
322
|
+
Create or update `.specify/memory/changelog.md`:
|
|
323
|
+
|
|
324
|
+
```markdown
|
|
325
|
+
## Merged Features Log
|
|
326
|
+
|
|
327
|
+
### [FEATURE NAME] — YYYY-MM-DD
|
|
328
|
+
**Branch:** [branch-name from plan.md]
|
|
329
|
+
**Spec:** specs/###-feature-name
|
|
330
|
+
|
|
331
|
+
**What was added:**
|
|
332
|
+
- [Summary of user stories/scenarios implemented]
|
|
333
|
+
|
|
334
|
+
**New Components:**
|
|
335
|
+
- [Modules/services added]
|
|
336
|
+
|
|
337
|
+
**Tasks Completed:** [completed]/[total] tasks
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Count tasks using the checkbox format: `- [X]` or `- [x]` = completed; `- [ ]` = incomplete. If `tasks.md` does not exist, omit the "Tasks Completed" line.
|
|
341
|
+
|
|
342
|
+
### 5.5 Update Feature Spec Status
|
|
343
|
+
|
|
344
|
+
In the feature's `spec.md` and `plan.md` files (inside `FEATURE_DIR`, **not** in memory), check for a `**Status**:` metadata field in the document header (typically in the first 10 lines, e.g., `**Status**: Draft`).
|
|
345
|
+
|
|
346
|
+
If found and the value is `Draft`, update it to `Completed`:
|
|
347
|
+
- `**Status**: Draft` → `**Status**: Completed`
|
|
348
|
+
|
|
349
|
+
This marks the feature specification as finalized after merge. Do not change other status values (e.g., `In Progress`, `Blocked`) — only `Draft` → `Completed`.
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## Step 6: Archival Report
|
|
354
|
+
|
|
355
|
+
Output the following structured report. Use **absolute paths** for all file references.
|
|
356
|
+
|
|
357
|
+
```markdown
|
|
358
|
+
# Archival Report
|
|
359
|
+
|
|
360
|
+
## Changed Files
|
|
361
|
+
| File (absolute path) | Change Summary |
|
|
362
|
+
|----------------------|----------------|
|
|
363
|
+
| `/absolute/path/to/spec.md` | Added [IDs], [N] user stories, [N] entities |
|
|
364
|
+
| `/absolute/path/to/plan.md` | Updated dependencies, project structure |
|
|
365
|
+
| `/absolute/path/to/changelog.md` | New entry for [feature name] |
|
|
366
|
+
| `/absolute/path/to/GEMINI.md` | Recent Changes, Known Issues |
|
|
367
|
+
|
|
368
|
+
## Feature Status
|
|
369
|
+
[List spec/plan files whose status was updated from Draft to Completed, or "No status fields found"]
|
|
370
|
+
|
|
371
|
+
## Bootstrapped
|
|
372
|
+
[List any files that were created for the first time, or "None"]
|
|
373
|
+
|
|
374
|
+
## Constitution Compliance
|
|
375
|
+
[Confirm all merged content respects constitution constraints, or list any unresolved CRITICAL conflicts]
|
|
376
|
+
|
|
377
|
+
## Edits Applied
|
|
378
|
+
[Brief summary of each artifact update]
|
|
379
|
+
|
|
380
|
+
## Conflicts Resolved
|
|
381
|
+
[List any conflicts that were resolved and how, or "None"]
|
|
382
|
+
|
|
383
|
+
## Outstanding Items
|
|
384
|
+
[Any remaining `NEEDS CLARIFICATION` markers, or "None"]
|
|
385
|
+
|
|
386
|
+
## Defaults Applied
|
|
387
|
+
[Any decisions made with reasonable defaults instead of asking, or "None"]
|
|
388
|
+
|
|
389
|
+
## Scoping
|
|
390
|
+
[Which artifacts were updated, and which were skipped due to scope modifiers]
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**Important:** Do NOT delete the input feature spec files.
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## Step 7: Post-Archival Hooks & Recommendations
|
|
398
|
+
|
|
399
|
+
### 7.1 Check Extension Hooks (after archival)
|
|
400
|
+
|
|
401
|
+
Check if `REPO_ROOT/.specify/extensions.yml` exists:
|
|
402
|
+
- Look for entries under `hooks.after_archive`
|
|
403
|
+
- Apply the same filtering and output logic as Step 0.6
|
|
404
|
+
- If no hooks are registered or the file does not exist, skip silently
|
|
405
|
+
|
|
406
|
+
### 7.2 Recommendations
|
|
407
|
+
|
|
408
|
+
Provide actionable next steps:
|
|
409
|
+
|
|
410
|
+
1. **Manual Review Items:** Anything flagged during conflict detection or constitution compliance check.
|
|
411
|
+
2. **Cleanup Suggestions:**
|
|
412
|
+
- Can the feature spec folder be archived? (e.g., `mv specs/###-feature-name .specify/archive/`)
|
|
413
|
+
- Are there orphaned files to remove?
|
|
414
|
+
3. **Verification:**
|
|
415
|
+
- Run `make test` (or the project's equivalent) to verify nothing broke.
|
|
416
|
+
- Review the archival report for accuracy.
|
|
417
|
+
4. **Follow-up:**
|
|
418
|
+
- Update `README.md` if CLI commands or user-facing APIs changed.
|
|
419
|
+
- Capture architectural insights from `research.md` into project memory if applicable.
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
## Done Criteria
|
|
424
|
+
|
|
425
|
+
- All non-conflicting feature content merged into main memory artifacts.
|
|
426
|
+
- Constitution compliance verified for all merged content.
|
|
427
|
+
- Memory directory bootstrapped if this was the first archival.
|
|
428
|
+
- Feature spec `**Status**: Draft` updated to `Completed` (if applicable).
|
|
429
|
+
- Conflicts either resolved (with user input) or marked with `NEEDS CLARIFICATION` (max 3).
|
|
430
|
+
- Archival Report printed with absolute paths for all changed files, constitution status, and next steps.
|
|
431
|
+
- Scoping hints respected — skipped artifacts explicitly noted.
|