scaffold-agent-specs 0.1.6 → 0.1.8

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.
package/README.md CHANGED
@@ -6,33 +6,7 @@ A deliberately small, dependency-free CLI for **spec-driven agentic coding**. It
6
6
 
7
7
  Node.js 20 or newer and npm (for installation or `npx`). The scaffolded repository itself can use **any** programming language or framework.
8
8
 
9
- ## Use locally before publishing
10
-
11
- Download and extract this project, then run:
12
-
13
- ```sh
14
- cd scaffold-agent-specs
15
- npm test
16
- node bin/scaffold-agent-specs.js --help
17
-
18
- # Preview what will be created in any repo:
19
- node bin/scaffold-agent-specs.js init --dir /path/to/your/repo --dry-run
20
-
21
- # Actually initialize the repo:
22
- node bin/scaffold-agent-specs.js init --dir /path/to/your/repo
23
- ```
24
-
25
- Or use `npm link` from this package directory to install the development command into your PATH:
26
-
27
- ```sh
28
- npm link
29
- cd /path/to/your/repo
30
- scaffold-agent-specs init
31
- ```
32
-
33
- Unlink later with `npm unlink -g scaffold-agent-specs`.
34
-
35
- ## After publishing to npm
9
+ ## Usage
36
10
 
37
11
  From the root of any project:
38
12
 
@@ -46,7 +20,7 @@ When the user and agent have discussed a feature and the user **explicitly accep
46
20
  npx scaffold-agent-specs feature "User statistics page" --approved
47
21
  ```
48
22
 
49
- This would create `docs/features/feature-001-user-statistics-page/` with these files:
23
+ This creates `docs/features/feature-001-user-statistics-page/` with these files:
50
24
 
51
25
  - `PLAN.md` for the approved scope, constraints, requirements and proposed approach.
52
26
  - `ACCEPTANCE_MATRIX.md` for objective acceptance criteria and verification evidence.
@@ -115,6 +89,16 @@ There is intentionally no `implement` command: an agent should follow `AGENTS.md
115
89
 
116
90
  ## Develop
117
91
 
92
+ To run the CLI from a clone of this repository:
93
+
94
+ ```sh
95
+ npm test
96
+ node bin/scaffold-agent-specs.js --help
97
+ node bin/scaffold-agent-specs.js init --dir /path/to/your/repo --dry-run
98
+ ```
99
+
100
+ Or use `npm link` to put the development command on your PATH, and `npm unlink -g scaffold-agent-specs` to remove it later.
101
+
118
102
  ```sh
119
103
  npm test # Built-in Node.js test runner
120
104
  npm run format # Format scaffold Markdown with Prettier
@@ -123,7 +107,7 @@ npm run pack:check # Preview npm-published file manifest
123
107
  npm pack # Produce local npm tarball for testing
124
108
  ```
125
109
 
126
- For publication instructions, see [`PUBLISHING.md`](PUBLISHING.md).
110
+ For the release steps, see [`PUBLISHING.md`](PUBLISHING.md).
127
111
 
128
112
  ## License
129
113
 
@@ -39,7 +39,8 @@
39
39
  "bc70d6dee9f3f76affb0636ff804a112885b0973aaa2753ac970fc83d0260b5e",
40
40
  "a09404a3dce7e2c1f7aa0efce59c5b075943ad768a02b62dc51e08e44a050318",
41
41
  "53776f37c6f55ece45c4b4d32d2a48749031c90e77047d9a730c3f150af0d79f",
42
- "3753a29898a4209208fdbb8f1e9a3de206d845d95e60d8c543f48c2c239780bf"
42
+ "3753a29898a4209208fdbb8f1e9a3de206d845d95e60d8c543f48c2c239780bf",
43
+ "78e89555d30c751816a523575b57aca8d8f2421b478769134bf31c1a16967a04"
43
44
  ],
44
45
  "CLAUDE.md": [
45
46
  "272bcb5a9f136af56c1c93203c21976e02a09ed0a59d2515fad23d24b6c34408"
@@ -50,7 +51,8 @@
50
51
  "9dd7762484311d7a2a59620d4e89c61e4eb68688d9ebe1b3e2f2ac6d114373fd",
51
52
  "049b5a682f613a0bb2dab7bd39e79645860eb30202d358ed9a879dbe238e84bc",
52
53
  "8f66846159f0f049af2035fd71be7b289cc999099ad2ac6c1aa3b61745754745",
53
- "4e12aed278f410305dc640a9f9cb0fa5135e28b0963c2a9bc4a8b7810e4af63f"
54
+ "4e12aed278f410305dc640a9f9cb0fa5135e28b0963c2a9bc4a8b7810e4af63f",
55
+ "3c2f525236c4b45addd5d62ffa3466b93d6502829082c1248da35a504d186e8a"
54
56
  ],
