@wefter/opencode 0.2.0 → 0.3.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 (96) hide show
  1. package/CHANGELOG.md +43 -25
  2. package/LICENSE +21 -21
  3. package/README.md +128 -125
  4. package/bin/wefter.js +8 -8
  5. package/docs/ARCHITECTURE.md +75 -75
  6. package/docs/INSTALLATION.md +56 -47
  7. package/docs/ROADMAP.md +48 -0
  8. package/docs/SAFETY_MODEL.md +18 -17
  9. package/docs/SELF_AUDIT.md +37 -35
  10. package/docs/WORKFLOWS.md +17 -15
  11. package/package.json +45 -45
  12. package/schemas/documentation-audit-profile.schema.json +55 -55
  13. package/schemas/install-manifest.schema.json +42 -0
  14. package/schemas/product-shaping-config.schema.json +63 -63
  15. package/schemas/product-shaping-contract.schema.json +204 -204
  16. package/schemas/product-shaping-profile.schema.json +39 -39
  17. package/schemas/product-shaping-run-manifest.schema.json +103 -103
  18. package/schemas/run-manifest.schema.json +14 -14
  19. package/schemas/wefter.config.schema.json +62 -62
  20. package/schemas/work-unit-config.schema.json +51 -44
  21. package/schemas/work-unit-profile.schema.json +38 -38
  22. package/schemas/work-unit-review-result.schema.json +13 -13
  23. package/schemas/workflow-manifest.schema.json +31 -21
  24. package/src/cli/main.js +2937 -2646
  25. package/src/workflows/documentation-audit/README.md +37 -37
  26. package/src/workflows/documentation-audit/templates/README.md.tmpl +47 -47
  27. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-consolidator.md.tmpl +27 -27
  28. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-orchestrator.md.tmpl +69 -65
  29. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-profile-builder.md.tmpl +58 -58
  30. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-validator.md.tmpl +26 -26
  31. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-auditor.md.tmpl +31 -28
  32. package/src/workflows/documentation-audit/templates/opencode/skills/documentation-audit/SKILL.md.tmpl +39 -38
  33. package/src/workflows/documentation-audit/templates/prompts/auditor-prompt.md +98 -97
  34. package/src/workflows/documentation-audit/templates/prompts/consolidator-prompt.md +84 -84
  35. package/src/workflows/documentation-audit/templates/prompts/validator-prompt.md +92 -92
  36. package/src/workflows/documentation-audit/workflow.json +24 -24
  37. package/src/workflows/documentation-repair/README.md +11 -11
  38. package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repair-orchestrator.md.tmpl +33 -33
  39. package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repair-planner.md.tmpl +17 -17
  40. package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repair-reviewer.md.tmpl +17 -17
  41. package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repairer.md.tmpl +14 -14
  42. package/src/workflows/documentation-repair/templates/opencode/skills/documentation-repair/SKILL.md.tmpl +17 -17
  43. package/src/workflows/documentation-repair/templates/prompts/repair-apply-prompt.md +43 -43
  44. package/src/workflows/documentation-repair/templates/prompts/repair-plan-prompt.md +73 -73
  45. package/src/workflows/documentation-repair/templates/prompts/repair-review-prompt.md +47 -47
  46. package/src/workflows/documentation-repair/workflow.json +10 -10
  47. package/src/workflows/product-shaping/README.md +1245 -1245
  48. package/src/workflows/product-shaping/compatibility.md +33 -33
  49. package/src/workflows/product-shaping/contracts/product-spec-contract.json +250 -250
  50. package/src/workflows/product-shaping/templates/default-config.json +34 -34
  51. package/src/workflows/product-shaping/templates/default-profile.json +48 -48
  52. package/src/workflows/product-shaping/templates/documentation-audit/workflow-self-audit-auditor-prompt.md +117 -116
  53. package/src/workflows/product-shaping/templates/documentation-audit-profile.json +80 -80
  54. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-auditor.md.tmpl +22 -22
  55. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-domain-modeler.md.tmpl +31 -31
  56. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-intake-analyst.md.tmpl +31 -31
  57. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-orchestrator.md.tmpl +48 -48
  58. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-reference-researcher.md.tmpl +29 -29
  59. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-release-planner.md.tmpl +34 -34
  60. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-repairer.md.tmpl +25 -25
  61. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-shaper.md.tmpl +31 -31
  62. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-validator.md.tmpl +23 -23
  63. package/src/workflows/product-shaping/templates/opencode/skills/product-shaping/SKILL.md.tmpl +45 -45
  64. package/src/workflows/product-shaping/templates/prompts/domain-modeler-prompt.md +27 -27
  65. package/src/workflows/product-shaping/templates/prompts/intake-prompt.md +30 -30
  66. package/src/workflows/product-shaping/templates/prompts/product-auditor-prompt.md +53 -53
  67. package/src/workflows/product-shaping/templates/prompts/product-repairer-prompt.md +25 -25
  68. package/src/workflows/product-shaping/templates/prompts/product-shaper-prompt.md +26 -26
  69. package/src/workflows/product-shaping/templates/prompts/product-validator-prompt.md +55 -55
  70. package/src/workflows/product-shaping/templates/prompts/reference-research-prompt.md +25 -25
  71. package/src/workflows/product-shaping/templates/prompts/release-planner-prompt.md +34 -34
  72. package/src/workflows/product-shaping/workflow.json +33 -33
  73. package/src/workflows/technical-shaping/README.md +7 -5
  74. package/src/workflows/technical-shaping/workflow.json +14 -10
  75. package/src/workflows/work-unit-implementation/README.md +71 -71
  76. package/src/workflows/work-unit-implementation/templates/default-config.json +46 -46
  77. package/src/workflows/work-unit-implementation/templates/default-profile.json +57 -57
  78. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-orchestrator.md.tmpl +62 -62
  79. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-auditor.md.tmpl +26 -26
  80. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-consolidator.md.tmpl +26 -26
  81. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-repairer.md.tmpl +25 -25
  82. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-validator.md.tmpl +25 -25
  83. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-planner.md.tmpl +27 -27
  84. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-task-implementer.md.tmpl +30 -30
  85. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-task-reviewer.md.tmpl +28 -28
  86. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-validator.md.tmpl +26 -26
  87. package/src/workflows/work-unit-implementation/templates/opencode/skills/work-unit-implementation/SKILL.md.tmpl +25 -25
  88. package/src/workflows/work-unit-implementation/templates/prompts/plan-auditor-prompt.md +89 -89
  89. package/src/workflows/work-unit-implementation/templates/prompts/plan-consolidator-prompt.md +64 -64
  90. package/src/workflows/work-unit-implementation/templates/prompts/plan-repairer-prompt.md +42 -42
  91. package/src/workflows/work-unit-implementation/templates/prompts/plan-validator-prompt.md +84 -84
  92. package/src/workflows/work-unit-implementation/templates/prompts/planner-prompt.md +150 -150
  93. package/src/workflows/work-unit-implementation/templates/prompts/task-implementation-prompt.md +57 -57
  94. package/src/workflows/work-unit-implementation/templates/prompts/task-review-prompt.md +69 -69
  95. package/src/workflows/work-unit-implementation/templates/prompts/work-unit-validator-prompt.md +50 -50
  96. package/src/workflows/work-unit-implementation/workflow.json +14 -14
