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.
@@ -1,88 +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.
1
+ ---
2
+ type: testing
3
+ ---
4
+ # Execution evidence and review
5
+
6
+ Version `0.2.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.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cliewen-openspec",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "OpenSpec workflows with durable decisions and behavioral evidence",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -48,7 +48,7 @@
48
48
  "yaml": "2.9.1"
49
49
  },
50
50
  "devDependencies": {
51
- "@fission-ai/openspec": "1.15.0",
51
+ "@fission-ai/openspec": "1.17.0",
52
52
  "@types/node": "26.6.6",
53
53
  "jsdom": "26.1.0",
54
54
  "markdown-it": "15.0.3",
@@ -0,0 +1,33 @@
1
+ # Close a Cliewen change
2
+
3
+ Use native OpenSpec status and the selected change's metadata to establish its schema, outcome, and resolved paths. Apply this reference to cliewen-delivery, cliewen-discovery, and cliewen-all changes. For other schemas, continue their native workflow. Read .cliewen-openspec/config.yaml and respect existing project conventions and authorization. This reference is advisory agent guidance, not a CLI hook or proof that review happened.
4
+
5
+ ## Before archive
6
+
7
+ Compare the actual result with the agreed scope, delta specs, and unresolved work. Preserve deferred obligations at the project's selected authority when planning is enabled. Review only affected records; useful findings can stay in an existing handoff or document. No separate closure report, new decision, lesson, or empty index is required when it adds no useful information.
8
+
9
+ Use the shared manual-step and observation guidance in .cliewen-openspec/planning.md independently of its optional planning settings. Automate feasible authorized checks before asking for manual work, explain any residual human need, and retain actual observation context and limits in existing records. Distinguish agent checks, human feedback, change approval, and release authorization. Reassess observations affected by later changes; manual evidence retains its existing warnings and freshness requirements. Missing feedback alone adds no routine approval gate.
10
+
11
+ With features.documentation enabled, reconcile affected explanations, architecture/design documents, examples, and links with the delivered result, using docsRoot and existing paths. With features.decisions enabled, maintain relevant Decision Records and their genuine acceptance status. Disabled facilities impose no matching optional work and preserve authored files.
12
+
13
+ For affected product intent or journeys, follow .cliewen-openspec/product-context.md. Reconcile enabled documentation with actual behavior and keep desired outcomes distinct from implementation and observed user results. Surface drift or additional wishes through existing scope rules; archive does not authorize them or establish user success.
14
+
15
+ With learnings.enabled and features.documentation enabled, follow the installed learning guidance: read the index before selecting notes, verify against current authority, retain only reusable evidence-backed observations, and merge or retire stale guidance in place. Otherwise skip learning retrieval and maintenance.
16
+
17
+ For delivery, apply the existing coverage, assertion-effectiveness, lifecycle, and evidence policies independently. Off skips its matching policy; review discloses unresolved findings and enforce resolves blocking findings. Preserve valid and shared active assertions. Remove obsolete assertions only following explicit accepted retirement, retain reserved IDs, and refresh review records when their inputs change. Evidence failures stay blocking when evidence is enabled.
18
+
19
+ For discovery or a combined no-change/further-investigation outcome, retain actual findings, uncertainty, recommendation, decision status, and experiment cleanup results. Follow that workflow's native skip-specs contract. These findings do not establish unimplemented product behavior and require no synthetic product execution evidence. Existing outcome consistency and approval rules still apply.
20
+
21
+ Obtain the required archive authorization without asking again when it was already given. Follow native OpenSpec synchronization and archive, using resolved paths and explicit user choices. Report pending synchronization honestly if the selected native route leaves specs unsynchronized. Do not infer acceptance, ticket completion, deployment, or Git integration from archive alone.
22
+
23
+ ## After the native operation
24
+
25
+ Inspect the actual result, archive destination, and permanent specs. If archive or synchronization failed or completed only part of the work, inspect current paths and changed files before retrying. State what actually changed, what remains, and the next action; do not report full closure or blindly repeat the operation. A failed or partial operation does not establish successful completion for planning purposes.
26
+
27
+ After successful archive, repair affected moved-file links and preserve useful knowledge at its established locations. With features.planning enabled, use .cliewen-openspec/planning.md to reassess affected tickets or plan items against actual results, dependencies, and the project's completion criteria. Seek direction for material changes in agreed scope. Prepare the next detailed proposal only when that work is selected. With planning disabled, skip ticket access and plan maintenance.
28
+
29
+ Use existing authorized ticket tools when applicable. Distinguish read access, write capability, and authorization. If access is read-only, unavailable, fails, or lacks authorization, report the archive result and concrete pending update separately without claiming ticket closure. A ticket may require additional deployment or human verification before completion.
30
+
31
+ For delivered behavior with evidence enabled, finish all intended tracked closure edits, commit the reviewed inputs, then recollect evidence for permanent specs without the Node adapter's --change flag and run Cliewen check. Archive or any later commit makes earlier revision-bound reports historical until refreshed. Keep reports ignored and untracked. Report the actual tested revision and check outcome; pending verification remains pending. No-delivery outcomes retain their own review contract.
32
+
33
+ Finish with a brief handoff: actual archive location, spec synchronization result, remaining work or pending updates, and relevant verification limits. Use existing records rather than a mandatory new artifact.
@@ -0,0 +1,31 @@
1
+ # Scope work from the project's plan
2
+
3
+ Read .cliewen-openspec/config.yaml. Apply the installed shared work-scoping guidance below for change assessment, assumptions, and resumption. These are agent instructions; they do not establish that assessment or approval happened.
4
+
5
+ ## Before context collection
6
+
7
+ Read this reference and configuration before broad project-content reads or searches. Do not batch that initial read with project documents or lesson contents. Resolve the learning policy before collecting further context, independently of features.planning.
8
+
9
+ Read learnings.enabled (default false) and features.documentation. If either disables learning guidance, skip the collection and preserve authored notes. Otherwise resolve the collection under docsRoot (default docs) and learnings.directory (default learnings). Read only its README.md index in a separate tool call, use scope and status to select relevant active notes, then open selected notes in a later call. Exclude unselected and retired notes from ordinary broad reads and searches. Missing or insufficient index information is a limitation to report, not permission to read the whole collection. Follow the selected workflow's full learning-maintenance instructions when retrieved.
10
+
11
+ After resolving this policy and selecting any relevant lessons, gather the remaining context needed for the task. Planning may be disabled while learning guidance remains enabled; its planning opt-out below does not skip this context policy.
12
+
13
+ ## Optional product context
14
+
15
+ After resolving the context policy above, use .cliewen-openspec/product-context.md when relevant intent or a cross-capability journey helps assess the work. Existing supplied context can inform scope independently of optional plan maintenance. features.documentation controls optional record maintenance; features.planning controls ticket/plan access. Routine work needs no new record.
16
+
17
+ ## Optional planning
18
+
19
+ For optional prototype experiments after resolving the context policy, use .cliewen-openspec/prototyping.md. Its user-selection and native-workflow rules apply independently of features.planning; understood work requires no experiment.
20
+
21
+ Read features.planning (default true). When false, skip planning-authority discovery, ticket access, and plan maintenance; preserve authored documents. Behavior scoping, relevant verification, and existing approval boundaries still apply.
22
+
23
+ When enabled and planning is useful, use one project-selected authority: its existing ticket system or a lightweight local plan using existing paths and conventions. Record the chosen system and project/backlog reference in that authority or an existing project reference. Link to it from the proposal when relevant. Keep goals and milestones together if sufficient; separate goal documents and a backlog for standalone tasks are optional.
24
+
25
+ Keep dependent future deliveries as tickets or plan items with purpose, desired outcome, scope, and known dependencies. Prepare their detailed proposals when actionable using current knowledge. For an oversized proposal, narrow the current delivery, preserve rationale and deferred obligations in the authority, and reconcile current artifacts. Reference ticket status at its source rather than maintaining a second status list.
26
+
27
+ Discover suitable ticket access through the host's exposed MCP servers, connectors, or CLI capabilities. Distinguish read access, write capability, and authorization for the particular action. The user connects services and grants access; credentials alone do not authorize writes. Use existing authorization and project policy rather than requesting it again when already given.
28
+
29
+ If discovery is unavailable, report availability as unknown. If a tool is missing, inaccessible, or fails, report what was actually observed, explain the needed connection when known, and provide links or concrete pending manual updates. Do not claim an unperformed update succeeded or infer that a hidden integration does not exist. Do not install integrations or change host configuration automatically.
30
+
31
+ Use descriptive OpenSpec kebab-case change names. Preserve original ticket IDs and descriptive links in proposal content when applicable, and preserve existing names and paths.
@@ -0,0 +1,31 @@
1
+ # Keep changes connected to the user's outcome
2
+
3
+ Use relevant agreed product context during scoping, design, investigation, review, and closure. Keep the explanation proportional to the decision. Routine understood work needs no new goal, journey, interview, approval step, or explanation for skipping them.
4
+
5
+ ## Reuse the intent
6
+
7
+ Look first at relevant context already supplied or available in the project's authoritative product brief, README, documents, or selected planning authority. Link to the existing source instead of copying its facts or status. Preserve paths, identifiers, and lifecycle meanings. Resolve learning policy before broader context collection as described in .cliewen-openspec/planning.md.
8
+
9
+ Use the known audience, problem, desired outcome, constraints, and supported success signals needed for this change. Keep missing intent or metrics unknown; do not invent accepted goals, numerical targets, or user research from implementation details. Clarify consequential missing information through existing project authority. A qualitative goal does not require a fabricated metric.
10
+
11
+ ## Explain a journey only when it helps
12
+
13
+ For consequential work across capabilities, describe the actor's starting need, relevant steps and handoffs, meaningful failure/recovery paths, and intended outcome. Use a short explanation with a diagram when it makes the path clearer; a table or prose can suffice. Do not require a complete product map, separate goal file, or journey ID.
14
+
15
+ Link behavioral rules to authoritative OpenSpec specs with descriptive titles and, when useful, exact scenario IDs alongside their meaning. Do not copy the rules into the journey, allocate parallel acceptance IDs, or use a journey as product execution evidence. Label aspirational steps and identify missing or contradictory spec behavior for normal change assessment. A desired recovery step does not establish that it exists.
16
+
17
+ ## Detect drift and scope creep
18
+
19
+ Compare consequential emerging work with the agreed problem, user outcome, and delivery scope. Surface an approach that no longer serves that outcome; do not rewrite the goal to justify work that has drifted.
20
+
21
+ Distinguish a necessary in-scope correction from an additional wish. An idea can support the product goal while remaining outside this delivery. Use existing work-scoping rules to retain deferred work in the selected authority when features.planning is enabled and obtain direction before materially expanding agreed scope. With planning disabled, report the additional scope in the current handoff without creating a backlog. A goal or journey does not authorize extra work. Ordinary authorized implementation choices proceed independently with relevant verification.
22
+
23
+ ## Respect settings and preserve useful knowledge
24
+
25
+ With features.documentation enabled, create or maintain a durable intent/journey explanation only when useful, using configured docsRoot or existing project locations and conventions. Keep each fact in one authoritative home and link to it. Existing records may be sufficient. Without an existing convention, optional examples include product-intent.md and journeys/<name>.md under docsRoot; installation creates neither.
26
+
27
+ With features.documentation disabled, add no optional intent/journey creation or maintenance requests and preserve authored files. Relevant context already supplied can still inform ordinary scoping and native behavioral specs. Ticket discovery, access, and plan updates independently follow features.planning and the existing planning reference; documentation guidance does not enable ticket access when planning is disabled. Report unavailable external context and pending authorized updates honestly, without inventing their contents or claiming updates succeeded.
28
+
29
+ Before archive, reconcile only affected explanations with the actual delivery under the enabled settings. Preserve unresolved/deferred work at its existing authority. Follow .cliewen-openspec/closure.md for native archive and moved-link maintenance.
30
+
31
+ Keep desired outcomes, implemented behavior, and actual observations distinct. Passing capability tests, a completed diagram, and archive alone do not prove user success or human approval. State when no actual user feedback was collected; label illustrative feedback and proposed outcomes. Discovery and combined no-delivery findings require no fabricated product evidence or delivery proposal. Reuse existing project approval and evidence boundaries.
@@ -0,0 +1,33 @@
1
+ # Try a bounded prototype
2
+
3
+ Use a prototype when something concrete can resolve material uncertainty. First inspect available evidence and clarify questions that can be answered directly. Suggest an experiment only when a specific remaining question can change the solution. Users can also request one directly. Clear, understood work proceeds normally without a prototype, interview, or explanation for skipping them.
4
+
5
+ ## Agree the experiment
6
+
7
+ Describe the question, expected learning, estimated effort, proposed workspace and outputs, meaningful time/resource limits, and the decision the result will inform. Clarify material missing limits. The user chooses whether to proceed. Reuse sufficient existing agreement within its scope instead of asking for the same permission again. If the user declines, continue ordinary clarification or planning and retain relevant uncertainty; do not create the prototype. Stop affected work and seek direction before materially expanding scope or resources.
8
+
9
+ Existing optional grill-me guidance applies. Suggest the interview when useful and use it on user request through exposed host capabilities. Neither availability nor an interview starts or authorizes a prototype. A prototype does not require the interview. If the skill is unavailable or declined, normal clarification remains available.
10
+
11
+ ## Follow the native handoff
12
+
13
+ Native OpenSpec explore is read-only for code. Keep conversational sketches and read-only inspection there; name the supported change handoff and obtain any capture confirmation required by that workflow before writing experimental code or prototype files. Do not bypass explore's rules by calling the code temporary.
14
+
15
+ Recommend a short cliewen-discovery change for the agreed experiment before a separate delivery proposal. Use its existing proposal to state the question, limits, workspace, and decision criteria; run the bounded experiment during investigation and record its findings in investigation.md. A small experiment needs only a concise investigation proposal, not premature production specs or delivery tasks. If cliewen-all is explicitly selected, use its investigation and preserve its existing decision boundary before product implementation. Follow the selected workflow's native instructions and paths; add no new schema or prototype artifact prerequisite.
16
+
17
+ ## Work within the agreed boundary
18
+
19
+ Use the agreed isolated experimental workspace, preferably an existing ignored project-local scratch location. Keep alternatives identifiable and label mock data, stubs, unsupported behavior, and checks honestly. Preserve production code, product acceptance tests, permanent specs, AC allocation, and capability mappings during investigation. Prototype checks establish observations about the experiment, not acceptance of unimplemented product behavior.
20
+
21
+ Describe actual isolation: an ignored directory or prompt instruction is not an OS-enforced sandbox. Existing project authority and external-action permissions still apply. Prototype agreement does not authorize production changes, purchases, installation, external access, or publication outside its described scope. Apply any permission already given to the required actions without redundant confirmation.
22
+
23
+ If a limit is reached, a check fails, or a measurement is invalid, record the actual outcome and what remains unknown. Do not report a stopped or unperformed experiment as successful. Reassess conclusions based on invalid measurements.
24
+
25
+ ## Preserve findings and choose the next step
26
+
27
+ Use the existing investigation artifact to record method, inputs or revision, observations, actual user feedback and its source, agent interpretation, remaining uncertainty, and the next decision. Missing feedback is not positive feedback or approval. Distinguish supplied example feedback from a live user observation. Native investigation artifacts remain available even when optional documentation or planning is disabled.
28
+
29
+ With features.planning enabled, reference or update the selected planning authority using existing access and authorization; do not duplicate ticket status. When disabled, skip ticket access and plan maintenance and preserve authored files. With learnings.enabled and features.documentation enabled, follow the index-first learning policy and retain only useful reusable findings. Otherwise skip optional lesson maintenance. An experiment does not require a new decision record, lesson, or separate report when existing records suffice.
30
+
31
+ Use the findings to proceed, investigate further, choose an alternative, or stop. Record whether prototype code is discarded, retained as reference, or reviewed for further development. Respect the agreed cleanup scope and preserve authored work that should remain. Prototype code is not automatically production-ready.
32
+
33
+ If a delivery is selected, carry relevant findings and limits into its current proposal or the combined workflow's decision/specs. Review reused code and verify the actual delivery contract. Preserve existing approval and archive boundaries; an agreed experiment or positive result is not approval of a later production delivery.
@@ -9,5 +9,6 @@ In review mode, disclose unresolved case/record warnings and their impact in the
9
9
  When coverage is active, tag Node cases with [Case: kebab-case-id] and [Coverage: positive|negative|boundary], retaining AC and Test-type tags. Use meaningful distinct cases and scoped reviewed exceptions where appropriate; counts do not prove assertion quality.
10
10
  When effectiveness is active, inspect assertions and record relevant controlled-fault or observed behavior failures. Fix setup or unrelated failures before making effectiveness claims. Do not claim recorded status authenticates approval.
11
11
  Choose faults that exercise the claimed input and execution path. Credit only the cases and assertions that actually detect the fault; passing another option state or stopping at an earlier assertion does not establish detection elsewhere.
12
+ For a change that inserts, removes, normalizes, or escapes a pattern, include supported caller content containing that pattern in relevant positions and option states. When claiming preservation, consider a fault that accidentally removes or transforms legitimate input content while still producing the requested new output. Record surviving faults and their impact even when the actual implementation passes independent checks; unrelated successful faults do not cover that gap.
12
13
  When lifecycle is active, review affected criteria and tests against a baseline. Retain valid behavior assertions through refactoring, update accepted behavior changes, and remove obsolete assertions only after explicit accepted retirement. Preserve shared active obligations and reserved IDs. Author fresh scoped review records, commit reviewed inputs, collect final evidence, and refresh the permanent-spec review after archive. Discovery-only and genuine no-delivery changes need no product-quality records.
13
14
  Finish documentation and task notes, commit reviewed inputs, then collect revision-bound evidence and run check. Later commits require fresh evidence.
@@ -0,0 +1,12 @@
1
+ Assess whether the work needs an OpenSpec change from intended behavior, requirements, design impact, and uncertainty, following OpenSpec conventions. A small correction restoring unchanged accepted behavior can use relevant verification without a new proposal. Reassess if investigation reveals new behavior or material design choices.
2
+ Scope each change as a coherent result that can be understood and verified together. Small implementation tasks do not each need a proposal; independent changes can proceed in parallel. When splitting an oversized proposal, retain rationale and deferred obligations in the project's planning authority when enabled, and reconcile the current proposal, specs, design, and tasks so deferred work is not reported as delivered.
3
+ Before a consequential commitment, identify its riskiest assumption, a credible alternative, the cheapest useful investigation, and a stop or revision condition where the reviewer reads the choice. Ask whether meeting every criterion could still fail the intended user. Routine understood work needs no challenge report or explanation for its absence.
4
+ On resumption or contradictory evidence, reassess goals, dependencies, and the next delivery. Surface mismatches and options and obtain direction for material changes in agreed scope before continuing affected work. Ordinary replanning does not automatically need a Decision Record.
5
+ For consequential unresolved choices, suggest optional grill-me when useful. Availability alone does not request an interview. On user request, use the host's exposed skill-loading mechanism to read grill-me and its grilling dependency before following their instructions. If unavailable, inaccessible, or declined, continue ordinary scoping and report relevant limits; do not install skills automatically. Confirm shared understanding before acting and preserve agreed conclusions in the relevant proposal, plan, or decision. Existing approval boundaries still apply.
6
+ For material uncertainty that needs something concrete to try, read .cliewen-openspec/prototyping.md. Suggest a bounded prototype only when useful; the user chooses it and understood work proceeds normally. Keep native explore read-only for code and continue an agreed experiment through the selected investigative change.
7
+ Use .cliewen-openspec/product-context.md for relevant product intent and cross-capability journeys during scoping, design, investigation, and review. Detect drift from the agreed outcome and distinguish in-scope corrections from new wishes through existing scope rules; optional records follow documentation/planning settings and routine work gains no new prerequisite.
8
+ Before requesting any manual step, assess whether available authorized tools can perform it reliably. Automate feasible checks, setup, and evidence collection while preserving verification quality and authorization. A previously manual procedure is not sufficient reason to ask a person to repeat it. Complete authorized preparation and explain the specific remaining need for human judgment, access, or authority; request only that contribution. Reassess when tools or access change. If automation fails or access is unavailable, report the actual limitation and smallest remaining action without claiming success or treating the limitation as permanent.
9
+ When useful human observations exist, preserve the supplied attribution, checked behavior or scenario, tested version, relevant environment and steps, actual results or problems, and limits. Keep unavailable details explicitly unknown. Faithfully summarize actual feedback; label illustrative examples and agent observations by their real origin. Automated checks cannot establish a real user's subjective experience. If no human feedback was collected, say so when relevant rather than inventing it or adding a routine gate.
10
+ Reuse an existing investigation, review, task note, ticket, or handoff for observations with descriptive references to the checked behavior. Optional durable documentation follows features.documentation and existing paths; when disabled, create no optional observation document but keep the handoff accurate. External records follow features.planning and existing access/authorization rules. Preserve an observation's original tested context when relevant behavior changes, identify it as historical, and assess whether the changed behavior needs another check.
11
+ Keep observation, change approval, and release authorization distinct. Positive feedback does not authorize unrelated scope or publication. Human involvement follows concrete verification needs and project policy; routine sufficiently verified authorized work proceeds independently. Discovery findings use existing investigation records without fabricated product ACs or execution evidence.
12
+ For existing manual execution results, reason can contain a concise observation or descriptive reference. Preserve the version-1 report contract: scenario identities, configured test types, scope, revision freshness, and manual-verification warnings still apply. A durable historical observation does not satisfy current revision-bound evidence. Never replace automated failures with a manual claim or report an unperformed check as passed. These instructions cannot authenticate feedback or establish automated proof.
@@ -20,5 +20,7 @@ Describe values at the boundary actually checked: producing text does not establ
20
20
  Name the verification command actually run and what it establishes. Artifact validation, installation health, test execution, and assertion review check different things; do not substitute one result for another.
21
21
  For unspecified inputs or unverified behavior, state the limit instead of promising an outcome.
22
22
  Ground motivation and problem claims in the request, inspected project sources, or observed results. Mark an unverified hypothesis explicitly; do not turn plausible background knowledge into an observed project problem.
23
+ Before using universal claims such as "never starts with", "exactly one", or "no marker", check supported caller content that could already contain the character or pattern. Describe what the operation adds or changes separately from content it must preserve. A downstream benefit inferred from technical background remains a hypothesis unless inspected evidence supports it; the request for an option is sufficient motivation on its own.
23
24
  When a request only asks for an option or capability, that request is sufficient motivation. Do not attribute consumer failures, business needs, or other inferred reasons to the requester. Label relevant technical background as unverified context rather than as a reported project defect or the requester's stated reason.
24
25
  Review clarity and brevity before finishing; do not impose a fixed word limit.
26
+ Before requesting a decision on a proposal, Decision Record, PR, or handoff, check that an unfamiliar reader can understand the problem, user-visible change, scope boundaries, and decision needed without the conversation or implementation code. Remove repeated detail and use descriptive links to supporting specs. Preserve required artifact sections, requirements, acceptance criteria, and important exceptions. Follow existing diagram settings; use a diagram with a short explanation when clearer, without requiring one or repeating each step in prose. This is agent review, not automatic proof of readability.
@@ -8,3 +8,4 @@ After collection, any later commit, including documentation-only or metadata cha
8
8
  Archive requires its own authorization; do not infer it from implementation approval or a passing check.
9
9
  A successful traceability check does not establish assertion quality.
10
10
  Never mark missing or stale evidence as passed.
11
+ Before and after native OpenSpec archive, read .cliewen-openspec/closure.md and apply its outcome-appropriate guidance and existing feature settings.
@@ -3,3 +3,4 @@ Review sources, actual experiment observations, unresolved uncertainty, recommen
3
3
  It is valid to end with no code change. If delivery is agreed, create a separate cliewen-delivery change and link the investigation and decision.
4
4
  Before archive, preserve useful durable knowledge and resolve any temporary experiment cleanup. Use OpenSpec archive with --skip-specs after human review when no product spec deltas are intended.
5
5
  Cliewen check --change on a discovery change checks installation and registry health only and reports discovery-review-required; it does not validate investigation completeness or product test evidence.
6
+ Before and after native OpenSpec archive, read .cliewen-openspec/closure.md and apply its investigation guidance and existing feature settings.
@@ -6,3 +6,4 @@ Check that the measuring method actually observes the claimed quantity before us
6
6
  Distinguish peak memory from retained memory after garbage collection. If a measurement is invalid, report that quantity as unmeasured and revise conclusions that depended on it; an approximate label does not make it valid.
7
7
  Keep experiments isolated and respect the proposal's limits. Obtain agreement before production changes, purchases, or external actions outside the authorized investigation.
8
8
  Discovery evidence supports a recommendation, not claims about unimplemented product behavior. Preserve existing AC identities and product specs.
9
+ For an agreed prototype, read .cliewen-openspec/prototyping.md, work inside the proposal's experimental limits, and retain actual observations, feedback, uncertainty, and code disposition in this investigation. Neither a useful result nor a prototype request authorizes production implementation.