9.2 KiB
Missing-spec runbook
24 packages either lack a folded openspec/specs/<cap>/spec.md entirely or have one that the conformance script cannot find for them. This runbook groups them by remediation type so an agent can work them in dependency order without re-discovering the categorisation.
For every group: read openspec/AGENTS.md Sections 13 and 14 first. Use templates in openspec/templates/. The 4-gate triple in CLAUDE.md "Pre-publish gate" applies.
Group 1 — Fold existing archive specs (4 packages)
These packages have specs in openspec/archive/2026-04-18-enterprise-crypto-family/specs/<cap>/ that were never folded into openspec/specs/. Mechanical archival cleanup — no spec writing needed.
| Package | Archive cap → fold to |
|---|---|
| crypto-browser | crypto-browser-engine → openspec/specs/crypto-browser-engine/spec.md |
| crypto-keys | crypto-keys → openspec/specs/crypto-keys/spec.md |
| crypto-sodium | crypto-sodium-engine → openspec/specs/crypto-sodium-engine/spec.md |
| crypto-vault | crypto-vault → openspec/specs/crypto-vault/spec.md |
Per-package steps
- Copy
openspec/archive/2026-04-18-enterprise-crypto-family/specs/<cap>/spec.mdtoopenspec/specs/<cap>/spec.md. - Verify the spec uses
### Requirement: <name>heading style; rewrite if not. - Add
**Verified by:**lines under every requirement. The implementations and tests already exist inpackages/crypto/<pkg>/. Map scenarios toit(...)titles. - Confirm
openspec/package-cap-map.ymlhas the entry (already populated for crypto-browser and crypto-sodium). - Run
bun scripts/openspec-conformance.ts @suaveplan/<pkg>— must be 0 errors. Plus the standard 4-gate triple. - No new OpenSpec change folder needed (this is a fold, not a contract change). Note the fold in a single
chore: fold archived crypto-family specscommit.
Group 2 — Package→cap mapping only (2 packages)
| Package | Reason script missed it |
|---|---|
| random | Owns 4 caps (random-utilities, seeded-prng, noise-functions, statistical-distributions) — script defaulted to single-cap lookup |
| readline | Specified inside cli cap — script defaulted to looking for a readline cap |
Per-package steps
- Confirm
openspec/package-cap-map.ymllists the package's caps (both already added). - Confirm the conformance script honors the YAML (see "Script integration" below).
- Run conformance — should now find the spec.
- If any of the mapped caps lack
**Verified by:**lines, treat as Group 5 (annotation only) for that cap.
Group 3 — Brand-new specs from enterprise source (15 packages)
Each package has a canonical source at ../suaveplan/enterprise/<pkg>.md. Per AGENTS.md Section 14, every requirement must cite a line range in the source.
| Package | Genesis path | Enterprise source |
|---|---|---|
| db | packages/database/db/ |
../suaveplan/enterprise/db.md |
| db-sqlite | packages/database/db-sqlite/ |
../suaveplan/enterprise/db-sqlite.md |
| storage | packages/storage/storage/ |
../suaveplan/enterprise/storage.md |
| streams | packages/flow/streams/ |
../suaveplan/enterprise/streams.md |
| qrcode | packages/barcode/qrcode/ |
../suaveplan/enterprise/qrcode.md |
| barcode | packages/barcode/barcode/ |
../suaveplan/enterprise/barcode.md |
| api-schemas | packages/api/api-schemas/ |
../suaveplan/enterprise/api-schemas.md |
| fsm | packages/flow/fsm/ |
../suaveplan/enterprise/fsm.md |
| domain-normalizer | packages/emails/domain-normalizer/ |
../suaveplan/enterprise/domain-normalizer.md |
| suppression | packages/emails/suppression/ |
../suaveplan/enterprise/suppression.md |
| compress-image | packages/image/compress-image/ |
../suaveplan/enterprise/compress-image.md |
| metadata | packages/audio/metadata/ |
../suaveplan/enterprise/metadata.md |
| diff | packages/data/diff/ |
../suaveplan/enterprise/diff.md |
| password-formats | packages/crypto/password-formats/ |
../suaveplan/enterprise/password-formats.md |
| security-codes | packages/platform/security-codes/ |
../suaveplan/enterprise/security-codes.md |
Per-package steps
- Read
../suaveplan/enterprise/<pkg>.mdend-to-end. - Read the genesis implementation under
packages/<plugin>/<pkg>/src/. - Read existing tests to know what scenarios are already pinned.
- Create
openspec/changes/<pkg>-spec-init/fromopenspec/templates/:proposal.mdwith## Source mappingtable covering every requirement (line ranges in enterprise source) and a## Requirements with no source linetable for genesis-only additions (e.g. 100% coverage policy).tasks.mdwith the standard 7-section structure.specs/<cap>/spec.mdwith### Requirement:blocks. Every requirement carries**Verified by:**at authoring time.
- If the spec exposes drift (e.g. enterprise source mandates an OTel histogram the impl doesn't emit), fix inline — do not defer. Standard from prior conformance audits.
- Run the 4-gate triple:
bunx turbo lint typecheck test --filter=@suaveplan/<pkg>bunx turbo test:coverage --filter=@suaveplan/<pkg>— 100/100/100/100bun scripts/openspec-conformance.ts @suaveplan/<pkg>— 0 errorsbunx turbo build --filter=@suaveplan/<pkg>
- Fold spec delta into
openspec/specs/<cap>/spec.md. Move change folder toopenspec/archive/<yyyy-mm-dd>-<change-id>/.
Suggested order (foundation first)
- db (substrate for db-sqlite, surrealdb, etc.)
- db-sqlite (depends on db)
- streams (substrate for many media/data packages)
- storage (depends on streams)
- fsm (control-flow leaf with broad fan-in)
- diff (leaf, used by undo/sync packages)
- domain-normalizer, suppression, security-codes (leaves)
- qrcode, barcode (codes leaves)
- api-schemas (depends on validation)
- compress-image, metadata (media leaves)
- password-formats (security leaf)
Group 4 — Genesis-original specs (no enterprise source) (7 packages)
These have no ../suaveplan/enterprise/<pkg>.md and need specs derived from the implementation.
| Package | Genesis path |
|---|---|
| testing-integration | packages/testing/testing-integration/ |
| testing-integration-garage-s3 | packages/testing/testing-integration-garage-s3/ |
| testing-integration-mailpit | packages/testing/testing-integration-mailpit/ |
| testing-integration-postgres | packages/testing/testing-integration-postgres/ |
| testing-integration-redis | packages/testing/testing-integration-redis/ |
| testing-integration-surrealdb | packages/testing/testing-integration-surrealdb/ |
| testing-integration-typesense | packages/testing/testing-integration-typesense/ |
Per-package steps
- Read the genesis implementation under
packages/testing/<pkg>/src/. - Read the package's
CLAUDE.mdblurb (inpackageslisting) for intent. - Create
openspec/changes/<pkg>-spec-init/from templates. - In
proposal.md:## Source mappingis required even with no source. Every requirement appears in the second table (## Requirements with no source line) with a justification — typically "Derived from genesis-original implementation; no enterprise/.md predecessor."- In a
## Design rationalesection (add to the template if absent), explain why this is genesis-original and what design decisions shape the contract.
- Draft
specs/testing-integration*/spec.mdwith### Requirement:blocks for every observable behavior. Every requirement carries**Verified by:**. - Run the 4-gate triple. Fold and archive.
Suggested order
testing-integration(core —ServiceFixture<TConfig>,TestEnvironment,HealthPoller,skipIfUnavailable).- The 6 adapters in any order (they depend on the core but not on each other).
Script integration — package-cap-map.yml lookup
The conformance script (scripts/openspec-conformance.ts) currently searches for openspec/specs/<bare>/spec.md where <bare> is the package's short name. To honour openspec/package-cap-map.yml:
- At script start, load
openspec/package-cap-map.ymlonce. Parse to aRecord<string, string[]>. - In the per-package routine, look up
<bare>in the map. Default to[<bare>]. - For each cap in the resolved list:
- Check
openspec/specs/<cap>/spec.mdexists and parses. - Run all spec-side checks (Verified-by lines, retroactive ticking, etc.) against that file.
- Aggregate findings under the same package report.
- Check
- For change-folder matching (
openspec/changes/*/specs/<cap>/spec.md), also iterate the resolved cap list rather than hard-coding<bare>.
This is a small refactor — the existing findRelatedChangeFolders function already reads **Package**: frontmatter; it just needs to also accept any of the package's caps when matching specs/<cap>/.
Out of scope for the runbook
- The 11 packages reclassified by the Batch C agent as "spec.md missing entirely" (qrcode, barcode, api-schemas, fsm, domain-normalizer, suppression, compress-image, metadata, diff, password-formats, security-codes) are now in Group 3 of this runbook — they have enterprise source. The runbook supersedes the prior reclassification.
enterprise-package-migrationskill in.claude/skills/already covers Group 3 + 4 workflows. This runbook is the triage list; the skill is the execution playbook.