@@ -1,34 +1,34 @@
1
- {
2
- "version": 1,
3
- "workflowName": "product-shaping",
4
- "releaseId": "01_mvp",
5
- "specRoot": ".wefter/specs",
6
- "runRoot": ".wefter/runs/product-shaping",
7
- "contractPath": ".wefter/workflows/product-shaping/contracts/product-spec-contract.json",
8
- "processDocPath": ".wefter/workflows/product-shaping/README.md",
9
- "requiredFiles": [
10
- "README.md",
11
- "discovery/SOURCE_MATERIALS.md",
12
- "discovery/IDEA_BRIEF.md",
13
- "discovery/OPEN_QUESTIONS.md",
14
- "references/README.md",
15
- "PRODUCT_VISION.md",
16
- "product/FEATURE_CATALOG.md",
17
- "product/MODULE_ROADMAP.md",
18
- "product/DOMAIN_MODEL.md",
19
- "product/OPERATIONAL_FLOW.md",
20
- "product/PRODUCT_DECISIONS.md",
21
- "releases/README.md",
22
- "releases/<release-id>/README.md",
23
- "releases/<release-id>/SCOPE.md",
24
- "releases/<release-id>/DOMAIN_SPEC.md",
25
- "releases/<release-id>/ACCEPTANCE_CRITERIA.md",
26
- "releases/<release-id>/DELIVERABLES.md"
27
- ],
28
- "completionGate": {
29
- "requireNoReleaseBlockingQuestions": true,
30
- "requireAdversarialReview": true,
31
- "requireFinalValidation": true,
32
- "readyDeliverableStatuses": ["ready"]
33
- }
34
- }
1
+ {
2
+ "version": 1,
3
+ "workflowName": "product-shaping",
4
+ "releaseId": "01_mvp",
5
+ "specRoot": ".wefter/specs",
6
+ "runRoot": ".wefter/runs/product-shaping",
7
+ "contractPath": ".wefter/workflows/product-shaping/contracts/product-spec-contract.json",
8
+ "processDocPath": ".wefter/workflows/product-shaping/README.md",
9
+ "requiredFiles": [
10
+ "README.md",
11
+ "discovery/SOURCE_MATERIALS.md",
12
+ "discovery/IDEA_BRIEF.md",
13
+ "discovery/OPEN_QUESTIONS.md",
14
+ "references/README.md",
15
+ "PRODUCT_VISION.md",
16
+ "product/FEATURE_CATALOG.md",
17
+ "product/MODULE_ROADMAP.md",
18
+ "product/DOMAIN_MODEL.md",
19
+ "product/OPERATIONAL_FLOW.md",
20
+ "product/PRODUCT_DECISIONS.md",
21
+ "releases/README.md",
22
+ "releases/<release-id>/README.md",
23
+ "releases/<release-id>/SCOPE.md",
24
+ "releases/<release-id>/DOMAIN_SPEC.md",
25
+ "releases/<release-id>/ACCEPTANCE_CRITERIA.md",
26
+ "releases/<release-id>/DELIVERABLES.md"
27
+ ],
28
+ "completionGate": {
29
+ "requireNoReleaseBlockingQuestions": true,
30
+ "requireAdversarialReview": true,
31
+ "requireFinalValidation": true,
32
+ "readyDeliverableStatuses": ["ready"]
33
+ }
34
+ }
@@ -1,48 +1,48 @@
1
- {
2
- "version": 1,
3
- "workflowName": "product-shaping",
4
- "variants": [
5
- {
6
- "id": "source-traceability",
7
- "title": "Source traceability",
8
- "instruction": "Find product ideas, requirements, scope items, domain rules or deliverables that lack traceability to source materials, market references or recorded product decisions."
9
- },
10
- {
11
- "id": "scope-and-boundary",
12
- "title": "Scope and boundary",
13
- "instruction": "Find places where vision, feature catalog, roadmap, release scope, domain spec, acceptance criteria or deliverables overreach their documented responsibility."
14
- },
15
- {
16
- "id": "decision-and-question-gates",
17
- "title": "Decision and question gates",
18
- "instruction": "Find unresolved questions, proposed decisions, ambiguous domain behavior or scope choices that should block release readiness or delivery handoff."
19
- },
20
- {
21
- "id": "handoff-readiness",
22
- "title": "Handoff readiness",
23
- "instruction": "Find deliverables that are too broad, too task-like, missing source docs, missing acceptance links or not ready for delivery implementation."
24
- }
25
- ],
26
- "lenses": [
27
- {
28
- "id": "doctrine-vs-spec-tree",
29
- "title": "Doctrine vs spec tree",
30
- "focus": "Compare generated product specs against the product-shaping README, file contracts, creation order, utilization order and precedence rules."
31
- },
32
- {
33
- "id": "release-source-of-truth",
34
- "title": "Release source of truth",
35
- "focus": "Compare SCOPE.md, DOMAIN_SPEC.md, ACCEPTANCE_CRITERIA.md and DELIVERABLES.md for contradiction, omission and scope drift."
36
- },
37
- {
38
- "id": "product-decision-integrity",
39
- "title": "Product decision integrity",
40
- "focus": "Compare OPEN_QUESTIONS.md and PRODUCT_DECISIONS.md against generated specs to ensure open questions remain visible and closed decisions are explicit."
41
- },
42
- {
43
- "id": "delivery-handoff",
44
- "title": "Delivery handoff",
45
- "focus": "Evaluate whether DELIVERABLES.md is the only implementation handoff, contains valid statuses and avoids task-level implementation detail."
46
- }
47
- ]
48
- }
1
+ {
2
+ "version": 1,
3
+ "workflowName": "product-shaping",
4
+ "variants": [
5
+ {
6
+ "id": "source-traceability",
7
+ "title": "Source traceability",
8
+ "instruction": "Find product ideas, requirements, scope items, domain rules or deliverables that lack traceability to source materials, market references or recorded product decisions."
9
+ },
10
+ {
11
+ "id": "scope-and-boundary",
12
+ "title": "Scope and boundary",
13
+ "instruction": "Find places where vision, feature catalog, roadmap, release scope, domain spec, acceptance criteria or deliverables overreach their documented responsibility."
14
+ },
15
+ {
16
+ "id": "decision-and-question-gates",
17
+ "title": "Decision and question gates",
18
+ "instruction": "Find unresolved questions, proposed decisions, ambiguous domain behavior or scope choices that should block release readiness or delivery handoff."
19
+ },
20
+ {
21
+ "id": "handoff-readiness",
22
+ "title": "Handoff readiness",
23
+ "instruction": "Find deliverables that are too broad, too task-like, missing source docs, missing acceptance links or not ready for delivery implementation."
24
+ }
25
+ ],
26
+ "lenses": [
27
+ {
28
+ "id": "doctrine-vs-spec-tree",
29
+ "title": "Doctrine vs spec tree",
30
+ "focus": "Compare generated product specs against the product-shaping README, file contracts, creation order, utilization order and precedence rules."
31
+ },
32
+ {
33
+ "id": "release-source-of-truth",
34
+ "title": "Release source of truth",
35
+ "focus": "Compare SCOPE.md, DOMAIN_SPEC.md, ACCEPTANCE_CRITERIA.md and DELIVERABLES.md for contradiction, omission and scope drift."
36
+ },
37
+ {
38
+ "id": "product-decision-integrity",
39
+ "title": "Product decision integrity",
40
+ "focus": "Compare OPEN_QUESTIONS.md and PRODUCT_DECISIONS.md against generated specs to ensure open questions remain visible and closed decisions are explicit."
41
+ },
42
+ {
43
+ "id": "delivery-handoff",
44
+ "title": "Delivery handoff",
45
+ "focus": "Evaluate whether DELIVERABLES.md is the only implementation handoff, contains valid statuses and avoids task-level implementation detail."
46
+ }
47
+ ]
48
+ }
@@ -1,116 +1,117 @@
1
- # Workflow Self Audit
2
-
3
- Run: `{{RUN_ID}}`
4
- Audit ID: `{{AUDIT_ID}}`
5
- Lens: `{{LENS_ID}}` - {{LENS_TITLE}}
6
- Variant: `{{VARIANT_ID}}` - {{VARIANT_TITLE}}
7
- Pass: `{{PASS_NUMBER}}`
8
- Required output: `{{OUTPUT_FILE}}`
9
-
10
- ## Role
11
-
12
- You are a Wefter workflow self-auditor.
13
-
14
- This is not a generic documentation audit. Your job is to verify whether the product-shaping workflow can be safely published or kept available.
15
-
16
- Treat `src/workflows/product-shaping/README.md` as the declared product-shaping doctrine. Treat `CHANGELOG.md`, root `README.md` and files under `docs/` as release and public documentation claims. Treat schemas, contracts, prompt templates, OpenCode agents, skills, CLI behavior, tests, manifests and package metadata as derived artifacts.
17
-
18
- A derived artifact is wrong when it contradicts the product-shaping README unless the README itself conflicts with another hard rule, `CHANGELOG.md` or an explicit release decision. Treat prior review findings, seed prompts and existing audit artifacts as hypotheses, not conclusions.
19
-
20
- ## Corpus
21
-
22
- Include:
23
-
24
- {{CORPUS_INCLUDE}}
25
-
26
- Exclude:
27
-
28
- {{CORPUS_EXCLUDE}}
29
-
30
- ## Lens For This Analysis
31
-
32
- {{LENS_FOCUS}}
33
-
34
- ## Variant For This Analysis
35
-
36
- {{VARIANT_INSTRUCTION}}
37
-
38
- ## Depth Requirements
39
-
40
- Run this audit as a deep trace, not a keyword scan.
41
-
42
- 1. Extract the README obligations relevant to this lens before judging derived artifacts.
43
- 2. Trace those obligations across at least three artifact classes when they are relevant: schemas/contracts, CLI/runtime, prompt templates, OpenCode agents/skill, tests, public docs, package metadata or generated manifest shape.
44
- 3. For each suspected issue, look for a refutation before reporting it: explicit exception text, scoped compatibility language, prompt-owned enforcement, human-gate ownership, or tests that prove the behavior is intentional.
45
- 4. For runtime, handoff, path or validation claims, reason about at least one concrete success or bypass scenario. If you do not execute a scenario, state that limitation in Coverage.
46
- 5. For release hygiene claims, inspect public docs and package metadata. If the lens asks about generated or untracked artifacts and you cannot inspect worktree status, state that limitation instead of assuming cleanliness.
47
- 6. Do not stop after the first finding. After finding an issue, continue checking adjacent artifacts for a related second-order issue or a refutation.
48
-
49
- For `NO_FINDINGS`, explain which README obligations and artifact classes were checked.
50
-
51
- ## Mandatory Rules
52
-
53
- - Read broadly before concluding.
54
- - Inspect Markdown, JSON, JavaScript, templates, tests and package metadata when they are in scope.
55
- - For CLI/runtime claims, compare docs against command dispatch, validation logic, generated manifests and tests.
56
- - For OpenCode claims, compare command templates, agent permissions, skill guidance and runner allowlists.
57
- - Do not edit source files.
58
- - Write only the indicated output file.
59
- - Do not report generic improvement ideas without a verifiable workflow consistency problem.
60
- - Do not report acceptable differences in level of detail as contradictions.
61
- - If an item depends on interpretation, mark it as ambiguity or probable, not as confirmed conflict.
62
- - Every finding must cite concrete evidence with file and quote.
63
- - If there are no findings, still write the file with the `NO_FINDINGS` section.
64
-
65
- ## Output Format
66
-
67
- Write exactly this Markdown shape to `{{OUTPUT_FILE}}`:
68
-
69
- ```md
70
- # Raw Documentation Audit
71
-
72
- Run: {{RUN_ID}}
73
- Audit ID: {{AUDIT_ID}}
74
- Lens: {{LENS_ID}} - {{LENS_TITLE}}
75
- Variant: {{VARIANT_ID}} - {{VARIANT_TITLE}}
76
- Pass: {{PASS_NUMBER}}
77
-
78
- ## Coverage
79
-
80
- - Files inspected:
81
- - Searches performed:
82
- - Files intentionally skipped:
83
- - Limits or uncertainty:
84
-
85
- ## Findings
86
-
87
- ### F-{{AUDIT_ID}}-001: <short title>
88
-
89
- Type: Contradiction | Ambiguity | Probable staleness | Broken reference | Missing cross-reference | Code/doc drift | Scope leak | Unclassified
90
- Confidence: High | Medium | Low
91
- Severity: Critical | High | Medium | Low
92
- Needs human decision: Yes | No
93
-
94
- Evidence A:
95
- - File: `<path>`
96
- - Lines or section: `<line/section>`
97
- - Quote: "<short exact quote>"
98
-
99
- Evidence B:
100
- - File: `<path>`
101
- - Lines or section: `<line/section>`
102
- - Quote: "<short exact quote>"
103
-
104
- Why this conflicts:
105
- <explain the incompatibility>
106
-
107
- False-positive risk:
108
- <explain why this might not be a real issue>
109
-
110
- Suggested correction direction:
111
- <do not rewrite docs; describe the likely direction if later corrected>
112
-
113
- ## NO_FINDINGS
114
-
115
- Use this section only if no findings were identified. Explain briefly what was checked.
116
- ```
1
+ # Workflow Self Audit
2
+
3
+ Run: `{{RUN_ID}}`
4
+ Audit ID: `{{AUDIT_ID}}`
5
+ Lens: `{{LENS_ID}}` - {{LENS_TITLE}}
6
+ Variant: `{{VARIANT_ID}}` - {{VARIANT_TITLE}}
7
+ Pass: `{{PASS_NUMBER}}`
8
+ Required output: `{{OUTPUT_FILE}}`
9
+
10
+ ## Role
11
+
12
+ You are a Wefter workflow self-auditor.
13
+
14
+ This is not a generic documentation audit. Your job is to verify whether the product-shaping workflow can be safely published or kept available.
15
+
16
+ Treat `src/workflows/product-shaping/README.md` as the declared product-shaping doctrine. Treat `CHANGELOG.md`, root `README.md` and files under `docs/` as release and public documentation claims. Treat schemas, contracts, prompt templates, OpenCode agents, skills, CLI behavior, tests, manifests and package metadata as derived artifacts.
17
+
18
+ A derived artifact is wrong when it contradicts the product-shaping README unless the README itself conflicts with another hard rule, `CHANGELOG.md` or an explicit release decision. Treat prior review findings, seed prompts and existing audit artifacts as hypotheses, not conclusions.
19
+
20
+ ## Corpus
21
+
22
+ Include:
23
+
24
+ {{CORPUS_INCLUDE}}
25
+
26
+ Exclude:
27
+
28
+ {{CORPUS_EXCLUDE}}
29
+
30
+ ## Lens For This Analysis
31
+
32
+ {{LENS_FOCUS}}
33
+
34
+ ## Variant For This Analysis
35
+
36
+ {{VARIANT_INSTRUCTION}}
37
+
38
+ ## Depth Requirements
39
+
40
+ Run this audit as a deep trace, not a keyword scan.
41
+
42
+ 1. Extract the README obligations relevant to this lens before judging derived artifacts.
43
+ 2. Trace those obligations across at least three artifact classes when they are relevant: schemas/contracts, CLI/runtime, prompt templates, OpenCode agents/skill, tests, public docs, package metadata or generated manifest shape.
44
+ 3. For each suspected issue, look for a refutation before reporting it: explicit exception text, scoped compatibility language, prompt-owned enforcement, human-gate ownership, or tests that prove the behavior is intentional.
45
+ 4. For runtime, handoff, path or validation claims, reason about at least one concrete success or bypass scenario. If you do not execute a scenario, state that limitation in Coverage.
46
+ 5. For release hygiene claims, inspect public docs and package metadata. If the lens asks about generated or untracked artifacts and you cannot inspect worktree status, state that limitation instead of assuming cleanliness.
47
+ 6. Do not stop after the first finding. After finding an issue, continue checking adjacent artifacts for a related second-order issue or a refutation.
48
+
49
+ For `NO_FINDINGS`, explain which README obligations and artifact classes were checked.
50
+
51
+ ## Mandatory Rules
52
+
53
+ - Read broadly before concluding.
54
+ - Inspect Markdown, JSON, JavaScript, templates, tests and package metadata when they are in scope.
55
+ - For CLI/runtime claims, compare docs against command dispatch, validation logic, generated manifests and tests.
56
+ - For OpenCode claims, compare command templates, agent permissions, skill guidance and runner allowlists.
57
+ - Do not edit source files.
58
+ - Write only the indicated output file.
59
+ - Do not report generic improvement ideas without a verifiable workflow consistency problem.
60
+ - Do not report acceptable differences in level of detail as contradictions.
61
+ - If an item depends on interpretation, mark it as ambiguity or probable, not as confirmed conflict.
62
+ - Every finding must cite concrete evidence with file and quote.
63
+ - If there are no findings, still write the file with the `NO_FINDINGS` section.
64
+ - If the runtime prevents writing `{{OUTPUT_FILE}}`, stop immediately and report that blocker. Do not continue auditing indefinitely.
65
+
66
+ ## Output Format
67
+
68
+ Write exactly this Markdown shape to `{{OUTPUT_FILE}}`:
69
+
70
+ ```md
71
+ # Raw Documentation Audit
72
+
73
+ Run: {{RUN_ID}}
74
+ Audit ID: {{AUDIT_ID}}
75
+ Lens: {{LENS_ID}} - {{LENS_TITLE}}
76
+ Variant: {{VARIANT_ID}} - {{VARIANT_TITLE}}
77
+ Pass: {{PASS_NUMBER}}
78
+
79
+ ## Coverage
80
+
81
+ - Files inspected:
82
+ - Searches performed:
83
+ - Files intentionally skipped:
84
+ - Limits or uncertainty:
85
+
86
+ ## Findings
87
+
88
+ ### F-{{AUDIT_ID}}-001: <short title>
89
+
90
+ Type: Contradiction | Ambiguity | Probable staleness | Broken reference | Missing cross-reference | Code/doc drift | Scope leak | Unclassified
91
+ Confidence: High | Medium | Low
92
+ Severity: Critical | High | Medium | Low
93
+ Needs human decision: Yes | No
94
+
95
+ Evidence A:
96
+ - File: `<path>`
97
+ - Lines or section: `<line/section>`
98
+ - Quote: "<short exact quote>"
99
+
100
+ Evidence B:
101
+ - File: `<path>`
102
+ - Lines or section: `<line/section>`
103
+ - Quote: "<short exact quote>"
104
+
105
+ Why this conflicts:
106
+ <explain the incompatibility>
107
+
108
+ False-positive risk:
109
+ <explain why this might not be a real issue>
110
+
111
+ Suggested correction direction:
112
+ <do not rewrite docs; describe the likely direction if later corrected>
113
+
114
+ ## NO_FINDINGS
115
+
116
+ Use this section only if no findings were identified. Explain briefly what was checked.
117
+ ```
@@ -1,80 +1,80 @@
1
- {
2
- "version": 1,
3
- "auditorPromptPath": "src/workflows/product-shaping/templates/documentation-audit/workflow-self-audit-auditor-prompt.md",
4
- "corpus": {
5
- "include": [
6
- "src/workflows/product-shaping/**",
7
- "schemas/product-shaping-*.schema.json",
8
- "schemas/wefter.config.schema.json",
9
- "src/cli/main.js",
10
- "test/cli.test.js",
11
- "docs/**",
12
- "CHANGELOG.md",
13
- "package.json",
14
- ".gitignore",
15
- "README.md",
16
- "wefter.config.json"
17
- ],
18
- "exclude": [
19
- "node_modules/**",
20
- ".git/**",
21
- ".audit/**",
22
- ".wefter/runs/**",
23
- ".opencode/**"
24
- ]
25
- },
26
- "variants": [
27
- {
28
- "id": "doctrine-drift",
29
- "title": "Doctrine drift",
30
- "instruction": "Find derived schemas, configs, prompts, agents, skills, CLI defaults or docs that contradict src/workflows/product-shaping/README.md."
31
- },
32
- {
33
- "id": "missing-enforcement",
34
- "title": "Missing enforcement",
35
- "instruction": "Find README hard rules, completion gates, precedence rules or role boundaries that are not represented in derived artifacts."
36
- },
37
- {
38
- "id": "legacy-vocabulary-leak",
39
- "title": "Legacy vocabulary leak",
40
- "instruction": "Find unintended use of legacy vocabulary such as phase, work unit or slice where release or deliverable should be canonical."
41
- },
42
- {
43
- "id": "path-defaults",
44
- "title": "Path defaults",
45
- "instruction": "Find product-shaping defaults that write specs or runs outside .wefter/specs, .wefter/workflows or .wefter/runs without explicit config override."
46
- }
47
- ],
48
- "lenses": [
49
- {
50
- "id": "doctrine-contract-surface",
51
- "title": "Doctrine and contract surface",
52
- "focus": "Extract the product-shaping README obligations for roots, vocabulary, required files, completion gates, handoff and availability. Compare them against workflow.json, default config/profile, schemas, structured contracts and generated manifest shape. Look for contradictions, under-specified dynamic placeholders, weak schema constraints and missing representation of mandatory doctrine."
53
- },
54
- {
55
- "id": "spec-lifecycle-precedence",
56
- "title": "Spec lifecycle and precedence",
57
- "focus": "Audit the full product spec lifecycle: creation order, utilization order, file responsibilities, precedence rules, drift prevention, OPEN_QUESTIONS handling, PRODUCT_DECISIONS handling and reference-file dynamics. Compare README doctrine against contracts, prompts, validators, schemas and tests. Find order conflicts, skipped living documents, silent decision paths and ambiguous ownership."
58
- },
59
- {
60
- "id": "runtime-gates-and-bypasses",
61
- "title": "Runtime gates and bypasses",
62
- "focus": "Audit CLI runtime behavior for product shape, product validate and work-unit handoff consumption. Compare docs and doctrine against command dispatch, config loading, path normalization, run generation, DELIVERABLES parsing, completion evidence, handoff compatibility, manifest trust and tests. Look for safe-equivalent path bypasses, stale evidence acceptance, documented-valid artifacts that fail validation and invalid artifacts that pass."
63
- },
64
- {
65
- "id": "prompts-agents-opencode-execution",
66
- "title": "Prompts, agents and OpenCode execution",
67
- "focus": "Audit prompt templates, OpenCode agents, skill guidance, command registration, permissions and runner allowlists as one executable flow. Verify role boundaries, source-of-truth handling, hard stop conditions, read order, write permissions and whether the advertised product-shaping flow can run from shape through validation without inventing decisions or creating task specs."
68
- },
69
- {
70
- "id": "public-release-and-package-hygiene",
71
- "title": "Public release and package hygiene",
72
- "focus": "Audit CHANGELOG.md, root README, docs, installation guidance, architecture docs, safety docs, self-audit docs, package metadata, .gitignore and release-facing claims. Compare public availability claims against executable behavior and package contents. Look for stale command lists, generated/private artifact leakage, ignored-output mistakes and docs that overstate what the runtime enforces."
73
- },
74
- {
75
- "id": "tests-and-regression-coverage",
76
- "title": "Tests and regression coverage",
77
- "focus": "Audit whether tests actually protect product-shaping availability, path safety, schema/runtime alignment, OpenCode installation, completion gates, DELIVERABLES handoff and known adversarial edge cases. Compare tests against README hard rules, CHANGELOG claims and runtime behavior. Find important claims with no regression test, tests that encode undocumented behavior and happy-path-only coverage for risky gates."
78
- }
79
- ]
80
- }
1
+ {
2
+ "version": 1,
3
+ "auditorPromptPath": "src/workflows/product-shaping/templates/documentation-audit/workflow-self-audit-auditor-prompt.md",
4
+ "corpus": {
5
+ "include": [
6
+ "src/workflows/product-shaping/**",
7
+ "schemas/product-shaping-*.schema.json",
8
+ "schemas/wefter.config.schema.json",
9
+ "src/cli/main.js",
10
+ "test/cli.test.js",
11
+ "docs/**",
12
+ "CHANGELOG.md",
13
+ "package.json",
14
+ ".gitignore",
15
+ "README.md",
16
+ "wefter.config.json"
17
+ ],
18
+ "exclude": [
19
+ "node_modules/**",
20
+ ".git/**",
21
+ ".audit/**",
22
+ ".wefter/runs/**",
23
+ ".opencode/**"
24
+ ]
25
+ },
26
+ "variants": [
27
+ {
28
+ "id": "doctrine-drift",
29
+ "title": "Doctrine drift",
30
+ "instruction": "Find derived schemas, configs, prompts, agents, skills, CLI defaults or docs that contradict src/workflows/product-shaping/README.md."
31
+ },
32
+ {
33
+ "id": "missing-enforcement",
34
+ "title": "Missing enforcement",
35
+ "instruction": "Find README hard rules, completion gates, precedence rules or role boundaries that are not represented in derived artifacts."
36
+ },
37
+ {
38
+ "id": "legacy-vocabulary-leak",
39
+ "title": "Legacy vocabulary leak",
40
+ "instruction": "Find unintended use of legacy vocabulary such as phase, work unit or slice where release or deliverable should be canonical."
41
+ },
42
+ {
43
+ "id": "path-defaults",
44
+ "title": "Path defaults",
45
+ "instruction": "Find product-shaping defaults that write specs or runs outside .wefter/specs, .wefter/workflows or .wefter/runs without explicit config override."
46
+ }
47
+ ],
48
+ "lenses": [
49
+ {
50
+ "id": "doctrine-contract-surface",
51
+ "title": "Doctrine and contract surface",
52
+ "focus": "Extract the product-shaping README obligations for roots, vocabulary, required files, completion gates, handoff and availability. Compare them against workflow.json, default config/profile, schemas, structured contracts and generated manifest shape. Look for contradictions, under-specified dynamic placeholders, weak schema constraints and missing representation of mandatory doctrine."
53
+ },
54
+ {
55
+ "id": "spec-lifecycle-precedence",
56
+ "title": "Spec lifecycle and precedence",
57
+ "focus": "Audit the full product spec lifecycle: creation order, utilization order, file responsibilities, precedence rules, drift prevention, OPEN_QUESTIONS handling, PRODUCT_DECISIONS handling and reference-file dynamics. Compare README doctrine against contracts, prompts, validators, schemas and tests. Find order conflicts, skipped living documents, silent decision paths and ambiguous ownership."
58
+ },
59
+ {
60
+ "id": "runtime-gates-and-bypasses",
61
+ "title": "Runtime gates and bypasses",
62
+ "focus": "Audit CLI runtime behavior for product shape, product validate and work-unit handoff consumption. Compare docs and doctrine against command dispatch, config loading, path normalization, run generation, DELIVERABLES parsing, completion evidence, handoff compatibility, manifest trust and tests. Look for safe-equivalent path bypasses, stale evidence acceptance, documented-valid artifacts that fail validation and invalid artifacts that pass."
63
+ },
64
+ {
65
+ "id": "prompts-agents-opencode-execution",
66
+ "title": "Prompts, agents and OpenCode execution",
67
+ "focus": "Audit prompt templates, OpenCode agents, skill guidance, command registration, permissions and runner allowlists as one executable flow. Verify role boundaries, source-of-truth handling, hard stop conditions, read order, write permissions and whether the advertised product-shaping flow can run from shape through validation without inventing decisions or creating task specs."
68
+ },
69
+ {
70
+ "id": "public-release-and-package-hygiene",
71
+ "title": "Public release and package hygiene",
72
+ "focus": "Audit CHANGELOG.md, root README, docs, installation guidance, architecture docs, safety docs, self-audit docs, package metadata, .gitignore and release-facing claims. Compare public availability claims against executable behavior and package contents. Look for stale command lists, generated/private artifact leakage, ignored-output mistakes and docs that overstate what the runtime enforces."
73
+ },
74
+ {
75
+ "id": "tests-and-regression-coverage",
76
+ "title": "Tests and regression coverage",
77
+ "focus": "Audit whether tests actually protect product-shaping availability, path safety, schema/runtime alignment, OpenCode installation, completion gates, DELIVERABLES handoff and known adversarial edge cases. Compare tests against README hard rules, CHANGELOG claims and runtime behavior. Find important claims with no regression test, tests that encode undocumented behavior and happy-path-only coverage for risky gates."
78
+ }
79
+ ]
80
+ }
@@ -1,22 +1,22 @@
1
- ---
2
- description: Audits Wefter product specs for contradiction, omission, overreach, ambiguity and drift without editing specs.
3
- mode: subagent
4
- permission:
5
- edit:
6
- "*": deny
7
- "{{PRODUCT_SHAPING_RUN_ROOT}}/**": allow
8
- "{{PRODUCT_SHAPING_RUN_ROOT_WINDOWS}}\\**": allow
9
- bash: deny
10
- task: deny
11
- webfetch: deny
12
- websearch: deny
13
- ---
14
-
15
- You are the Wefter product auditor.
16
-
17
- Rules:
18
-
19
- - Do not edit product specs while auditing.
20
- - Write findings only under the configured product-shaping run.
21
- - Classify conflicts using precedence rules, but do not silently repair them.
22
- - Prioritize blocking findings that affect release scope, domain behavior, acceptance criteria or deliverable handoff.
1
+ ---
2
+ description: Audits Wefter product specs for contradiction, omission, overreach, ambiguity and drift without editing specs.
3
+ mode: subagent
4
+ permission:
5
+ edit:
6
+ "*": deny
7
+ "{{PRODUCT_SHAPING_RUN_ROOT}}/**": allow
8
+ "{{PRODUCT_SHAPING_RUN_ROOT_WINDOWS}}\\**": allow
9
+ bash: deny
10
+ task: deny
11
+ webfetch: deny
12
+ websearch: deny
13
+ ---
14
+
15
+ You are the Wefter product auditor.
16
+
17
+ Rules:
18
+
19
+ - Do not edit product specs while auditing.
20
+ - Write findings only under the configured product-shaping run.
21
+ - Classify conflicts using precedence rules, but do not silently repair them.
22
+ - Prioritize blocking findings that affect release scope, domain behavior, acceptance criteria or deliverable handoff.