specdo 1.0.2

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.
Files changed (161) hide show
  1. package/CHANGELOG.md +139 -0
  2. package/README.md +308 -0
  3. package/README.zh-CN.md +306 -0
  4. package/bin/specdo.js +3 -0
  5. package/dist/cli/index.d.ts +15 -0
  6. package/dist/cli/index.d.ts.map +1 -0
  7. package/dist/cli/index.js +297 -0
  8. package/dist/cli/index.js.map +1 -0
  9. package/dist/commands/_shared.d.ts +45 -0
  10. package/dist/commands/_shared.d.ts.map +1 -0
  11. package/dist/commands/_shared.js +124 -0
  12. package/dist/commands/_shared.js.map +1 -0
  13. package/dist/commands/apply.d.ts +30 -0
  14. package/dist/commands/apply.d.ts.map +1 -0
  15. package/dist/commands/apply.js +393 -0
  16. package/dist/commands/apply.js.map +1 -0
  17. package/dist/commands/archive.d.ts +25 -0
  18. package/dist/commands/archive.d.ts.map +1 -0
  19. package/dist/commands/archive.js +362 -0
  20. package/dist/commands/archive.js.map +1 -0
  21. package/dist/commands/doctor.d.ts +21 -0
  22. package/dist/commands/doctor.d.ts.map +1 -0
  23. package/dist/commands/doctor.js +180 -0
  24. package/dist/commands/doctor.js.map +1 -0
  25. package/dist/commands/domains.d.ts +14 -0
  26. package/dist/commands/domains.d.ts.map +1 -0
  27. package/dist/commands/domains.js +107 -0
  28. package/dist/commands/domains.js.map +1 -0
  29. package/dist/commands/explore.d.ts +48 -0
  30. package/dist/commands/explore.d.ts.map +1 -0
  31. package/dist/commands/explore.js +378 -0
  32. package/dist/commands/explore.js.map +1 -0
  33. package/dist/commands/init.d.ts +45 -0
  34. package/dist/commands/init.d.ts.map +1 -0
  35. package/dist/commands/init.js +243 -0
  36. package/dist/commands/init.js.map +1 -0
  37. package/dist/commands/list.d.ts +23 -0
  38. package/dist/commands/list.d.ts.map +1 -0
  39. package/dist/commands/list.js +135 -0
  40. package/dist/commands/list.js.map +1 -0
  41. package/dist/commands/propose.d.ts +22 -0
  42. package/dist/commands/propose.d.ts.map +1 -0
  43. package/dist/commands/propose.js +316 -0
  44. package/dist/commands/propose.js.map +1 -0
  45. package/dist/commands/show.d.ts +15 -0
  46. package/dist/commands/show.d.ts.map +1 -0
  47. package/dist/commands/show.js +214 -0
  48. package/dist/commands/show.js.map +1 -0
  49. package/dist/commands/status.d.ts +17 -0
  50. package/dist/commands/status.d.ts.map +1 -0
  51. package/dist/commands/status.js +146 -0
  52. package/dist/commands/status.js.map +1 -0
  53. package/dist/commands/sync.d.ts +21 -0
  54. package/dist/commands/sync.d.ts.map +1 -0
  55. package/dist/commands/sync.js +113 -0
  56. package/dist/commands/sync.js.map +1 -0
  57. package/dist/commands/validate.d.ts +117 -0
  58. package/dist/commands/validate.d.ts.map +1 -0
  59. package/dist/commands/validate.js +446 -0
  60. package/dist/commands/validate.js.map +1 -0
  61. package/dist/core/apply-brief-renderer.d.ts +35 -0
  62. package/dist/core/apply-brief-renderer.d.ts.map +1 -0
  63. package/dist/core/apply-brief-renderer.js +242 -0
  64. package/dist/core/apply-brief-renderer.js.map +1 -0
  65. package/dist/core/config-store.d.ts +190 -0
  66. package/dist/core/config-store.d.ts.map +1 -0
  67. package/dist/core/config-store.js +280 -0
  68. package/dist/core/config-store.js.map +1 -0
  69. package/dist/core/context-store.d.ts +96 -0
  70. package/dist/core/context-store.d.ts.map +1 -0
  71. package/dist/core/context-store.js +426 -0
  72. package/dist/core/context-store.js.map +1 -0
  73. package/dist/core/json-schemas.d.ts +349 -0
  74. package/dist/core/json-schemas.d.ts.map +1 -0
  75. package/dist/core/json-schemas.js +125 -0
  76. package/dist/core/json-schemas.js.map +1 -0
  77. package/dist/core/skill-content/cross-domain.d.ts +12 -0
  78. package/dist/core/skill-content/cross-domain.d.ts.map +1 -0
  79. package/dist/core/skill-content/cross-domain.js +291 -0
  80. package/dist/core/skill-content/cross-domain.js.map +1 -0
  81. package/dist/core/skill-content/protocol-examples.d.ts +13 -0
  82. package/dist/core/skill-content/protocol-examples.d.ts.map +1 -0
  83. package/dist/core/skill-content/protocol-examples.js +190 -0
  84. package/dist/core/skill-content/protocol-examples.js.map +1 -0
  85. package/dist/core/skill-content/workflow-content.d.ts +25 -0
  86. package/dist/core/skill-content/workflow-content.d.ts.map +1 -0
  87. package/dist/core/skill-content/workflow-content.js +1572 -0
  88. package/dist/core/skill-content/workflow-content.js.map +1 -0
  89. package/dist/core/skill-exporter.d.ts +186 -0
  90. package/dist/core/skill-exporter.d.ts.map +1 -0
  91. package/dist/core/skill-exporter.js +922 -0
  92. package/dist/core/skill-exporter.js.map +1 -0
  93. package/dist/core/spec-sync.d.ts +65 -0
  94. package/dist/core/spec-sync.d.ts.map +1 -0
  95. package/dist/core/spec-sync.js +226 -0
  96. package/dist/core/spec-sync.js.map +1 -0
  97. package/dist/core/task-parser.d.ts +58 -0
  98. package/dist/core/task-parser.d.ts.map +1 -0
  99. package/dist/core/task-parser.js +244 -0
  100. package/dist/core/task-parser.js.map +1 -0
  101. package/dist/core/template-renderer.d.ts +51 -0
  102. package/dist/core/template-renderer.d.ts.map +1 -0
  103. package/dist/core/template-renderer.js +362 -0
  104. package/dist/core/template-renderer.js.map +1 -0
  105. package/dist/domains/architecture.d.ts +34 -0
  106. package/dist/domains/architecture.d.ts.map +1 -0
  107. package/dist/domains/architecture.js +341 -0
  108. package/dist/domains/architecture.js.map +1 -0
  109. package/dist/domains/backend.d.ts +35 -0
  110. package/dist/domains/backend.d.ts.map +1 -0
  111. package/dist/domains/backend.js +367 -0
  112. package/dist/domains/backend.js.map +1 -0
  113. package/dist/domains/frontend.d.ts +36 -0
  114. package/dist/domains/frontend.d.ts.map +1 -0
  115. package/dist/domains/frontend.js +373 -0
  116. package/dist/domains/frontend.js.map +1 -0
  117. package/dist/domains/index.d.ts +49 -0
  118. package/dist/domains/index.d.ts.map +1 -0
  119. package/dist/domains/index.js +255 -0
  120. package/dist/domains/index.js.map +1 -0
  121. package/dist/domains/operations.d.ts +37 -0
  122. package/dist/domains/operations.d.ts.map +1 -0
  123. package/dist/domains/operations.js +344 -0
  124. package/dist/domains/operations.js.map +1 -0
  125. package/dist/domains/pool-ranking.d.ts +43 -0
  126. package/dist/domains/pool-ranking.d.ts.map +1 -0
  127. package/dist/domains/pool-ranking.js +153 -0
  128. package/dist/domains/pool-ranking.js.map +1 -0
  129. package/dist/domains/quality.d.ts +45 -0
  130. package/dist/domains/quality.d.ts.map +1 -0
  131. package/dist/domains/quality.js +368 -0
  132. package/dist/domains/quality.js.map +1 -0
  133. package/dist/domains/security.d.ts +19 -0
  134. package/dist/domains/security.d.ts.map +1 -0
  135. package/dist/domains/security.js +364 -0
  136. package/dist/domains/security.js.map +1 -0
  137. package/dist/domains/signal-match.d.ts +25 -0
  138. package/dist/domains/signal-match.d.ts.map +1 -0
  139. package/dist/domains/signal-match.js +67 -0
  140. package/dist/domains/signal-match.js.map +1 -0
  141. package/dist/domains/types.d.ts +354 -0
  142. package/dist/domains/types.d.ts.map +1 -0
  143. package/dist/domains/types.js +12 -0
  144. package/dist/domains/types.js.map +1 -0
  145. package/dist/index.d.ts +9 -0
  146. package/dist/index.d.ts.map +1 -0
  147. package/dist/index.js +9 -0
  148. package/dist/index.js.map +1 -0
  149. package/dist/protocols/index.d.ts +36 -0
  150. package/dist/protocols/index.d.ts.map +1 -0
  151. package/dist/protocols/index.js +85 -0
  152. package/dist/protocols/index.js.map +1 -0
  153. package/dist/protocols/review-to-solid.d.ts +32 -0
  154. package/dist/protocols/review-to-solid.d.ts.map +1 -0
  155. package/dist/protocols/review-to-solid.js +309 -0
  156. package/dist/protocols/review-to-solid.js.map +1 -0
  157. package/dist/utils/prompt.d.ts +37 -0
  158. package/dist/utils/prompt.d.ts.map +1 -0
  159. package/dist/utils/prompt.js +81 -0
  160. package/dist/utils/prompt.js.map +1 -0
  161. package/package.json +80 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,139 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - `specdo init <agent>` exports **5 core workflow skill packages** into the