55
57
  "docs/adr/README.md": [
56
58
  "2f27a4a5ecfb92725875c0b859194588b0ed367ac87b7d321ba063062abf25d5"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scaffold-agent-specs",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "A tiny, spec-driven workflow scaffold for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -16,7 +16,7 @@ These are the shared instructions for AI coding agents working in this repositor
16
16
  For **new features**, follow this sequence:
17
17
 
18
18
  1. **Discover:** Discuss the idea with the user. Understand the problem, users, expected behavior, constraints, boundaries, and unresolved questions. Do not implement the feature or create its feature directory during discovery.
19
- 2. **Propose:** Present a concise scope summary covering the goal, in-scope and out-of-scope behavior, important acceptance outcomes, assumptions, and consequential open questions. Explicitly offer **accept / revise / discard**.
19
+ 2. **Propose:** Present a concise scope summary covering the goal, in-scope and out-of-scope behavior, important acceptance outcomes, assumptions, and consequential open questions. If the scope holds parts that can be built and verified on their own, propose splitting it into several features. Explicitly offer **accept / revise / discard**.
20
20
  3. **Get approval:** Treat only a clear, affirmative user response as scope approval. If the user revises the proposal, summarize the revised scope and seek approval again. If discarded, do not create feature artifacts.
21
21
  4. **Specify:** After approval, create `docs/features/feature-NNN-kebab-case/` and populate `PLAN.md`, `ACCEPTANCE_MATRIX.md`, and `TASKS.md` from `.agent-specs/templates/feature/`, following the steps in [`docs/WORKFLOW.md`](docs/WORKFLOW.md) (Phase 3). Add `DESIGN.md` for substantial UX/technical design and `RESEARCH.md` for findings worth preserving, only when needed. Create `HANDOFF.md` when a real session handoff is useful. Record the approved scope faithfully. Mark proposed technical choices as proposed, not approved.
22
22
  5. **Stop at the spec boundary:** After writing the feature documents, summarize what was created and stop. **Do not start implementation** until the user explicitly requests it, possibly in a later session.
@@ -27,7 +27,7 @@ Existing-feature work and ordinary fixes should follow the user's requested scop
27
27
 
28
28
  ### Scope changes and technical decisions
29
29
 
30
- - An approved feature scope is the baseline. Ask for renewed approval before materially changing promised behavior, exclusions, or acceptance criteria.
30
+ - An approved feature scope is the baseline. Ask for renewed approval before materially changing promised behavior, exclusions, or acceptance criteria, and before adding user-visible behavior the scope doesn't include, however small.
31
31
  - Technical implementation details can evolve within that scope. Surface decisions that introduce major dependencies, migrations that modify or delete existing data, security implications, substantial complexity, or broad architectural consequences before committing to them.
32
32
  - Keep proposed decisions in the feature `PLAN.md`. Add a project-wide ADR **when a significant architectural decision has actually been adopted**, typically after implementation. For consequential decisions adopted earlier, record the ADR at adoption rather than losing the rationale. Never turn an unimplemented proposal into an accepted ADR.
33
33
 
@@ -8,6 +8,7 @@ This document expands the feature lifecycle required by [`AGENTS.md`](../AGENTS.
8
8
  - Check for overlap with existing features: list `docs/features/` and judge by folder names. Open a feature's `PLAN.md` only when its name suggests related scope, and read its summary and approved scope rather than the whole folder. If scope overlaps, say so in the proposal and settle with the user which feature owns it.
9
9
  - Ask focused clarifying questions, using the agent's interactive question interface where available or normal chat otherwise. Prefer small, purposeful batches over long questionnaires.
10
10
  - Establish the problem, target users, expected behaviors, important edge cases, constraints, dependencies, and exclusions.
11
+ - Ask how the user wants the feature verified when that affects effort or tooling, for example browser end-to-end tests or checks on a device or service the agent can't reach. If the project already has a test approach, follow it instead of asking.
11
12
  - Offer sensible defaults and surface tradeoffs; do not silently make consequential product decisions.
12
13
  - Do **not** create a feature directory, commit a spec, or implement the feature yet.
13
14
 
@@ -21,6 +22,8 @@ Present a readable summary with:
21
22
  4. **Acceptance expectations**: how success will be recognized.
22
23
  5. **Assumptions, risks, and open questions**: especially choices that affect cost or design.
23
24
 
25
+ **Size the feature.** A feature is one increment the user can review and verify in one sitting. If the scope contains parts that can be built and verified on their own, or would need more than about ten acceptance criteria, propose splitting it into several features: list them in build order with their dependencies, and let the user choose between the split and a single feature. Each feature gets its own directory; one approval can cover the whole set.
26
+
24
27
  Ask the user to **accept, revise, or discard**.
25
28
 
26
29
  - **Accept:** proceed to specification.
@@ -32,7 +35,7 @@ Ask the user to **accept, revise, or discard**.
32
35
 
33
36
  Create the feature directory by hand:
34
37
 
35
- 1. **Number:** find the highest `NNN` among the existing `docs/features/feature-NNN-*` directories and add one (start at `001`). Never reuse a number.
38
+ 1. **Number:** find the highest `NNN` among the existing `docs/features/feature-NNN-*` directories and add one (start at `001`). Never reuse a number. If the user re-scopes or splits a feature before any of it is implemented, restructure its documents in a new commit; it may keep its number and take a new slug.
36
39
  2. **Name:** `docs/features/feature-NNN-kebab-case/`, where `kebab-case` is a short slug of the feature title (for example `feature-007-user-statistics-page`).
37
40
  3. **Copy:** `PLAN.md`, `ACCEPTANCE_MATRIX.md`, and `TASKS.md` from `.agent-specs/templates/feature/`, plus any optional templates needed (see the table below).
38
41
  4. **Fill identifiers:** in every copied file, replace `feature-NNN-kebab-case` with the directory name, the `NNN` in `Feature NNN:` with the number, `[Feature title]` with the title, and `[YYYY-MM-DD]` with today's date.
@@ -51,7 +54,7 @@ Required and optional documents:
51
54
  | `RESEARCH.md` | Durable findings from meaningful investigation | Optional |
52
55
  | `HANDOFF.md` | Short-lived context for work that will resume elsewhere | Only if useful |
53
56
 
54
- Write the approved scope into `PLAN.md`. Draft acceptance criteria and tasks that correspond to that scope. Cross-reference IDs where practical. Put unresolved technical questions in the plan, rather than inventing answers. Add `DESIGN.md` only for substantial design detail, and `RESEARCH.md` only when research findings are worth retaining. Do not write an ADR for an unimplemented option.
57
+ Write the approved scope into `PLAN.md`. Draft acceptance criteria and tasks that correspond to that scope. Cross-reference IDs where practical. State each criterion's verification method as the observable check (for example "journey completes in a browser at 360 px width"), not a specific test tool, unless the user or the project has already chosen one; tooling is an implementation choice. Put unresolved technical questions in the plan, rather than inventing answers. Add `DESIGN.md` only for substantial design detail, and `RESEARCH.md` only when research findings are worth retaining. Do not write an ADR for an unimplemented option.
55
58
 
56
59
  **Then stop.** Tell the user what was scaffolded, identify open decisions or blockers, and wait for an explicit implementation request. Feature approval is **not** implementation authorization.
57
60
 
@@ -60,6 +63,7 @@ Write the approved scope into `PLAN.md`. Draft acceptance criteria and tasks tha
60
63
  - Re-read the active feature's plan, acceptance matrix, and tasks, plus any optional design/research documents; inspect relevant code and applicable `docs/conventions/` documentation.
61
64
  - Check readiness: requirements coherent, blockers identified, implementation direction sensible, verification approach practical. Record any blockers under "Dependencies and blockers" in `TASKS.md`, then set its status to `Ready`, and to `In progress` once work starts.
62
65
  - Seek human input before significant new dependencies, migrations that modify or delete existing data, security-sensitive choices, or changes to approved behavior. Purely additive migrations (for example, a new table or store that leaves existing data untouched) need no prior approval, but record them in the plan and report them. Technical refinement that stays within scope usually needs no additional approval.
66
+ - Treat user-visible behavior beyond the approved requirements as a scope change, however small (for example, undoing an action or an extra management capability): ask before building it, then add it to the plan's requirements and scope change log. Supporting work that leaves behavior unchanged, such as operator scripts or security hardening, needs no approval but belongs in the plan's technical approach.
63
67
  - Work through `TASKS.md`, updating checked items to reflect reality. Keep plan notes synchronized when implementation choices change.
64
68
  - Add or update tests and record concrete results in `ACCEPTANCE_MATRIX.md`.
65
69
  - If interrupted, add or refresh `HANDOFF.md` with the current task, blockers, commands run, and the next actionable step.
@@ -68,6 +72,7 @@ Write the approved scope into `PLAN.md`. Draft acceptance criteria and tasks tha
68
72
 
69
73
  - Review each acceptance criterion against observable evidence. Use `Pass`, `Fail`, `Blocked`, or `Not run`; never invent a result. If a criterion is waived or removed, record the user's approval and update scope accordingly.
70
74
  - Run applicable checks and document anything not run.
75
+ - Reconcile `PLAN.md` with what shipped: its technical approach, assumptions, and references (ADRs, related features) must describe the implementation, with no stale claims left, and any behavior added during implementation must appear in its requirements.
71
76
  - Update affected user/developer/project documentation in the same change. Maintain `docs/ARCHITECTURE.md`, `docs/GLOSSARY.md`, and `docs/conventions/` when they exist and are affected by the change.
72
77
  - Check whether a missing project document has become useful. Consider `docs/conventions/` for a rule that earlier features also relied on and that the code doesn't make obvious (one whose violation would be a silent bug), and `docs/GLOSSARY.md` for domain terms used across several features or easily confused with each other. **Always include the outcome in your report**: name each candidate and say whether you recommend it and why, even if you recommend against it. The user decides; don't create the document until they agree.
73
78
  - Create ADRs for meaningful architectural decisions **actually adopted**. Normally do this after the implementation is known; for a consequential choice adopted earlier, record it at that point.