cliewen-openspec 0.0.0-stage → 0.1.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 +69 -0
- package/LICENSE +21 -0
- package/README.md +101 -2
- package/adapters/node-test.mjs +65 -0
- package/dist/ac.d.ts +16 -0
- package/dist/ac.js +124 -0
- package/dist/all.d.ts +1 -0
- package/dist/all.js +28 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +81 -0
- package/dist/core.d.ts +55 -0
- package/dist/core.js +651 -0
- package/dist/delivery.d.ts +1 -0
- package/dist/delivery.js +21 -0
- package/dist/discovery.d.ts +1 -0
- package/dist/discovery.js +15 -0
- package/dist/quality.d.ts +27 -0
- package/dist/quality.js +412 -0
- package/dist/schema-source.d.ts +3 -0
- package/dist/schema-source.js +9 -0
- package/docs/configuration.md +278 -0
- package/docs/testing/evidence.md +88 -0
- package/docs/testing/pilot-prompt.md +20 -0
- package/docs/testing/test-quality.md +84 -0
- package/package.json +63 -4
- package/schemas/README.md +25 -0
- package/schemas/all/instructions/apply.md +4 -0
- package/schemas/all/instructions/approval.md +4 -0
- package/schemas/all/instructions/decision.md +7 -0
- package/schemas/all/instructions/investigation.md +1 -0
- package/schemas/all/instructions/proposal.md +3 -0
- package/schemas/all/instructions/specs.md +2 -0
- package/schemas/all/instructions/tasks.md +2 -0
- package/schemas/all/templates/decision.md +20 -0
- package/schemas/all/templates/proposal.md +19 -0
- package/schemas/all/templates/tasks.md +9 -0
- package/schemas/base/instructions/diagrams.md +7 -0
- package/schemas/base/instructions/humanizer.md +7 -0
- package/schemas/base/instructions/learnings.md +6 -0
- package/schemas/base/instructions/routing.md +5 -0
- package/schemas/base/instructions/testing-approach.md +13 -0
- package/schemas/base/instructions/writing.md +24 -0
- package/schemas/base/templates/decision.md +18 -0
- package/schemas/base/templates/learning.md +19 -0
- package/schemas/delivery/instructions/apply.md +10 -0
- package/schemas/delivery/instructions/design.md +9 -0
- package/schemas/delivery/instructions/proposal.md +3 -0
- package/schemas/delivery/instructions/specs.md +11 -0
- package/schemas/delivery/instructions/tasks.md +13 -0
- package/schemas/delivery/templates/design.md +9 -0
- package/schemas/delivery/templates/proposal.md +13 -0
- package/schemas/delivery/templates/spec.md +13 -0
- package/schemas/delivery/templates/tasks.md +17 -0
- package/schemas/discovery/instructions/apply.md +5 -0
- package/schemas/discovery/instructions/decision.md +7 -0
- package/schemas/discovery/instructions/investigation.md +8 -0
- package/schemas/discovery/instructions/proposal.md +4 -0
- package/schemas/discovery/templates/decision.md +17 -0
- package/schemas/discovery/templates/investigation.md +11 -0
- package/schemas/discovery/templates/proposal.md +9 -0
|
@@ -0,0 +1,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.1.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.1.0.
|
|
9
|
+
|
|
10
|
+
## Full defaults
|
|
11
|
+
|
|
12
|
+
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.
|
|
13
|
+
|
|
14
|
+
<!-- defaults -->
|
|
15
|
+
```yaml
|
|
16
|
+
docsRoot: docs
|
|
17
|
+
learnings:
|
|
18
|
+
enabled: false
|
|
19
|
+
directory: learnings
|
|
20
|
+
writing:
|
|
21
|
+
humanizer: auto
|
|
22
|
+
features:
|
|
23
|
+
documentation: true
|
|
24
|
+
decisions: true
|
|
25
|
+
mermaid: true
|
|
26
|
+
planning: true
|
|
27
|
+
review: true
|
|
28
|
+
evidence: true
|
|
29
|
+
evidence:
|
|
30
|
+
report: .cliewen-openspec/evidence.json
|
|
31
|
+
ac:
|
|
32
|
+
capabilities: {}
|
|
33
|
+
padding: 3
|
|
34
|
+
testing:
|
|
35
|
+
placement: per-task
|
|
36
|
+
quality:
|
|
37
|
+
coverage:
|
|
38
|
+
mode: review
|
|
39
|
+
minimumCases:
|
|
40
|
+
positive: 1
|
|
41
|
+
negative: 1
|
|
42
|
+
boundary: 0
|
|
43
|
+
effectiveness:
|
|
44
|
+
mode: review
|
|
45
|
+
lifecycle:
|
|
46
|
+
mode: review
|
|
47
|
+
types:
|
|
48
|
+
Unit:
|
|
49
|
+
description: Isolated behavior without external dependencies
|
|
50
|
+
Integration:
|
|
51
|
+
description: Interaction between components or dependencies
|
|
52
|
+
E2E:
|
|
53
|
+
description: Complete user or system workflow
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Test quality and lifecycle
|
|
57
|
+
|
|
58
|
+
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.
|
|
59
|
+
|
|
60
|
+
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.
|
|
61
|
+
|
|
62
|
+
For example, to enforce coverage while leaving other policies advisory:
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
testing:
|
|
66
|
+
quality:
|
|
67
|
+
coverage:
|
|
68
|
+
mode: enforce
|
|
69
|
+
minimumCases:
|
|
70
|
+
positive: 2
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
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.
|
|
74
|
+
|
|
75
|
+
## Documentation and features
|
|
76
|
+
|
|
77
|
+
| Setting | Default | Effect |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| `docsRoot` | `docs` | Root for durable explanations; init creates an entry README if absent |
|
|
80
|
+
| `features.documentation` | `true` | Guidance to assess and maintain affected documentation |
|
|
81
|
+
| `features.decisions` | `true` | Guidance for considering and recording durable decisions |
|
|
82
|
+
| `features.mermaid` | `true` | Guidance to use embedded Mermaid where useful |
|
|
83
|
+
| `features.planning` | `true` | Makes optional planning guidance available; does not require a plan |
|
|
84
|
+
| `features.review` | `true` | Makes review guidance available; a separate reviewer remains optional |
|
|
85
|
+
| `features.evidence` | `true` | Scenario-ID and execution-report checks |
|
|
86
|
+
| `evidence.report` | `.cliewen-openspec/evidence.json` | Repository-local path to the execution report |
|
|
87
|
+
|
|
88
|
+
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.
|
|
89
|
+
|
|
90
|
+
## Project learnings
|
|
91
|
+
|
|
92
|
+
Set `learnings.enabled: true` to ask the coding agent to retrieve and maintain reusable project lessons. `learnings.directory` is relative to `docsRoot`. For example:
|
|
93
|
+
|
|
94
|
+
```yaml
|
|
95
|
+
docsRoot: notes
|
|
96
|
+
learnings:
|
|
97
|
+
enabled: true
|
|
98
|
+
directory: lessons
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
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.
|
|
102
|
+
|
|
103
|
+
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.
|
|
104
|
+
|
|
105
|
+
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.
|
|
106
|
+
|
|
107
|
+
### Instructions before context collection
|
|
108
|
+
|
|
109
|
+
Some agents gather project context before requesting OpenSpec instructions. Schema guidance becomes available when those instructions are read; it cannot prevent earlier reads. To request the intended order from the start, add this rule to the project's existing agent instruction file, such as `AGENTS.md` or the host's equivalent:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
For Cliewen operations, read .cliewen-openspec/config.yaml and obtain the selected OpenSpec artifact or apply instructions before broad project-content reads or searches. Resolve the learning policy first: when enabled and documentation guidance is active, read only the configured collection's index in one tool call, then select relevant notes before opening them in a later call. Exclude unselected, unrelated, and retired notes from ordinary context reads and content searches. Explicit maintenance may select affected historical notes. When disabled, skip the collection. Report limitations rather than loading everything.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
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.
|
|
116
|
+
|
|
117
|
+
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).
|
|
118
|
+
|
|
119
|
+
## Humanizer and writing
|
|
120
|
+
|
|
121
|
+
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.
|
|
122
|
+
|
|
123
|
+
`writing.humanizer` controls the coding agent's use of an external skill:
|
|
124
|
+
|
|
125
|
+
| Value | Behavior |
|
|
126
|
+
|---|---|
|
|
127
|
+
| `auto` (default) | Inspect the host's exposed inventory and use a usable Humanizer skill when available |
|
|
128
|
+
| `"on"` | Explicitly request use, with the same nonblocking fallback when unavailable |
|
|
129
|
+
| `"off"` | Skip Cliewen's discovery, use, status messages, and installation suggestions |
|
|
130
|
+
|
|
131
|
+
For example, to disable this integration independently of learnings:
|
|
132
|
+
|
|
133
|
+
```yaml
|
|
134
|
+
writing:
|
|
135
|
+
humanizer: "off"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
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.
|
|
139
|
+
|
|
140
|
+
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.
|
|
141
|
+
|
|
142
|
+
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.
|
|
143
|
+
|
|
144
|
+
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.
|
|
145
|
+
|
|
146
|
+
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.
|
|
147
|
+
|
|
148
|
+
## Test types
|
|
149
|
+
|
|
150
|
+
`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.
|
|
151
|
+
|
|
152
|
+
For example, a project that calls its tests Component and System can use:
|
|
153
|
+
|
|
154
|
+
```yaml
|
|
155
|
+
testing:
|
|
156
|
+
types:
|
|
157
|
+
Component:
|
|
158
|
+
description: One component tested in process with controlled dependencies
|
|
159
|
+
System:
|
|
160
|
+
description: A complete workflow against a deployed system
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
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.
|
|
164
|
+
|
|
165
|
+
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.
|
|
166
|
+
|
|
167
|
+
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.
|
|
168
|
+
|
|
169
|
+
For example, to use a different documentation root and turn off Mermaid guidance:
|
|
170
|
+
|
|
171
|
+
```yaml
|
|
172
|
+
docsRoot: project-docs
|
|
173
|
+
features:
|
|
174
|
+
mermaid: false
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
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.
|
|
178
|
+
|
|
179
|
+
## Testing and IDs at a glance
|
|
180
|
+
|
|
181
|
+
```yaml
|
|
182
|
+
ac:
|
|
183
|
+
padding: 3
|
|
184
|
+
capabilities: {}
|
|
185
|
+
testing:
|
|
186
|
+
placement: per-task
|
|
187
|
+
types:
|
|
188
|
+
Unit:
|
|
189
|
+
description: Isolated behavior without external dependencies
|
|
190
|
+
Integration:
|
|
191
|
+
description: Interaction between components or dependencies
|
|
192
|
+
E2E:
|
|
193
|
+
description: Complete user or system workflow
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Acceptance criterion IDs
|
|
197
|
+
|
|
198
|
+
An ID consists of an uppercase prefix, a hyphen, and a positive sequence number. Register a prefix for each capability before allocating IDs:
|
|
199
|
+
|
|
200
|
+
```yaml
|
|
201
|
+
ac:
|
|
202
|
+
padding: 3
|
|
203
|
+
capabilities:
|
|
204
|
+
csv-export: EXP
|
|
205
|
+
account-management: ACC
|
|
206
|
+
support: SUP
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
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.
|
|
210
|
+
|
|
211
|
+
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.
|
|
212
|
+
|
|
213
|
+
```sh
|
|
214
|
+
cliewen-openspec ac next --capability csv-export # EXP-001 initially
|
|
215
|
+
cliewen-openspec ac next --capability support # SUP-001 initially
|
|
216
|
+
cliewen-openspec ac next EXP # Same registered sequence as csv-export
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
`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.
|
|
220
|
+
|
|
221
|
+
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.
|
|
222
|
+
|
|
223
|
+
### Renaming a prefix
|
|
224
|
+
|
|
225
|
+
Use the command rather than editing an established mapping directly:
|
|
226
|
+
|
|
227
|
+
```sh
|
|
228
|
+
cliewen-openspec ac rename-prefix csv-export EXPORT
|
|
229
|
+
cliewen-openspec ac next --capability csv-export
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
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.
|
|
233
|
+
|
|
234
|
+
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.
|
|
235
|
+
|
|
236
|
+
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.
|
|
237
|
+
|
|
238
|
+
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.
|
|
239
|
+
|
|
240
|
+
## Test placement
|
|
241
|
+
|
|
242
|
+
`testing.placement` controls the schema's planning and implementation guidance:
|
|
243
|
+
|
|
244
|
+
- `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.
|
|
245
|
+
- `end-of-change`: Plan tests in a final verification section, with explicit links to the implementation tasks they cover.
|
|
246
|
+
|
|
247
|
+
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.
|
|
248
|
+
|
|
249
|
+
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.
|
|
250
|
+
|
|
251
|
+
<a id="test-driven-development"></a>
|
|
252
|
+
|
|
253
|
+
## Evidence-first verification
|
|
254
|
+
|
|
255
|
+
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.
|
|
256
|
+
|
|
257
|
+
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.
|
|
258
|
+
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.
|
|
259
|
+
3. Assess assertion effectiveness through relevant failures and review. A setup or syntax failure does not show that a test detects the intended defect.
|
|
260
|
+
4. Keep tests aligned with accepted requirements, preserving active assertions and explicitly reviewing retirement.
|
|
261
|
+
|
|
262
|
+
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.
|
|
263
|
+
|
|
264
|
+
### Earlier formats
|
|
265
|
+
|
|
266
|
+
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.
|
|
267
|
+
|
|
268
|
+
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.
|
|
269
|
+
|
|
270
|
+
## Decision filenames
|
|
271
|
+
|
|
272
|
+
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.
|
|
273
|
+
|
|
274
|
+
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.
|
|
275
|
+
|
|
276
|
+
## Installed resource versions
|
|
277
|
+
|
|
278
|
+
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.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: testing
|
|
3
|
+
---
|
|
4
|
+
# Execution evidence and review
|
|
5
|
+
|
|
6
|
+
Version `0.1.0` provides the execution checks below and [test quality and lifecycle checks](test-quality.md), using optional case metadata in the same version-1 report. Policies default to advisory review. Case counts and reviewed statuses do not establish semantic correctness.
|
|
7
|
+
|
|
8
|
+
The candidate supports `init`, `update`, `uninstall`, `ac next`, `ac rename-prefix`, `check`, and `recover`, and installs `cliewen-delivery`, `cliewen-discovery`, and `cliewen-all`. Package CI exercises OpenSpec 1.15.0 on Windows and Linux. Existing-registry adapters, structural checks for your project's documentation and Mermaid, and independent review tooling remain planned.
|
|
9
|
+
|
|
10
|
+
Initialize OpenSpec first, then install the local `cliewen-openspec-0.1.0.tgz` built in [Your first change](../guide/getting-started.md). Run `cliewen-openspec init --default` to explicitly select delivery; omit `--default` to preserve the existing schema. `--root PATH` supports an explicit target, and `init --dry-run` makes no changes. The earlier npm alpha is not the package exercised by this contract.
|
|
11
|
+
|
|
12
|
+
Register a capability-to-prefix mapping, then allocate IDs using `cliewen-openspec ac next --capability export`. Keep the committed `.cliewen-openspec/ac-registry.json`; numbers are never reclaimed. This initial allocator supports sequential work; parallel branches must resolve collisions. Do not use it alongside another allocator until an adapter exists.
|
|
13
|
+
|
|
14
|
+
`ac.capabilities` maps each OpenSpec capability to its prefix. `ac.padding` controls minimum digit width (default 3). Use `ac rename-prefix CAPABILITY PREFIX` to change an established prefix while retaining its sequence and historical references. See [configuration](../configuration.md) for prefix selection and the default per-task testing workflow.
|
|
15
|
+
|
|
16
|
+
After implementing and committing the project inputs, run the reference adapter with explicit Node test paths:
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
node node_modules/cliewen-openspec/adapters/node-test.mjs --change add-export test/export.test.mjs
|
|
20
|
+
cliewen-openspec check --change add-export --json
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Finish README changes, task notes, results, and any PR draft before the final commit. Collect and check on that clean HEAD. A later commit makes the report stale even if it changes only documentation or metadata; collect and check again after that commit. Keep collection logs outside tracked/untracked inputs, such as a project-local ignored directory.
|
|
24
|
+
|
|
25
|
+
Report the final tested revision and check result in the terminal handoff or an ignored file. A tracked record can describe an earlier tested revision, labeled as historical. Writing the latest revision into that record and committing it creates another revision that needs fresh evidence.
|
|
26
|
+
|
|
27
|
+
Tests use titles such as `exports rows [EXPORT-001] [Test-type: Unit]`. The reference adapter supports one AC tag and requires exactly one configured test-type tag per mapped test title. It records the declared type, real Node TAP results, and the runner exit code, so failures outside mapped tests also block the check. Reports must be Git-ignored and untracked. The adapter rejects dirty input revisions and changes during execution, and invalidates older evidence when a new run starts. A crash cannot leave an earlier passing report usable.
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"version": 1,
|
|
32
|
+
"revision": "<full Git commit>",
|
|
33
|
+
"scope": {"change": "add-export"},
|
|
34
|
+
"execution": {"exitCode": 0},
|
|
35
|
+
"results": [
|
|
36
|
+
{"scenario":"EXPORT-001","test":"exports rows","testType":"Unit","outcome":"passed"}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Allowed outcomes: passed, failed, skipped, pending and manual. Pending requires a reason; `--fail-on-pending` makes it blocking. Manual results are reported as warnings and are never described as automated proof. Report schema failures exit 2; failed checks exit 1; checks without errors exit 0. Reviewed sufficiency remains explicitly unassessed.
|
|
42
|
+
|
|
43
|
+
`check --change NAME` checks active delta scenarios (REMOVED scenarios are excluded). Without it, check all permanent specs. OpenSpec retains responsibility for semantic merging. After archive changes the tree, commit and regenerate evidence without the adapter's `--change` before checking permanent specs.
|
|
44
|
+
|
|
45
|
+
## Collect evidence for one change
|
|
46
|
+
|
|
47
|
+
Pass `--change NAME` once to the Node adapter, followed by explicit test file paths. It runs every test in those files, then includes only results whose AC IDs appear in the selected change's delta specs. This supports files containing both existing tests and tests for the current change. The flag selects report results, not which tests execute.
|
|
48
|
+
|
|
49
|
+
The report records `scope: {"change": "NAME"}` and the full runner exit code. A failure in any executed test, including an unmapped test or a test outside the change, still produces a failing runner status and blocks `check`. AC-tagged tests across the run must have valid test-type metadata, including tests filtered out of the report.
|
|
50
|
+
|
|
51
|
+
Run `check --change` with the same name. A named report used for another change or for permanent specs produces `evidence-scope-mismatch`, even if its IDs overlap. Scoped reports require `execution.exitCode`. The report envelope remains version 1.
|
|
52
|
+
|
|
53
|
+
Without the adapter flag, collection retains all mapped results and omits `scope`, preserving the existing behavior. Reports without scope metadata remain accepted; the checker still detects unrelated or missing scenario references. The checker cannot infer a collection scope that an older report does not declare.
|
|
54
|
+
|
|
55
|
+
The adapter exits 0 when the runner passes, 1 when it fails with reportable results, and 2 for collection errors. Missing change specs, invalid names or options, no selected scenarios, no matching results, and incomplete runner execution are collection errors. Once collection starts from valid clean inputs and an ignored output path, an earlier report is removed before scope validation and execution, so failed recollection cannot reuse a previous pass. Scenario completeness and exact test-type matching remain the checker's responsibility.
|
|
56
|
+
|
|
57
|
+
The candidate validates installation version/hashes, registry state, execution evidence, and configured test-policy records. It does not authenticate the semantic quality or approval of a review. Enabling documentation features supplies schema guidance, not document-structure validators. The schema does not add a post-implementation artifact as an apply prerequisite. Archive is deliberately performed with OpenSpec, after reviewing evidence.
|
|
58
|
+
|
|
59
|
+
For `cliewen-discovery` changes, `check --change NAME` reads the schema selection from OpenSpec metadata and checks installation and registry health only. With evidence enabled, it reports `discovery-review-required` instead of requesting a product test report. Review research sources, actual observations, uncertainty, and the recommendation yourself. An `ok: true` result does not validate discovery documents or prove product behavior. See [the discovery guide](../guide/discovery.md).
|
|
60
|
+
|
|
61
|
+
For `cliewen-all`, check first validates decision frontmatter and the outcome branch. Delivery needs accepted status and must not skip specs, then follows this product evidence contract. No-change or further-investigation needs native `skip_specs: true` and no Markdown product deltas; it reports `discovery-review-required` without assessing product evidence. Outcome consistency and accepted-status checks remain active if evidence is disabled. Metadata cannot prove real human approval. See [the combined guide](../guide/all.md).
|
|
62
|
+
|
|
63
|
+
## Troubleshooting
|
|
64
|
+
|
|
65
|
+
| Finding or error | What to do |
|
|
66
|
+
|---|---|
|
|
67
|
+
| `evidence-not-configured` | Commit inputs, run the test adapter, and check that `evidence.report` points to its output |
|
|
68
|
+
| `stale-evidence` | Regenerate the report after committing the intended inputs; archive also changes the revision |
|
|
69
|
+
| `unverifiable-evidence` | Resolve tracked and untracked changes, then commit and rerun; confirm the project has a Git HEAD |
|
|
70
|
+
| `test-failed`, `test-skipped`, or `runner-failed` | Inspect real test output, fix failures, and collect a new report; do not edit a report to claim a pass |
|
|
71
|
+
| `missing-ac-id` or `missing-evidence` | Check scenario headings and bracketed IDs in test titles; supply a test result for each selected scenario |
|
|
72
|
+
| `unknown-ac-reference` | Use the matching `--change` scope or collect a report containing only the scenarios being checked |
|
|
73
|
+
| `evidence-scope-mismatch` | Collect for the requested change and pass the same name to `check`; after archive, recollect without the adapter's `--change` for permanent specs |
|
|
74
|
+
| `duplicate-ac-id` or `duplicate-test-result` | Inspect duplicate scenario identities or repeated test result entries before recollecting |
|
|
75
|
+
| `pending-without-reason` | Record why execution is pending; use `--fail-on-pending` when pending work must block |
|
|
76
|
+
| `owned-file-modified` | Review edits to installer-owned files; update replaces unmodified owned content and rejects conflicting local edits. See the update guide |
|
|
77
|
+
| `invalid-ac-registry` | Restore a manually changed prefix mapping and use `ac rename-prefix`; preserve the registry and reserved numbers |
|
|
78
|
+
| `interrupted-transaction` | Run `cliewen-openspec recover`, then review the restored files |
|
|
79
|
+
| Adapter says the output is not ignored | Add the custom report path to `.gitignore`; default output is ignored by init |
|
|
80
|
+
| `sufficiency-not-assessed` | Expected informational finding; review whether assertions actually establish the scenarios |
|
|
81
|
+
|
|
82
|
+
A `manual` result is reported as a warning and does not become automated proof. The current format records free-text context, not a reviewed-sufficiency verdict. A pending result with a reason also remains a warning unless explicitly made blocking.
|
|
83
|
+
|
|
84
|
+
Each selected scenario requires exactly one nonempty `Test-type` line. Each result requires `testType`, including pending and manual results. Types must belong to `testing.types` and match the scenario exactly. Findings are `invalid-scenario-test-type`, `missing-test-type`, `unknown-test-type`, and `test-type-mismatch`. Fix the scenario or test metadata, commit, and recollect evidence. Reports without types must be regenerated. The report envelope remains version 1 with stricter result checks.
|
|
85
|
+
|
|
86
|
+
The adapter records explicit metadata; it cannot establish whether a test actually exercises the claimed boundary. Review that boundary and task descriptions alongside assertions. See [test-type configuration](../configuration.md#test-types).
|
|
87
|
+
|
|
88
|
+
Execution reports establish observed outcomes and revision freshness. Follow [evidence-first verification](../configuration.md#evidence-first-verification) to plan acceptance cases, assess assertion quality, and maintain tests. Historical recorder logs are preserved but no longer gate completion.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: testing
|
|
3
|
+
---
|
|
4
|
+
# CSV pilot reference prompt
|
|
5
|
+
|
|
6
|
+
Use this prompt to evaluate whether the installed Cliewen schema provides enough workflow guidance from a concrete task description.
|
|
7
|
+
|
|
8
|
+
Prerequisite: OpenSpec and Cliewen are initialized, and the `add-csv-export` change uses `cliewen-delivery`.
|
|
9
|
+
|
|
10
|
+
## Prompt
|
|
11
|
+
|
|
12
|
+
> Create a change proposal for a CSV export function. The function must accept a list of records and export them as CSV with a header row. Specify the columns explicitly so their order is stable. Fields containing commas, quotation marks, or line breaks must be escaped correctly. An empty list must produce a CSV containing only the header. Use the existing OpenSpec change `add-csv-export`, and stop after the proposal, specs, design, and tasks so I can review the proposal before implementation.
|
|
13
|
+
|
|
14
|
+
## What are we evaluating?
|
|
15
|
+
|
|
16
|
+
The prompt describes the task and the review boundary. The schema supplies the workflow guidance, including stable AC IDs and consideration of evidence, documentation, and decisions when relevant and enabled.
|
|
17
|
+
|
|
18
|
+
During review, assess whether the agent follows the schema without additional workflow instructions, whether the scenarios cover the requested behavior, and whether uncertainties become visible before implementation. With the default testing configuration, each implementation task should include its own tests and completion check.
|
|
19
|
+
|
|
20
|
+
A successful copied example does not establish that an agent can implement or verify a new change. Review an agent-authored result against the requested behavior and actual evidence.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
---
|
|
4
|
+
# Test quality and lifecycle
|
|
5
|
+
|
|
6
|
+
These checks are included in `0.1.0`. The earlier published `0.1.0-alpha.1` does not include them. They assess case declarations and review records. You still review whether assertions prove the intended behavior.
|
|
7
|
+
|
|
8
|
+
## Choose the checks your project needs
|
|
9
|
+
|
|
10
|
+
Coverage, effectiveness, and lifecycle each have an independent mode: `off`, `review` (the default), or `enforce`. Review produces warnings; enforce makes incomplete or invalid records blocking and requires evidence enabled. See [configuration](../configuration.md#test-quality-and-lifecycle) for defaults and overrides.
|
|
11
|
+
|
|
12
|
+
Add case tags to Node tests, alongside their existing scenario and test type:
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
test('parses one [COUNT-001] [Test-type: Unit] [Case: ordinary] [Coverage: positive]', () => {
|
|
16
|
+
assert.equal(count('1'), 1);
|
|
17
|
+
});
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Each case needs a unique kebab-case ID within its scenario and one category: `positive`, `negative`, or `boundary`. Passing distinct cases count toward configured minima. Retries, skipped tests, manual results, wrong test types, and stale evidence do not count. Missing or ambiguous tags remain visible in the report; review mode does not stop collection because of optional metadata.
|
|
21
|
+
|
|
22
|
+
## Plan interacting cases
|
|
23
|
+
|
|
24
|
+
Some requirements depend on both the input and the selected option. Before implementation, identify those interactions and choose combinations that could expose a behavior failure. A preservation claim needs exact assertions for relevant default, disabled, and enabled paths, using content that could be changed accidentally.
|
|
25
|
+
|
|
26
|
+
For example, an optional text prefix must preserve caller content whether prefix insertion is enabled or disabled. Testing ordinary text with insertion disabled and unusual characters only with insertion enabled leaves an interaction untested. Include that content on the other relevant paths and compare the complete expected output.
|
|
27
|
+
|
|
28
|
+
Use a small table in the acceptance plan when it helps. Explain why combinations matter and disclose those left untested. Exhaustive combinations are not required, and unsupported inputs need no invented behavior. Case counts alone do not show that these interactions are covered. This is agent planning and review guidance; `check` does not infer missing combinations from test code.
|
|
29
|
+
|
|
30
|
+
## Record what you reviewed
|
|
31
|
+
|
|
32
|
+
For a change named `add-count`, author `.cliewen-openspec/reviews/change-add-count.yaml`. For permanent specs, use `.cliewen-openspec/reviews/specs.yaml`. These are project documents, preserved by update and uninstall.
|
|
33
|
+
|
|
34
|
+
The record contains `version: 1`, matching `scope` (`{change: add-count}` or `{specs: true}`), a full Git `baseline` commit, an `inputs` mapping, and `effectiveness`, `lifecycle`, and `exceptions` lists. Unknown fields are rejected. The baseline must be available locally and an ancestor of HEAD.
|
|
35
|
+
|
|
36
|
+
Inputs map inspected paths to SHA-256 digests of Git blob bytes. Include configuration, assessed specs, change tasks when present, tests, implementation, and relevant helpers or dependency files. Use `null` for an inspected file removed by the change. Exclude the review record itself.
|
|
37
|
+
|
|
38
|
+
Lifecycle comparison reads the permanent spec set as well as the change's deltas, so include all current permanent spec files when that policy is active.
|
|
39
|
+
|
|
40
|
+
To calculate a digest, stage the intended files, then run this in your project, replacing `src/count.mjs` with an inspected path:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
git add .
|
|
44
|
+
node --input-type=module -e 'import {execFileSync} from "node:child_process"; import {createHash} from "node:crypto"; console.log(createHash("sha256").update(execFileSync("git", ["show", ":src/count.mjs"])).digest("hex"));'
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
After authoring the record, commit project inputs, recollect execution evidence, and run `check` as usual. Changed declared inputs invalidate the review. Undeclared dependencies can escape this check, so review dependency completeness. Every commit still requires fresh execution evidence, including edits to review prose.
|
|
48
|
+
|
|
49
|
+
### Assertion effectiveness
|
|
50
|
+
|
|
51
|
+
Each assessment identifies `scenario`, `cases`, `testFiles`, `sourceFiles`, `method` (`controlled-fault` or `behavior-failure`), `assertion`, `defect`, `command` (an argument list), `observation`, `failureKind`, and `status`.
|
|
52
|
+
|
|
53
|
+
Only `failureKind: behavior` with `status: reviewed` satisfies the obligation. Setup and unrelated failures do not demonstrate assertion effectiveness. Referenced test/source files must have inspected input digests; case IDs must exist in the report. One relevant experiment can cover several cases. Commands are recorded evidence and are never executed by `check`.
|
|
54
|
+
|
|
55
|
+
Choose a fault that exercises the input and path being assessed. Credit only assertions that actually fail: an enabled-path failure does not prove detection on a disabled path, and a loop that stops at its first failure does not demonstrate later assertions. Restore the intended behavior and rerun the relevant tests before collecting final evidence.
|
|
56
|
+
|
|
57
|
+
### Test maintenance and retirement
|
|
58
|
+
|
|
59
|
+
Lifecycle entries identify `scenario`, `change` (`unchanged`, `modified`, or `retired`), `reason`, `status`, and affected `tests`. Each test declares `file`, its exact `test` name, `action` (`retain`, `update`, `remap`, or `remove`), and `remainingScenarios`. Remapping also needs `replacementScenarios` with passing evidence.
|
|
60
|
+
|
|
61
|
+
Retirement needs `retirement: {status: accepted, source: PATH}` pointing to an inspected document recording agreement. A missing criterion alone never authorizes test removal. Removing a shared test while it declares active obligations is rejected. Retain or remap those assertions instead. Out-of-scope retained obligations require review and verification with the full suite and permanent evidence; a change-scoped report does not prove their execution individually.
|
|
62
|
+
|
|
63
|
+
The checker projects added, modified, and removed requirement blocks against permanent specs, including removal blocks without scenario text. Requirement renames currently produce an unresolved-lifecycle finding; use review mode until rename projection is supported. Refactoring still needs a reviewed disposition or scoped exception for affected unchanged criteria. Review whether the impact analysis found all affected tests.
|
|
64
|
+
|
|
65
|
+
For delivery refactoring with no behavior delta, native `skip_specs: true` selects permanent scenarios for scoped execution evidence and lifecycle checks. Keep the change free of product delta files. This preserves test obligations without inventing new requirements.
|
|
66
|
+
|
|
67
|
+
### Scoped exceptions
|
|
68
|
+
|
|
69
|
+
Exceptions declare `policy`, `scenario`, `reason`, and `status: reviewed`. Coverage exceptions also name `category`. They waive only that category minimum or the named scenario's effectiveness/lifecycle review obligation. Duplicate or unknown references are invalid. Exceptions cannot waive explicit retirement, removal of active assertions, failed execution, stale results, installation checks.
|
|
70
|
+
|
|
71
|
+
## Resolve findings
|
|
72
|
+
|
|
73
|
+
| Finding | Action |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `coverage-metadata-missing` / `coverage-case-invalid` | Correct tags and recollect results |
|
|
76
|
+
| `coverage-minimum-unmet` | Add meaningful cases or review a scoped exception |
|
|
77
|
+
| `test-review-missing` / `test-review-invalid` | Author or correct the record and commit it |
|
|
78
|
+
| `test-review-scope-mismatch` | Use the record matching the command |
|
|
79
|
+
| `test-review-stale` | Reinspect changed inputs and update their digests |
|
|
80
|
+
| `effectiveness-unreviewed` | Review a relevant failure or a justified exception |
|
|
81
|
+
| `lifecycle-unresolved` / `retirement-unaccepted` | Explain affected tests and establish retirement agreement |
|
|
82
|
+
| `active-test-removal` | Preserve or remap active assertions |
|
|
83
|
+
|
|
84
|
+
After archive, refresh the permanent-spec review and its input paths before claiming enforced permanent checks. Recollect evidence after committing it. Discovery-only and genuine no-delivery combined changes do not require product-quality records. A reviewed status records a claim; it cannot authenticate who approved it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cliewen-openspec",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OpenSpec workflows with durable decisions and behavioral evidence",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/cliewen-openspec/cliewen-openspec.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://cliewen-openspec.github.io/cliewen-openspec/",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=20.19.0"
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"cliewen-openspec": "dist/cli.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"schemas",
|
|
21
|
+
"adapters",
|
|
22
|
+
"README.md",
|
|
23
|
+
"CHANGELOG.md",
|
|
24
|
+
"LICENSE",
|
|
25
|
+
"docs/configuration.md",
|
|
26
|
+
"docs/testing/evidence.md",
|
|
27
|
+
"docs/testing/test-quality.md",
|
|
28
|
+
"docs/testing/pilot-prompt.md"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "node scripts/clean-retired-build.mjs && tsc",
|
|
32
|
+
"test": "npm run build && node --test test/*.test.mjs",
|
|
33
|
+
"prepack": "npm run build",
|
|
34
|
+
"docs:build": "npm run build && node scripts/build-docs.mjs",
|
|
35
|
+
"docs:serve": "node scripts/serve-docs.mjs",
|
|
36
|
+
"docs:check": "node scripts/check-docs-browser.mjs",
|
|
37
|
+
"trial:prepare": "node scripts/prepare-csv-bom-trial.mjs",
|
|
38
|
+
"trial:knowledge:prepare": "node scripts/prepare-knowledge-writing-trial.mjs",
|
|
39
|
+
"trial:quality:prepare": "node scripts/prepare-quality-lifecycle-trial.mjs",
|
|
40
|
+
"trial:quality:combined": "node scripts/prepare-combined-quality-trial.mjs",
|
|
41
|
+
"trial:discovery": "node scripts/prepare-csv-discovery-trial.mjs",
|
|
42
|
+
"eval:check": "npm run build && node scripts/check-agent-evaluation.mjs",
|
|
43
|
+
"trial:all": "node scripts/prepare-csv-all-trial.mjs",
|
|
44
|
+
"trial:cli:prepare": "node scripts/prepare-cli-evaluation.mjs",
|
|
45
|
+
"trial:cli": "node scripts/run-cli-trial.mjs"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"yaml": "2.9.1"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@fission-ai/openspec": "1.15.0",
|
|
52
|
+
"@types/node": "26.6.6",
|
|
53
|
+
"jsdom": "26.1.0",
|
|
54
|
+
"markdown-it": "15.0.3",
|
|
55
|
+
"mermaid": "12.2.0",
|
|
56
|
+
"playwright": "1.64.1",
|
|
57
|
+
"typescript": "7.0.2",
|
|
58
|
+
"vitepress": "1.6.4",
|
|
59
|
+
"vue": "3.5.44"
|
|
60
|
+
},
|
|
61
|
+
"overrides": {
|
|
62
|
+
"vite": "7.3.7",
|
|
63
|
+
"@vitejs/plugin-vue": "6.0.10"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Schema sources
|
|
2
|
+
|
|
3
|
+
Edit agent instructions and Markdown templates here. `src/delivery.ts`, `src/discovery.ts`, and `src/all.ts` define their artifact dependencies and assemble standalone schemas during installation. `src/schema-source.ts` loads shared instructions and normalizes source files. The combined bundle reuses discovery investigation and delivery spec/task guidance rather than composing installed schemas at runtime.
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
schemas/
|
|
7
|
+
|-- base/
|
|
8
|
+
| |-- instructions/ Shared writing, diagrams, routing, and testing guidance
|
|
9
|
+
| `-- templates/ Decision Record template
|
|
10
|
+
|-- delivery/
|
|
11
|
+
| |-- instructions/ Proposal, specs, design, tasks, and apply guidance
|
|
12
|
+
| `-- templates/ OpenSpec artifact templates
|
|
13
|
+
|-- discovery/
|
|
14
|
+
| |-- instructions/ Proposal, investigation, decision, and closure guidance
|
|
15
|
+
| `-- templates/ Investigation artifact templates
|
|
16
|
+
`-- all/
|
|
17
|
+
|-- instructions/ Combined outcome and approval guidance
|
|
18
|
+
`-- templates/ One proposal, decision/design source, and branch-aware tasks
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Instruction files contain prose, with sentences on separate lines for review. The assembler joins those lines with spaces. In the tasks and apply instructions, `${testingApproach}` inserts the shared testing guidance. Markdown templates retain their line breaks. Both kinds of files normalize Windows line endings to LF.
|
|
22
|
+
|
|
23
|
+
The npm package includes this directory. File loading is relative to the installed module, so consumers can run the CLI from their own project directory. Installation writes all three bundles under `openspec/schemas/` and `.cliewen-openspec/templates/decision.md`.
|
|
24
|
+
|
|
25
|
+
Run `npm test` after changes. The suite includes installation from a packed tarball, schema validation, discovery handoff, native no-delivery closure, combined delivery, and evidence through archive. `base` is shared source material, not a selectable OpenSpec schema.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
For this combined schema, read decision.md first. Outcome-specific instructions here determine whether the delivery guidance that follows applies.
|
|
2
|
+
For outcome: delivery, production implementation requires status: accepted following actual human agreement. If status remains proposed, stop at that review boundary. Use decision.md as the design source, run per-task tests as configured, collect change-scoped evidence, and check before archive.
|
|
3
|
+
For outcome: no-change or further-investigation, do not implement production code, allocate product AC IDs, or collect fake product evidence. Confirm native skip_specs: true, complete only genuine closure checks in tasks.md, and use check for outcome consistency and installation health. Review findings and decision status yourself, then archive with --skip-specs only when authorized.
|
|
4
|
+
Completing artifact files or setting accepted text does not establish that human agreement occurred. Preserve the actual approval source and never claim it without evidence.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
Until real human agreement is recorded as status: accepted in decision.md, preserve product code, tests, permanent specs, the AC registry, and capability mappings.
|
|
2
|
+
Do not allocate new acceptance IDs or register mappings, even for drafts; leave draft IDs unassigned.
|
|
3
|
+
If you allocate too early, report the error and stop; do not reset counters or claim the stage passed.
|
|
4
|
+
Implementation approval does not authorize archive, push, or an external pull request.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Use decision.md for both the outcome and chosen design, linking to investigation findings instead of copying them. Do not create a separate design.md artifact.
|
|
2
|
+
Frontmatter must include type: decision, status: proposed or accepted, and outcome: delivery, no-change, or further-investigation.
|
|
3
|
+
Only human agreement permits accepted status. Stop before production implementation while a delivery decision remains proposed; record the actual approval source instead of inventing it.
|
|
4
|
+
Describe exactly what agreement authorizes; do not include unverified commands in the continuation request.
|
|
5
|
+
For delivery, describe agreed behavior, constraints, approach, risks, and verification. Keep schema: cliewen-all and leave skip_specs absent or false in .openspec.yaml.
|
|
6
|
+
For no-change or further-investigation, explain why and what would reopen the question, set skip_specs: true in .openspec.yaml, and do not create product spec deltas or allocate acceptance IDs for unanswered questions.
|
|
7
|
+
When decisions are enabled and the choice merits a durable record, use the shared decision template under configured docsRoot/decisions. Preserve existing document paths and ID authority; new-project filenames use sequential numbers padded to at least three digits. Link the authoritative record rather than repeat it. Human agreement remains required for acceptance.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Keep findings in this change and link them from the decision. A separate discovery change or delivery handoff is unnecessary for this schema.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Use one proposal for the whole change: state the question, motivation, scope, constraints, decision criteria, and investigation limits.
|
|
2
|
+
Read existing specs and knowledge. Do not assume investigation will justify delivery.
|
|
3
|
+
Update the same proposal's change/capability/impact sections after the recommendation; do not create a second proposal or duplicate investigation findings.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
These product-spec instructions apply only when decision.md declares outcome: delivery. Use the chosen design in decision.md and do not reopen investigation implicitly.
|
|
2
|
+
For outcome: no-change or further-investigation, set native skip_specs: true in .openspec.yaml; this artifact is skipped by OpenSpec. Do not create placeholder specs or fake requirements.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
The implementation and testing guidance that follows applies only to outcome: delivery in decision.md. Link its chosen approach instead of writing design.md or repeating investigation findings.
|
|
2
|
+
For outcome: no-change or further-investigation, do not invent implementation or test tasks. Use tasks.md only for genuine closure work such as reviewing the recommendation, retaining useful knowledge, and cleaning isolated experiments. Do not require product test evidence for an investigation-only outcome.
|