Skip to content
Back to skills

Prospec Archive

ASecurity

Archive Changes - Archive completed changes, generate summary, sync requirements to feature specs, and gate archiving on Knowledge sync — the SDD terminal station, not git tagging or a release. Triggers: archive, spec sync, finalize change, 封存, 歸檔, 收尾, 規格同步

  • 6 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added September 2, 2026
ai-agentsrustbashdebugginggitsecurity

Works with

  • terminal
  • cli

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add benwu95/prospec --skill prospec-archive --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prospec Archive?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prospec Archive
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/benwu95-prospec-archive/badge)](https://www.skillsdirectory.com/skills/benwu95-prospec-archive)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: prospec-archive
description: "Archive Changes - Archive completed changes, generate summary, sync requirements to feature specs, and gate archiving on Knowledge sync — the SDD terminal station, not git tagging or a release. Triggers: archive, spec sync, finalize change, 封存, 歸檔, 收尾, 規格同步"
---
<!-- Generated by `prospec agent sync`. Do not edit — this file is regenerated on every sync. -->

# Prospec Archive Skill

## Activation

When triggered, briefly describe:
- That you'll scan `.prospec/changes/` for completed changes
- The deterministic mutations are executed by `prospec archive <name>` (previewed with `--dry-run`); this skill keeps the judgment work — the Entry Gate, the Review & Verify summary, and REQ semantic graduation
- Affected-module Knowledge is synced at the implement exit; the S/A commit prompt confirms validated content and the Entry Gate re-confirms synchronization (backstop) before archiving

## Language Policy

Write each generated document in the language the Constitution's Language Policy rule assigns to **its path** — change artifacts and their archived summaries in the project's artifact language, the trust zone (Knowledge base, Feature Specs, index) in English. One skill run may write both. Free text you pass the CLI that lands in a change artifact follows the artifact language too, leaving its paths, commands, enum values and the fixed prefixes the CLI matches untranslated. Keep code, identifiers, technical terms, and git commit messages in English.
## CLI Prerequisite (required)

> The prospec CLI is a required file for this skill — its deterministic steps call `prospec`
> commands. Probe BEFORE any other step; there is no manual fallback.

1. Run `prospec --version` (Bash).
2. **Command not found / not executable** → STOP. Ask the user to install the prospec standalone
   executable — the one-click installer script from the project README (macOS/Linux `install.sh`,
   Windows `install.ps1`) or a release binary from GitHub Releases; prospec is NOT published to
   npm. Then re-run this skill.
3. **Version older than 2.11.0** → STOP. Report the installed vs required version
   and ask the user to upgrade, then re-run this skill.

Hand-executing a CLI-owned mutation is NEVER the fallback — that re-introduces the
nondeterministic serialization this contract exists to remove.

Evidence uses `snapshot-v2` / `repository-inputs-v2`: working-tree content of git index members. Unchanged members and effective content preserve evidence across staging and equivalent commits. Revalidate legacy records once.

## Startup Loading

1. [DYNAMIC] Read `.prospec/changes/` — scan all change directories and their `metadata.yaml`

> Format references are read **per phase on demand**, NOT as Startup Loading items (keeps the stable prefix lean): [`references/archive-format.md`](references/archive-format.md) at Phase 2/3 (summary + spec archiving), [`references/feature-spec-format.md`](references/feature-spec-format.md) at Phase 3.5, [`references/product-spec-format.md`](references/product-spec-format.md) at Phase 3.6. (`references/promotion-format.md` is already read on demand at Phase 4.5.) Read each when entering its phase; do not preload them into the stable prefix.

## Entry Gate

> Blocking precondition check per archive target. If any item FAILs, stop and tell the user what is missing — do not archive that change. This gate is the **backstop** that re-confirms the Knowledge synchronization completed at the implement exit and confirmed at the S/A commit prompt; it still **FAILs and refuses to archive** when affected-module Knowledge is not synced (defense in depth — the sync is moved earlier, not removed).

- Archive target is `status: verified` — only `prospec-verify` at grade S/A produces `verified` (lifecycle: `prospec/ai-knowledge/_status-lifecycle.md`).
- **Metadata completeness (machine-checked)**: `prospec archive` refuses when the `metadata-completeness` check is FAIL — **do not archive**. Fix it (re-run `prospec-verify` if the grade is genuinely absent), then re-archive. `--allow-incomplete` exempts this check only, for a pre-schema record. (The CLI is required — the probe STOPs before this gate when the engine is missing.)
- **Review, test and delta-spec provenance (machine-checked)**: `prospec archive` refuses when the `review-provenance`, `test-provenance` or `delta-spec-provenance` check is FAIL for this change — **Any FAIL → do not archive**, and the CLI names the remedy per cause. A review/test FAIL means current inputs lack valid evidence: re-run `prospec-review` then `prospec-verify` (`prospec check --record-tests` runs the suite). Equivalent commit history preserves valid evidence. The CLI uses a live assessment and rechecks observed inputs before the first write; dry-run applies the same refusal gate without writes. A `delta-spec-provenance` FAIL is different: the `**Spec:**` landing blocks about to be copied verbatim into the trust zone are stale — **Fix the block, not the code**, then `prospec check --record-review`. Missing or unprovable required checks refuse entry; only the explicitly unavailable test-command exemption remains. When that re-verify **does not reach S/A** the change is not archivable — `status` stays `verified` but `metadata-completeness` reads the LATEST grade, so **never archive on the strength of a `status` the latest verify did not earn**. (The CLI is required — the probe STOPs before this gate when the engine is missing.)
- An absent `related_modules` is unknown; `[]` declares no related modules. Judge proposal scope against actual diff: committed range + uncommitted diff; a clean working tree proves nothing. Reconcile via `prospec change related-modules <modules...> --change [name]` or `--no-related-modules`. Unchanged commitments mean attribution bookkeeping; reductions need human re-scope and scenario amendment. Declaration is not proof of completeness; independent classification, unions and blockers remain.
- Knowledge is synced for this change: `prospec archive` **refuses** when affected-module Knowledge is not synced — it checks `metadata.related_modules` ∪ the modules classified from the delta-spec's ADDED/MODIFIED/REMOVED REQs and refuses, naming each cause. The skill also checks README content: REMOVED behavior must no longer appear. Not synced → apply each reason's remedy (`KNOWLEDGE_UNSYNCED`: `prospec-knowledge-update` for those modules; `KNOWLEDGE_INPUT_INVALID`: repair the named input), then re-archive. An empty module set does not bypass input validation.
  - **`metadata.scale: quick`** has no delta-spec: map **actual diff file paths** through `prospec/ai-knowledge/module-map.yaml` for Phase 4. The CLI derives its set from `metadata.related_modules` only; absent scope refuses as `KNOWLEDGE_INPUT_INVALID`, while explicit empty does **not** backstop this diff-path check. Sync every diff-touched module before archiving.
  - **`metadata.scale: backfill`**: synchronize the modules `prospec knowledge update --change` reports ∪ `metadata.related_modules`. Use the CLI-reported modules; do not infer classification from the Feature header.
  - **`metadata.scale: standard` / `full`**: use the CLI-reported modules for feature-prefixed REQs as well; the CLI owns prefix classification.
- **Quick spec-impact check** (`metadata.scale: quick` only) — the quick-scale **substitute** for delta-spec-driven graduation, not extra ceremony: a `standard`/`full` change graduates from delta-spec REQs authored at plan time; a quick change has no delta-spec, so its spec impact is determined here from the actual diff. It cannot move earlier — no diff exists before implement. Keep it to a **single bounded judgment** (does the diff touch spec-covered behavior?), not a re-analysis. Compare the actual diff against existing `prospec/specs/features/` REQs — an LLM judgment step (do not claim determinism).
  - Diff affects spec-covered behavior → **FAIL**: require a minimal **Spec Impact** section appended to proposal.md (REQ ID + ADDED/MODIFIED per affected requirement), then re-run. Phase 3.5 graduates from that section.
  - No spec impact → pass; record the diagnostic conclusion in summary.md and skip graduation.


## Core Workflow


### Phase 1: Scan and Confirm Targets

Scan `.prospec/changes/` for changes with `status: verified` — **only `verified` changes are archivable** (status lifecycle: `prospec/ai-knowledge/_status-lifecycle.md`).
Display a table of archivable changes:

| Change Name | Status | Created | Modules |
|-------------|--------|---------|---------|

Confirm the set with the user before proceeding.

> **Phase 1 Gate** — proceed when:
> - [ ] Archivable-changes table listed only `status: verified` changes
> - [ ] User confirmed the set of changes to archive

### Phase 2: Generate Summary

For each change to archive:
1. Read `proposal.md` — extract User Story and acceptance criteria (and the Spec Impact section for a quick change that has one)
2. Read `delta-spec.md` — extract REQ IDs and affected modules (quick: absent — use the Spec Impact section and diff-derived modules from the Entry Gate)
3. Read `tasks.md` — calculate completion rate over **code tasks only** (kind schema: tasks-format reference). Unchecked code tasks → **warn and list them** before archiving; unchecked `[M]` manual tasks → reminder only, never blocking. (`scale: backfill` has no tasks.md — skip this step.)
4. Assemble the **Review & Verify** section from `metadata.yaml` `quality_log` (WARN/FAIL digest), `review.md` (critical/major counts + a short findings excerpt), and the verify report (grade + dimensions) — use the same evidence in Phase 4.5 Harvest. When a source is absent, state it plainly (`Unverified`, `no review round`); **never fabricate** a grade or counts. Format: `references/archive-format.md` §6
5. Generate `summary.md` following `references/archive-format.md` specification — it MUST carry the `## Review & Verify` section from step 4

> **Phase 2 Gate** — proceed when:
> - [ ] `summary.md` generated per `references/archive-format.md` for each target change
> - [ ] `summary.md` carries the `## Review & Verify` section (grade + criticals/majors + `quality_log` digest; `Unverified`/`no review round` when a source is absent, never fabricated)
> - [ ] Code-task completion rate computed; any unchecked code tasks surfaced to the user

### Phase 3: Execute Archive

Mutations are code-executed by the CLI — do not hand-run them. For each change:
1. Preview: run `prospec archive <change-name> --dry-run` and show the planned mutations.
2. Execute: run `prospec archive <change-name>` — retain its returned `archivePath` and exact `archiveIdentity`. It verifies and publishes the complete bundle in the corresponding main worktree project, then removes the source; sets `status: archived` + `archived_at`, and runs the mechanical Feature Spec / product.md `## Feature Map` / feature-map.yaml syncs (detailed in Phases 3.5–3.6). A `refused`/`not found` report means the target is not archivable — resolve it, never force.
3. Overwrite the scaffold `summary.md` at the returned `archivePath` with the Phase 2 summary (the one carrying `## Review & Verify`). Carry the scaffold's `- **Plan Decision**:` line over verbatim when it has one.
All spec/Knowledge writes stay in the executing source project. For linked-local legacy history, use `prospec history import --from <project-root>`; inspect reported paths on partial failure, never automatically unlock or restore. Do not reconstruct dates or destinations.
Finalize `_archived-history`, counters and the product map after judgment via `prospec archive finalize` in Phase 3.7.

> **Phase 3 Gate** — proceed when:
> - [ ] `prospec archive` executed (dry-run previewed first) — complete bundle retained at returned `archivePath`; `archiveIdentity` recorded for finalize
> - [ ] Phase 2 `summary.md` (with `## Review & Verify`) placed in the archive directory, replacing the scaffold
> - [ ] `metadata.yaml` `status` set to `archived`

### Phase 3.5: Feature Spec Sync

> `prospec-archive` is the **sole writer** of Feature Specs — requirements graduate into the permanent capability record here (the archive service is this station's mechanical writer; it writes nowhere else). `prospec-verify` deliberately does not gate on Feature Spec freshness (see `_status-lifecycle.md`), so this graduation step is where `specs/features/` catches up to the change.

> **PHASE 3.5 SPEC GRADUATION CONTRACT**:
> Before proceeding with Phase 3.5, **STOP immediately and read `references/spec-graduation.md`** to understand the FIVE CLI worklists, the block-replaces-whole-body rule, and graduation key by scale.

`prospec archive` (Phase 3) already performed the **mechanical** Feature Spec Sync. What remains is the **judgment** work — REQ semantic graduation:

1. **Audit CLI Worklists**: Consult the 5 worklists (`pendingConvergence`, `droppedBehavior`, `refusedRequirements`, `acknowledgedDrops`, `staleDeclarations`) per [`references/spec-graduation.md`](references/spec-graduation.md). Phase 3's mechanical sync replaced bodies only where the delta-spec carried a `**Spec:**` block — it did NOT replace bodies lacking one (having landed does not mean you lost nothing — inspect dropped behavior; a truncation refusal for an ADDED entry with no `**Spec:**` block points at Description / Acceptance Criteria).
2. **Read Graduating REQs**: Read every requirement this change graduates from the **merged Feature Spec on disk** via `prospec spec show <feature> --req <ids>` (Bash) (the worklists above do **not** define that set — each is an EXCEPTION report; **Graduation key by scale** names that set: `quick` → the proposal's **Spec Impact** section; `standard`/`full`/`backfill` → delta-spec REQ IDs; never substitute the delta-spec).
3. **Converge wording**: Rewrite merged text into the spec's language (English), behavior-first voice; trim transient change narrative.
4. **Story Placement & Context**: Ensure ADDED REQs sit under their respective User Story sections and context is enriched per [`references/spec-graduation.md`](references/spec-graduation.md) and [`references/feature-spec-format.md`](references/feature-spec-format.md). For complete feature retirement, mark the feature `status: deprecated`, retain its history at the existing spec path and keep retired REQ identities resolvable through the Deprecated section; retired Story headings no longer describe active capability.
5. (Frontmatter counters are reconciled mechanically by `prospec archive finalize` in Phase 3.7 — do not recount them by hand).

**Blocking worklists stop archive at preflight** — resolve the CLI's named cause before retrying Phase 3. If a later sync error is reported after the bundle moved, report the incomplete sync and converge the affected Feature Specs.

> **Phase 3.5 Gate** — proceed when:
> - [ ] Every REQ on the CLI's graduation worklist has a converged body (no REQ left with only a title, and no pre-change body left describing post-change behavior)
> - [ ] Every bullet the CLI reported as **dropped behavior** is either restored into the `**Spec:**` block or written into that entry's `**Dropped:**` block — a landing block replaces the whole body, so what it omits leaves the trust zone. Confirming deliberateness means *writing it down*, not asserting it in passing: the CLI holds the write until the declaration is there, and the declaration is what a later reader audits (an empty report satisfies this item)
> - [ ] Every REQ the CLI **refused** has had its named cause resolved using the refusal-specific remedy in [`references/spec-graduation.md`](references/spec-graduation.md); a `**Dropped:**` declaration does not release a refusal
> - [ ] Every **stale declaration** reported is resolved — a declared bullet that was not dropped means the delta-spec describes an older body than the spec now has, so re-read the merged file before graduating
> - [ ] Each ADDED/MODIFIED/REMOVED requirement routed into its Feature Spec under `prospec/specs/features/` (CLI-reported, spot-checked; or graduation skipped for a quick change diagnosed as no-impact)
> - [ ] Merged REQ wording converged and placed under the right Story section
> - [ ] Any partial sync failure surfaced with retained source/history paths

### Phase 3.6: Product Spec Sync

1. Record the initial product sync outcome from Phase 3. Read [`references/product-spec-format.md`](references/product-spec-format.md) for the bootstrap format. A decline means the map is not synced: apply the named remedy and carry the pending refresh to finalize. Semantic graduation may have changed feature statuses since that initial sync; final map confirmation belongs after Phase 3.7's refresh.
2. Inspect authored product sections for a duplicate map under a **different name** (`## Feature Inventory`, `## 功能地圖`), or a same-name heading outside the CLI's lexical near-miss rule (`## Feature Map (draft) (2024)`, `## 3.1 Feature Map`). Reconcile duplicates with the author.
3. Confirm `prospec/ai-knowledge/feature-map.yaml`: **bootstrap-once + no-clobber**. Existing curated indexes remain untouched by bootstrap; apply only intended semantic routing/status decisions to authored entries. New indexes derive modules from REQ prefixes and leave `req_prefixes` for human curation.

I/O failures stop the command and report retained bundles; inspect partial source spec writes before proceeding.

> **Phase 3.6 Gate** — proceed when:
> - [ ] initial product outcome recorded; any decline's cause and pending refresh to finalize recorded in the summary
> - [ ] no authored section duplicates the Feature Map under another name or a heading outside the lexical guard
> - [ ] `prospec/ai-knowledge/feature-map.yaml` present; intended curated routing/status decisions applied without replacing other entries

### Phase 3.7: Finalize (post-judgment CLI step)

Run `prospec archive finalize <change-name> --bundle <archiveIdentity>` in the original source project (Bash; `--dry-run` first). It executes the post-judgment mutations:

1. Refreshes escalation history from metadata in both summaries, preserving override reasons after PASS, then copies the final summary to `prospec/specs/_archived-history/{archiveIdentity}.md` (committed, drift-excluded via `ARCHIVED_EXCLUDES`). It refuses while the file still lacks `## Review & Verify`.
2. Reconciles `story_count`/`req_count` from complete final feature-spec bodies. Only `status: deprecated` permits a positive declared counter to become a body-derived zero; active, absent or unknown status retains positive-to-zero refusal. A refused reconciliation leaves that spec byte-identical: converge its body or repair the reported unreadable input before retrying.
3. Refreshes the product Feature Map through the existing product writer. On a decline, keep synchronization incomplete, fix the named cause and re-run finalize. Confirm the final map only when the refresh wrote: it lists every current active feature and preserves authored content outside the Feature Map apart from `last_updated`. For a bootstrapped file, check the loaded `product-spec-format.md` and record any knowingly unfilled `TBD` placeholder.

Finalize failure never un-archives. Resolve command readiness refusals, spec reconciliation refusals or product declines by their reported cause before re-running (idempotent); inspect retained paths after partial I/O failures.

> **Phase 3.7 Gate** — proceed when:
> - [ ] `prospec archive finalize` ran after Phase 3.5's graduation with its returned bundle identity
> - [ ] command readiness and reconciliation refusals resolved against their named inputs
> - [ ] final product map confirmed only when the refresh wrote; on a decline, fix its named cause and re-run finalize before claiming synchronization complete
> - [ ] final map lists every current active feature; authored content and knowingly unfilled bootstrap placeholders checked

### Phase 4: Knowledge Sync Re-check

The Entry Gate already required Knowledge to be synced — this phase re-confirms the gate held through archiving (no prompt, no question):

1. Reuse the Entry Gate's resolved set; `scale: quick` keeps its diff-derived set. For `scale: backfill`, sync the modules `prospec knowledge update --change` reports ∪ `metadata.related_modules`.
2. Confirm each affected module README still reflects the archived change; list the confirmed modules:
   ```
   Knowledge sync confirmed for this change:
   - [module-1]: [N] requirements reflected
   - [module-2]: [N] requirements reflected
   ```
3. If a gap is found (gate state regressed since the Entry Gate), STOP: run `prospec-knowledge-update` for the gap, then continue — do not fall back to an optional prompt
4. Refresh the deterministic project-structure snapshot so `prospec/ai-knowledge/raw-scan.md` reflects the just-archived code for the next `prospec-knowledge-generate`: run `prospec knowledge init --raw-scan-only` (Bash). Non-fatal — a refresh failure is noted, never blocks the archive.

> The archive service does **not** auto-trigger a knowledge update or a raw-scan refresh. Steps 3–4 above (and the Entry Gate) are the only knowledge-sync path — perform them manually; there is no service-side fallback.

> **Phase 4 Gate** — proceed when:
> - [ ] Every affected module README re-confirmed to reflect the archived change (no regression since the Entry Gate)
> - [ ] Confirmed modules listed with their reflected requirement counts; any gap resolved via `prospec-knowledge-update`
> - [ ] `raw-scan.md` refreshed via `prospec knowledge init --raw-scan-only` (or the failure noted, non-fatal)

### Phase 4.5: Auto-Harvest Recurring Lessons

Harvest this change's `quality_log` and `review.md` into the version-controlled ledger now — a fresh worktree may no longer have them.

Follow the **Harvest** definition in [`references/promotion-format.md`](references/promotion-format.md) (read it on demand; do not restate the ledger table here):

1. Scan this change's `metadata.yaml` `quality_log` (WARN/FAIL) and `review.md` (recurring criticals, plus Harvest's external-criterion candidates); cross `tasks.md` × kind markers for `[M]` manual tasks left unchecked.
2. Assign each finding its deterministic ledger key, emit the lesson JSON (`{key, description, kind, source_change, impact_modules}`) to a temp file and run `prospec learn upsert --lesson <file>` (Bash) — the **same single writer** `prospec-learn` Collect uses, so `prospec/ai-knowledge/_lessons-ledger.md` is never hand-edited from here. The CLI owns the mechanics: `source_changes` is a set and `frequency` increments once per distinct change, so re-archiving is **idempotent** (no double-count); a row whose `status` is `retired` is **refused** — counters untouched, `unchanged` reported with a warning naming the key. Recording that occurrence in the row's `description`, or un-retiring the row, is a human act for `prospec-learn` Sweep, never something to force through here. A recurring unchecked-`[M]` pattern records a `kind: playbook` "manual task systematically skipped" lesson; a `tasks.md` without kind markers is skipped, not guessed.
3. **Regression Pin Adjudication** — inspect regression pins introduced during this change's review fix-loop. If a pin enforces a generalizable structural or security invariant across a whole family (e.g. formatter sanitize, issue-ref sink), note it for promotion to a permanent directory-enumerated contract test during `prospec-learn`.
4. This is **non-fatal** (try/catch + log, like Feature Spec Sync / knowledge update) — a harvest failure never blocks archiving.

Then point the user at `prospec-learn` for Score/Promote — auto-harvest only accumulates; nothing is promoted to `_playbook.md`/Constitution without explicit human approval.

## Escalation Decision (CLI-Owned)

- Present CLI trigger/lifetime ordinal/exits/recommendation; stop.
- Only human `Manual override: <reason>` composed WARN grants one event/station attempt; observations/report warnings grant none. Replay consumes none; resolution expires grants; tests independent.
- Re-scope keeps amendment gates/status, no unlock. PASS retains history/prose/fences.

### Abandon an attempt

`prospec change abandon <name> --reason <text>` → `archiveDir` (main worktree `.prospec/abandoned/`). `--overturned`: disproved leaves. Save work → stage metadata → verify/publish → clean source; inspect partial paths; no auto-unlock.

Report preservedFileCount: manifest entries, not gitlink pins; worktree not restored. Human decides keep/restore via preservation/version control. Restore requires explicit authorization; reuse prior decision.

## Output Contract

> After running, self-assess and emit a concise Output Summary. Every Success Criterion must be objectively checkable (file existence / grep / test result / count) — no subjective adjectives.

### Success Criteria
- [ ] summary.md generated
- [ ] Feature Spec sync completed
- [ ] metadata status set to archived
- [ ] knowledge sync confirmed (Entry Gate held through Phase 4 re-check)

### Failure Conditions
- archived a non-verified change without confirmation
- Feature Spec sync skipped

### Output Summary
Emit one line: `Met N/M | Unmet: <items> | Overall: PASS|WARN|FAIL | Next: <one-line>`

## NEVER

- **NEVER** archive without user confirmation — accidental archiving moves active work out of changes/; recovery requires manual file moves. The explicit change name passed to `prospec archive <name>` is that confirmation's carrier — never archive unnamed
- **NEVER** hand-execute the deterministic mutations — `prospec archive` owns the move, scaffold summary, mechanical spec sync, and the product Feature-Map/feature-map writes; `prospec archive finalize` owns the `_archived-history` copy, counter reconciliation and post-graduation product refresh; hand-running any of them re-introduces the drift the CLI entry exists to prevent (preview with `--dry-run` instead)
- **NEVER** archive a change that is not `status: verified` — only `prospec-verify` at grade S/A produces `verified`; tell the user to verify to S/A first (lifecycle: `prospec/ai-knowledge/_status-lifecycle.md`)
- **NEVER** skip summary.md generation — summary is the permanent record in the archive directory; without it, the change has no audit trail
- **NEVER** emit a summary.md that lacks the `## Review & Verify` section — the `_archived-history` copy carries review/verify evidence (grade, criticals/majors, `quality_log`); when a source is absent record `Unverified`/`no review round`, never fabricate
- **NEVER** delete original files instead of moving — deletion is irreversible; archive preserves all artifacts for future reference and debugging
- **NEVER** modify the content of artifacts during archive — artifacts are the historical record; any modification falsifies the development history
- **NEVER** bypass the Entry Gate knowledge-sync check — a failed `prospec-knowledge-update` means the gate stays FAIL; fix it and re-run, then archive. Archiving with stale Knowledge writes a permanent record that contradicts the code, and no later checkpoint will force the sync
- **NEVER** archive without reading delta-spec.md — affected modules drive both Spec Sync and Knowledge Update; skipping produces orphaned requirements (`scale: quick` is the exception: modules come from diff paths and graduation from the Spec Impact section; `scale: backfill` graduates via the delta-spec as usual)
- **NEVER** skip the quick spec-impact check or treat its empty REQ-prefix module set as "touches no modules" — an absent delta-spec is not evidence of no impact; the actual diff is
- **NEVER** reimplement REQ-prefix classification — use the CLI report and resolve each named input refusal before continuing

## Error Handling

| Scenario | Action |
|----------|--------|
| No changes found in changes/ | Inform user that there are no changes to archive |
| Entry Gate knowledge-sync FAIL | Apply each refusal reason's remedy (`prospec-knowledge-update` for `KNOWLEDGE_UNSYNCED`, repair the named input for `KNOWLEDGE_INPUT_INVALID`), then re-run `prospec-archive` |
| Change missing metadata.yaml | Skip that change, warn user about incomplete change directory |
| Change missing delta-spec.md | `scale: quick`: expected — run the quick spec-impact check instead. Otherwise: archive with partial summary, note missing spec in summary.md |
| `prospec archive` reports `refused` / `not found` | The named target is not archivable (wrong status) or misspelled — resolve per the report (verify to S/A, or `prospec status` to list names); never force |
| Archive directory already exists | The CLI reports it skipped (exit 1) — investigate the stale destination with the user before retrying |
| Transfer fails | Report retained paths and phase; inspect before retrying |

## Next-Step Handoff

After the Output Summary, recommend the next step in the SDD workflow order
(`story → plan → tasks → implement → knowledge-update → review → verify → archive`, then periodic `learn`) — read
`metadata.yaml` status and `prospec/ai-knowledge/_status-lifecycle.md` (review and learn own no
status transition, so follow this order, not status alone). Provide the direct, actionable Skill
identity or CLI command for the next step (e.g. `prospec-plan`), allowing smooth continuation
without blocking on a separate confirmation turn. If the stage is terminal (`archived`), the linear
flow is complete — point to periodic `prospec-learn` rather than a workflow successor. If the result
does not advance (e.g. verify grade B/C/D), say so and point to the corrective step instead of
offering the next skill.

Files in this skill

  • SKILL.md29.8 KB
  • references/archive-format.md4.7 KB
  • references/feature-spec-format.md4.6 KB
  • references/product-spec-format.md5 KB
  • references/promotion-format.md6.4 KB
  • references/spec-graduation.md3.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.