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 CHANGED
@@ -1,69 +1,88 @@
1
- # Changelog
2
-
3
- Changes that matter to projects using Cliewen for OpenSpec.
4
-
5
- ## 0.1.0 (2026-11-09)
6
-
7
- - Optional indexed project learnings help agents retrieve relevant lessons and maintain or retire stale guidance. Notes remain project-owned and survive disabling the facility, updates, and uninstall. Learnings are off by default. Agents that gather context before reading schema instructions may need the [project instruction example](docs/configuration.md#instructions-before-context-collection).
8
- - Optional Humanizer guidance defaults to automatic host discovery, with explicit on/off modes, one status per session, and a clear-writing fallback. Missing skills never block writing or install automatically. See [configuration and host limits](docs/configuration.md#humanizer-and-writing).
9
- - Shared writing guidance asks agents to validate local document links before handoff and describe future files as planned paths until they exist. This requests an agent check; the CLI does not validate every Markdown link.
10
- - Technical explanations should distinguish supported inputs from observed runtime behavior and describe what each verification command actually checked. These are review instructions, not an automatic guarantee of factual correctness.
11
-
12
- - Evidence-first verification plans acceptance cases before implementation, verifies small tasks, reviews effective assertions, and maintains tests as requirements change. It records execution evidence without requiring an order of test and production edits. See [the verification approach](docs/configuration.md#evidence-first-verification).
13
- - Delivery guidance asks agents to test relevant combinations of input content and options, including preservation on default and disabled paths. These combinations require review; passing case counts do not establish their coverage. See [planning interacting cases](docs/testing/test-quality.md#plan-interacting-cases).
14
-
15
- - Independently configurable checks for positive/negative case coverage, assertion-effectiveness reviews, and test maintenance when requirements change or are retired. The default warns about missing assessments; projects can disable individual policies or make them blocking.
16
- - Case IDs and coverage categories in Node test reports, plus scoped exceptions and review records tied to inspected file contents. Passing record checks still require review of assertion meaning and approval claims. See [test quality and lifecycle](docs/testing/test-quality.md) for development-source usage and limitations.
17
- - The first non-prerelease release starts with the current configuration. Upgrading earlier alpha installations is outside its supported scope; authored-file preservation remains part of the installer contract.
18
-
19
- ## 0.1.0-alpha.1 (2026-11-01)
20
-
21
- The first public alpha was published as `cliewen-openspec@0.1.0-alpha.1`, with the `alpha` tag. Its features and limitations below describe that historical snapshot. Follow the [installation guide](docs/guide/getting-started.md) for 0.1.0.
22
-
23
- ### OpenSpec workflows
24
-
25
- Choose from three schemas, which define the documents and instructions for a change:
26
-
27
- - `cliewen-delivery` takes an understood change through a proposal, behavior specifications, design, implementation tasks, and verification.
28
- - `cliewen-discovery` helps investigate a question and recommend what to do next. The recommendation can be to make no change.
29
- - `cliewen-all` combines investigation and delivery. It calls for human agreement before implementation and also supports ending an investigation without changing the product.
30
-
31
- All three include guidance for maintaining documentation, recording durable decisions, writing clearly, and using diagrams where helpful. OpenSpec manages the change files and incorporates completed changes into the project's specifications when they are archived.
32
-
33
- ### Installation and project settings
34
-
35
- - `init` installs the schemas and supporting resources. Preview changes before writing files, and keep your existing default schema unless you explicitly select a replacement.
36
- - `update` refreshes resources installed by Cliewen. It preserves project settings and authored documents, and stops if local edits conflict with the update. Updates support recognized alpha installations; general version migrations are not available yet.
37
- - `uninstall` removes unchanged resources installed by Cliewen while preserving project documents and data. Resolve active changes using those schemas first, and select a replacement if removing the default schema. Removing the npm package is a separate step.
38
- - Installation commands support previews and recovery after interrupted writes. Path checks keep managed files inside the project, and file comparisons tolerate Windows line-ending conversion.
39
- - Project settings let you choose the documentation directory, test workflow, and evidence report location. You can turn individual facilities on or off without deleting authored documents.
40
-
41
- See the [configuration reference](docs/configuration.md) and [CLI guide](docs/guide/cli.md) for defaults and commands.
42
-
43
- ### Acceptance criteria and tests
44
-
45
- - Give behavior scenarios stable acceptance criterion IDs so specifications, tests, and results can refer to the same requirement. Choose a prefix for each capability, such as `EXP-001` for an export feature. Allocate IDs and rename prefixes without reusing reserved numbers or losing historical references.
46
- - Use the default Unit, Integration, and E2E test types, or define your own. Checks require the type declared by a scenario to match its test results.
47
- - Test each implementation task as you go, or configure testing at the end of a change. The default allows tests before or after code.
48
- - Optionally select test-driven development (TDD). The `tdd start` and `tdd run` commands record test commands, outcomes, and snapshots of declared files. Completion checks reject missing, stale, or inconsistent records. Tasks using another verification method need a reason.
49
-
50
- ### Test results before archive
51
-
52
- The Node test adapter runs tagged tests and records which scenarios they cover, whether they passed, and the Git revision tested. You can collect results for one change while retaining the exit status of the entire test run, so failures elsewhere in that run remain visible.
53
-
54
- Before archive, `check` reports missing or duplicate references, mismatched test types, failed or skipped tests, pending work, and manual verification. It also checks that results belong to the current committed revision and that the working tree is clean. A later commit requires fresh results, including when only documentation changed.
55
-
56
- See the [evidence guide](docs/testing/evidence.md) for collection commands and help resolving findings.
57
-
58
- ### Guide and examples
59
-
60
- The [user guide](docs/guide/index.md) covers installation, schema selection, existing projects, configuration, and troubleshooting. A worked CSV example takes a change through implementation, test results, and archive. The documentation site includes search, light and dark appearance, and diagrams.
61
-
62
- ### Current limitations
63
-
64
- - Passing checks establish test execution, references, and revision freshness. You still need to review whether the assertions prove the intended behavior. Configurable case coverage and test lifecycle checks are not implemented.
65
- - TDD records check the declared command and file history. They cannot prove why a test failed, prevent every code write, or authenticate the recorded history. Ordinary task-by-task testing remains agent guidance.
66
- - Discovery findings and combined-workflow approval fields require review. A recorded status cannot prove that a person approved the change.
67
- - Documentation and diagram guidance does not validate your project's document metadata or diagram syntax.
68
- - Acceptance ID allocation supports sequential work. Parallel branches may allocate the same number and need conflict resolution.
69
- - Release validation across the supported coding agents is still incomplete. Treat the package as an alpha; review its output before relying on it.
1
+ # Changelog
2
+
3
+ Changes that matter to projects using Cliewen for OpenSpec.
4
+
5
+ ## Unreleased
6
+
7
+ ## 0.2.0 (2026-11-13)
8
+
9
+ - Agents now assess automation before requesting manual work and explain any remaining human contribution. Shared guidance helps them prepare concise decision material and retain concrete human observations without treating feedback as release authorization. Existing configuration and evidence formats are unchanged. See [human review and verification](docs/guide/workflow.md#make-decisions-easy-to-assess).
10
+
11
+ - Optional product context helps agents keep changes connected to the agreed user outcome and identify drift or scope creep. Useful cross-capability journeys link to OpenSpec rules, while routine tasks need no new goal or journey document. Existing documentation and planning settings apply. See [product intent and journeys](docs/guide/workflow.md#keep-the-users-outcome-in-view).
12
+
13
+ - Installation and resource-update previews now show detected Node/OpenSpec versions, installed/target Cliewen versions, and files to create, replace, or delete. Init and update check Node 20.19+ and OpenSpec 1.15.0+ before changing files. Published 0.1.0 resources have an explicit supported update route that preserves project configuration, documents, changes, and acceptance identities. See [updating an installation](docs/guide/updating.md) for source-version limits and conflict handling.
14
+
15
+ - Agents can suggest a bounded prototype when material uncertainty needs something concrete to try. Users choose the experiment; clear tasks and declined suggestions continue normally. The installed prototype reference guides native investigative handoff, isolation, honest findings and feedback, and code disposition before delivery planning. See [optional prototypes](docs/guide/workflow.md#try-a-prototype-when-it-can-answer-a-question).
16
+
17
+ - The pre-change planning reference now explains learning-policy resolution before broad context reads, including when planning is disabled. An optional project-entry rule requests a separate initial reference read and index-first lesson selection. This guides agents; it does not enforce read order through the CLI.
18
+
19
+ - A shared closure reference helps agents maintain affected documentation, decisions, tests, and enabled learnings around archive, then revisit affected future work. Projects can opt in through OpenSpec's archive operation guidance so a separate archive session can find it. Native archive remains in OpenSpec; direct CLI calls do not execute the review. See [closure setup](docs/guide/workflow.md#close-the-change-and-preserve-useful-knowledge).
20
+
21
+ - Agents receive guidance for scoping coherent OpenSpec changes, splitting oversized proposals, and revisiting assumptions as work progresses. Optional planning uses your existing ticket system or a lightweight local plan. Ticket access uses the agent's available tools and your authorization.
22
+ - An installed planning reference and an optional project instruction make that guidance available before change creation. Planning can be disabled independently; authored documents are preserved. Agents can suggest a user-requested grill-me interview when available. These are review instructions, not automated guarantees of agent behavior. See [work scoping and planning](docs/guide/workflow.md#choose-the-next-delivery).
23
+
24
+ ## 0.1.0 (2026-11-09)
25
+
26
+ - Optional indexed project learnings help agents retrieve relevant lessons and maintain or retire stale guidance. Notes remain project-owned and survive disabling the facility, updates, and uninstall. Learnings are off by default. Agents that gather context before reading schema instructions may need the [project instruction example](docs/configuration.md#instructions-before-context-collection).
27
+ - Optional Humanizer guidance defaults to automatic host discovery, with explicit on/off modes, one status per session, and a clear-writing fallback. Missing skills never block writing or install automatically. See [configuration and host limits](docs/configuration.md#humanizer-and-writing).
28
+ - Shared writing guidance asks agents to validate local document links before handoff and describe future files as planned paths until they exist. This requests an agent check; the CLI does not validate every Markdown link.
29
+ - Technical explanations should distinguish supported inputs from observed runtime behavior and describe what each verification command actually checked. These are review instructions, not an automatic guarantee of factual correctness.
30
+
31
+ - Evidence-first verification plans acceptance cases before implementation, verifies small tasks, reviews effective assertions, and maintains tests as requirements change. It records execution evidence without requiring an order of test and production edits. See [the verification approach](docs/configuration.md#evidence-first-verification).
32
+ - Delivery guidance asks agents to test relevant combinations of input content and options, including preservation on default and disabled paths. These combinations require review; passing case counts do not establish their coverage. See [planning interacting cases](docs/testing/test-quality.md#plan-interacting-cases).
33
+
34
+ - Independently configurable checks for positive/negative case coverage, assertion-effectiveness reviews, and test maintenance when requirements change or are retired. The default warns about missing assessments; projects can disable individual policies or make them blocking.
35
+ - Case IDs and coverage categories in Node test reports, plus scoped exceptions and review records tied to inspected file contents. Passing record checks still require review of assertion meaning and approval claims. See [test quality and lifecycle](docs/testing/test-quality.md) for development-source usage and limitations.
36
+ - The first non-prerelease release starts with the current configuration. Upgrading earlier alpha installations is outside its supported scope; authored-file preservation remains part of the installer contract.
37
+
38
+ ## 0.1.0-alpha.1 (2026-11-01)
39
+
40
+ The first public alpha was published as `cliewen-openspec@0.1.0-alpha.1`, with the `alpha` tag. Its features and limitations below describe that historical snapshot. Follow the [installation guide](docs/guide/getting-started.md) for 0.1.0.
41
+
42
+ ### OpenSpec workflows
43
+
44
+ Choose from three schemas, which define the documents and instructions for a change:
45
+
46
+ - `cliewen-delivery` takes an understood change through a proposal, behavior specifications, design, implementation tasks, and verification.
47
+ - `cliewen-discovery` helps investigate a question and recommend what to do next. The recommendation can be to make no change.
48
+ - `cliewen-all` combines investigation and delivery. It calls for human agreement before implementation and also supports ending an investigation without changing the product.
49
+
50
+ All three include guidance for maintaining documentation, recording durable decisions, writing clearly, and using diagrams where helpful. OpenSpec manages the change files and incorporates completed changes into the project's specifications when they are archived.
51
+
52
+ ### Installation and project settings
53
+
54
+ - `init` installs the schemas and supporting resources. Preview changes before writing files, and keep your existing default schema unless you explicitly select a replacement.
55
+ - `update` refreshes resources installed by Cliewen. It preserves project settings and authored documents, and stops if local edits conflict with the update. Updates support recognized alpha installations; general version migrations are not available yet.
56
+ - `uninstall` removes unchanged resources installed by Cliewen while preserving project documents and data. Resolve active changes using those schemas first, and select a replacement if removing the default schema. Removing the npm package is a separate step.
57
+ - Installation commands support previews and recovery after interrupted writes. Path checks keep managed files inside the project, and file comparisons tolerate Windows line-ending conversion.
58
+ - Project settings let you choose the documentation directory, test workflow, and evidence report location. You can turn individual facilities on or off without deleting authored documents.
59
+
60
+ See the [configuration reference](docs/configuration.md) and [CLI guide](docs/guide/cli.md) for defaults and commands.
61
+
62
+ ### Acceptance criteria and tests
63
+
64
+ - Give behavior scenarios stable acceptance criterion IDs so specifications, tests, and results can refer to the same requirement. Choose a prefix for each capability, such as `EXP-001` for an export feature. Allocate IDs and rename prefixes without reusing reserved numbers or losing historical references.
65
+ - Use the default Unit, Integration, and E2E test types, or define your own. Checks require the type declared by a scenario to match its test results.
66
+ - Test each implementation task as you go, or configure testing at the end of a change. The default allows tests before or after code.
67
+ - Optionally select test-driven development (TDD). The `tdd start` and `tdd run` commands record test commands, outcomes, and snapshots of declared files. Completion checks reject missing, stale, or inconsistent records. Tasks using another verification method need a reason.
68
+
69
+ ### Test results before archive
70
+
71
+ The Node test adapter runs tagged tests and records which scenarios they cover, whether they passed, and the Git revision tested. You can collect results for one change while retaining the exit status of the entire test run, so failures elsewhere in that run remain visible.
72
+
73
+ Before archive, `check` reports missing or duplicate references, mismatched test types, failed or skipped tests, pending work, and manual verification. It also checks that results belong to the current committed revision and that the working tree is clean. A later commit requires fresh results, including when only documentation changed.
74
+
75
+ See the [evidence guide](docs/testing/evidence.md) for collection commands and help resolving findings.
76
+
77
+ ### Guide and examples
78
+
79
+ The [user guide](docs/guide/index.md) covers installation, schema selection, existing projects, configuration, and troubleshooting. A worked CSV example takes a change through implementation, test results, and archive. The documentation site includes search, light and dark appearance, and diagrams.
80
+
81
+ ### Current limitations
82
+
83
+ - Passing checks establish test execution, references, and revision freshness. You still need to review whether the assertions prove the intended behavior. Configurable case coverage and test lifecycle checks are not implemented.
84
+ - TDD records check the declared command and file history. They cannot prove why a test failed, prevent every code write, or authenticate the recorded history. Ordinary task-by-task testing remains agent guidance.
85
+ - Discovery findings and combined-workflow approval fields require review. A recorded status cannot prove that a person approved the change.
86
+ - Documentation and diagram guidance does not validate your project's document metadata or diagram syntax.
87
+ - Acceptance ID allocation supports sequential work. Parallel branches may allocate the same number and need conflict resolution.
88
+ - Release validation across the supported coding agents is still incomplete. Treat the package as an alpha; review its output before relying on it.
package/README.md CHANGED
@@ -1,102 +1,106 @@
1
- # Cliewen for OpenSpec
2
-
3
- Durable decisions, living documentation, and evidence for OpenSpec.
4
-
5
- **Version `0.1.0`.** Installs `cliewen-delivery`, `cliewen-discovery`, and `cliewen-all`, allocates acceptance IDs, and checks real delivery test evidence through OpenSpec archiving. Discovery supports investigation and recommendation without required production implementation.
6
-
7
- The release includes [test quality and lifecycle checks](docs/testing/test-quality.md), optional project learnings, and Humanizer guidance. Follow [Your first change](docs/guide/getting-started.md) to build and install its local tarball. The published `0.1.0-alpha.1` is an earlier snapshot and does not include these additions; its manifest is not supported by 0.1.0.
8
-
9
- ## Schema collection
10
-
11
- - **cliewen-delivery** — recommended workflow for understood changes.
12
- - **cliewen-discovery** — investigation, alternatives and decision handoff.
13
- - **cliewen-all** — combined discovery and delivery, with explicit no-delivery closure.
14
-
15
- `cliewen-base` names the internal shared foundation used to build these bundles. It is not a separately selectable schema. Discovery remains the workflow for investigation and decision-making.
16
-
17
- The shared design covers documentation, Decision Records, Mermaid, optional plans and evidence. Evidence is enabled by default. See the [discovery guide](docs/guide/discovery.md) for investigation, a no-change outcome, and delivery handoff. The package supplies documentation and decision guidance; structural metadata and Mermaid validators remain planned.
18
-
19
- Use [the combined workflow](docs/guide/all.md) to investigate and deliver in one change, with a proposed decision and human approval before implementation. Its no-delivery branch uses native `skip_specs`, without fake product requirements.
20
-
21
- ## Install
22
-
23
- Requires Node.js 20.19 or newer and Git. The integration test uses OpenSpec 1.15.0. Windows and Linux CI exercise Node 22 and 24.
24
-
25
- In your project, install the versioned packages and initialize OpenSpec:
26
-
27
- ```sh
28
- npm install --save-dev @fission-ai/openspec@1.15.0
29
- npx --no-install openspec init
30
- npm install --save-dev cliewen-openspec@0.1.0
31
- npx --no-install cliewen-openspec init --default
32
- npx --no-install openspec new change add-export --schema cliewen-delivery
33
- ```
34
-
35
- Register the capability in `.cliewen-openspec/config.yaml`:
36
-
37
- ```yaml
38
- ac:
39
- padding: 3
40
- capabilities:
41
- export: EXPORT
42
- ```
43
-
44
- Then allocate its first ID:
45
-
46
- ```sh
47
- npx --no-install cliewen-openspec ac next --capability export
48
- ```
49
-
50
- `--default` explicitly selects delivery for future changes. Omit it to preserve the existing schema. `init --dry-run` previews writes. Use the generated ID in scenario headings and test titles; commit the ID registry along with specs.
51
-
52
- The explicit version selects 0.1.0. Earlier alpha installation manifests are unsupported; use a fresh installation rather than editing a manifest version. For the complete CSV example, follow [your first change](docs/guide/getting-started.md).
53
-
54
- For an existing installation, install the desired package version and use `cliewen-openspec update --dry-run --json`, then `cliewen-openspec update --json` after reviewing the plan. Update refreshes owned resources from supported manifests, preserving configuration, selected schemas, IDs, and authored files. See [updating an installation](docs/guide/updating.md).
55
-
56
- Configure capability-specific AC prefixes and number padding, and choose test placement in `.cliewen-openspec/config.yaml`. Testing each implementation task before moving on is the default. Use `ac rename-prefix` to change an established prefix without resetting its sequence. See [project configuration](docs/configuration.md) for examples and prefix selection.
57
-
58
- Use **spec-driven development with evidence-first verification**: plan acceptance cases before implementation, verify small tasks, assess assertion effectiveness, and maintain tests as requirements change. See [the verification approach](docs/configuration.md#evidence-first-verification).
59
-
60
- After implementation, commit the project inputs and collect evidence from Node tests:
61
-
62
- ```sh
63
- node node_modules/cliewen-openspec/adapters/node-test.mjs test/export.test.mjs
64
- npx --no-install cliewen-openspec check --change add-export --json
65
- ```
66
-
67
- After reviewing the assertions and evidence, archive with OpenSpec. Commit the archived state, regenerate evidence and check permanent specs. See [the evidence guide](docs/testing/evidence.md) for outcomes, pending/manual verification and current limitations.
68
-
69
- `npm test` includes an end-to-end example which installs the packed tarball in a temporary repository, creates a real OpenSpec change, runs tagged tests, verifies failure cases, archives the change and checks that the AC ID survives. It cleans up its temporary repository afterward.
70
-
71
- ## Project documents
72
-
73
- - [User guide source](docs/guide/index.md) and [published documentation](https://cliewen-openspec.github.io/cliewen-openspec/)
74
- - [Decisions](docs/decisions/README.md)
75
- - [Changelog](CHANGELOG.md)
76
- - [Project configuration](docs/configuration.md)
77
- - [Pilot reference prompt](docs/testing/pilot-prompt.md)
78
- - [Implementation plan](plan.md)
79
- - [Practice mapping](docs/cliewen-mapping.md)
80
- - [Architecture](docs/architecture/README.md)
81
- - [Website](https://cliewen-openspec.github.io/cliewen-openspec/)
82
- - [Credits](CREDITS.md)
83
-
84
- Implemented commands: `init`, `update`, `uninstall`, `ac next`, `ac rename-prefix`, `check` and `recover`. Review generated/resource changes before applying them. [Uninstall](docs/guide/uninstalling.md) preserves project data and requires an explicit replacement when removing the selected default. Tests never establish assertion quality automatically.
85
-
86
- ## Development checks
87
-
88
- `npm test` builds TypeScript and runs unit and packed-installation integration tests. GitHub Actions runs the same suite on Windows and Linux with Node 22 and 24. These checks cover the alpha implementation; documentation semantic accuracy and assertion sufficiency still require review.
89
-
90
- For actual agent trials, use the [CLI evaluation guide](docs/testing/cli-evaluation.md). `npm run trial:cli:prepare` creates matching projects for three pinned CLI profiles; `npm run trial:cli -- SUITE PROFILE SCHEMA` explicitly launches one case and saves raw logs. These commands use local agent authentication and may incur usage charges. CI uses fake CLIs and makes no model calls.
91
-
92
- Build the documentation with `npm run docs:build` and preview it with `npm run docs:serve`. For browser checks, install Chromium with `npx playwright install chromium`, then run `npm run docs:check`. Documentation tooling uses Node 22.12+ (Node 22 or 24 recommended). See [documentation development](docs/guide/development.md).
93
-
94
- ## Feedback
95
-
96
- [Report a bug](https://github.com/cliewen-openspec/cliewen-openspec/issues/new?template=bug_report.yml) or [suggest an improvement](https://github.com/cliewen-openspec/cliewen-openspec/issues/new?template=idea.yml). Documentation problems and workflow ideas are welcome. A small example helps us understand the problem; a proposed implementation is optional.
97
-
98
- Maintainers use the [feedback triage guide](docs/feedback-triage.md) to reproduce problems, record decisions, and link accepted work to OpenSpec changes.
99
-
100
- ## License
101
-
102
- [MIT](LICENSE).
1
+ # Cliewen for OpenSpec
2
+
3
+ Durable decisions, living documentation, and evidence for OpenSpec.
4
+
5
+ Built on [OpenSpec](https://openspec.dev/), using its custom-schema workflows. See [Fission-AI/OpenSpec on GitHub](https://github.com/Fission-AI/OpenSpec) for the engine's source and community.
6
+
7
+ **Version `0.2.0`.** Installs `cliewen-delivery`, `cliewen-discovery`, and `cliewen-all`, allocates acceptance IDs, and checks real delivery test evidence through OpenSpec archiving. Discovery supports investigation and recommendation without required production implementation.
8
+
9
+ Version 0.2.0 adds work scoping, optional prototypes and product context, closure guidance, and guidance for automating checks and recording human observations. See [the 0.2.0 release notes](docs/releases/0.2.0-notes.md) for changes and upgrade requirements.
10
+
11
+ The package also includes [test quality and lifecycle checks](docs/testing/test-quality.md), optional project learnings, and Humanizer guidance. Follow [Your first change](docs/guide/getting-started.md) to build and install its local tarball. The published `0.1.0-alpha.1` is an earlier snapshot and does not include these additions; its manifest is not supported by 0.2.0.
12
+
13
+ ## Schema collection
14
+
15
+ - **cliewen-delivery** — recommended workflow for understood changes.
16
+ - **cliewen-discovery** — investigation, alternatives and decision handoff.
17
+ - **cliewen-all** — combined discovery and delivery, with explicit no-delivery closure.
18
+
19
+ `cliewen-base` names the internal shared foundation used to build these bundles. It is not a separately selectable schema. Discovery remains the workflow for investigation and decision-making.
20
+
21
+ The shared design covers documentation, Decision Records, Mermaid, optional plans and evidence. Evidence is enabled by default. See the [discovery guide](docs/guide/discovery.md) for investigation, a no-change outcome, and delivery handoff. The package supplies documentation and decision guidance; structural metadata and Mermaid validators remain planned.
22
+
23
+ Use [the combined workflow](docs/guide/all.md) to investigate and deliver in one change, with a proposed decision and human approval before implementation. Its no-delivery branch uses native `skip_specs`, without fake product requirements.
24
+
25
+ ## Install
26
+
27
+ Requires OpenSpec 1.15.0 or newer, Node.js 20.19 or newer, and Git. The npm commands below install OpenSpec 1.17.0, which requires Node 22.12 or newer. See [version compatibility](docs/configuration.md#version-compatibility) for the Node 20 installation path. Current integration tests target OpenSpec 1.17.0; Windows and Linux CI use Node 22 and 24.
28
+
29
+ In your project, install the versioned packages and initialize OpenSpec:
30
+
31
+ ```sh
32
+ npm install --save-dev @fission-ai/openspec@1.17.0
33
+ npx --no-install openspec init
34
+ npm install --save-dev cliewen-openspec@0.2.0
35
+ npx --no-install cliewen-openspec init --default
36
+ npx --no-install openspec new change add-export --schema cliewen-delivery
37
+ ```
38
+
39
+ Register the capability in `.cliewen-openspec/config.yaml`:
40
+
41
+ ```yaml
42
+ ac:
43
+ padding: 3
44
+ capabilities:
45
+ export: EXPORT
46
+ ```
47
+
48
+ Then allocate its first ID:
49
+
50
+ ```sh
51
+ npx --no-install cliewen-openspec ac next --capability export
52
+ ```
53
+
54
+ `--default` explicitly selects delivery for future changes. Omit it to preserve the existing schema. `init --dry-run` previews writes. Use the generated ID in scenario headings and test titles; commit the ID registry along with specs.
55
+
56
+ The explicit version selects 0.2.0. Earlier alpha installation manifests are unsupported; use a fresh installation rather than editing a manifest version. For the complete CSV example, follow [your first change](docs/guide/getting-started.md).
57
+
58
+ For an existing installation, install the desired package version and use `cliewen-openspec update --dry-run --json`, then `cliewen-openspec update --json` after reviewing the plan. Update refreshes owned resources from supported manifests, preserving configuration, selected schemas, IDs, and authored files. See [updating an installation](docs/guide/updating.md).
59
+
60
+ Configure capability-specific AC prefixes and number padding, and choose test placement in `.cliewen-openspec/config.yaml`. Testing each implementation task before moving on is the default. Use `ac rename-prefix` to change an established prefix without resetting its sequence. See [project configuration](docs/configuration.md) for examples and prefix selection.
61
+
62
+ Use **spec-driven development with evidence-first verification**: plan acceptance cases before implementation, verify small tasks, assess assertion effectiveness, and maintain tests as requirements change. See [the verification approach](docs/configuration.md#evidence-first-verification).
63
+
64
+ After implementation, commit the project inputs and collect evidence from Node tests:
65
+
66
+ ```sh
67
+ node node_modules/cliewen-openspec/adapters/node-test.mjs test/export.test.mjs
68
+ npx --no-install cliewen-openspec check --change add-export --json
69
+ ```
70
+
71
+ After reviewing the assertions and evidence, archive with OpenSpec. Commit the archived state, regenerate evidence and check permanent specs. See [the evidence guide](docs/testing/evidence.md) for outcomes, pending/manual verification and current limitations.
72
+
73
+ `npm test` includes an end-to-end example which installs the packed tarball in a temporary repository, creates a real OpenSpec change, runs tagged tests, verifies failure cases, archives the change and checks that the AC ID survives. It cleans up its temporary repository afterward.
74
+
75
+ ## Project documents
76
+
77
+ - [User guide source](docs/guide/index.md) and [published documentation](https://cliewen-openspec.github.io/cliewen-openspec/)
78
+ - [Decisions](docs/decisions/README.md)
79
+ - [Changelog](CHANGELOG.md)
80
+ - [Project configuration](docs/configuration.md)
81
+ - [Pilot reference prompt](docs/testing/pilot-prompt.md)
82
+ - [Implementation plan](plan.md)
83
+ - [Practice mapping](docs/cliewen-mapping.md)
84
+ - [Architecture](docs/architecture/README.md)
85
+ - [Website](https://cliewen-openspec.github.io/cliewen-openspec/)
86
+ - [Credits](CREDITS.md)
87
+
88
+ Implemented commands: `init`, `update`, `uninstall`, `ac next`, `ac rename-prefix`, `check` and `recover`. Review generated/resource changes before applying them. [Uninstall](docs/guide/uninstalling.md) preserves project data and requires an explicit replacement when removing the selected default. Tests never establish assertion quality automatically.
89
+
90
+ ## Development checks
91
+
92
+ `npm test` builds TypeScript and runs unit and packed-installation integration tests. GitHub Actions runs the same suite on Windows and Linux with Node 22 and 24. These checks cover the alpha implementation; documentation semantic accuracy and assertion sufficiency still require review.
93
+
94
+ For actual agent trials, use the [CLI evaluation guide](docs/testing/cli-evaluation.md). `npm run trial:cli:prepare` creates matching projects for three pinned CLI profiles; `npm run trial:cli -- SUITE PROFILE SCHEMA` explicitly launches one case and saves raw logs. These commands use local agent authentication and may incur usage charges. CI uses fake CLIs and makes no model calls.
95
+
96
+ Build the documentation with `npm run docs:build` and preview it with `npm run docs:serve`. For browser checks, install Chromium with `npx playwright install chromium`, then run `npm run docs:check`. Documentation tooling uses Node 22.12+ (Node 22 or 24 recommended). See [documentation development](docs/guide/development.md).
97
+
98
+ ## Feedback
99
+
100
+ [Report a bug](https://github.com/cliewen-openspec/cliewen-openspec/issues/new?template=bug_report.yml) or [suggest an improvement](https://github.com/cliewen-openspec/cliewen-openspec/issues/new?template=idea.yml). Documentation problems and workflow ideas are welcome. A small example helps us understand the problem; a proposed implementation is optional.
101
+
102
+ Maintainers use the [feedback triage guide](docs/feedback-triage.md) to reproduce problems, record decisions, and link accepted work to OpenSpec changes.
103
+
104
+ ## License
105
+
106
+ [MIT](LICENSE).
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import path from 'node:path';
3
- import { check, init, update, uninstall, nextId, renamePrefix, capabilityForPrefix, recover, version } from './core.js';
3
+ import { check, lifecycle, uninstall, nextId, renamePrefix, capabilityForPrefix, recover, version } from './core.js';
4
4
  const args = process.argv.slice(2);
5
5
  const wantsJson = args.includes('--json');
6
6
  function option(name) { const i = args.indexOf(name); if (i < 0)
@@ -50,9 +50,9 @@ try {
50
50
  else if (command === '--version')
51
51
  console.log(version);
52
52
  else if (command === 'init')
53
- console.log(JSON.stringify({ dryRun: dry, writes: init(root, dry, makeDefault) }, null, 2));
53
+ console.log(JSON.stringify({ dryRun: dry, ...lifecycle(root, 'init', dry, makeDefault) }, null, 2));
54
54
  else if (command === 'update')
55
- console.log(JSON.stringify({ dryRun: dry, ...update(root, dry) }, null, 2));
55
+ console.log(JSON.stringify({ dryRun: dry, ...lifecycle(root, 'update', dry) }, null, 2));
56
56
  else if (command === 'uninstall')
57
57
  console.log(JSON.stringify({ dryRun: dry, ...uninstall(root, dry, replacement) }, null, 2));
58
58
  else if (command === 'recover') {
@@ -0,0 +1,12 @@
1
+ export type Compatibility = {
2
+ node: {
3
+ version: string;
4
+ minimum: string;
5
+ };
6
+ openspec: {
7
+ version: string;
8
+ minimum: string;
9
+ source: string;
10
+ };
11
+ };
12
+ export declare function compatibility(root: string): Compatibility;
@@ -0,0 +1,87 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { createRequire } from 'node:module';
4
+ import { execFileSync } from 'node:child_process';
5
+ import { requirements, meetsMinimum } from './release.js';
6
+ function npmCommand(root) {
7
+ let entry;
8
+ try {
9
+ entry = createRequire(path.join(path.resolve(root), 'package.json')).resolve('@fission-ai/openspec');
10
+ }
11
+ catch (error) {
12
+ if (error.code === 'MODULE_NOT_FOUND') {
13
+ // A present but broken package must not be hidden by a global installation.
14
+ const locations = createRequire(path.join(path.resolve(root), 'package.json')).resolve.paths('@fission-ai/openspec') ?? [];
15
+ if (locations.some(p => fs.existsSync(path.join(p, '@fission-ai/openspec/package.json'))))
16
+ throw Error('Project OpenSpec package cannot be resolved; repair its installation before init/update.');
17
+ return;
18
+ }
19
+ throw Error('Project OpenSpec package cannot be resolved; repair its installation before init/update.');
20
+ }
21
+ let cursor = path.dirname(entry);
22
+ while (true) {
23
+ const metadata = path.join(cursor, 'package.json');
24
+ if (fs.existsSync(metadata)) {
25
+ const pkg = JSON.parse(fs.readFileSync(metadata, 'utf8'));
26
+ if (pkg.name === '@fission-ai/openspec') {
27
+ const bin = typeof pkg.bin === 'string' ? pkg.bin : pkg.bin?.openspec;
28
+ if (typeof bin !== 'string')
29
+ throw Error('Project OpenSpec package has no public CLI; repair its installation.');
30
+ const cli = path.resolve(cursor, bin), relative = path.relative(cursor, cli);
31
+ if (!relative || relative.startsWith('..') || path.isAbsolute(relative))
32
+ throw Error('Project OpenSpec CLI path is invalid; repair its installation.');
33
+ return { file: process.execPath, args: [cli], source: `project npm: ${cli}` };
34
+ }
35
+ }
36
+ const parent = path.dirname(cursor);
37
+ if (parent === cursor)
38
+ throw Error('Project OpenSpec package metadata cannot be located; repair its installation.');
39
+ cursor = parent;
40
+ }
41
+ }
42
+ function pathCommand() {
43
+ const extensions = process.platform === 'win32' ? ['.exe', '.cmd', '.bat', ''] : [''];
44
+ for (const directory of (process.env.PATH ?? '').split(path.delimiter).filter(Boolean)) {
45
+ for (const extension of extensions) {
46
+ const candidate = path.resolve(directory.replace(/^"|"$/g, ''), `openspec${extension}`);
47
+ if (!fs.existsSync(candidate) || !fs.statSync(candidate).isFile())
48
+ continue;
49
+ if (process.platform !== 'win32') {
50
+ try {
51
+ fs.accessSync(candidate, fs.constants.X_OK);
52
+ }
53
+ catch {
54
+ continue;
55
+ }
56
+ }
57
+ if (/\.(cmd|bat)$/i.test(candidate)) {
58
+ // npm/cmd-shim's public JS entry can be invoked without executing shell text.
59
+ const text = fs.readFileSync(candidate, 'utf8');
60
+ const entry = /"%dp0%[\\/]([^"\r\n]+\.(?:c|m)?js)"\s+%\*/i.exec(text)?.[1];
61
+ if (!entry)
62
+ throw Error(`Cannot safely resolve OpenSpec PATH shim: ${candidate}. Use a project-local npm installation or a standalone executable.`);
63
+ const cli = path.resolve(path.dirname(candidate), entry.replaceAll('\\', path.sep));
64
+ return { file: process.execPath, args: [cli], source: `PATH npm shim: ${candidate} -> ${cli}` };
65
+ }
66
+ return { file: candidate, args: [], source: `PATH: ${candidate}` };
67
+ }
68
+ }
69
+ }
70
+ export function compatibility(root) {
71
+ const node = process.versions.node;
72
+ if (!meetsMinimum(node, requirements.node))
73
+ throw Error(`Node ${node} is unsupported; requires Node ${requirements.node}+. Install a compatible Node runtime and rerun init/update.`);
74
+ const command = npmCommand(root) ?? pathCommand();
75
+ if (!command)
76
+ throw Error(`OpenSpec not found; requires OpenSpec ${requirements.openspec}+ and Node ${requirements.node}+. Install a compatible project-local @fission-ai/openspec package or expose its standalone CLI on PATH, then rerun init/update.`);
77
+ let output;
78
+ try {
79
+ output = execFileSync(command.file, [...command.args, '--version'], { cwd: root, encoding: 'utf8', timeout: 5000, maxBuffer: 65536, windowsHide: true, stdio: ['ignore', 'pipe', 'pipe'], env: { ...process.env, OPENSPEC_TELEMETRY: '0', CI: '1' } }).trim();
80
+ }
81
+ catch {
82
+ throw Error(`OpenSpec version probe failed or exceeded 5 seconds (${command.source}); requires OpenSpec ${requirements.openspec}+ runnable on Node ${node}. Repair the selected installation or its Node runtime and rerun init/update.`);
83
+ }
84
+ if (!meetsMinimum(output, requirements.openspec))
85
+ throw Error(`OpenSpec version ${JSON.stringify(output)} is unsupported (${command.source}); requires stable OpenSpec ${requirements.openspec}+. Install a compatible version deliberately and rerun init/update; Cliewen does not upgrade OpenSpec.`);
86
+ return { node: { version: node, minimum: requirements.node }, openspec: { version: output, minimum: requirements.openspec, source: command.source } };
87
+ }
package/dist/core.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { type QualitySettings } from './quality.js';
2
2
  export { nextId, renamePrefix, capabilityForPrefix } from './ac.js';
3
- export declare const version = "0.1.0";
3
+ import { type Compatibility } from './compatibility.js';
4
+ export { version } from './release.js';
4
5
  export type Config = {
5
6
  docsRoot: string;
6
7
  learnings: {
@@ -39,11 +40,22 @@ export declare function uninstall(root: string, dryRun?: boolean, replacement?:
39
40
  writes: string[];
40
41
  deletes: string[];
41
42
  };
42
- export declare function update(root: string, dryRun?: boolean): {
43
+ export type LifecycleResult = {
43
44
  writes: string[];
44
45
  deletes: string[];
46
+ creates: string[];
47
+ replaces: string[];
48
+ installedVersion: string | null;
49
+ targetVersion: string;
50
+ compatibility: Compatibility;
51
+ recoveredTransaction: boolean;
45
52
  };
53
+ export declare function lifecycle(root: string, operation: 'init' | 'update', dryRun?: boolean, makeDefault?: boolean): LifecycleResult;
46
54
  export declare function init(root: string, dryRun: boolean, makeDefault: boolean): string[];
55
+ export declare function update(root: string, dryRun?: boolean): {
56
+ writes: string[];
57
+ deletes: string[];
58
+ };
47
59
  export declare function markdowns(dir: string): string[];
48
60
  export declare function scenarios(root: string, change?: string): {
49
61
  id: string;