cliewen-openspec 0.1.0 → 0.2.0
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/CHANGELOG.md +88 -69
- package/README.md +106 -102
- package/dist/cli.js +3 -3
- package/dist/compatibility.d.ts +12 -0
- package/dist/compatibility.js +87 -0
- package/dist/core.d.ts +14 -2
- package/dist/core.js +60 -22
- package/dist/release.d.ts +9 -0
- package/dist/release.js +23 -0
- package/dist/schema-source.js +1 -1
- package/docs/configuration.md +317 -278
- package/docs/testing/evidence.md +88 -88
- package/package.json +2 -2
- package/schemas/base/instructions/closure.md +33 -0
- package/schemas/base/instructions/planning.md +31 -0
- package/schemas/base/instructions/product-context.md +31 -0
- package/schemas/base/instructions/prototyping.md +33 -0
- package/schemas/base/instructions/testing-approach.md +1 -0
- package/schemas/base/instructions/work-scoping.md +12 -0
- package/schemas/base/instructions/writing.md +2 -0
- package/schemas/delivery/instructions/apply.md +1 -0
- package/schemas/discovery/instructions/apply.md +1 -0
- package/schemas/discovery/instructions/investigation.md +1 -0
package/docs/configuration.md
CHANGED
|
@@ -1,278 +1,317 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
---
|
|
4
|
-
# Project configuration
|
|
5
|
-
|
|
6
|
-
Cliewen reads project settings from `.cliewen-openspec/config.yaml`.
|
|
7
|
-
|
|
8
|
-
This reference describes version `0.
|
|
9
|
-
|
|
10
|
-
##
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
##
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
description:
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
---
|
|
4
|
+
# Project configuration
|
|
5
|
+
|
|
6
|
+
Cliewen reads project settings from `.cliewen-openspec/config.yaml`.
|
|
7
|
+
|
|
8
|
+
This reference describes version `0.2.0`. The earlier published `0.1.0-alpha.1` does not accept the `quality`, `lifecycle`, `learnings`, or `writing` settings below. Use that package's bundled reference when working with the alpha; its installation manifest is unsupported by 0.2.0.
|
|
9
|
+
|
|
10
|
+
## Version compatibility
|
|
11
|
+
|
|
12
|
+
Cliewen requires **OpenSpec 1.15.0 or newer**, **Node.js 20.19 or newer**, and Git. Current development pins OpenSpec 1.17.0. The published 0.1.0 release was checked with OpenSpec 1.15.0; 0.2.0 checks cover OpenSpec 1.15.0 and 1.17.0.
|
|
13
|
+
|
|
14
|
+
OpenSpec has its own installation requirements:
|
|
15
|
+
|
|
16
|
+
| Installation | Node requirement |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Cliewen CLI | Node 20.19+ |
|
|
19
|
+
| OpenSpec 1.15.0 via npm | Compatible with the Cliewen Node 20.19 minimum |
|
|
20
|
+
| OpenSpec 1.17.0 via npm | Node 22.12+ |
|
|
21
|
+
| OpenSpec standalone binary | No Node runtime for OpenSpec itself; Cliewen still needs Node |
|
|
22
|
+
|
|
23
|
+
On Node 20.19, pin `@fission-ai/openspec@1.15.0` or use a compatible OpenSpec standalone installation. The current worked npm guide uses OpenSpec 1.17.0 and therefore requires Node 22.12+. See [OpenSpec's release notes](https://github.com/Fission-AI/OpenSpec/blob/main/CHANGELOG.md) for its own runtime requirements.
|
|
24
|
+
|
|
25
|
+
The minimum is a compatibility floor, not proof that every newer release has been tested. A future Cliewen release may raise its OpenSpec or Node minimum. Review that release's requirements before upgrading.
|
|
26
|
+
|
|
27
|
+
Version 0.2.0 checks these minimums at every `init` and `update`, including previews, before recovery or installation writes. Published 0.1.0 does not perform these checks. No persistent success cache is used. Other commands keep their existing requirements; explicit `recover` remains available to restore an interrupted transaction.
|
|
28
|
+
|
|
29
|
+
The check uses the project's resolvable OpenSpec npm installation first, otherwise the CLI on PATH, including a standalone executable. It runs that installation's public `--version`; an incompatible or broken selected local installation does not fall back to a global version. Output identifies the source and detected versions. Missing tools, invalid/prerelease versions, execution failure, or a probe exceeding five seconds stop init/update with an actionable error. Cliewen neither downloads nor upgrades OpenSpec during this check.
|
|
30
|
+
|
|
31
|
+
The 0.2.0 upgrade route accepts published 0.1.0 ownership manifests and the running target version. Further source versions require explicit support; alpha installations, unknown formats, and downgrades remain unsupported. See [updating an installation](guide/updating.md) for package/resource boundaries and preview output; never relabel a manifest to bypass validation.
|
|
32
|
+
|
|
33
|
+
## Optional product context in development
|
|
34
|
+
|
|
35
|
+
Version 0.2.0 installs `.cliewen-openspec/product-context.md` for product intent, useful cross-capability journeys, and detection of drift or scope creep. Published 0.1.0 does not contain this reference. There is no new configuration field or required artifact. `features.documentation` controls optional records under `docsRoot` or existing project paths; `features.planning` independently controls planning authority and ticket access. Disabled facilities add no corresponding work and preserve authored content. Existing supplied context still informs normal scoping. See [product intent and journeys](guide/workflow.md#keep-the-users-outcome-in-view) for an illustrative example and limits.
|
|
36
|
+
|
|
37
|
+
## Full defaults
|
|
38
|
+
|
|
39
|
+
This is the complete configuration written by `init`. Omitted fields use these values; unknown settings and invalid values fail validation. Changes apply when the next operation reads the config. They do not rewrite existing proposals or task lists.
|
|
40
|
+
|
|
41
|
+
<!-- defaults -->
|
|
42
|
+
```yaml
|
|
43
|
+
docsRoot: docs
|
|
44
|
+
learnings:
|
|
45
|
+
enabled: false
|
|
46
|
+
directory: learnings
|
|
47
|
+
writing:
|
|
48
|
+
humanizer: auto
|
|
49
|
+
features:
|
|
50
|
+
documentation: true
|
|
51
|
+
decisions: true
|
|
52
|
+
mermaid: true
|
|
53
|
+
planning: true
|
|
54
|
+
review: true
|
|
55
|
+
evidence: true
|
|
56
|
+
evidence:
|
|
57
|
+
report: .cliewen-openspec/evidence.json
|
|
58
|
+
ac:
|
|
59
|
+
capabilities: {}
|
|
60
|
+
padding: 3
|
|
61
|
+
testing:
|
|
62
|
+
placement: per-task
|
|
63
|
+
quality:
|
|
64
|
+
coverage:
|
|
65
|
+
mode: review
|
|
66
|
+
minimumCases:
|
|
67
|
+
positive: 1
|
|
68
|
+
negative: 1
|
|
69
|
+
boundary: 0
|
|
70
|
+
effectiveness:
|
|
71
|
+
mode: review
|
|
72
|
+
lifecycle:
|
|
73
|
+
mode: review
|
|
74
|
+
types:
|
|
75
|
+
Unit:
|
|
76
|
+
description: Isolated behavior without external dependencies
|
|
77
|
+
Integration:
|
|
78
|
+
description: Interaction between components or dependencies
|
|
79
|
+
E2E:
|
|
80
|
+
description: Complete user or system workflow
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Test quality and lifecycle
|
|
84
|
+
|
|
85
|
+
Each of `testing.quality.coverage.mode`, `testing.quality.effectiveness.mode`, and `testing.lifecycle.mode` accepts `off`, `review`, or `enforce`. The default is `review`: incomplete assessments produce warnings. `enforce` makes missing or invalid records blocking and requires `features.evidence: true`. `off` disables that policy's checks and guidance. Evidence opt-out leaves review guidance available but reports that execution-backed assessment is unavailable.
|
|
86
|
+
|
|
87
|
+
Coverage counts distinct passed cases by scenario and category. Configure nonnegative safe-integer minima under `testing.quality.coverage.minimumCases`; omitted categories retain their defaults. One positive and one negative case are required by default, with relevant boundary cases assessed during review. A reviewed exception can waive a category minimum for a particular scenario.
|
|
88
|
+
|
|
89
|
+
For example, to enforce coverage while leaving other policies advisory:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
testing:
|
|
93
|
+
quality:
|
|
94
|
+
coverage:
|
|
95
|
+
mode: enforce
|
|
96
|
+
minimumCases:
|
|
97
|
+
positive: 2
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
This requires two positive and one negative case per scenario. It does not count retries or prove cases are meaningfully different. See [test quality and lifecycle](testing/test-quality.md) for tagging tests, writing review records, and handling exceptions.
|
|
101
|
+
|
|
102
|
+
## Documentation and features
|
|
103
|
+
|
|
104
|
+
| Setting | Default | Effect |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| `docsRoot` | `docs` | Root for durable explanations; init creates an entry README if absent |
|
|
107
|
+
| `features.documentation` | `true` | Guidance to assess and maintain affected documentation |
|
|
108
|
+
| `features.decisions` | `true` | Guidance for considering and recording durable decisions |
|
|
109
|
+
| `features.mermaid` | `true` | Guidance to use embedded Mermaid where useful |
|
|
110
|
+
| `features.planning` | `true` | Enables planning-authority discovery, ticket access guidance, and plan maintenance; does not require a plan |
|
|
111
|
+
| `features.review` | `true` | Makes review guidance available; a separate reviewer remains optional |
|
|
112
|
+
| `features.evidence` | `true` | Scenario-ID and execution-report checks |
|
|
113
|
+
| `evidence.report` | `.cliewen-openspec/evidence.json` | Repository-local path to the execution report |
|
|
114
|
+
|
|
115
|
+
All paths must stay inside the project; absolute paths, parent traversal, and symlink components are rejected. A custom evidence report path must be Git-ignored and untracked before the reference adapter can write it. New installations ignore the default `evidence.json` report, `transaction.json`, and local `tdd/` history in `.cliewen-openspec/.gitignore`. Existing ignore files are preserved.
|
|
116
|
+
|
|
117
|
+
## Project learnings
|
|
118
|
+
|
|
119
|
+
Set `learnings.enabled: true` to ask the coding agent to retrieve and maintain reusable project lessons. `learnings.directory` is relative to `docsRoot`. For example:
|
|
120
|
+
|
|
121
|
+
```yaml
|
|
122
|
+
docsRoot: notes
|
|
123
|
+
learnings:
|
|
124
|
+
enabled: true
|
|
125
|
+
directory: lessons
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
This selects `notes/lessons/`. The installer does not create that directory or an empty index. When a useful lesson exists, the agent follows the existing collection's conventions or uses `.cliewen-openspec/templates/learning.md` and a short `README.md` index. The index lists titles, scope, status, and links. The agent reads the index first, then opens selected relevant notes in a later tool call. Broad content searches exclude unselected notes. Missing or unclear index information is a limitation to report, rather than a reason to load the whole collection.
|
|
129
|
+
|
|
130
|
+
New notes distinguish `tentative`, `verified`, and `retired` guidance and record the situation, observation, evidence, correction, scope, and limits. Verified notes include a `lastVerified` date. Recheck applicability: a lesson never overrides current specs or accepted decisions. At closure, merge duplicates through links, retire stale notes in place, and promote recurring guidance into tests or durable rules where useful. Explicit maintenance may read affected historical notes selected from the index; ordinary work skips retired and unrelated contents. Routine work need not produce a lesson.
|
|
131
|
+
|
|
132
|
+
Disabling learnings stops retrieval and maintenance guidance while preserving authored content. `features.documentation: false` also suppresses this workflow, even if learnings are enabled. Update and uninstall preserve authored notes and indexes; the installed template remains an owned resource. Existing knowledge outside the selected directory can be referenced without copying or moving it. Absolute, escaping, and empty directory settings are rejected; symlinks in the collection path are rejected when learnings are active. Disabled learnings do not inspect an unused collection path.
|
|
133
|
+
|
|
134
|
+
### Instructions before context collection
|
|
135
|
+
|
|
136
|
+
Some agents gather project context before requesting OpenSpec instructions. Schema guidance becomes available when those instructions are read; it cannot prevent earlier reads. For development-source installations containing `.cliewen-openspec/planning.md`, add this rule to the project's existing agent instruction file, such as `AGENTS.md` or the host's equivalent:
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
Before creating or resuming an OpenSpec change, first read only .cliewen-openspec/config.yaml and .cliewen-openspec/planning.md, without batching project documents or lesson contents into that tool call. Follow the reference's learning-policy and index-first instructions before broad reads or searches, independently of features.planning. Apply its work-scoping guidance and enable planning-specific requests only when features.planning is enabled. Retrieve the selected native OpenSpec artifact or apply instructions before executing the workflow.
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The installer does not add or replace this project-owned rule. It requests an order; agent behavior still needs review. A trace that shows an unwanted read takes precedence over an agent's claim that it skipped the file.
|
|
143
|
+
|
|
144
|
+
Published 0.1.0 does not contain the planning reference. For that installation, request native OpenSpec artifact or apply instructions first and follow their learning-policy and index-first rules before broad context collection. Updating package code alone does not refresh installed references; use the supported installation lifecycle and review local ownership conflicts.
|
|
145
|
+
|
|
146
|
+
These are agent instructions, not a content validator. `check` cannot establish that a lesson is true, relevant, or actually retrieved. Changing settings requires no reinstall, but upgrading from an older package requires [updating its installed instructions](guide/updating.md).
|
|
147
|
+
|
|
148
|
+
## Humanizer and writing
|
|
149
|
+
|
|
150
|
+
Baseline writing guidance applies in every mode. Agents should distinguish the accepted contract from runtime observations, describe the output representation actually checked, and name what each verification command establishes. These requests need review; neither Humanizer nor `check` validates every factual claim.
|
|
151
|
+
|
|
152
|
+
`writing.humanizer` controls the coding agent's use of an external skill:
|
|
153
|
+
|
|
154
|
+
| Value | Behavior |
|
|
155
|
+
|---|---|
|
|
156
|
+
| `auto` (default) | Inspect the host's exposed inventory and use a usable Humanizer skill when available |
|
|
157
|
+
| `"on"` | Explicitly request use, with the same nonblocking fallback when unavailable |
|
|
158
|
+
| `"off"` | Skip Cliewen's discovery, use, status messages, and installation suggestions |
|
|
159
|
+
|
|
160
|
+
For example, to disable this integration independently of learnings:
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
writing:
|
|
164
|
+
humanizer: "off"
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
In auto/on mode, the agent gives one short status per session: used, detected but inaccessible, confirmed absent, or availability unknown. It claims use only after reading and applying the skill's instructions. It does not repeat the status in each artifact or PR description. If absence is confirmed, it may combine the status with one installation suggestion, respecting a refusal. An unavailable inventory is reported as unknown, not as a missing skill.
|
|
168
|
+
|
|
169
|
+
Cliewen does not scan global skill directories, install software, enable plugins, or cache availability across sessions. Installation is a deliberate user action using [Humanizer's current host-specific instructions](https://github.com/blader/humanizer#installation). Availability depends on the host's inventory and permissions; finding a file does not prove the agent can invoke it. No universal detection command or cross-host success guarantee is provided.
|
|
170
|
+
|
|
171
|
+
A failed attempt to load a skill by name does not establish that the host detected it. When inventory is unavailable, report availability as unknown and describe the failed invocation separately. Reserve "detected but inaccessible" for a skill the host actually identifies.
|
|
172
|
+
|
|
173
|
+
The skill applies to prose across proposals, specs, tasks, guides, comments, docstrings, commits, PR descriptions, messages, and replies. Preserve technical meaning, code behavior, commands, identifiers, and structured data; verify factual claims after rewriting. Baseline clear-writing rules apply in every mode and when the skill is absent. Disabling documentation guidance does not disable these writing rules or Humanizer. Independent repository or host requirements still apply.
|
|
174
|
+
|
|
175
|
+
Shared writing guidance also asks the agent to check local document links before handoff, using each containing file's directory as the base. For example, a proposal at `openspec/changes/example/proposal.md` reaches `docs/` through `../../../docs/`. Verify targets and fragments with the project's available link or rendering checks. Describe future files as planned paths until they exist. This is agent guidance; Cliewen's `check` command does not validate every Markdown link or authenticate the agent's validation claims.
|
|
176
|
+
|
|
177
|
+
## Test types
|
|
178
|
+
|
|
179
|
+
`testing.types` defaults to `Unit`, `Integration`, and `E2E`, with the descriptions shown above. A project-defined mapping replaces the entire default set. Names are case-sensitive, may contain spaces, and must be nonempty, single-line names without surrounding whitespace or square brackets. Each entry requires a nonempty `description`; an empty mapping is invalid.
|
|
180
|
+
|
|
181
|
+
For example, a project that calls its tests Component and System can use:
|
|
182
|
+
|
|
183
|
+
```yaml
|
|
184
|
+
testing:
|
|
185
|
+
types:
|
|
186
|
+
Component:
|
|
187
|
+
description: One component tested in process with controlled dependencies
|
|
188
|
+
System:
|
|
189
|
+
description: A complete workflow against a deployed system
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Each scenario needs exactly one `Test-type: Component` line beneath its heading. With the Node adapter, give each mapped test a title such as `exports rows [EXPORT-001] [Test-type: Component]`. Tasks should name the concrete test, type, and verification boundary. The checker requires evidence `testType` to match the scenario's declared type exactly; it does not assume one type substitutes for another. Task descriptions and the actual quality of the test boundary still require review.
|
|
193
|
+
|
|
194
|
+
For existing projects, add types to scenarios and test titles, commit the inputs, then regenerate evidence. Older reports without `testType` fail the check and are not automatically upgraded. Evidence opt-out skips these checks. Testing types do not change per-task placement or verification quality.
|
|
195
|
+
|
|
196
|
+
Development source extends planning with single-authority backlog guidance and an installed `.cliewen-openspec/planning.md` reference. These additions are not in published 0.1.0. See [change scoping and optional pre-change setup](guide/workflow.md#choose-the-next-delivery).
|
|
197
|
+
|
|
198
|
+
The candidate supplies guidance for documentation, decisions, Mermaid, planning, and review. It does not structurally validate those documents or independently enforce agent behavior. Disabling a facility preserves authored files. Evidence opt-out skips product evidence checks; installation and registry checks still run.
|
|
199
|
+
|
|
200
|
+
For example, to use a different documentation root and turn off Mermaid guidance:
|
|
201
|
+
|
|
202
|
+
```yaml
|
|
203
|
+
docsRoot: project-docs
|
|
204
|
+
features:
|
|
205
|
+
mermaid: false
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Other fields retain their defaults. The YAML objects `features`, `ac`, and `testing` support partial settings. If you provide `evidence`, include its `report` string. Changing `docsRoot` does not move existing files. The schema artifact graph is selected by the OpenSpec schema and is not rewritten by feature flags.
|
|
209
|
+
|
|
210
|
+
## Testing and IDs at a glance
|
|
211
|
+
|
|
212
|
+
```yaml
|
|
213
|
+
ac:
|
|
214
|
+
padding: 3
|
|
215
|
+
capabilities: {}
|
|
216
|
+
testing:
|
|
217
|
+
placement: per-task
|
|
218
|
+
types:
|
|
219
|
+
Unit:
|
|
220
|
+
description: Isolated behavior without external dependencies
|
|
221
|
+
Integration:
|
|
222
|
+
description: Interaction between components or dependencies
|
|
223
|
+
E2E:
|
|
224
|
+
description: Complete user or system workflow
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## Acceptance criterion IDs
|
|
228
|
+
|
|
229
|
+
An ID consists of an uppercase prefix, a hyphen, and a positive sequence number. Register a prefix for each capability before allocating IDs:
|
|
230
|
+
|
|
231
|
+
```yaml
|
|
232
|
+
ac:
|
|
233
|
+
padding: 3
|
|
234
|
+
capabilities:
|
|
235
|
+
csv-export: EXP
|
|
236
|
+
account-management: ACC
|
|
237
|
+
support: SUP
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Capability names match their directories under `openspec/specs/` or the change's `specs/`. A new capability can be registered before its spec directory exists. There is no global prefix or automatic prefix selection.
|
|
241
|
+
|
|
242
|
+
Choose a short, recognizable capability or domain name with your team. `EXPORT` and `EXP` are equally valid; Cliewen does not infer either from the change title. Reuse the chosen prefix for that capability across changes. The prefix must start with an uppercase letter and contain only uppercase letters and digits.
|
|
243
|
+
|
|
244
|
+
```sh
|
|
245
|
+
cliewen-openspec ac next --capability csv-export # EXP-001 initially
|
|
246
|
+
cliewen-openspec ac next --capability support # SUP-001 initially
|
|
247
|
+
cliewen-openspec ac next EXP # Same registered sequence as csv-export
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
`padding` is the minimum number of digits, from 1 to 12. For example, 1 produces `EXP-1`, 3 produces `EXP-001`, and 4 produces `EXP-0001`. Numbers grow beyond the minimum width without truncation. The separator is always a hyphen; arbitrary ID templates are not supported.
|
|
251
|
+
|
|
252
|
+
Each capability owns one numeric sequence. The allocator consults the committed `.cliewen-openspec/ac-registry.json` and existing OpenSpec Markdown, including active and archived changes. It never reclaims allocated numbers. Changing padding continues the same sequence and does not rewrite existing IDs. Commit the registry together with config and specs. Parallel branches still need collision resolution; this allocator supports sequential work rather than distributed allocation.
|
|
253
|
+
|
|
254
|
+
### Renaming a prefix
|
|
255
|
+
|
|
256
|
+
Use the command rather than editing an established mapping directly:
|
|
257
|
+
|
|
258
|
+
```sh
|
|
259
|
+
cliewen-openspec ac rename-prefix csv-export EXPORT
|
|
260
|
+
cliewen-openspec ac next --capability csv-export
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
If the highest allocated number was `EXP-017`, the next ID is `EXPORT-018`. Existing scenarios and tests keep their `EXP-...` references. The command updates config and registry in one recoverable transaction, preserving YAML comments. Config and registry mismatches block allocation and are reported by `check`, including when evidence is disabled. Restore the registered prefix in config before running the rename command if you edited it manually.
|
|
264
|
+
|
|
265
|
+
Current and historical prefixes remain reserved to their original capability, even if its config mapping is removed. Allocation using a retired prefix is rejected with guidance to use the current capability. Previously used prefixes cannot be reassigned, including renaming back to a historical prefix. The command also rejects target prefixes already appearing in OpenSpec documents.
|
|
266
|
+
|
|
267
|
+
The registry records each capability's current prefix, previous prefixes, and highest allocated number. `check` validates this state without writing it. Removing the registry loses allocation history, so retain it in version control. Do not use the native registry as a second authority for IDs allocated by another tool.
|
|
268
|
+
|
|
269
|
+
The earlier experimental `ac.prefix` setting is no longer supported. Replace it with `ac.capabilities` before using this version. Existing bracketed IDs remain valid evidence references regardless of prefix history.
|
|
270
|
+
|
|
271
|
+
## Test placement
|
|
272
|
+
|
|
273
|
+
`testing.placement` controls the schema's planning and implementation guidance:
|
|
274
|
+
|
|
275
|
+
- `per-task` (default): Each implementation task includes its relevant tests, a test command, and a completion check. Implement a small slice, run its tests, fix failures, and then continue to the next task. Documentation-only tasks can use an appropriate validation check. This provides fast feedback throughout implementation.
|
|
276
|
+
- `end-of-change`: Plan tests in a final verification section, with explicit links to the implementation tasks they cover.
|
|
277
|
+
|
|
278
|
+
Both modes retain final regression testing and revision-bound evidence collection. Per-task test runs provide immediate feedback; the evidence adapter records results for the final committed inputs. Disabling evidence does not disable ordinary task-level testing.
|
|
279
|
+
|
|
280
|
+
Placement is guidance supplied by the installed schema and task template. Configuration changes do not rewrite existing task lists; revise the task plan when changing this setting.
|
|
281
|
+
|
|
282
|
+
<a id="test-driven-development"></a>
|
|
283
|
+
|
|
284
|
+
## Evidence-first verification
|
|
285
|
+
|
|
286
|
+
Use **spec-driven development with evidence-first verification**: define expected behavior and how to verify it before implementation. Develop code and tests in small steps, check that tests detect relevant faults, and maintain them as requirements change.
|
|
287
|
+
|
|
288
|
+
1. Describe acceptance criteria and positive, negative, and boundary cases before implementation. Consider [interactions between inputs and options](testing/test-quality.md#plan-interacting-cases), especially when existing content must be preserved. Executable tests can develop alongside the code.
|
|
289
|
+
2. Verify each task before continuing, using concrete commands and actual results. With end-of-change placement, plan the final automated suite while retaining a suitable check for each task.
|
|
290
|
+
3. Assess assertion effectiveness through relevant failures and review. A setup or syntax failure does not show that a test detects the intended defect.
|
|
291
|
+
4. Keep tests aligned with accepted requirements, preserving active assertions and explicitly reviewing retirement.
|
|
292
|
+
|
|
293
|
+
This approach is close to [Specification by Example](https://martinfowler.com/bliki/SpecificationByExample.html), which uses concrete examples to clarify specifications, and [ATDD](https://agilealliance.org/glossary/atdd/), which agrees acceptance tests before implementation. Evidence-first verification is our descriptive wording; it does not require a particular order of test and production edits.
|
|
294
|
+
|
|
295
|
+
### Earlier formats
|
|
296
|
+
|
|
297
|
+
The first non-prerelease release supports fresh configuration and its own `0.1.0` installation manifests. It does not migrate earlier alpha installations. Retired `testing.approach` values and effectiveness records using `method: tdd` remain invalid; do not copy them into a new project.
|
|
298
|
+
|
|
299
|
+
Existing authored history remains project-owned. Recorder commands and task-method metadata from earlier development builds do not establish completion under evidence-first verification. General format migration is outside this release's scope.
|
|
300
|
+
|
|
301
|
+
## Decision filenames
|
|
302
|
+
|
|
303
|
+
New projects use `NNN-short-title.md`, such as `001-use-a-shared-base.md`, for new Decision Records. The sequence starts at 1, padded to a minimum of three digits for filename sorting. Numbers above 999 grow naturally. This is a naming convention in the schema guidance, not a configurable setting or an implemented decision allocator.
|
|
304
|
+
|
|
305
|
+
Existing filenames and paths are stable public addresses: never rename, move, or renumber documents to normalize naming, titles, categories, or padding. External systems such as GitHub may link to them. Edit content and metadata in place, even when a title or category changes. Existing projects retain conventions such as `ADR-059-title.md` and `PDR-074-title.md`; read their allocation rules and use their existing ID authority rather than starting a competing counter. These conventions are not configurable in `0.1.0`. This repository's earlier owner-approved filename normalization does not authorize renaming documents in other projects.
|
|
306
|
+
|
|
307
|
+
## Installed resource versions
|
|
308
|
+
|
|
309
|
+
The `0.1.0` candidate's `init`, `update`, and `uninstall` accept only `0.1.0` installation manifests. `check` reports other manifest versions as unsupported; changing the recorded version by hand does not migrate an installation. Use a fresh project for candidate evaluation. [Update](guide/updating.md) refreshes or repairs owned resources within the supported version while preserving configuration, registry, authored artifacts, and document paths. Adding config settings alone does not replace installed instructions. General version/config/registry migrations are outside this release's scope.
|
|
310
|
+
|
|
311
|
+
## Optional archive-session guidance
|
|
312
|
+
|
|
313
|
+
Version 0.2.0 installs `.cliewen-openspec/closure.md`. For repository-local projects, OpenSpec's project-owned `operations.archive.guidance` can point an archive session to that reference. See [closure setup and limits](guide/workflow.md#use-the-reference-from-a-separate-archive-session), including direct CLI use and removal of the optional entry after uninstall. Existing Cliewen feature and test-policy settings control the matching review responsibilities; there is no new configuration flag or automatic archive hook.
|
|
314
|
+
|
|
315
|
+
## Optional prototype guidance
|
|
316
|
+
|
|
317
|
+
Version 0.2.0 installs `.cliewen-openspec/prototyping.md` for [bounded user-selected experiments](guide/workflow.md#try-a-prototype-when-it-can-answer-a-question). Prototype selection is per task and adds no configuration flag. Planning controls ticket/plan maintenance; learnings and documentation settings control optional lesson maintenance. Native investigation artifacts retain actual findings even when those facilities are disabled. The existing installation lifecycle owns only the reference, not prototype files or user records.
|