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.
Files changed (45) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +16 -12
  3. package/adapters/node-test.mjs +9 -4
  4. package/dist/ac-coordination.d.ts +33 -0
  5. package/dist/ac-coordination.js +318 -0
  6. package/dist/ac.d.ts +4 -3
  7. package/dist/ac.js +20 -1
  8. package/dist/ci-github.d.ts +19 -0
  9. package/dist/ci-github.js +70 -0
  10. package/dist/ci-inspection.d.ts +48 -0
  11. package/dist/ci-inspection.js +246 -0
  12. package/dist/ci-settings.d.ts +15 -0
  13. package/dist/ci-settings.js +50 -0
  14. package/dist/cli.js +73 -12
  15. package/dist/core.d.ts +32 -3
  16. package/dist/core.js +167 -15
  17. package/dist/documentation-settings.d.ts +16 -0
  18. package/dist/documentation-settings.js +65 -0
  19. package/dist/documentation.d.ts +47 -0
  20. package/dist/documentation.js +337 -0
  21. package/dist/mermaid-check.d.ts +10 -0
  22. package/dist/mermaid-check.js +40 -0
  23. package/dist/mermaid-worker.d.ts +1 -0
  24. package/dist/mermaid-worker.js +24 -0
  25. package/dist/quality.d.ts +1 -1
  26. package/dist/quality.js +22 -7
  27. package/dist/release.d.ts +2 -2
  28. package/dist/release.js +3 -3
  29. package/dist/schema-source.js +1 -1
  30. package/dist/setup-profile.d.ts +31 -0
  31. package/dist/setup-profile.js +59 -0
  32. package/dist/state-lock.d.ts +2 -0
  33. package/dist/state-lock.js +92 -0
  34. package/docs/configuration.md +170 -10
  35. package/docs/testing/evidence.md +14 -1
  36. package/docs/testing/test-quality.md +3 -1
  37. package/package.json +67 -65
  38. package/schemas/base/instructions/ci-inspection.md +9 -0
  39. package/schemas/base/instructions/closure.md +4 -2
  40. package/schemas/base/instructions/context-entry.md +1 -0
  41. package/schemas/base/instructions/context-selection.md +33 -0
  42. package/schemas/base/instructions/documentation-checks.md +2 -0
  43. package/schemas/base/instructions/humanizer.md +12 -5
  44. package/schemas/base/instructions/planning.md +60 -27
  45. package/schemas/delivery/instructions/apply.md +2 -0
@@ -1,7 +1,14 @@
1
- Read writing.humanizer (default auto; values auto, on, off). With off, Cliewen requests no skill discovery, use, installation suggestion, or Humanizer status; baseline writing rules and independent host mandates still apply.
2
- With auto or on, inspect the host's exposed skills/capabilities for a usable Humanizer skill, including namespaced forms. Read and apply its instructions before claiming use. A listing or file alone does not prove invocation is permitted. Do not scan global directories or infer absence when inventory is unavailable.
3
- A failed load of a guessed skill name without an inventory entry establishes neither detection nor absence. Report availability unknown and describe the failed invocation separately; reserve detected but inaccessible for a skill the host actually identifies. Do not combine these states into an ambiguous status.
4
- When first handling prose under this policy, give the user one brief status per session: actually used; detected but inaccessible; confirmed absent; or availability unknown. Wait until availability and any actual application are known; do not announce an intention to use the skill and then announce its use again. Detection without application must never be reported as use. Keep the status out of project artifacts and do not repeat it in later replies.
5
- For confirmed absence, combine a once-per-session installation suggestion with the status, linking https://github.com/blader/humanizer#installation and current host instructions. Respect an existing refusal. For unknown inventory or unavailable invocation, describe that limitation without claiming absence or successful use. On explicitly requests use but remains nonblocking when unavailable. Continue with baseline guidance in every fallback.
1
+ Read writing.humanizer (default auto; values auto, on, off). With off, skip this policy and continue with baseline writing and independent host requirements. Omit all Humanizer mentions from the handoff, including a note that it was disabled or skipped. Do not look for, invoke, or suggest installing the skill under this policy.
2
+
3
+ With auto or on, inspect the host's exposed skill inventory. Use a usable Humanizer skill, including a namespaced one. Read and apply its instructions before claiming use. Keep skill discovery and loading in tool calls with no user-facing progress announcement. Do not scan global directories.
4
+
5
+ Include one brief status per session in the first writing handoff. Use the outcome you observed:
6
+
7
+ - Humanizer used. Say this only after reading and applying the skill.
8
+ - Humanizer detected but inaccessible. Use this when the host identifies the skill and you cannot invoke it.
9
+ - Humanizer absent. Use this when the exposed inventory confirms absence. In the same status, link to https://github.com/blader/humanizer#installation and current host instructions unless the user previously declined.
10
+ - Humanizer availability unknown. Use this when no inventory is available. A failed load of a guessed name does not establish whether the skill exists.
11
+
12
+ Check the handoff before sending it. If this is the first writing handoff under auto or on, include the observed status even when availability is unknown. Keep it out of project artifacts and omit it in later replies once reported. On explicitly requests use but remains nonblocking when unavailable. Continue with baseline guidance in every fallback.
6
13
  Never install/update skills, enable plugins, or modify global configuration automatically. Re-evaluate in a new session; no persistent machine-wide detection cache is required.
