cliewen-openspec 0.2.0 → 0.4.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 +28 -0
- package/README.md +16 -12
- package/adapters/node-test.mjs +9 -4
- package/dist/ac-coordination.d.ts +33 -0
- package/dist/ac-coordination.js +318 -0
- package/dist/ac.d.ts +4 -3
- package/dist/ac.js +20 -1
- package/dist/ci-github.d.ts +19 -0
- package/dist/ci-github.js +70 -0
- package/dist/ci-inspection.d.ts +48 -0
- package/dist/ci-inspection.js +246 -0
- package/dist/ci-settings.d.ts +15 -0
- package/dist/ci-settings.js +50 -0
- package/dist/cli.js +73 -12
- package/dist/core.d.ts +32 -3
- package/dist/core.js +167 -15
- package/dist/documentation-settings.d.ts +16 -0
- package/dist/documentation-settings.js +65 -0
- package/dist/documentation.d.ts +47 -0
- package/dist/documentation.js +337 -0
- package/dist/mermaid-check.d.ts +10 -0
- package/dist/mermaid-check.js +40 -0
- package/dist/mermaid-worker.d.ts +1 -0
- package/dist/mermaid-worker.js +24 -0
- package/dist/quality.d.ts +1 -1
- package/dist/quality.js +22 -7
- package/dist/release.d.ts +2 -2
- package/dist/release.js +3 -3
- package/dist/schema-source.js +1 -1
- package/dist/setup-profile.d.ts +31 -0
- package/dist/setup-profile.js +59 -0
- package/dist/state-lock.d.ts +2 -0
- package/dist/state-lock.js +92 -0
- package/docs/configuration.md +170 -10
- package/docs/testing/evidence.md +14 -1
- package/docs/testing/test-quality.md +3 -1
- package/package.json +67 -65
- package/schemas/base/instructions/ci-inspection.md +9 -0
- package/schemas/base/instructions/closure.md +4 -2
- package/schemas/base/instructions/context-entry.md +1 -0
- package/schemas/base/instructions/context-selection.md +33 -0
- package/schemas/base/instructions/documentation-checks.md +2 -0
- package/schemas/base/instructions/humanizer.md +12 -5
- package/schemas/base/instructions/planning.md +60 -27
- package/schemas/delivery/instructions/apply.md +2 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import os from 'node:os';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { execFileSync } from 'node:child_process';
|
|
6
|
+
const held = new Set();
|
|
7
|
+
function hasGitMetadata(root) {
|
|
8
|
+
const start = fs.realpathSync(root);
|
|
9
|
+
let cursor = start;
|
|
10
|
+
while (true) {
|
|
11
|
+
const exists = (file) => { try {
|
|
12
|
+
return fs.lstatSync(file);
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
if (error.code !== 'ENOENT')
|
|
16
|
+
throw error;
|
|
17
|
+
return undefined;
|
|
18
|
+
} };
|
|
19
|
+
const marker = path.join(cursor, '.git'), entry = exists(marker);
|
|
20
|
+
if (entry) {
|
|
21
|
+
if (cursor === start || entry.isSymbolicLink())
|
|
22
|
+
return true;
|
|
23
|
+
if (entry.isDirectory() && ['HEAD', 'objects', 'commondir', 'cliewen-ac'].some(name => exists(path.join(marker, name))))
|
|
24
|
+
return true;
|
|
25
|
+
if (entry.isFile() && entry.size <= 65536 && /^gitdir: /m.test(fs.readFileSync(marker, 'utf8')))
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
// An unrelated empty .git directory in an ancestor is not a repository.
|
|
29
|
+
if (exists(path.join(cursor, 'HEAD')) && (cursor === start || exists(path.join(cursor, 'objects')) || exists(path.join(cursor, 'cliewen-ac'))))
|
|
30
|
+
return true;
|
|
31
|
+
const parent = path.dirname(cursor);
|
|
32
|
+
if (parent === cursor)
|
|
33
|
+
return false;
|
|
34
|
+
cursor = parent;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export function runtimeDirectory(root) {
|
|
38
|
+
let directory;
|
|
39
|
+
try {
|
|
40
|
+
const gitDir = execFileSync('git', ['rev-parse', '--absolute-git-dir'], { cwd: root, encoding: 'utf8', windowsHide: true, timeout: 5000, stdio: ['ignore', 'pipe', 'pipe'], env: { ...process.env, LC_ALL: 'C', LANG: 'C' } }).trim();
|
|
41
|
+
if (!gitDir || !path.isAbsolute(gitDir))
|
|
42
|
+
throw Error('Invalid Git directory output');
|
|
43
|
+
directory = path.join(gitDir, 'cliewen-ac');
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
const failure = error;
|
|
47
|
+
const nonGit = failure.status === 128 && /^fatal: not a git repository\b/m.test(String(failure.stderr ?? ''));
|
|
48
|
+
const selected = Object.keys(process.env).some(key => ['GIT_DIR', 'GIT_WORK_TREE', 'GIT_COMMON_DIR'].includes(key.toUpperCase()) && process.env[key] !== undefined);
|
|
49
|
+
if (!nonGit || selected || hasGitMetadata(root))
|
|
50
|
+
throw Error('Git runtime discovery failed; no allocation or recovery performed. Repair Git access before retrying; Cliewen will not switch runtime directories on a discovery error.');
|
|
51
|
+
directory = path.join(os.tmpdir(), 'cliewen-state-' + createHash('sha256').update(fs.realpathSync(root)).digest('hex'));
|
|
52
|
+
}
|
|
53
|
+
// Do not follow a project-controlled runtime link.
|
|
54
|
+
let cursor = path.parse(path.resolve(directory)).root;
|
|
55
|
+
for (const part of path.resolve(directory).slice(cursor.length).split(path.sep)) {
|
|
56
|
+
cursor = path.join(cursor, part);
|
|
57
|
+
if (fs.existsSync(cursor) && fs.lstatSync(cursor).isSymbolicLink())
|
|
58
|
+
throw Error('Symlink not supported in Cliewen runtime path');
|
|
59
|
+
}
|
|
60
|
+
return directory;
|
|
61
|
+
}
|
|
62
|
+
export function withStateLock(root, action) {
|
|
63
|
+
const directory = runtimeDirectory(root), file = path.join(directory, 'state.lock');
|
|
64
|
+
if (held.has(file))
|
|
65
|
+
return action();
|
|
66
|
+
fs.mkdirSync(directory, { recursive: true });
|
|
67
|
+
const end = Date.now() + 20000;
|
|
68
|
+
let fd;
|
|
69
|
+
while (true) {
|
|
70
|
+
try {
|
|
71
|
+
fd = fs.openSync(file, 'wx');
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
if (error.code !== 'EEXIST')
|
|
76
|
+
throw error;
|
|
77
|
+
if (Date.now() >= end)
|
|
78
|
+
throw Error(`Cliewen state is locked: ${file}. Retry; after an interrupted process, stop all Cliewen writers before removing this lock file. Locks are never stolen automatically.`);
|
|
79
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 25);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
held.add(file);
|
|
83
|
+
try {
|
|
84
|
+
fs.writeFileSync(fd, JSON.stringify({ pid: process.pid }));
|
|
85
|
+
return action();
|
|
86
|
+
}
|
|
87
|
+
finally {
|
|
88
|
+
held.delete(file);
|
|
89
|
+
fs.closeSync(fd);
|
|
90
|
+
fs.unlinkSync(file);
|
|
91
|
+
}
|
|
92
|
+
}
|
package/docs/configuration.md
CHANGED
|
@@ -5,41 +5,189 @@ type: reference
|
|
|
5
5
|
|
|
6
6
|
Cliewen reads project settings from `.cliewen-openspec/config.yaml`.
|
|
7
7
|
|
|
8
|
-
This reference describes
|
|
8
|
+
This reference describes Cliewen `0.4.0`. For an older package, consult the reference bundled with that version.
|
|
9
9
|
|
|
10
10
|
## Version compatibility
|
|
11
11
|
|
|
12
|
-
Cliewen
|
|
12
|
+
Cliewen 0.4.0 requires **Node.js 22.12 or newer** and **OpenSpec 1.15.0 or newer**. Git remains necessary for identity coordination and revision-bound evidence. The documentation checker runs independently of Git and OpenSpec. Versions 0.1.0 and 0.2.0 retain their Node 20.19+ requirements. The worked guide uses OpenSpec 2.0.0.
|
|
13
|
+
|
|
14
|
+
Cliewen supports repository-local OpenSpec 2.0.0 workflows. External stores and multi-repo evidence remain unsupported. Init and update reject standalone stores and declared external planning layouts before recovery or writes. Local specs and changes take precedence when both exist.
|
|
13
15
|
|
|
14
16
|
OpenSpec has its own installation requirements:
|
|
15
17
|
|
|
16
18
|
| Installation | Node requirement |
|
|
17
19
|
|---|---|
|
|
18
|
-
| Cliewen
|
|
19
|
-
|
|
|
20
|
-
| OpenSpec 1.
|
|
20
|
+
| Cliewen development source | Node 22.12+ |
|
|
21
|
+
| Published Cliewen 0.1.0 and 0.2.0 | Node 20.19+ |
|
|
22
|
+
| OpenSpec 1.15.0 via npm | Compatible with Cliewen's development minimum |
|
|
23
|
+
| OpenSpec 1.17.0 or 2.0.0 via npm | Node 22.12+ |
|
|
21
24
|
| OpenSpec standalone binary | No Node runtime for OpenSpec itself; Cliewen still needs Node |
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
Use Node 22.12+ for the current worked guide and development package. See [OpenSpec's release notes](https://github.com/Fission-AI/OpenSpec/blob/main/CHANGELOG.md) for its own runtime requirements.
|
|
24
27
|
|
|
25
28
|
The minimum is a compatibility floor, not proof that every newer release has been tested. A future Cliewen release may raise its OpenSpec or Node minimum. Review that release's requirements before upgrading.
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
Init/update check the target package's minimums, including previews, before recovery or installation writes. The development floor is Node 22.12+; published 0.2.0 checks its original Node 20.19+ floor. Published 0.1.0 does not perform these checks. No persistent success cache is used. Documentation checks independently reject unsupported Node; explicit `recover` remains available to restore an interrupted transaction.
|
|
28
31
|
|
|
29
32
|
The check uses the project's resolvable OpenSpec npm installation first, otherwise the CLI on PATH, including a standalone executable. It runs that installation's public `--version`; an incompatible or broken selected local installation does not fall back to a global version. Output identifies the source and detected versions. Missing tools, invalid/prerelease versions, execution failure, or a probe exceeding five seconds stop init/update with an actionable error. Cliewen neither downloads nor upgrades OpenSpec during this check.
|
|
30
33
|
|
|
31
|
-
|
|
34
|
+
Version 0.4.0 accepts ownership manifests from 0.1.0 through 0.4.0. Alpha manifests, unknown formats, and downgrades are rejected. See [updating an installation](guide/updating.md) for preview and apply examples.
|
|
35
|
+
|
|
36
|
+
## Documentation checks in development source
|
|
37
|
+
|
|
38
|
+
Published 0.2.0 does not include these settings or `cliewen-openspec docs check`. In development source, standard installation includes the Mermaid parser; no extra diagram tool is required. The command reads selected Markdown without changing files, installing tools or contacting services.
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
documentationChecks:
|
|
42
|
+
roots: [docs, README.md]
|
|
43
|
+
exclude: [docs/private]
|
|
44
|
+
links: advisory
|
|
45
|
+
metadata: advisory
|
|
46
|
+
mermaid: advisory
|
|
47
|
+
metadataRules: []
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
All three categories default to `advisory`: findings warn and exit 0. `enforce` exits 1 for an issue or incomplete check; `off` skips that category. Invalid settings, command failures and unsupported Node exit 2. Inspect category statuses rather than treating exit 0 as valid documentation. With every category off, no document roots are walked.
|
|
51
|
+
|
|
52
|
+
Empty `roots` selects `docsRoot`. Roots may be `.md`/`.markdown` files or directories. Exclusions match exact paths and descendants, with slash normalization and filesystem case behavior; glob expressions and paths outside the project are rejected. The checker skips `.git` and `node_modules`, refuses symbolic links/junctions, and applies exclusions before reading bodies. These settings are independent of context selection and optional planning, evidence and document-maintenance guidance. Auditing lesson files does not authorize an agent to retrieve disabled lessons as guidance.
|
|
53
|
+
|
|
54
|
+
Links resolve relative to their containing Markdown file. Supported checks include inline/reference links, images, URI-encoded filenames, and Markdown heading fragments using `github-slugger`, including repeated and Unicode headings. Code examples are ignored. External URLs and site-root routes are outside local checking. Custom HTML anchors, renderer-specific heading attributes and non-Markdown fragments are unchecked. Fragment targets outside selected scope remain unread and make links incomplete; add a permitted target to roots when its headings need checking.
|
|
55
|
+
|
|
56
|
+
Frontmatter is optional. When present, YAML must be a mapping without syntax errors or duplicate keys. Custom fields and statuses are allowed unless a matching project rule restricts them:
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
documentationChecks:
|
|
60
|
+
metadata: enforce
|
|
61
|
+
metadataRules:
|
|
62
|
+
- path: docs/decisions
|
|
63
|
+
required: [type, status]
|
|
64
|
+
values:
|
|
65
|
+
type: [decision]
|
|
66
|
+
status: [proposed, accepted, rejected, superseded]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Rules match an exact file or subtree; all matching rules apply. A subtree rule also covers its README/index: use file-specific rules or a narrower subtree when those documents have different metadata. `required` controls presence. `values` checks allowed strings only when the field exists. Unlisted fields remain allowed. Native OpenSpec artifacts gain no frontmatter requirement unless explicitly covered by a rule.
|
|
70
|
+
|
|
71
|
+
Mermaid checks fenced `mermaid` blocks against the included parser's grammar and reports its version. Documents without those blocks need no parser initialization. A valid parse establishes syntax, not layout quality, factual accuracy or rendering on every host. Missing/broken tooling or timeouts produce incomplete results, never a pass.
|
|
72
|
+
|
|
73
|
+
The command limits collection to 1,000 Markdown files and 10,000 directory entries, each file to 1 MiB, each diagram to 256 KiB, and parser initialization/each diagram to five seconds. Missing roots, unreadable files and exceeded limits are explicit incomplete checks. JSON reports scope counts, per-category modes/statuses and findings; `checked` counts files for links/metadata and blocks for Mermaid. Empty scope is not evidence that documentation passed. See [the command reference](guide/cli.md#docs-check).
|
|
74
|
+
|
|
75
|
+
## Optional context selection in development source
|
|
76
|
+
|
|
77
|
+
Published 0.2.0 does not include `contextSelection`. Development source adds optional guidance for selecting relevant existing project knowledge. It defaults to guided and runs only when the agent retrieves the installed instructions. It adds no retrieval CLI or automatic document scan.
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
contextSelection:
|
|
81
|
+
mode: guided
|
|
82
|
+
roots: [docs/decisions, docs/architecture]
|
|
83
|
+
exclude: [docs/decisions/private]
|
|
84
|
+
maxFiles: 4
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
| Setting | Default | Meaning |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| `mode` | `guided` | `guided` requests the additional selection pass; off leaves current workflow and learning rules in place |
|
|
90
|
+
| `roots` | `[]` | Empty uses `docsRoot`; otherwise select project-relative files or directories |
|
|
91
|
+
| `exclude` | `[]` | Additional-record paths and their descendants to exclude, on path-segment boundaries; glob patterns are unsupported |
|
|
92
|
+
| `maxFiles` | `8` | Advisory budget of 1–100 distinct additional records whose contents are read |
|
|
93
|
+
|
|
94
|
+
Required native specs, configuration/instructions and the established learning gate are separate from that budget. Index and metadata reads should remain focused. Absolute paths, parent traversal, glob syntax and malformed values are rejected during configuration validation. Existing authored configuration is preserved rather than rewritten to add defaults.
|
|
95
|
+
|
|
96
|
+
Guided mode starts after learning-policy resolution and its separate index-first step. Disabled or retired lesson contents remain excluded even when a selected root contains them. Planning and documentation maintenance remain independently configurable: selection can use existing records while those facilities are off, without creating documents or touching tickets.
|
|
97
|
+
|
|
98
|
+
The guidance uses OpenSpec inventory and focused overviews, then full relevant specs, and selects current decisions and constraints through existing indexes and host tools. A useful handoff names sources and relevance, consequential conflicts and scope left unexamined. Missing or excluded essential information requires focused resolution. No report or context document is required for routine work.
|
|
99
|
+
|
|
100
|
+
Missing `contextSelection` or an omitted `mode` selects guided, including existing projects after package/resource update. An explicit `mode: off` stays off. Configuration bytes are preserved; no migration writes the new default into authored files.
|
|
101
|
+
|
|
102
|
+
Use filenames, folder roles, headings and indexes alongside existing frontmatter such as `title`, `status`, `scope` and `links`. A README may be an overview or index; the project's actual `docsRoot` and custom structure determine where to look. Exclusions and learning gates apply before opening metadata. No new fields, standard tree or renaming are required. Metadata and location alone do not prove that a document is current or applicable.
|
|
103
|
+
|
|
104
|
+
These settings guide the agent; they do not enforce file access, measure actual reads, establish complete retrieval or prove that the agent found every applicable constraint. Explicit confidentiality restrictions still apply. See [context selection in the workflow](guide/workflow.md#select-relevant-project-knowledge).
|
|
32
105
|
|
|
33
106
|
## Optional product context in development
|
|
34
107
|
|
|
35
108
|
Version 0.2.0 installs `.cliewen-openspec/product-context.md` for product intent, useful cross-capability journeys, and detection of drift or scope creep. Published 0.1.0 does not contain this reference. There is no new configuration field or required artifact. `features.documentation` controls optional records under `docsRoot` or existing project paths; `features.planning` independently controls planning authority and ticket access. Disabled facilities add no corresponding work and preserve authored content. Existing supplied context still informs normal scoping. See [product intent and journeys](guide/workflow.md#keep-the-users-outcome-in-view) for an illustrative example and limits.
|
|
36
109
|
|
|
110
|
+
## CI requirement inspection in development source
|
|
111
|
+
|
|
112
|
+
Published 0.2.0 does not include `ci inspect`. Development source provides read-only inspection of required GitHub.com status checks. It requires Node 22.12+, the GitHub CLI (`gh`) in an absolute directory on PATH, and existing access to the selected repository. It uses that access without starting login. Inspecting classic protection may require administration-read permission. The report marks information it cannot obtain as unknown.
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
ciInspection:
|
|
116
|
+
mode: advisory
|
|
117
|
+
host: github
|
|
118
|
+
repository: example/service
|
|
119
|
+
branch: main
|
|
120
|
+
requiredChecks:
|
|
121
|
+
- context: test (ubuntu-latest, 24)
|
|
122
|
+
- context: lint
|
|
123
|
+
appId: 15368
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Replace the example repository, exact check names and optional app ID with your project's choices. A solo project can select one test check; a team can select the same checks or add its own. Contributor count does not choose the policy.
|
|
127
|
+
|
|
128
|
+
| Setting | Default | Meaning |
|
|
129
|
+
|---|---|---|
|
|
130
|
+
| `mode` | `advisory` | Report observations; `off` skips host/tool access |
|
|
131
|
+
| `host` | `github` | GitHub.com is the supported host |
|
|
132
|
+
| `repository` | `null` | Explicit `owner/name`; never inferred from Git remotes |
|
|
133
|
+
| `branch` | `null` | Resolve the selected repository's current default branch; otherwise inspect this exact branch |
|
|
134
|
+
| `requiredChecks` | `[]` | Unique exact `context` names, each optionally bound to a positive integer `appId` |
|
|
135
|
+
|
|
136
|
+
Run `cliewen-openspec ci inspect`, optionally with `--json`. Missing repository or an empty check list reports `not-configured` without a host request. Init, update and ordinary `check` do not invoke inspection. Existing config bytes are preserved; these settings are independent of evidence, documentation and planning switches.
|
|
137
|
+
|
|
138
|
+
Each expected check is `observed`, `missing` or `unknown`. Missing requires complete supported policy coverage; an unavailable source cannot prove absence. Active classic protection and effective rules, including inherited rules, supply requirements. A configured app ID needs an explicit matching host binding. Bypass visibility is separate: `possible`, `none-observed` or `unknown`. A hidden list is unknown, and a visible exception does not establish that someone bypassed the combined policy.
|
|
139
|
+
|
|
140
|
+
Valid advisory reports exit 0 even for missing or unknown requirements; invalid configuration/usage and unsupported Node exit 2. JSON includes `version`, `inspectedAt`, `target`, `checks`, `sources`, `coverage`, `findings`, `mode`, `status` and `exitCode`. Inspect those states before drawing a conclusion. The command neither diagnoses failing jobs nor establishes test quality, current PR results or merge authorization.
|
|
141
|
+
|
|
142
|
+
Requests have a 10-second deadline and a 1 MiB response limit, with 60 seconds for the inspection, at most 10 pages of 100 effective rules and 32 ruleset-detail requests. Truncated, refused, malformed or contradictory results leave affected coverage unknown. Required-workflow rules, other hosts and actor-specific permissions are outside supported coverage. No project file, host setting or persistent report is written. See [the command reference](guide/cli.md#ci-inspect).
|
|
143
|
+
|
|
144
|
+
## Setup profiles
|
|
145
|
+
|
|
146
|
+
The development CLI offers optional solo and team profiles. A new project starts with local acceptance ID allocation, per-task test guidance, evidence enabled, advisory test quality and lifecycle findings, and CI configured separately. Choosing later uses these defaults for a new project and keeps current settings in an existing one.
|
|
147
|
+
|
|
148
|
+
The solo profile asks whether multiple clones or worktrees allocate IDs at the same time. The team profile uses the same concurrency question and can suggest enabling review guidance when the team reviews changes together. Both start with the same effective settings. Settings only change when you select a recommendation.
|
|
149
|
+
|
|
150
|
+
The selected profile is stored in the project-owned `.cliewen-openspec/setup-profile.json`. Init, update, and uninstall preserve it when you make no new profile selection. [Switch an existing project from solo to team](guide/cli.md#choose-or-change-a-setup-profile)
|
|
151
|
+
|
|
152
|
+
## Implementation readiness
|
|
153
|
+
|
|
154
|
+
By default, before implementation the agent rates outcome clarity and delivery feasibility from 1 to 4. It uses the lower score and a threshold of 3. Solo and team projects use the same settings. Change the threshold to an integer from 2 through 4, or set `readiness.enabled` to `false` to skip the assessment.
|
|
155
|
+
|
|
156
|
+
```yaml
|
|
157
|
+
readiness:
|
|
158
|
+
enabled: true
|
|
159
|
+
threshold: 3
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
[How an agent handles an unanswered question](guide/workflow.md#assess-implementation-readiness)
|
|
163
|
+
|
|
37
164
|
## Full defaults
|
|
38
165
|
|
|
39
166
|
This is the complete configuration written by `init`. Omitted fields use these values; unknown settings and invalid values fail validation. Changes apply when the next operation reads the config. They do not rewrite existing proposals or task lists.
|
|
40
167
|
|
|
41
168
|
<!-- defaults -->
|
|
42
169
|
```yaml
|
|
170
|
+
ciInspection:
|
|
171
|
+
mode: advisory
|
|
172
|
+
host: github
|
|
173
|
+
repository: null
|
|
174
|
+
branch: null
|
|
175
|
+
requiredChecks: []
|
|
176
|
+
documentationChecks:
|
|
177
|
+
roots: []
|
|
178
|
+
exclude: []
|
|
179
|
+
links: advisory
|
|
180
|
+
metadata: advisory
|
|
181
|
+
mermaid: advisory
|
|
182
|
+
metadataRules: []
|
|
183
|
+
contextSelection:
|
|
184
|
+
mode: guided
|
|
185
|
+
roots: []
|
|
186
|
+
exclude: []
|
|
187
|
+
maxFiles: 8
|
|
188
|
+
readiness:
|
|
189
|
+
enabled: true
|
|
190
|
+
threshold: 3
|
|
43
191
|
docsRoot: docs
|
|
44
192
|
learnings:
|
|
45
193
|
enabled: false
|
|
@@ -249,7 +397,19 @@ cliewen-openspec ac next EXP # Same registered sequence as
|
|
|
249
397
|
|
|
250
398
|
`padding` is the minimum number of digits, from 1 to 12. For example, 1 produces `EXP-1`, 3 produces `EXP-001`, and 4 produces `EXP-0001`. Numbers grow beyond the minimum width without truncation. The separator is always a hyphen; arbitrary ID templates are not supported.
|
|
251
399
|
|
|
252
|
-
Each capability owns one numeric sequence. The allocator consults the committed `.cliewen-openspec/ac-registry.json` and existing OpenSpec Markdown, including active and archived changes. It never reclaims allocated numbers. Changing padding continues the same sequence and does not rewrite existing IDs. Commit the registry together with config and specs.
|
|
400
|
+
Each capability owns one numeric sequence. The allocator consults the committed `.cliewen-openspec/ac-registry.json` and existing OpenSpec Markdown, including active and archived changes. It never reclaims allocated numbers. Changing padding continues the same sequence and does not rewrite existing IDs. Commit the registry together with config and specs. Published 0.2.0 supports sequential local allocation; independent branches can collide.
|
|
401
|
+
|
|
402
|
+
### Optional coordination in development source
|
|
403
|
+
|
|
404
|
+
Development source adds explicit Git coordination and serializes local writers in one worktree. Missing `.cliewen-openspec/ac-coordination.json` means local mode, with no network access for allocation. The file is project-owned and independent of `features` settings.
|
|
405
|
+
|
|
406
|
+
```json
|
|
407
|
+
{"version":1,"mode":"local"}
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
Use `ac coordinate origin` to preview and `ac coordinate origin --apply` to select Git mode. Setup writes a version-1 JSON file with `mode: "git"`, `remote`, and an authority UUID; do not fabricate or edit that identity. Git mode reserves through one dedicated remote ref before returning an ID. Fetch and push URLs must match and select one destination. Setup preserves known counters and retired prefixes.
|
|
411
|
+
|
|
412
|
+
Choose by concurrency, not team size. One person running concurrent agents can need coordination; a team that serializes allocation can keep local mode. Coordinated allocation needs online write access and never falls back to local on failure. See [setup, sync and recovery](guide/cli.md#ac-coordinate-sync-resume-and-abandon) for executable commands, adoption requirements, locks, and returning to local mode. Offline ranges and external registry adapters are not implemented.
|
|
253
413
|
|
|
254
414
|
### Renaming a prefix
|
|
255
415
|
|
|
@@ -306,7 +466,7 @@ Existing filenames and paths are stable public addresses: never rename, move, or
|
|
|
306
466
|
|
|
307
467
|
## Installed resource versions
|
|
308
468
|
|
|
309
|
-
|
|
469
|
+
Run [update](guide/updating.md) to refresh owned resources from a supported manifest version. It preserves project configuration, the registry, and authored files at their existing paths. Adding settings to your config leaves installed instructions in place until you refresh them.
|
|
310
470
|
|
|
311
471
|
## Optional archive-session guidance
|
|
312
472
|
|
package/docs/testing/evidence.md
CHANGED
|
@@ -70,7 +70,7 @@ For `cliewen-all`, check first validates decision frontmatter and the outcome br
|
|
|
70
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
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
72
|
| `unknown-ac-reference` | Use the matching `--change` scope or collect a report containing only the scenarios being checked |
|
|
73
|
-
| `evidence-scope-mismatch` |
|
|
73
|
+
| `evidence-scope-mismatch` | Use the same scope for collection and checking. After synchronization, collect fresh evidence for the permanent spec scope you want to check. |
|
|
74
74
|
| `duplicate-ac-id` or `duplicate-test-result` | Inspect duplicate scenario identities or repeated test result entries before recollecting |
|
|
75
75
|
| `pending-without-reason` | Record why execution is pending; use `--fail-on-pending` when pending work must block |
|
|
76
76
|
| `owned-file-modified` | Review edits to installer-owned files; update replaces unmodified owned content and rejects conflicting local edits. See the update guide |
|
|
@@ -83,6 +83,19 @@ A `manual` result is reported as a warning and does not become automated proof.
|
|
|
83
83
|
|
|
84
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
85
|
|
|
86
|
+
## Collect evidence for one capability
|
|
87
|
+
|
|
88
|
+
The development version can check one capability once its permanent spec includes the requirements you want to verify. For example, run these commands on a clean Git revision containing `openspec/specs/export/spec.md`:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
node node_modules/cliewen-openspec/adapters/node-test.mjs --capability export test/export.test.mjs
|
|
92
|
+
cliewen-openspec check --capability export --json
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The adapter records `scope: {"capability":"export"}`, the tested revision, and the full runner exit code. A failure anywhere in the supplied test files blocks the check. If the run produces no tagged results for export, the report lets the checker name the criteria that lack evidence.
|
|
96
|
+
|
|
97
|
+
Use the same capability name for both commands. The most recent collection replaces the configured report. After synchronization or archive changes the tested revision, commit the intended edits and collect again. CI can use the check's exit code directly. [Exit codes](../guide/cli.md#check)
|
|
98
|
+
|
|
86
99
|
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
100
|
|
|
88
101
|
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.
|
|
@@ -29,7 +29,9 @@ Use a small table in the acceptance plan when it helps. Explain why combinations
|
|
|
29
29
|
|
|
30
30
|
## Record what you reviewed
|
|
31
31
|
|
|
32
|
-
For a change named `add-count`, author `.cliewen-openspec/reviews/change-add-count.yaml`. For permanent specs, use `.cliewen-openspec/reviews/specs.yaml`.
|
|
32
|
+
For a change named `add-count`, author `.cliewen-openspec/reviews/change-add-count.yaml`. For all permanent specs, use `.cliewen-openspec/reviews/specs.yaml`. For a capability named `count`, use `.cliewen-openspec/reviews/capability-count.yaml` with `scope: {capability: count}`. Update and uninstall preserve these project documents.
|
|
33
|
+
|
|
34
|
+
Capability lifecycle review checks criteria from the selected capability at the baseline and at HEAD. Include the permanent spec inputs used to verify references to other capabilities. Use a whole-project check when remapping a test to a criterion in another capability so the review can check its replacement evidence.
|
|
33
35
|
|
|
34
36
|
The record contains `version: 1`, matching `scope` (`{change: add-count}` or `{specs: true}`), a full Git `baseline` commit, an `inputs` mapping, and `effectiveness`, `lifecycle`, and `exceptions` lists. Unknown fields are rejected. The baseline must be available locally and an ancestor of HEAD.
|
|
35
37
|
|
package/package.json
CHANGED
|
@@ -1,65 +1,67 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "cliewen-openspec",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "OpenSpec workflows with durable decisions and behavioral evidence",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/cliewen-openspec/cliewen-openspec.git"
|
|
10
|
-
},
|
|
11
|
-
"homepage": "https://cliewen-openspec.github.io/
|
|
12
|
-
"engines": {
|
|
13
|
-
"node": ">=
|
|
14
|
-
},
|
|
15
|
-
"bin": {
|
|
16
|
-
"cliewen-openspec": "dist/cli.js"
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"dist",
|
|
20
|
-
"schemas",
|
|
21
|
-
"adapters",
|
|
22
|
-
"README.md",
|
|
23
|
-
"CHANGELOG.md",
|
|
24
|
-
"LICENSE",
|
|
25
|
-
"docs/configuration.md",
|
|
26
|
-
"docs/testing/evidence.md",
|
|
27
|
-
"docs/testing/test-quality.md",
|
|
28
|
-
"docs/testing/pilot-prompt.md"
|
|
29
|
-
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "node scripts/clean-retired-build.mjs && tsc",
|
|
32
|
-
"test": "npm run build && node --test test/*.test.mjs",
|
|
33
|
-
"prepack": "npm run build",
|
|
34
|
-
"docs:build": "npm run build && node scripts/build-docs.mjs",
|
|
35
|
-
"docs:serve": "node scripts/serve-docs.mjs",
|
|
36
|
-
"docs:check": "node scripts/check-docs-browser.mjs",
|
|
37
|
-
"trial:prepare": "node scripts/prepare-csv-bom-trial.mjs",
|
|
38
|
-
"trial:knowledge:prepare": "node scripts/prepare-knowledge-writing-trial.mjs",
|
|
39
|
-
"trial:quality:prepare": "node scripts/prepare-quality-lifecycle-trial.mjs",
|
|
40
|
-
"trial:quality:combined": "node scripts/prepare-combined-quality-trial.mjs",
|
|
41
|
-
"trial:discovery": "node scripts/prepare-csv-discovery-trial.mjs",
|
|
42
|
-
"eval:check": "npm run build && node scripts/check-agent-evaluation.mjs",
|
|
43
|
-
"trial:all": "node scripts/prepare-csv-all-trial.mjs",
|
|
44
|
-
"trial:cli:prepare": "node scripts/prepare-cli-evaluation.mjs",
|
|
45
|
-
"trial:cli": "node scripts/run-cli-trial.mjs"
|
|
46
|
-
},
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "cliewen-openspec",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "OpenSpec workflows with durable decisions and behavioral evidence",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/cliewen-openspec/cliewen-openspec.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://cliewen-openspec.github.io/",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=22.12.0"
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"cliewen-openspec": "dist/cli.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"schemas",
|
|
21
|
+
"adapters",
|
|
22
|
+
"README.md",
|
|
23
|
+
"CHANGELOG.md",
|
|
24
|
+
"LICENSE",
|
|
25
|
+
"docs/configuration.md",
|
|
26
|
+
"docs/testing/evidence.md",
|
|
27
|
+
"docs/testing/test-quality.md",
|
|
28
|
+
"docs/testing/pilot-prompt.md"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "node scripts/clean-retired-build.mjs && tsc",
|
|
32
|
+
"test": "npm run build && node --test --test-concurrency=2 test/*.test.mjs",
|
|
33
|
+
"prepack": "npm run build",
|
|
34
|
+
"docs:build": "npm run build && node scripts/build-docs.mjs",
|
|
35
|
+
"docs:serve": "node scripts/serve-docs.mjs",
|
|
36
|
+
"docs:check": "node scripts/check-docs-browser.mjs",
|
|
37
|
+
"trial:prepare": "node scripts/prepare-csv-bom-trial.mjs",
|
|
38
|
+
"trial:knowledge:prepare": "node scripts/prepare-knowledge-writing-trial.mjs",
|
|
39
|
+
"trial:quality:prepare": "node scripts/prepare-quality-lifecycle-trial.mjs",
|
|
40
|
+
"trial:quality:combined": "node scripts/prepare-combined-quality-trial.mjs",
|
|
41
|
+
"trial:discovery": "node scripts/prepare-csv-discovery-trial.mjs",
|
|
42
|
+
"eval:check": "npm run build && node scripts/check-agent-evaluation.mjs",
|
|
43
|
+
"trial:all": "node scripts/prepare-csv-all-trial.mjs",
|
|
44
|
+
"trial:cli:prepare": "node scripts/prepare-cli-evaluation.mjs",
|
|
45
|
+
"trial:cli": "node scripts/run-cli-trial.mjs"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"github-slugger": "2.0.0",
|
|
49
|
+
"jsdom": "26.1.0",
|
|
50
|
+
"markdown-it": "15.0.3",
|
|
51
|
+
"mermaid": "12.2.0",
|
|
52
|
+
"yaml": "2.9.1"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@fission-ai/openspec": "2.0.0",
|
|
56
|
+
"@types/jsdom": "30.0.0",
|
|
57
|
+
"@types/node": "26.6.6",
|
|
58
|
+
"playwright": "1.64.1",
|
|
59
|
+
"typescript": "7.0.2",
|
|
60
|
+
"vitepress": "1.6.4",
|
|
61
|
+
"vue": "3.5.44"
|
|
62
|
+
},
|
|
63
|
+
"overrides": {
|
|
64
|
+
"vite": "7.3.7",
|
|
65
|
+
"@vitejs/plugin-vue": "6.0.10"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Inspect required CI checks
|
|
2
|
+
|
|
3
|
+
Use cliewen-openspec ci inspect for relevant integration or review work when ciInspection selects a repository and expected checks. Read the project settings first. The default is advisory; explicit off skips inspection. An unconfigured target requires no host access. This reference guides agents; installation and ordinary local check do not execute host inspection.
|
|
4
|
+
|
|
5
|
+
Inspect only the configured GitHub.com repository and branch. An omitted branch selects the host's default branch. Keep the actual inspected target and time in any useful handoff; report observed, missing and unknown requirements accurately. Match exact check contexts and any selected app IDs. A missing CLI, limited permissions, partial responses or hidden bypass data are limitations to report, not successful enforcement. Exit 0 means an advisory report completed.
|
|
6
|
+
|
|
7
|
+
Keep requirement observations separate from bypass visibility and current CI execution results. A required check can have an exception; a visible exception does not prove an actor bypassed all applicable rules. This command does not diagnose failing jobs or establish test quality.
|
|
8
|
+
|
|
9
|
+
Use existing authorized access. Do not install tools, initiate login, change branch settings or broaden permissions as part of inspection. Solo and team projects retain their own integration policy. Automate feasible authorized inspection before asking for manual work; explain the specific remaining access or judgment when needed. No new durable report or routine approval is required. Inspection does not authorize merge, archive or release.
|
|
@@ -4,7 +4,9 @@ Use native OpenSpec status and the selected change's metadata to establish its s
|
|
|
4
4
|
|
|
5
5
|
## Before archive
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
For relevant integration review with ciInspection configured and enabled, use .cliewen-openspec/ci-inspection.md. Keep observed requirements, missing or unknown coverage and bypass visibility separate from CI results and archive authorization. Explicit off skips inspection; no extra approval gate or report is required.
|
|
8
|
+
|
|
9
|
+
For delivery, compare the actual diff, tests, and affected documentation with the reviewed scope and accepted amendments. For each agreed outcome and constraint, check the delivered behavior and its verification result. Distinguish missing behavior from missing or unavailable evidence. Look for unrequested changes and explain necessary supporting edits. Use "Handle scope findings" in .cliewen-openspec/planning.md even when optional planning is disabled. Preserve the review outcome and any accepted amendments with the change, and surface unresolved items before archive. Keep a clean result in an existing task note or handoff.
|
|
8
10
|
|
|
9
11
|
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
12
|
|
|
@@ -28,6 +30,6 @@ After successful archive, repair affected moved-file links and preserve useful k
|
|
|
28
30
|
|
|
29
31
|
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
32
|
|
|
31
|
-
For delivered behavior with evidence enabled, finish
|
|
33
|
+
For delivered behavior with evidence enabled, finish the tracked closure edits and commit the reviewed inputs. Once the permanent specs reflect the change, collect fresh evidence and run Cliewen check. For one affected capability, use --capability NAME on both the Node adapter and check. Use the whole-project scope when evidence must cover multiple capabilities together. Archive or any later commit makes earlier reports historical. Keep reports ignored and untracked. Report the tested revision and result, including pending verification. No-delivery outcomes retain their own review contract.
|
|
32
34
|
|
|
33
35
|
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 @@
|
|
|
1
|
+
Read contextSelection.mode (default guided). When off, request no extra context-selection pass or handoff. When guided, first resolve the learning policy and its separate index-first gate, then read .cliewen-openspec/context-selection.md for native-first selection. This setting is independent of planning and documentation maintenance and does not disable required native spec reading or change learning gates.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Select relevant project knowledge
|
|
2
|
+
|
|
3
|
+
Read contextSelection in .cliewen-openspec/config.yaml. Defaults: mode guided, roots [], exclude [], maxFiles 8. Off requests no additional pass or handoff; existing required spec reading and learning policy still apply. This reference supplies advisory agent instructions, not a retrieval engine or access-control boundary.
|
|
4
|
+
|
|
5
|
+
## Resolve policy first
|
|
6
|
+
|
|
7
|
+
Start only after the learning policy is resolved. If learnings.enabled or features.documentation disables lessons, exclude their contents even when a selected root includes them. When enabled, read only the learning README.md index in its own tool call, then selected relevant active notes in a later call under the existing policy. Never preload the collection. Retired lessons do not guide ordinary work; missing or insufficient index information is a limitation, not permission to read everything.
|
|
8
|
+
|
|
9
|
+
Guided selection is independent of optional planning and documentation maintenance. With those features disabled, use relevant existing supplied records without creating documents, maintaining plans or accessing tickets. Preserve authored paths and project authority. Explicit confidentiality restrictions remain applicable.
|
|
10
|
+
|
|
11
|
+
## Start with OpenSpec
|
|
12
|
+
|
|
13
|
+
Use the installed public CLI: `openspec list --specs --json` for inventory, then `openspec show NAME --type spec --json --no-scenarios` for focused overviews where supported. Use equivalent public operations on supported older versions. Read relevant specs in full, including scenarios, before deciding coverage or behavior. Retrieve the selected workflow's native instructions. Keep short project context/rules authoritative at their existing source instead of copying the corpus into them.
|
|
14
|
+
|
|
15
|
+
`openspec context --json` on OpenSpec 2 describes the resolved root and declared repo/store relationships. It is not a relevance search over decisions or lessons. This package supports repository-local workflows; this reference does not enable external stores or authorize global config/workspace writes.
|
|
16
|
+
|
|
17
|
+
## Select additional records
|
|
18
|
+
|
|
19
|
+
Empty roots means docsRoot (default docs). Otherwise use the listed project-relative files/directories. Exclusions are exact project-relative paths and their descendants, using path-segment boundaries; normalize slash direction when comparing. They are not glob patterns. Apply them before reading additional contents. Do not broaden a search across excluded paths, disabled learning collections, credentials, global directories or external repositories.
|
|
20
|
+
|
|
21
|
+
Use existing indexes, titles, scope and status to choose additional records with authorized host tools. Keep index/metadata reads focused. maxFiles counts distinct additional selected records whose contents are read; required native specs, configuration/instructions and the established learning gate are separate. Read only relevant sections where useful. This budget guides the agent and is not mechanically enforced or a claim that less text was actually read.
|
|
22
|
+
|
|
23
|
+
Use filenames and directory roles as candidate signals alongside headings, indexes and metadata. A README.md may be an overview or index; existing decisions/, architecture/ or testing/ folders can suggest where relevant knowledge lives. Follow docsRoot and the project's actual organization, including custom paths. Do not require these names, create a standard tree or rename documents. Verify each selected source's meaning and authority rather than assuming either from its location.
|
|
24
|
+
|
|
25
|
+
Use existing Markdown frontmatter when it helps selection: for example title, status, scope, type and links, interpreted through the project's own conventions. Inspect only allowed candidate files after applying exclusions and learning gates; frontmatter inspection is still a file read. Do not require new fields, rewrite metadata or infer authority from an ID alone. Missing, unknown or stale metadata is a limitation to verify against the selected content and current sources.
|
|
26
|
+
|
|
27
|
+
Prefer current accepted decisions and applicable constraints. Treat tentative, inferred, superseded or historical records according to their status; a filename or matching phrase alone establishes no authority. Check applicable facts against current specs and available evidence. Surface consequential contradictions instead of choosing silently or inventing missing intent. Supplied task context can identify a useful source without requiring a broad search.
|
|
28
|
+
|
|
29
|
+
If a missing index, broken reference, excluded source or exhausted budget leaves essential context unknown, state the gap and seek a focused resolution. Do not silently omit an essential constraint or expand scope. Native required reading remains required; if an explicit confidentiality restriction prevents it, report that conflict before dependent work.
|
|
30
|
+
|
|
31
|
+
## Keep the handoff useful
|
|
32
|
+
|
|
33
|
+
When useful, briefly name selected sources and why they apply, material conflicts, missing information and scope left unexamined. Use descriptive links; do not copy entire specs or imply complete retrieval. Routine clear work needs no separate report, context artifact, new index or approval checkpoint. Installation creates no project knowledge record.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
When reviewing changed Markdown, use cliewen-openspec docs check with the project's documentationChecks settings and existing document paths when the CLI is available. Local-link, metadata and Mermaid checks default to advisory; honor each category's off/advisory/enforce choice. Do not enable disabled checks or broaden configured roots/exclusions silently. These checks audit authored content; they do not authorize retrieving disabled lessons as guidance. No new durable report is required.
|
|
2
|
+
Report category statuses and relevant findings, including changed files outside selected scope, unavailable tooling and unsupported fragments. Exit 0 with advisory findings does not establish valid documentation. The command checks local references, optional YAML frontmatter and supported Mermaid grammar; native OpenSpec validation, factual review and visual verification remain separate. If the CLI is unavailable, use available focused checks and state their limits without claiming the Cliewen command ran.
|