@wefter/opencode 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -14
- package/LICENSE +21 -21
- package/README.md +125 -112
- package/bin/wefter.js +8 -8
- package/docs/ARCHITECTURE.md +75 -79
- package/docs/INSTALLATION.md +47 -46
- package/docs/SAFETY_MODEL.md +17 -17
- package/docs/SELF_AUDIT.md +35 -0
- package/docs/WORKFLOWS.md +15 -13
- package/package.json +45 -45
- package/schemas/documentation-audit-profile.schema.json +55 -47
- package/schemas/product-shaping-config.schema.json +63 -0
- package/schemas/product-shaping-contract.schema.json +204 -0
- package/schemas/product-shaping-profile.schema.json +39 -0
- package/schemas/product-shaping-run-manifest.schema.json +103 -0
- package/schemas/run-manifest.schema.json +14 -14
- package/schemas/wefter.config.schema.json +62 -31
- package/schemas/work-unit-config.schema.json +44 -44
- package/schemas/work-unit-profile.schema.json +38 -38
- package/schemas/work-unit-review-result.schema.json +13 -13
- package/schemas/workflow-manifest.schema.json +21 -21
- package/src/cli/main.js +2646 -1858
- package/src/workflows/documentation-audit/README.md +37 -37
- package/src/workflows/documentation-audit/templates/README.md.tmpl +47 -47
- package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-consolidator.md.tmpl +27 -27
- package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-orchestrator.md.tmpl +65 -65
- package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-profile-builder.md.tmpl +58 -58
- package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-validator.md.tmpl +26 -26
- package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-auditor.md.tmpl +28 -28
- package/src/workflows/documentation-audit/templates/opencode/skills/documentation-audit/SKILL.md.tmpl +38 -38
- package/src/workflows/documentation-audit/templates/prompts/auditor-prompt.md +97 -97
- package/src/workflows/documentation-audit/templates/prompts/consolidator-prompt.md +84 -84
- package/src/workflows/documentation-audit/templates/prompts/validator-prompt.md +92 -92
- package/src/workflows/documentation-audit/workflow.json +24 -24
- package/src/workflows/documentation-repair/README.md +11 -11
- package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repair-orchestrator.md.tmpl +33 -33
- package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repair-planner.md.tmpl +17 -17
- package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repair-reviewer.md.tmpl +17 -17
- package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repairer.md.tmpl +14 -14
- package/src/workflows/documentation-repair/templates/opencode/skills/documentation-repair/SKILL.md.tmpl +17 -17
- package/src/workflows/documentation-repair/templates/prompts/repair-apply-prompt.md +43 -43
- package/src/workflows/documentation-repair/templates/prompts/repair-plan-prompt.md +73 -73
- package/src/workflows/documentation-repair/templates/prompts/repair-review-prompt.md +47 -47
- package/src/workflows/documentation-repair/workflow.json +10 -10
- package/src/workflows/product-shaping/README.md +1245 -7
- package/src/workflows/product-shaping/compatibility.md +33 -0
- package/src/workflows/product-shaping/contracts/product-spec-contract.json +250 -0
- package/src/workflows/product-shaping/templates/default-config.json +34 -0
- package/src/workflows/product-shaping/templates/default-profile.json +48 -0
- package/src/workflows/product-shaping/templates/documentation-audit/workflow-self-audit-auditor-prompt.md +116 -0
- package/src/workflows/product-shaping/templates/documentation-audit-profile.json +80 -0
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-auditor.md.tmpl +22 -0
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-domain-modeler.md.tmpl +31 -0
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-intake-analyst.md.tmpl +31 -0
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-orchestrator.md.tmpl +48 -0
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-reference-researcher.md.tmpl +29 -0
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-release-planner.md.tmpl +34 -0
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-repairer.md.tmpl +25 -0
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-shaper.md.tmpl +31 -0
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-validator.md.tmpl +23 -0
- package/src/workflows/product-shaping/templates/opencode/skills/product-shaping/SKILL.md.tmpl +45 -0
- package/src/workflows/product-shaping/templates/prompts/domain-modeler-prompt.md +27 -0
- package/src/workflows/product-shaping/templates/prompts/intake-prompt.md +30 -0
- package/src/workflows/product-shaping/templates/prompts/product-auditor-prompt.md +53 -0
- package/src/workflows/product-shaping/templates/prompts/product-repairer-prompt.md +25 -0
- package/src/workflows/product-shaping/templates/prompts/product-shaper-prompt.md +26 -0
- package/src/workflows/product-shaping/templates/prompts/product-validator-prompt.md +55 -0
- package/src/workflows/product-shaping/templates/prompts/reference-research-prompt.md +25 -0
- package/src/workflows/product-shaping/templates/prompts/release-planner-prompt.md +34 -0
- package/src/workflows/product-shaping/workflow.json +33 -10
- package/src/workflows/technical-shaping/README.md +5 -5
- package/src/workflows/technical-shaping/workflow.json +10 -10
- package/src/workflows/work-unit-implementation/README.md +71 -71
- package/src/workflows/work-unit-implementation/templates/default-config.json +46 -46
- package/src/workflows/work-unit-implementation/templates/default-profile.json +57 -57
- package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-orchestrator.md.tmpl +62 -62
- package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-auditor.md.tmpl +26 -26
- package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-consolidator.md.tmpl +26 -26
- package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-repairer.md.tmpl +25 -25
- package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-validator.md.tmpl +25 -25
- package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-planner.md.tmpl +27 -27
- package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-task-implementer.md.tmpl +30 -30
- package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-task-reviewer.md.tmpl +28 -28
- package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-validator.md.tmpl +26 -26
- package/src/workflows/work-unit-implementation/templates/opencode/skills/work-unit-implementation/SKILL.md.tmpl +25 -25
- package/src/workflows/work-unit-implementation/templates/prompts/plan-auditor-prompt.md +89 -89
- package/src/workflows/work-unit-implementation/templates/prompts/plan-consolidator-prompt.md +64 -64
- package/src/workflows/work-unit-implementation/templates/prompts/plan-repairer-prompt.md +42 -42
- package/src/workflows/work-unit-implementation/templates/prompts/plan-validator-prompt.md +84 -84
- package/src/workflows/work-unit-implementation/templates/prompts/planner-prompt.md +150 -150
- package/src/workflows/work-unit-implementation/templates/prompts/task-implementation-prompt.md +57 -57
- package/src/workflows/work-unit-implementation/templates/prompts/task-review-prompt.md +69 -69
- package/src/workflows/work-unit-implementation/templates/prompts/work-unit-validator-prompt.md +50 -50
- package/src/workflows/work-unit-implementation/workflow.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## 0.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- Added
|
|
10
|
-
- Added
|
|
11
|
-
- Added
|
|
12
|
-
- Added
|
|
13
|
-
-
|
|
14
|
-
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## 0.2.0 - 2026-06-02
|
|
6
|
+
|
|
7
|
+
Promotes `product-shaping` to an available workflow.
|
|
8
|
+
|
|
9
|
+
- Added available-by-default product-shaping workflow installation, CLI run generation, OpenCode command, agents, skill, prompts, contracts and schemas.
|
|
10
|
+
- Added product-shaping completion gate validation for required specs, ready deliverables, adversarial review evidence and final validation evidence.
|
|
11
|
+
- Added `DELIVERABLES.md` handoff validation before legacy work-unit implementation can consume product-shaping output.
|
|
12
|
+
- Added product-shaping doctrine autoaudit profile and repaired audit findings across schemas, prompts, agents, CLI behavior and docs.
|
|
13
|
+
- Hardened product-shaping schemas and runtime checks for canonical file order, vocabulary, relative paths, manifest outputs, handoff and gate evidence.
|
|
14
|
+
- Expanded CLI tests for product-shaping availability, path safety, handoff validation and OpenCode installation.
|
|
15
|
+
|
|
16
|
+
## 0.1.0 - 2026-06-02
|
|
17
|
+
|
|
18
|
+
Initial public release of Wefter for OpenCode.
|
|
19
|
+
|
|
20
|
+
- Added the `wefter` CLI for installing and validating OpenCode workflow packs.
|
|
21
|
+
- Added documentation audit workflow generation, profile import, profile scaffolding, and doctor validation.
|
|
22
|
+
- Added documentation repair workflow generation from validated audit reports.
|
|
23
|
+
- Added work-unit implementation workflow generation and task/review guard validation.
|
|
24
|
+
- Added reusable OpenCode agents, skills, commands, workflow manifests, prompt templates, and schemas.
|
|
25
|
+
- Added path-safety checks and automated CLI tests for core workflow operations.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Wuerike
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Wuerike
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,112 +1,125 @@
|
|
|
1
|
-
# Wefter for OpenCode
|
|
2
|
-
|
|
3
|
-
Wefter installs reusable OpenCode workflows that weave product intent into audited specs, executable tasks, and validated implementation.
|
|
4
|
-
|
|
5
|
-
## Status
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Package
|
|
10
|
-
|
|
11
|
-
```text
|
|
12
|
-
package: @wefter/opencode
|
|
13
|
-
repo: opencode-wefter
|
|
14
|
-
cli: wefter
|
|
15
|
-
config: wefter.config.json
|
|
16
|
-
local workflow files: .wefter/
|
|
17
|
-
runtime artifacts: .audit/wefter/
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Workflows
|
|
21
|
-
|
|
22
|
-
| Workflow ID | Status | Purpose |
|
|
23
|
-
| --- | --- | --- |
|
|
24
|
-
| `product-shaping` |
|
|
25
|
-
| `documentation-audit` | Available | Run redundant, adversarial documentation consistency audits. |
|
|
26
|
-
| `documentation-repair` | Available | Repair docs from a validated audit report without mixing detection and correction. |
|
|
27
|
-
| `technical-shaping` | Planned | Convert product docs into explicit technical decisions and implementation constraints. |
|
|
28
|
-
| `work-unit-implementation` | Available | Generate planning runs, orchestrate plan review, enforce task/review guards, and validate a work unit. |
|
|
29
|
-
|
|
30
|
-
## Local Development
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npm run check
|
|
34
|
-
node bin/wefter.js --help
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Install into another project from this checkout:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
node <path-to-opencode-wefter>/bin/wefter.js init --target <path-to-project> --yes
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Intended User Flow
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npx @wefter/opencode init
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Restart OpenCode, then use:
|
|
50
|
-
|
|
51
|
-
```text
|
|
52
|
-
/wefter-generate-doc-audit-profile
|
|
53
|
-
/wefter-
|
|
54
|
-
/wefter-
|
|
55
|
-
/wefter-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
wefter
|
|
63
|
-
wefter
|
|
64
|
-
wefter
|
|
65
|
-
wefter docs
|
|
66
|
-
wefter
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
1
|
+
# Wefter for OpenCode
|
|
2
|
+
|
|
3
|
+
Wefter installs reusable OpenCode workflows that weave product intent into audited specs, executable tasks, and validated implementation.
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
Wefter is usable locally for `product-shaping`, `documentation-audit`, `documentation-repair`, and `work-unit-implementation`. Product shaping is available by default and includes CLI run generation, OpenCode integration, validation gates and audited `DELIVERABLES.md` handoff.
|
|
8
|
+
|
|
9
|
+
## Package
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
package: @wefter/opencode
|
|
13
|
+
repo: opencode-wefter
|
|
14
|
+
cli: wefter
|
|
15
|
+
config: wefter.config.json
|
|
16
|
+
local workflow files: .wefter/
|
|
17
|
+
runtime artifacts: .audit/wefter/ for legacy workflows; .wefter/runs/ for product-shaping
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Workflows
|
|
21
|
+
|
|
22
|
+
| Workflow ID | Status | Purpose |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| `product-shaping` | Available | Shape an initial idea into product specs, release scope, acceptance criteria and deliverables. |
|
|
25
|
+
| `documentation-audit` | Available | Run redundant, adversarial documentation consistency audits. |
|
|
26
|
+
| `documentation-repair` | Available | Repair docs from a validated audit report without mixing detection and correction. |
|
|
27
|
+
| `technical-shaping` | Planned | Convert product docs into explicit technical decisions and implementation constraints. |
|
|
28
|
+
| `work-unit-implementation` | Available | Generate planning runs, orchestrate plan review, enforce task/review guards, and validate a work unit. |
|
|
29
|
+
|
|
30
|
+
## Local Development
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm run check
|
|
34
|
+
node bin/wefter.js --help
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Install into another project from this checkout:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
node <path-to-opencode-wefter>/bin/wefter.js init --target <path-to-project> --yes
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Intended User Flow
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx @wefter/opencode init
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Restart OpenCode, then use the available default commands:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
/wefter-generate-doc-audit-profile
|
|
53
|
+
/wefter-shape-product
|
|
54
|
+
/wefter-audit-docs
|
|
55
|
+
/wefter-repair-docs
|
|
56
|
+
/wefter-run-work-unit
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
CLI checks are also available:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
wefter doctor
|
|
63
|
+
wefter product shape --dry-run
|
|
64
|
+
wefter product validate --json
|
|
65
|
+
wefter docs audit --passes-per-lens 1 --max-audits 12
|
|
66
|
+
wefter docs audit --profile-path docs/audits/lenses.json --passes-per-lens 1 --max-audits 12
|
|
67
|
+
wefter profile import --source docs/audits/lenses.json --force
|
|
68
|
+
wefter docs repair --audit-report .audit/wefter/documentation-audit/<run-id>/final/final-documentation-audit-report.md
|
|
69
|
+
wefter new-run documentation-audit --passes-per-lens 1 --max-audits 12
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Default Config
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"version": 1,
|
|
77
|
+
"workflowRoot": ".wefter/workflows",
|
|
78
|
+
"profilePath": ".wefter/workflows/documentation-audit/profile.json",
|
|
79
|
+
"artifactRoot": ".audit/wefter/documentation-audit",
|
|
80
|
+
"templateRoot": ".wefter/workflows/documentation-audit/templates",
|
|
81
|
+
"processDocPath": ".wefter/workflows/documentation-audit/README.md",
|
|
82
|
+
"runnerCommand": "node <path-to-wefter>/bin/wefter.js",
|
|
83
|
+
"workflows": {
|
|
84
|
+
"product-shaping": {
|
|
85
|
+
"status": "available",
|
|
86
|
+
"enabled": true,
|
|
87
|
+
"specRoot": ".wefter/specs",
|
|
88
|
+
"runRoot": ".wefter/runs/product-shaping",
|
|
89
|
+
"configPath": ".wefter/workflows/product-shaping/config.json",
|
|
90
|
+
"profilePath": ".wefter/workflows/product-shaping/profile.json"
|
|
91
|
+
},
|
|
92
|
+
"documentation-audit": { "status": "available", "enabled": true },
|
|
93
|
+
"documentation-repair": { "status": "available", "enabled": true },
|
|
94
|
+
"technical-shaping": { "status": "planned", "enabled": false },
|
|
95
|
+
"work-unit-implementation": {
|
|
96
|
+
"status": "available",
|
|
97
|
+
"enabled": true,
|
|
98
|
+
"configPath": ".wefter/workflows/work-unit-implementation/config.json",
|
|
99
|
+
"profilePath": ".wefter/workflows/work-unit-implementation/profile.json"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Safety Model
|
|
106
|
+
|
|
107
|
+
- Installed audit agents render permissions using the configured artifact root and profile path.
|
|
108
|
+
- `docs audit` writes through a staging directory and only moves the final run after all files are generated.
|
|
109
|
+
- `docs audit --profile-path` can use a repository-specific audit profile for one run without changing `wefter.config.json`.
|
|
110
|
+
- `profile import` validates and copies an existing repository-relative audit profile into the configured Wefter profile path.
|
|
111
|
+
- `docs repair` writes through a staging directory and requires an existing repository-relative audit report path.
|
|
112
|
+
- Paths in `wefter.config.json` must be relative to the target repository and must not contain `..`.
|
|
113
|
+
- Run names are plain directory names and cannot contain path separators.
|
|
114
|
+
- `product-shaping` writes versioned product specs under `.wefter/specs/` and runtime runs under `.wefter/runs/product-shaping/` by default.
|
|
115
|
+
- `product validate` fails the publication/handoff gate when required product specs, blocking questions or deliverable statuses are invalid.
|
|
116
|
+
- Audit execution must not edit source documentation; correction is a separate workflow.
|
|
117
|
+
- Repair execution must pause when validated findings require unresolved human decisions.
|
|
118
|
+
|
|
119
|
+
## Product Direction
|
|
120
|
+
|
|
121
|
+
Next hardening steps after the `0.2.0` product-shaping release:
|
|
122
|
+
|
|
123
|
+
1. Add installation manifest/uninstall support.
|
|
124
|
+
2. Continue migration from legacy `work-unit-implementation` naming toward `delivery-implementation`.
|
|
125
|
+
3. Harden release and package publishing automation.
|
package/bin/wefter.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { main } from "../src/cli/main.js";
|
|
4
|
-
|
|
5
|
-
main().catch((error) => {
|
|
6
|
-
console.error(error.message);
|
|
7
|
-
process.exitCode = 1;
|
|
8
|
-
});
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { main } from "../src/cli/main.js";
|
|
4
|
+
|
|
5
|
+
main().catch((error) => {
|
|
6
|
+
console.error(error.message);
|
|
7
|
+
process.exitCode = 1;
|
|
8
|
+
});
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -1,79 +1,75 @@
|
|
|
1
|
-
# Architecture
|
|
2
|
-
|
|
3
|
-
Wefter separates reusable workflow infrastructure from repository-specific product, documentation and implementation intent.
|
|
4
|
-
|
|
5
|
-
## Reusable Engine
|
|
6
|
-
|
|
7
|
-
The reusable engine contains:
|
|
8
|
-
|
|
9
|
-
- CLI command runner.
|
|
10
|
-
- Workflow manifests.
|
|
11
|
-
- OpenCode agents and skills.
|
|
12
|
-
- Generic prompt templates.
|
|
13
|
-
- Config, profile and run schemas.
|
|
14
|
-
|
|
15
|
-
These files must not encode any single product domain.
|
|
16
|
-
|
|
17
|
-
## Local Configuration
|
|
18
|
-
|
|
19
|
-
`wefter.config.json` stores installation choices for one repository:
|
|
20
|
-
|
|
21
|
-
- `workflowRoot`: versioned Wefter workflow files installed in the target repository.
|
|
22
|
-
- `artifactRoot`: generated runtime output root for
|
|
23
|
-
- `profilePath`: project-specific documentation audit profile.
|
|
24
|
-
- `templateRoot`: installed documentation audit prompt templates.
|
|
25
|
-
- `processDocPath`: installed workflow documentation.
|
|
26
|
-
- `runnerCommand`: command used by OpenCode orchestrators to invoke Wefter.
|
|
27
|
-
- `workflows`: registry of available and planned workflow IDs, with workflow-specific paths such as work-unit `configPath` and `profilePath`.
|
|
28
|
-
|
|
29
|
-
Paths are repository-relative and validated before use.
|
|
30
|
-
|
|
31
|
-
## Workflow Modules
|
|
32
|
-
|
|
33
|
-
Workflow modules live under `src/workflows/<workflow-id>/` and expose `workflow.json` as their contract. The initial architecture registers:
|
|
34
|
-
|
|
35
|
-
- `product-shaping`
|
|
36
|
-
- `documentation-audit`
|
|
37
|
-
- `documentation-repair`
|
|
38
|
-
- `technical-shaping`
|
|
39
|
-
- `work-unit-implementation`
|
|
40
|
-
|
|
41
|
-
`documentation-audit` is executable end-to-end through the CLI. `documentation-repair` generates gated repair runs from validated audit reports. `work-unit-implementation` can generate planning runs, install OpenCode agents, enforce deterministic task/review guards and validate completed work units.
|
|
42
|
-
|
|
43
|
-
## Documentation Audit Run
|
|
44
|
-
|
|
45
|
-
`wefter docs audit` reads config and profile, then writes a run under the configured artifact root.
|
|
46
|
-
|
|
47
|
-
Run generation uses staging:
|
|
48
|
-
|
|
49
|
-
```text
|
|
50
|
-
<artifactRoot>/.tmp/<run-id>/
|
|
51
|
-
-> <artifactRoot>/<run-id>/
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
This avoids exposing partially generated final runs after an interrupted creation.
|
|
55
|
-
|
|
56
|
-
## Documentation Repair Run
|
|
57
|
-
|
|
58
|
-
`wefter docs repair --audit-report <path>` reads config and creates a run under `.audit/wefter/documentation-repair/`.
|
|
59
|
-
|
|
60
|
-
Repair runs contain prompts for planning, applying approved repairs and reviewing the repaired documentation. The generated flow separates safe documentation edits from human-decision items and recommends a follow-up audit after repair.
|
|
61
|
-
|
|
62
|
-
## OpenCode Integration
|
|
63
|
-
|
|
64
|
-
The installer writes:
|
|
65
|
-
|
|
66
|
-
- `.opencode/agent/wefter-doc
|
|
67
|
-
- `.opencode/agent/wefter-
|
|
68
|
-
- `.opencode/agent/wefter-
|
|
69
|
-
- `.opencode/
|
|
70
|
-
- `.opencode/
|
|
71
|
-
- `.opencode/
|
|
72
|
-
- `.opencode/
|
|
73
|
-
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
- `.opencode/skills/documentation-repair/SKILL.md`
|
|
77
|
-
- `opencode.json` commands `/wefter-audit-docs`, `/wefter-generate-doc-audit-profile`, `/wefter-repair-docs` and `/wefter-run-work-unit`
|
|
78
|
-
|
|
79
|
-
OpenCode must be restarted after installation because configuration is loaded once at startup.
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
Wefter separates reusable workflow infrastructure from repository-specific product, documentation and implementation intent.
|
|
4
|
+
|
|
5
|
+
## Reusable Engine
|
|
6
|
+
|
|
7
|
+
The reusable engine contains:
|
|
8
|
+
|
|
9
|
+
- CLI command runner.
|
|
10
|
+
- Workflow manifests.
|
|
11
|
+
- OpenCode agents and skills.
|
|
12
|
+
- Generic prompt templates.
|
|
13
|
+
- Config, profile and run schemas.
|
|
14
|
+
|
|
15
|
+
These files must not encode any single product domain.
|
|
16
|
+
|
|
17
|
+
## Local Configuration
|
|
18
|
+
|
|
19
|
+
`wefter.config.json` stores installation choices for one repository:
|
|
20
|
+
|
|
21
|
+
- `workflowRoot`: versioned Wefter workflow files installed in the target repository.
|
|
22
|
+
- `artifactRoot`: generated runtime output root for legacy audit workflows. Product-shaping uses its workflow-specific run root under `.wefter/runs/product-shaping` by default.
|
|
23
|
+
- `profilePath`: project-specific documentation audit profile.
|
|
24
|
+
- `templateRoot`: installed documentation audit prompt templates.
|
|
25
|
+
- `processDocPath`: installed workflow documentation.
|
|
26
|
+
- `runnerCommand`: command used by OpenCode orchestrators to invoke Wefter.
|
|
27
|
+
- `workflows`: registry of available and planned workflow IDs, with workflow-specific paths such as work-unit `configPath` and `profilePath`.
|
|
28
|
+
|
|
29
|
+
Paths are repository-relative and validated before use.
|
|
30
|
+
|
|
31
|
+
## Workflow Modules
|
|
32
|
+
|
|
33
|
+
Workflow modules live under `src/workflows/<workflow-id>/` and expose `workflow.json` as their contract. The initial architecture registers:
|
|
34
|
+
|
|
35
|
+
- `product-shaping`
|
|
36
|
+
- `documentation-audit`
|
|
37
|
+
- `documentation-repair`
|
|
38
|
+
- `technical-shaping`
|
|
39
|
+
- `work-unit-implementation`
|
|
40
|
+
|
|
41
|
+
`product-shaping` is available for product spec generation and gated `DELIVERABLES.md` handoff. `documentation-audit` is executable end-to-end through the CLI. `documentation-repair` generates gated repair runs from validated audit reports. `work-unit-implementation` can generate planning runs, install OpenCode agents, enforce deterministic task/review guards and validate completed work units.
|
|
42
|
+
|
|
43
|
+
## Documentation Audit Run
|
|
44
|
+
|
|
45
|
+
`wefter docs audit` reads config and profile, then writes a run under the configured artifact root.
|
|
46
|
+
|
|
47
|
+
Run generation uses staging:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
<artifactRoot>/.tmp/<run-id>/
|
|
51
|
+
-> <artifactRoot>/<run-id>/
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This avoids exposing partially generated final runs after an interrupted creation.
|
|
55
|
+
|
|
56
|
+
## Documentation Repair Run
|
|
57
|
+
|
|
58
|
+
`wefter docs repair --audit-report <path>` reads config and creates a run under `.audit/wefter/documentation-repair/`.
|
|
59
|
+
|
|
60
|
+
Repair runs contain prompts for planning, applying approved repairs and reviewing the repaired documentation. The generated flow separates safe documentation edits from human-decision items and recommends a follow-up audit after repair.
|
|
61
|
+
|
|
62
|
+
## OpenCode Integration
|
|
63
|
+
|
|
64
|
+
The installer writes:
|
|
65
|
+
|
|
66
|
+
- `.opencode/agent/wefter-doc-*.md`
|
|
67
|
+
- `.opencode/agent/wefter-product-*.md`
|
|
68
|
+
- `.opencode/agent/wefter-work-unit-*.md`
|
|
69
|
+
- `.opencode/skills/documentation-audit/SKILL.md`
|
|
70
|
+
- `.opencode/skills/documentation-repair/SKILL.md`
|
|
71
|
+
- `.opencode/skills/product-shaping/SKILL.md`
|
|
72
|
+
- `.opencode/skills/work-unit-implementation/SKILL.md`
|
|
73
|
+
- `opencode.json` commands `/wefter-generate-doc-audit-profile`, `/wefter-shape-product`, `/wefter-audit-docs`, `/wefter-repair-docs` and `/wefter-run-work-unit`
|
|
74
|
+
|
|
75
|
+
OpenCode must be restarted after installation because configuration is loaded once at startup.
|
package/docs/INSTALLATION.md
CHANGED
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
# Installation
|
|
2
|
-
|
|
3
|
-
From a published package:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npx @wefter/opencode init
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
From a local checkout:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
node <path-to-opencode-wefter>/bin/wefter.js init --target <path-to-project> --yes
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Then restart OpenCode and run:
|
|
16
|
-
|
|
17
|
-
```text
|
|
18
|
-
/wefter-generate-doc-audit-profile
|
|
19
|
-
/wefter-
|
|
20
|
-
/wefter-
|
|
21
|
-
/wefter-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
From a published package:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx @wefter/opencode init
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
From a local checkout:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
node <path-to-opencode-wefter>/bin/wefter.js init --target <path-to-project> --yes
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Then restart OpenCode and run:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
/wefter-generate-doc-audit-profile
|
|
19
|
+
/wefter-shape-product
|
|
20
|
+
/wefter-audit-docs
|
|
21
|
+
/wefter-repair-docs
|
|
22
|
+
/wefter-run-work-unit
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Validate an installation with:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
wefter doctor
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Import an existing repository-specific documentation audit profile, such as a legacy `docs/audits/lenses.json`, with:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
wefter profile import --source docs/audits/lenses.json --force
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Run a one-off audit with a repository-specific profile without changing config:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
wefter docs audit --profile-path docs/audits/lenses.json --passes-per-lens 1 --max-audits 12
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Generate a documentation repair run from a validated audit report with:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
wefter docs repair --audit-report .audit/wefter/documentation-audit/<run-id>/final/final-documentation-audit-report.md
|
|
47
|
+
```
|
package/docs/SAFETY_MODEL.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# Safety Model
|
|
2
|
-
|
|
3
|
-
Wefter workflows are designed as gated loops, not free-form agent prompts.
|
|
4
|
-
|
|
5
|
-
Core rules:
|
|
6
|
-
|
|
7
|
-
- Detection and correction are separate workflows.
|
|
8
|
-
- Documentation audit agents must not edit source documentation.
|
|
9
|
-
- Documentation repair must plan before editing and pause on unresolved human decisions.
|
|
10
|
-
- Runtime artifacts are written under `.audit/wefter
|
|
11
|
-
- Versioned workflow configuration is written under `.wefter/` by default.
|
|
12
|
-
- Paths are target-repository relative and must not contain `..`.
|
|
13
|
-
- Run directories are staged before becoming visible as final runs.
|
|
14
|
-
- OpenCode agent permissions restrict write access to configured artifact paths.
|
|
15
|
-
- Implementation work must be task-level, reviewed and validated before moving to the next work unit.
|
|
16
|
-
|
|
17
|
-
OpenCode must be restarted after installing or changing agents, skills or commands.
|
|
1
|
+
# Safety Model
|
|
2
|
+
|
|
3
|
+
Wefter workflows are designed as gated loops, not free-form agent prompts.
|
|
4
|
+
|
|
5
|
+
Core rules:
|
|
6
|
+
|
|
7
|
+
- Detection and correction are separate workflows.
|
|
8
|
+
- Documentation audit agents must not edit source documentation.
|
|
9
|
+
- Documentation repair must plan before editing and pause on unresolved human decisions.
|
|
10
|
+
- Runtime artifacts are written under workflow-specific configured roots: legacy audit, repair and work-unit workflows default to `.audit/wefter/`, while product-shaping defaults to `.wefter/runs/`.
|
|
11
|
+
- Versioned workflow configuration is written under `.wefter/` by default.
|
|
12
|
+
- Paths are target-repository relative and must not contain `..`.
|
|
13
|
+
- Run directories are staged before becoming visible as final runs.
|
|
14
|
+
- OpenCode agent permissions restrict write access to configured artifact paths.
|
|
15
|
+
- Implementation work must be task-level, reviewed and validated before moving to the next work unit.
|
|
16
|
+
|
|
17
|
+
OpenCode must be restarted after installing or changing agents, skills or commands.
|