7
14
  Apply the skill to all authored prose, including proposals, specs, tasks, guides, comments, docstrings, commit and PR descriptions, messages, and replies. Preserve code behavior, requirements, commands, identifiers, examples, links, and structured syntax. Check factual claims after rewriting; stylistic editing does not establish correctness. See the installed docs/configuration.md for defaults and limits.
@@ -1,31 +1,64 @@
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.
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
+ For an optional focused selection pass, read contextSelection.mode (default guided). After resolving the learning policy above, guided mode uses .cliewen-openspec/context-selection.md. Off adds no pass or handoff. This choice is independent of features.planning and documentation maintenance; existing lesson gates still apply.
16
+
17
+ 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.
18
+
19
+ ## Optional planning
20
+
21
+ 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.
22
+
23
+ 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.
24
+
25
+ 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.
26
+
27
+ 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.
28
+
29
+ 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.
30
+
31
+ 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.
32
+
33
+ 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.
24
34
 
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.
35
+ ## Review delivery scope before implementation
26
36
 
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.
37
+ In Delivery and the delivery branch of Combined, review the complete proposal, spec changes, design or combined decision, and tasks before the first implementation task. Start from the original request and accepted amendments. For each requested outcome and constraint, find where the plan addresses it and how it will be verified. Then check whether any planned work goes beyond the request. Agreement among the artifacts can still leave a requirement out. If the request or an amendment is unavailable, state what you checked and what context you still need. Repeat this review for the affected parts of a materially changed plan.
28
38
 
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.
39
+ ## Handle scope findings
30
40
 
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.
41
+ In either delivery review, warn about suspected extra work or omissions. Name the request or scope boundary, the specific finding, and its practical impact. Correct a clear in-scope omission and recheck it. The scope owner can accept an addition, remove it from the current change, or defer it to one or more follow-ups. The owner can also narrow or defer a requested item. Record the disposition once in an existing change artifact. Remove deferred work from the current delivery and use the selected planning authority when enabled. Prepare follow-up proposals as their work becomes actionable. Keep unresolved items open and continue independent in-scope work when authorized. Keep a clean review brief.
42
+
43
+ ## Assess implementation readiness
44
+
45
+ In Delivery and the delivery branch of Combined, assess readiness after the plan review and before implementation. Read readiness.enabled (default true) and readiness.threshold (default 3). With readiness disabled, skip ratings and continue the ordinary workflow.
46
+
47
+ Rate outcome clarity and feasibility separately. For clarity, consider the requested behavior and constraints. For feasibility, consider the approach, prerequisites, and how you will verify the result. Rate each dimension using the evidence available:
48
+
49
+ | Score | Basis |
50
+ | --- | --- |
51
+ | 1 | A consequential unknown blocks the work. |
52
+ | 2 | Competing interpretations or an unverified dependency could materially change the result. |
53
+ | 3 | Work can proceed with stated, low-risk assumptions. |
54
+ | 4 | This dimension is clear enough to explain and verify without a material open question. |
55
+
56
+ Give a short reason for each rating. Use the lower score. If it meets the threshold, proceed with the authorized work. Difficulty alone does not reduce a rating. Routine ready cases need no separate report or approval.
57
+
58
+ Below the threshold, check relevant available evidence first and pause the affected work. Ask the smallest question that could change the decision when the user needs to decide. For technical uncertainty, use authorized focused discovery or propose a smaller delivery. Reassess after receiving new information. Stop asking when ready or when further questions would add nothing, and report any remaining blocker.
59
+
60
+ ### Resume a ticket after clarification
61
+
62
+ For a ticket-driven change with planning enabled, reread the ticket before writing or resuming. With authorized write access, record the blocking question, why the answer matters, the OpenSpec change name and path, and the exact repository-relative paths to .cliewen-openspec/planning.md and .cliewen-openspec/config.yaml. Use the project's waiting convention. When retrying, reuse the outstanding question and retry only missing updates. If an update is unauthorized, unavailable, or fails, report the question and the exact pending update in the handoff. For local work or when planning is off, use the conversation or existing handoff.
63
+
64
+ On pickup, retrieve the named change's native apply instructions and read the exact installed paths in the handoff before scoring. Use the answer already recorded on the ticket without asking again or posting it back. Update only the outcomes, constraints, and verification that the answer settles. Keep existing behavior outside that decision intact and keep deferred work outside this delivery. Reassess readiness on the four-point scale using the installed Cliewen configuration. Resume when the threshold is met and existing authorization permits it. Independent authorized work can proceed while this item waits.
@@ -1,3 +1,5 @@
1
+ For delivery, complete the review under "Review delivery scope before implementation" in .cliewen-openspec/planning.md before starting implementation tasks. Apply the work-scoping review even when optional planning is disabled.
2
+ Then follow "Assess implementation readiness" in the same reference. Read readiness.enabled and readiness.threshold from the project configuration, defaulting to true and 3. When disabled, skip the score and continue with existing scope and approval rules.
1
3
  Implement tasks and maintain relevant documents. ${testingApproach} Follow testing.placement (default per-task): run each implementation task's relevant tests and fix failures before moving on.
2
4
  End-of-change defers the automated suite to final verification; still perform a suitable check for each task before proceeding.
3
5
  Final regression and revision-bound evidence collection still follow implementation in either mode.