13
+ canonical skill directory of the chosen AI tool. Each package is a
14
+ directory with a concise `SKILL.md` plus a `references/` sub-directory
15
+ carrying the detailed reference material. SpecDo-specific domain and
16
+ protocol guidance now lives inside those workflow-local references instead
17
+ of shipping as parallel top-level skills, which keeps the exported surface
18
+ aligned with the OpenSpec core workflow paradigm while still adding richer
19
+ guardrails. This follows the [Agent Skills](https://agentskills.io)
20
+ progressive disclosure standard so agents only load the deeper content
21
+ when needed. Eight agents are supported, each path verified against the
22
+ upstream docs:
23
+ - `claude` → `.claude/skills/` (Anthropic)
24
+ - `qoder` → `.qoder/skills/` (Qoder)
25
+ - `cursor` → `.cursor/skills/` (Cursor 2.4+)
26
+ - `cline` → `.cline/skills/` (Cline experimental)
27
+ - `codex` → `.codex/skills/` (OpenAI Codex CLI)
28
+ - `goose` → `.goose/skills/` (Block Goose)
29
+ - `kilo` → `.kilo/skills/` (Kilo Code)
30
+ - `opencode` → `.opencode/skills/` (OpenCode, Claude-compatible)
31
+
32
+ Multiple targets can be listed via comma separation (e.g. `claude,cursor`).
33
+ - `specdo init universal` (escape hatch) writes into the community
34
+ `.agents/skills/` directory, which is picked up by Cursor / Goose / Kilo
35
+ Code / Roo Code via their compatibility loaders. Use this when your AI
36
+ tool is unsupported but understands the open Agent Skills standard. This
37
+ is also the non-interactive form of the unknown-agent fallback prompt.
38
+ - Typo correction: when `init` receives a name that is not in the
39
+ registry, SpecDo suggests the closest canonical match using Levenshtein
40
+ distance ≤ 1 (e.g. `clude` → `claude`). When no candidate is close
41
+ enough in an interactive shell, SpecDo prompts to install the universal
42
+ fallback; in non-interactive shells it prints a short hint pointing at
43
+ `specdo init universal`.
44
+ - `specdo init -g` (alias `--global`) installs the same skills into the
45
+ user-global directory (`~/.<agent>/skills/`); requires an agent and skips
46
+ the project skeleton.
47
+ - New helper modules under `src/core/skill-content/`
48
+ (`workflow-content.ts`, `cross-domain.ts`, `protocol-examples.ts`) host
49
+ the hand-authored prose used by the progressive-disclosure skill packages.
50
+ `src/core/skill-exporter.ts` renders SKILL.md + references at runtime
51
+ from `DomainModule` / `Protocol` definitions and these content modules
52
+ — no template files, single source of truth in code.
53
+
54
+ ### Changed
55
+
56
+ - **BREAKING**: `specdo init` now requires an agent name as a positional
57
+ argument (e.g. `specdo init claude`). Running `specdo init` alone exits
58
+ with code 2 and prints usage help. The previous `--agent <name>` flag
59
+ has been removed; use the positional argument instead. Migration: replace
60
+ `specdo init --agent claude` with `specdo init claude`.
61
+ - **BREAKING**: removed the `specdo-init` workflow skill. `init` is a
62
+ bootstrap action the agent invokes once — a dedicated skill for it added
63
+ no recall value and duplicated `README` content. The workflow skill set
64
+ is now 5 (explore / propose / apply / sync / archive).
65
+ - **BREAKING**: removed the `-y` / `--yes` flag from `specdo init`. The
66
+ community-fallback prompt for unknown agents is now strictly interactive;
67
+ in non-interactive shells, invoke `specdo init universal` explicitly
68
+ instead. This removes a redundant code path — the explicit positional
69
+ form is shorter, discoverable through `--help`, and harder to misuse.
70
+ - **Progressive disclosure**: each exported skill is now a directory rather
71
+ than a single file. `SKILL.md` (≤ 80 lines) carries the metadata, trigger
72
+ phrases, and the most actionable snippets; `references/*.md` carries the
73
+ full command matrix / exit-code tables (workflow), the full checklist /
74
+ patterns / cross-domain notes (domain), and the full per-step workflow /
75
+ output contract / do-don't code examples (protocol). Agents load
76
+ reference material on demand, saving context window.
77
+ - **Strict-validation guarantee**: `specdo/` is created **only** after the
78
+ agent argument is fully validated. A typo, unknown agent, or `'all'`
79
+ leaves the filesystem untouched (exit 2). Fix the command and re-run to
80
+ actually initialize. This replaces the brief "skeleton-first" behaviour
81
+ that shipped in a previous unreleased commit — the new contract is
82
+ cleaner because users get a single, atomic init outcome instead of a
83
+ partially-initialized workspace they have to reason about.
84
+ - **Interactive universal-fallback prompt**: when an unknown agent has no
85
+ close Levenshtein match and stdin is a TTY, SpecDo asks `Install skills
86
+ to the community fallback (.agents/skills/) instead? [y/N]`. Answering
87
+ `y` initializes the workspace and writes universal skills in one shot.
88
+ Any other reply aborts cleanly with nothing on disk. Non-interactive
89
+ shells (CI, piped stdin, `CI=1`, `SPECDO_NON_INTERACTIVE=1`) skip the
90
+ prompt and exit 2 with a short hint pointing to `specdo init universal`.
91
+ The error text no longer asks users to retype a magic `universal` token
92
+ implicitly — either the prompt or the explicit positional form resolves it.
93
+ - `specdo init <agent>` is safe to re-run on already-initialized projects:
94
+ it enters **refresh mode**, repairs any missing skeleton pieces in place
95
+ (sub-directories, `.gitkeep` files), and re-renders SKILL.md and
96
+ references files. `config.yaml` is preserved — user edits are never
97
+ overwritten.
98
+ - `'all'` and the universal `agents` keyword are intentionally rejected.
99
+ Users must enumerate every IDE target explicitly so that a typo never
100
+ fans out across the whole machine.
101
+ - Tools deliberately excluded after audit: Continue.dev (no directory-based
102
+ skill loading), Windsurf (`.windsurfrules` is rules injection, not skills),
103
+ Aider (no canonical directory). They may be added later if upstream
104
+ evolves toward a SKILL.md-style mechanism.
105
+
106
+ ## [1.0.1] - 2026-06-03
107
+
108
+ ### Added
109
+
110
+ - Self-contained `specdo` CLI for spec-driven development with six built-in domains:
111
+ `security`, `architecture`, `operations`, `backend`, `quality`, `frontend`
112
+ - End-to-end workflow commands: `init`, `explore`, `propose`, `apply`, `sync`,
113
+ `validate`, `archive`, plus inspection commands `list`, `show`, `status`,
114
+ `domains`, `doctor`
115
+ - Atomic `context.json` persistence with lock file protection, `.bak` recovery,
116
+ and stable `--json` output contracts for automation
117
+ - Domain overrides through `specdo/config.yaml`, including per-stage disable,
118
+ list extension/replacement, and pattern overrides
119
+ - Hash-based spec promotion from `specdo/changes/<name>/specs/` into
120
+ `specdo/specs/`, including `--force` backups and conflict tracking
121
+ - Repository documentation under `docs/reference/` covering commands,
122
+ architecture, and methodology
123
+ - Release verification chain with lint, `tsc --noEmit`, tests, packed CLI
124
+ verification, and install/run smoke coverage
125
+
126
+ ### Fixed
127
+
128
+ - Release smoke now validates generated `proposal.md`, `design.md`, `tasks.md`,
129
+ and `apply-brief.md` structure before switching to deterministic sync/archive fixtures
130
+ - Packed tarballs now ship the referenced `docs/reference/` files so installed
131
+ `README.md` / `CHANGELOG.md` links resolve inside the package
132
+ - `sync` clears stale `forcedConflicts` / `forcedConflictHashes` after a clean
133
+ run or an unresolved conflict, so `context.json.sync` reflects the current state
134
+
135
+ ### Security
136
+
137
+ - Atomic writes and recovery snapshots reduce the chance of corrupted workflow state
138
+ - Sync conflict backups protect canonical specs during `--force` overwrites
139
+ - Path validation and structured workspace layout limit accidental file traversal
package/README.md ADDED
@@ -0,0 +1,308 @@
1
+ <div align="center">
2
+
3
+ # SpecDo
4
+
5
+ **Turn ideas into production-ready deliverables through structured specifications, domain expertise, and evidence-backed execution.**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/specdo.svg)](https://www.npmjs.com/package/specdo)
8
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
9
+ [![Node.js](https://img.shields.io/badge/node-%E2%89%A5%2020.19-brightgreen)](https://nodejs.org)
10
+
11
+ </div>
12
+
13
+ > [中文](README.zh-CN.md)
14
+
15
+ ---
16
+
17
+ <p align="center">
18
+ <img src="./assets/specdo-architecture.png" alt="SpecDo Architecture" width="100%">
19
+ </p>
20
+
21
+
22
+ ## Why SpecDo?
23
+
24
+ Most AI coding workflows stop at code generation.
25
+
26
+ SpecDo focuses on **delivery**.
27
+
28
+ Instead of asking an AI to "build something", SpecDo guides both humans and AI agents through a structured, evidence-backed workflow:
29
+
30
+ ```text
31
+ Explore → Propose → Apply → Sync → Archive
32
+ ```
33
+
34
+ Every step produces artifacts that can be reviewed, versioned, audited, and improved.
35
+
36
+ - **Local-first** — runs on your machine, works with any AI coding tool
37
+ - **Agent-driven discovery** — your AI agent grills you with domain-specific questions (at least 8, typically 10–30 per change) before generating proposals
38
+ - **Full domain coverage** — all six engineering domains inject checklists at every stage, even domains you didn't explicitly discuss
39
+ - **Evidence-backed** — tasks require proof before archival; every change leaves an audit trail
40
+ - **Project-customizable** — override any domain stage with your team's standards via `config.yaml`
41
+
42
+
43
+
44
+ ---
45
+
46
+ ## Core Concepts
47
+
48
+ SpecDo is built on three primitives.
49
+
50
+ ### Workflow
51
+
52
+ A closed-loop pipeline that carries every change from idea to archived evidence:
53
+
54
+ ```text
55
+ explore → propose → apply → sync → archive
56
+ ```
57
+
58
+ Each stage produces immutable artifacts — `proposal.md`, `design.md`, `tasks.md`, `specs/`, `apply-brief.md` — that together form the **source of truth** for the change.
59
+
60
+ ### Domain Knowledge Engine
61
+
62
+ Six built-in domain modules inject stage-appropriate expertise at every step. Under the hood, each domain is a typed `DomainModule` constant — statically compiled into TypeScript, not loaded from files at runtime.
63
+
64
+ | Domain | Focus |
65
+ |--------|-------|
66
+ | **Security** | Threats, risks, OWASP Top 10, auth, encryption, input validation |
67
+ | **Architecture** | System boundaries, API design, ADRs, integration patterns |
68
+ | **Operations** | Release management, CI/CD, observability, dependency upgrades |
69
+ | **Backend** | Data models, query optimization, migrations, error handling |
70
+ | **Quality** | TDD, code review, debugging, performance profiling |
71
+ | **Frontend** | Components, a11y, Core Web Vitals, responsive design |
72
+
73
+ Each domain provides **4 stages of pre-authored knowledge**:
74
+
75
+ ```
76
+ explore → signals (trigger keywords) + clarifying questions
77
+ design → checklists + patterns + anti-patterns
78
+ implement → focus areas + patterns + common mistakes
79
+ verify → verification gates before archival
80
+ ```
81
+
82
+ > **Key design choice**: `--domains` controls which domains you **ask questions about** during explore. `propose` always injects **all 6 domains' checklists** into design.md and tasks.md. `apply` matches domains dynamically per task via signal scoring, falling back to the domains used during propose.
83
+
84
+ ### Protocols
85
+
86
+ Beyond "what to focus on" (domains), SpecDo defines "how to execute" (protocols):
87
+
88
+ - **review-to-solid** — a 7-step cyclic hardening workflow: scope → audit → findings → fix → re-review → converge, with P1/P2/P3 severity grading and a mandatory Delta Table output.
89
+
90
+ Protocols are injected into `apply-brief.md` when the quality domain is active.
91
+
92
+ ---
93
+
94
+ ## Quick Start
95
+
96
+ ```bash
97
+ # 1. Install (Node.js ≥ 20.19)
98
+ npm install specdo -g
99
+
100
+ # 2. Initialize -- creates config.yaml + exports AI agent skills
101
+ specdo init claude
102
+
103
+ # 3. Explore -- capture a change idea (use --domains to focus questions)
104
+ specdo explore "Add rate limiting to the public API" --domains backend
105
+
106
+ # 4. Propose -- generate proposal, design, tasks, and specs
107
+ specdo propose --change add-rate-limiting-to-the-public-api
108
+
109
+ # 5. Apply -- start the TDD execution loop
110
+ specdo apply --change add-rate-limiting-to-the-public-api
111
+ specdo apply --change add-rate-limiting-to-the-public-api --done 1.1 --evidence "middleware added, tests passing"
112
+
113
+ # 6. Sync -- promote specs into the canonical library
114
+ specdo sync --change add-rate-limiting-to-the-public-api
115
+
116
+ # 7. Archive -- finalize with evidence trail
117
+ specdo archive --change add-rate-limiting-to-the-public-api
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Workflow Outputs
123
+
124
+ A complete SpecDo change produces these artifacts:
125
+
126
+ ```text
127
+ specdo/changes/<name>/
128
+ ├── context.json ← single source of truth (atomic writes)
129
+ ├── proposal.md ← why + scope + risks
130
+ ├── design.md ← how (all 6 domain checklists injected)
131
+ ├── tasks.md ← ordered, numbered task list (drives apply)
132
+ ├── apply-brief.md ← TDD execution guide with domain focus areas
133
+ └── specs/ ← change-scoped spec drafts
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Project Structure
139
+
140
+ ```text
141
+ specdo/
142
+ ├── config.yaml # domain overrides + project settings
143
+ ├── changes/ # active in-flight changes
144
+ ├── specs/ # canonical specification library
145
+ └── archive/ # completed changes with evidence trail
146
+ ```
147
+
148
+ `context.json` uses write-temp → fsync → rename with `.bak` snapshots and advisory file locking — zero external dependencies.
149
+
150
+ ---
151
+
152
+ ## AI Agent Integration
153
+
154
+ SpecDo exports itself as **progressive-disclosure skill packages** — 5 `SKILL.md` files with `references/` — into 8 canonical AI tools:
155
+
156
+ | Agent | Project path | Global path |
157
+ |-------|-------------|-------------|
158
+ | `claude` | `.claude/skills/` | `~/.claude/skills/` |
159
+ | `qoder` | `.qoder/skills/` | `~/.qoder/skills/` |
160
+ | `cursor` | `.cursor/skills/` | `~/.cursor/skills/` |
161
+ | `cline` | `.cline/skills/` | `~/.cline/skills/` |
162
+ | `codex` | `.codex/skills/` | `~/.codex/skills/` |
163
+ | `goose` | `.goose/skills/` | `~/.goose/skills/` |
164
+ | `kilo` | `.kilo/skills/` | `~/.kilo/skills/` |
165
+ | `opencode` | `.opencode/skills/` | `~/.opencode/skills/` |
166
+
167
+ Typo correction (`clude` → `claude`) and unknown-agent fallback (`.agents/skills/`) are built in. SpecDo never touches your `AGENTS.md` or `CLAUDE.md`.
168
+
169
+ ### Exported skills
170
+
171
+ | Skill | Purpose |
172
+ |-------|---------|
173
+ | `specdo-explore` | Agent-driven discovery with grill-me methodology |
174
+ | `specdo-propose` | Render proposal / specs / design / tasks with full domain injection |
175
+ | `specdo-apply` | TDD execution loop with per-task evidence |
176
+ | `specdo-sync` | Promote specs into canonical `specdo/specs/` |
177
+ | `specdo-archive` | Finalize with evidence trail and audit summary |
178
+
179
+ ---
180
+
181
+ ## Customization
182
+
183
+ SpecDo ships with built-in best practices for all 6 domains. Use
184
+ `specdo/config.yaml` to layer your team's own standards **on top** —
185
+ no source-code changes needed.
186
+
187
+ ### Quick reference
188
+
189
+ | Dimension | Options |
190
+ |-----------|---------|
191
+ | **Domain** | `security` `architecture` `backend` `quality` `frontend` `operations` |
192
+ | **Stage** | `explore` `design` `implement` `verify` |
193
+ | **List fields** | `questions` `checklist` `focusAreas` `antiPatterns` |
194
+ | **Actions** | `prepend` (insert at head) `append` (append to tail) `replace` (replace entire list) |
195
+ | **Special** | `enabled: false` (disable a stage) `patterns` (key-value map; same key overwrites, new key appends) |
196
+
197
+ ### Full example
198
+
199
+ ```yaml
200
+ # specdo/config.yaml
201
+ domainVersion: "1.0"
202
+ overrides:
203
+ security:
204
+ explore:
205
+ questions:
206
+ - prepend: "[ORG] Is SOC2 compliance required?"
207
+ - append: "[ORG] Has the last pentest report been resolved?"
208
+ design:
209
+ checklist:
210
+ - prepend: "Validate against internal threat model TM-001"
211
+ - append: "Sign-off from #sec-review channel"
212
+ verify:
213
+ enabled: false # disable the entire verify stage for security
214
+
215
+ architecture:
216
+ design:
217
+ checklist:
218
+ - replace: "[ORG] Follow RFC-0421 micro-frontend boundary rules"
219
+ patterns:
220
+ "Modular Monolith (default)": "[ORG] Mono-first + company module boundary spec"
221
+ "[ORG] Event-driven CQRS": "Use Kafka + company event schema registry"
222
+
223
+ backend:
224
+ implement:
225
+ focusAreas:
226
+ - append: "[ORG] All migrations must use the internal db-migrate-safe tool"
227
+ antiPatterns:
228
+ - append: "[ORG] Never concatenate user input into ORM raw queries"
229
+
230
+ quality:
231
+ implement:
232
+ patterns:
233
+ "Property-based testing": "Use fast-check for parser fuzz"
234
+
235
+ operations:
236
+ verify:
237
+ checklist:
238
+ - append: "[ORG] Announce releases in #sre-release channel before deploy"
239
+ ```
240
+
241
+ ### Action rules
242
+
243
+ | Rule | Detail |
244
+ |------|--------|
245
+ | One action per item | Each override item must contain exactly one of `prepend`, `append`, or `replace` |
246
+ | No mixing in one field | A single field cannot combine `replace` with `prepend`/`append` items |
247
+ | Unknown domain or stage | Zod schema validation fails; `specdo validate` reports the error |
248
+ | Unknown field | Caught by `strict()` — silently rejected with no effect |
249
+
250
+ ### Verify your overrides
251
+
252
+ ```bash
253
+ # Inspect a resolved domain after overrides are applied
254
+ specdo domains show security
255
+
256
+ # Validate config.yaml correctness
257
+ specdo validate
258
+ ```
259
+
260
+ ---
261
+
262
+ ## All Commands
263
+
264
+ ### Workflow
265
+
266
+ | Command | What it does |
267
+ |---------|-------------|
268
+ | `init <agent>[,<agent>...]` | Create workspace + `config.yaml` + export skills |
269
+ | `explore [idea]` | Agent-driven discovery: `--domains`, `--context`, `--depth` |
270
+ | `propose --change <n>` | Render proposal / design / tasks / `specs/<capability>/spec.md` |
271
+ | `apply --change <n>` | Execution brief; `--done 1.1 --evidence "..."` marks progress |
272
+ | `sync --change <n>` | Promote change specs into canonical `specdo/specs/` |
273
+ | `archive --change <n>` | Validate completeness + move to `specdo/archive/` |
274
+
275
+ ### Inspection
276
+
277
+ | Command | What it does |
278
+ |---------|-------------|
279
+ | `list [--specs\|--archived] [--json]` | List changes, specs, or archived entries |
280
+ | `show <name> [--type spec] [--json]` | Display change details or resolve specs |
281
+ | `status [--change <n>] [--json]` | Stage progress for one or all changes |
282
+ | `validate [--change <n>] [--json]` | Schema + cross-reference + tasks consistency |
283
+ | `domains list\|show <name>` | Inspect resolved domain definitions |
284
+ | `doctor [--deep] [--json]` | Workspace health check |
285
+
286
+ All inspection commands support `--json` for automation.
287
+
288
+ ---
289
+
290
+ ## Development
291
+
292
+ ```bash
293
+ pnpm install
294
+ pnpm test # vitest (521 tests)
295
+ pnpm run build # TypeScript → dist/
296
+ pnpm run release:check # full pipeline: lint + tsc + test + pack + smoke
297
+ ```
298
+
299
+ Runtime dependencies: `chalk`, `commander`, `yaml`, `zod` — nothing else.
300
+
301
+ ---
302
+
303
+ ## Acknowledgments
304
+
305
+ SpecDo is adapted from [OpenSpec](https://github.com/Fission-AI/OpenSpec), a specification-driven development framework. We're grateful to the OpenSpec authors for establishing the core `changes/` → `specs/` → `archive/` workflow paradigm that SpecDo builds upon.
306
+
307
+ ---
308
+ </div>