@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.
- package/CHANGELOG.md +43 -25
- package/LICENSE +21 -21
- package/README.md +128 -125
- package/bin/wefter.js +8 -8
- package/docs/ARCHITECTURE.md +75 -75
- package/docs/INSTALLATION.md +56 -47
- package/docs/ROADMAP.md +48 -0
- package/docs/SAFETY_MODEL.md +18 -17
- package/docs/SELF_AUDIT.md +37 -35
- package/docs/WORKFLOWS.md +17 -15
- package/package.json +45 -45
- package/schemas/documentation-audit-profile.schema.json +55 -55
- package/schemas/install-manifest.schema.json +42 -0
- package/schemas/product-shaping-config.schema.json +63 -63
- package/schemas/product-shaping-contract.schema.json +204 -204
- package/schemas/product-shaping-profile.schema.json +39 -39
- package/schemas/product-shaping-run-manifest.schema.json +103 -103
- package/schemas/run-manifest.schema.json +14 -14
- package/schemas/wefter.config.schema.json +62 -62
- package/schemas/work-unit-config.schema.json +51 -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 +31 -21
- package/src/cli/main.js +2937 -2646
- 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 +69 -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 +31 -28
- package/src/workflows/documentation-audit/templates/opencode/skills/documentation-audit/SKILL.md.tmpl +39 -38
- package/src/workflows/documentation-audit/templates/prompts/auditor-prompt.md +98 -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 -1245
- package/src/workflows/product-shaping/compatibility.md +33 -33
- package/src/workflows/product-shaping/contracts/product-spec-contract.json +250 -250
- package/src/workflows/product-shaping/templates/default-config.json +34 -34
- package/src/workflows/product-shaping/templates/default-profile.json +48 -48
- package/src/workflows/product-shaping/templates/documentation-audit/workflow-self-audit-auditor-prompt.md +117 -116
- package/src/workflows/product-shaping/templates/documentation-audit-profile.json +80 -80
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-auditor.md.tmpl +22 -22
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-domain-modeler.md.tmpl +31 -31
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-intake-analyst.md.tmpl +31 -31
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-orchestrator.md.tmpl +48 -48
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-reference-researcher.md.tmpl +29 -29
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-release-planner.md.tmpl +34 -34
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-repairer.md.tmpl +25 -25
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-shaper.md.tmpl +31 -31
- package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-validator.md.tmpl +23 -23
- package/src/workflows/product-shaping/templates/opencode/skills/product-shaping/SKILL.md.tmpl +45 -45
- package/src/workflows/product-shaping/templates/prompts/domain-modeler-prompt.md +27 -27
- package/src/workflows/product-shaping/templates/prompts/intake-prompt.md +30 -30
- package/src/workflows/product-shaping/templates/prompts/product-auditor-prompt.md +53 -53
- package/src/workflows/product-shaping/templates/prompts/product-repairer-prompt.md +25 -25
- package/src/workflows/product-shaping/templates/prompts/product-shaper-prompt.md +26 -26
- package/src/workflows/product-shaping/templates/prompts/product-validator-prompt.md +55 -55
- package/src/workflows/product-shaping/templates/prompts/reference-research-prompt.md +25 -25
- package/src/workflows/product-shaping/templates/prompts/release-planner-prompt.md +34 -34
- package/src/workflows/product-shaping/workflow.json +33 -33
- package/src/workflows/technical-shaping/README.md +7 -5
- package/src/workflows/technical-shaping/workflow.json +14 -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
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
# Implemented Task Review
|
|
2
|
-
|
|
3
|
-
Run: `{{RUN_ID}}`
|
|
4
|
-
Work unit: `{{WORK_UNIT_KEY}}`
|
|
5
|
-
Review output root: `{{TASK_REVIEW_DIR}}`
|
|
6
|
-
|
|
7
|
-
## Role
|
|
8
|
-
|
|
9
|
-
You are the independent reviewer of one implemented task. Validate code, tests and documentation against the approved task spec and source documents.
|
|
10
|
-
|
|
11
|
-
## Inputs
|
|
12
|
-
|
|
13
|
-
- Approved plan: `{{VERSIONED_WORK_UNIT_PLAN}}`
|
|
14
|
-
- Approved task specs: `{{VERSIONED_TASK_SPECS_DIR}}`
|
|
15
|
-
- Decision log: `{{VERSIONED_DECISION_LOG}}`
|
|
16
|
-
- Task logs: `{{TASK_LOG_DIR}}`
|
|
17
|
-
|
|
18
|
-
## Rules
|
|
19
|
-
|
|
20
|
-
- Focus on bugs, specification gaps, security, tenant isolation, permissions, errors and missing tests.
|
|
21
|
-
- Verify TDD evidence: approval scenarios mapped to tests, red/failing evidence or justified exception, and green tests/checks after implementation.
|
|
22
|
-
- Do not edit code.
|
|
23
|
-
- Write one review per task to `{{TASK_REVIEW_DIR}}/<task-id>.md`.
|
|
24
|
-
- The review must contain a `## Machine Result` block with valid JSON exactly in the shape below; the deterministic guard fails if the block is missing, ambiguous or inconsistent.
|
|
25
|
-
- In `Machine Result.result`, use exactly one value: `Pass`, `Needs Fix` or `Blocked`.
|
|
26
|
-
- If there are no findings, explicitly state the task passed and cite observed tests/checks.
|
|
27
|
-
|
|
28
|
-
## Review Format
|
|
29
|
-
|
|
30
|
-
````md
|
|
31
|
-
# <task-id> Review
|
|
32
|
-
|
|
33
|
-
## Machine Result
|
|
34
|
-
|
|
35
|
-
```json
|
|
36
|
-
{
|
|
37
|
-
"taskId": "<task-id>",
|
|
38
|
-
"result": "Pass",
|
|
39
|
-
"reviewIteration": 1,
|
|
40
|
-
"blockingFindings": []
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Result
|
|
45
|
-
|
|
46
|
-
Pass | Needs Fix | Blocked
|
|
47
|
-
|
|
48
|
-
## Findings
|
|
49
|
-
|
|
50
|
-
### R-001: <title>
|
|
51
|
-
|
|
52
|
-
Severity: Critical | High | Medium | Low
|
|
53
|
-
Evidence:
|
|
54
|
-
Recommendation:
|
|
55
|
-
|
|
56
|
-
## Tests Reviewed
|
|
57
|
-
## TDD Evidence Reviewed
|
|
58
|
-
## Residual Risks
|
|
59
|
-
````
|
|
60
|
-
|
|
61
|
-
## Deterministic Guard
|
|
62
|
-
|
|
63
|
-
After writing the review, the orchestrator must execute:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
wefter work-unit guard --run-id {{RUN_ID}} --task-id <task-id> --mode ReadyForNextTask
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
If the command fails because of `Needs Fix`, the same task must return for correction and another review. If it fails as `Blocked`, the work unit must pause for human decision or specification adjustment.
|
|
1
|
+
# Implemented Task Review
|
|
2
|
+
|
|
3
|
+
Run: `{{RUN_ID}}`
|
|
4
|
+
Work unit: `{{WORK_UNIT_KEY}}`
|
|
5
|
+
Review output root: `{{TASK_REVIEW_DIR}}`
|
|
6
|
+
|
|
7
|
+
## Role
|
|
8
|
+
|
|
9
|
+
You are the independent reviewer of one implemented task. Validate code, tests and documentation against the approved task spec and source documents.
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
- Approved plan: `{{VERSIONED_WORK_UNIT_PLAN}}`
|
|
14
|
+
- Approved task specs: `{{VERSIONED_TASK_SPECS_DIR}}`
|
|
15
|
+
- Decision log: `{{VERSIONED_DECISION_LOG}}`
|
|
16
|
+
- Task logs: `{{TASK_LOG_DIR}}`
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
|
|
20
|
+
- Focus on bugs, specification gaps, security, tenant isolation, permissions, errors and missing tests.
|
|
21
|
+
- Verify TDD evidence: approval scenarios mapped to tests, red/failing evidence or justified exception, and green tests/checks after implementation.
|
|
22
|
+
- Do not edit code.
|
|
23
|
+
- Write one review per task to `{{TASK_REVIEW_DIR}}/<task-id>.md`.
|
|
24
|
+
- The review must contain a `## Machine Result` block with valid JSON exactly in the shape below; the deterministic guard fails if the block is missing, ambiguous or inconsistent.
|
|
25
|
+
- In `Machine Result.result`, use exactly one value: `Pass`, `Needs Fix` or `Blocked`.
|
|
26
|
+
- If there are no findings, explicitly state the task passed and cite observed tests/checks.
|
|
27
|
+
|
|
28
|
+
## Review Format
|
|
29
|
+
|
|
30
|
+
````md
|
|
31
|
+
# <task-id> Review
|
|
32
|
+
|
|
33
|
+
## Machine Result
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"taskId": "<task-id>",
|
|
38
|
+
"result": "Pass",
|
|
39
|
+
"reviewIteration": 1,
|
|
40
|
+
"blockingFindings": []
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Result
|
|
45
|
+
|
|
46
|
+
Pass | Needs Fix | Blocked
|
|
47
|
+
|
|
48
|
+
## Findings
|
|
49
|
+
|
|
50
|
+
### R-001: <title>
|
|
51
|
+
|
|
52
|
+
Severity: Critical | High | Medium | Low
|
|
53
|
+
Evidence:
|
|
54
|
+
Recommendation:
|
|
55
|
+
|
|
56
|
+
## Tests Reviewed
|
|
57
|
+
## TDD Evidence Reviewed
|
|
58
|
+
## Residual Risks
|
|
59
|
+
````
|
|
60
|
+
|
|
61
|
+
## Deterministic Guard
|
|
62
|
+
|
|
63
|
+
After writing the review, the orchestrator must execute:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
wefter work-unit guard --run-id {{RUN_ID}} --task-id <task-id> --mode ReadyForNextTask
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
If the command fails because of `Needs Fix`, the same task must return for correction and another review. If it fails as `Blocked`, the work unit must pause for human decision or specification adjustment.
|
package/src/workflows/work-unit-implementation/templates/prompts/work-unit-validator-prompt.md
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
# Final Work-Unit Validation
|
|
2
|
-
|
|
3
|
-
Run: `{{RUN_ID}}`
|
|
4
|
-
Work unit: `{{WORK_UNIT_KEY}}`
|
|
5
|
-
Output: `{{WORK_UNIT_VALIDATION_OUTPUT}}`
|
|
6
|
-
|
|
7
|
-
## Role
|
|
8
|
-
|
|
9
|
-
You are the final validator for the work unit. Validate the complete result against the approved plan, task specs, acceptance criteria and source documentation.
|
|
10
|
-
|
|
11
|
-
## Inputs
|
|
12
|
-
|
|
13
|
-
- Approved plan: `{{VERSIONED_WORK_UNIT_PLAN}}`
|
|
14
|
-
- Approved task specs: `{{VERSIONED_TASK_SPECS_DIR}}`
|
|
15
|
-
- Approved traceability matrix: `{{VERSIONED_TRACEABILITY_MATRIX}}`
|
|
16
|
-
- Verification plan: `{{VERSIONED_VERIFICATION_PLAN}}`
|
|
17
|
-
- Decision log: `{{VERSIONED_DECISION_LOG}}`
|
|
18
|
-
- Task logs: `{{TASK_LOG_DIR}}`
|
|
19
|
-
- Task reviews: `{{TASK_REVIEW_DIR}}`
|
|
20
|
-
|
|
21
|
-
## Tasks
|
|
22
|
-
|
|
23
|
-
- Before validating, confirm the deterministic guard `ReadyForFinalValidation` was executed successfully for this run.
|
|
24
|
-
- Verify that all tasks were executed or explicitly cancelled with reason.
|
|
25
|
-
- Verify that all task reviews passed or have documented correction.
|
|
26
|
-
- Verify work-unit acceptance criteria.
|
|
27
|
-
- Verify tests and commands run.
|
|
28
|
-
- Verify documentation and decision log.
|
|
29
|
-
- List blocking and non-blocking pending items.
|
|
30
|
-
|
|
31
|
-
## Output
|
|
32
|
-
|
|
33
|
-
Write `{{WORK_UNIT_VALIDATION_OUTPUT}}`:
|
|
34
|
-
|
|
35
|
-
```md
|
|
36
|
-
# {{WORK_UNIT_KEY}} Final Validation
|
|
37
|
-
|
|
38
|
-
## Result
|
|
39
|
-
|
|
40
|
-
Passed | Passed With Follow Ups | Blocked
|
|
41
|
-
|
|
42
|
-
## Scope Validation
|
|
43
|
-
## Acceptance Criteria Validation
|
|
44
|
-
## Task Review Summary
|
|
45
|
-
## Tests And Commands
|
|
46
|
-
## Documentation Validation
|
|
47
|
-
## Decision Log Validation
|
|
48
|
-
## Blockers
|
|
49
|
-
## Follow Ups
|
|
50
|
-
```
|
|
1
|
+
# Final Work-Unit Validation
|
|
2
|
+
|
|
3
|
+
Run: `{{RUN_ID}}`
|
|
4
|
+
Work unit: `{{WORK_UNIT_KEY}}`
|
|
5
|
+
Output: `{{WORK_UNIT_VALIDATION_OUTPUT}}`
|
|
6
|
+
|
|
7
|
+
## Role
|
|
8
|
+
|
|
9
|
+
You are the final validator for the work unit. Validate the complete result against the approved plan, task specs, acceptance criteria and source documentation.
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
- Approved plan: `{{VERSIONED_WORK_UNIT_PLAN}}`
|
|
14
|
+
- Approved task specs: `{{VERSIONED_TASK_SPECS_DIR}}`
|
|
15
|
+
- Approved traceability matrix: `{{VERSIONED_TRACEABILITY_MATRIX}}`
|
|
16
|
+
- Verification plan: `{{VERSIONED_VERIFICATION_PLAN}}`
|
|
17
|
+
- Decision log: `{{VERSIONED_DECISION_LOG}}`
|
|
18
|
+
- Task logs: `{{TASK_LOG_DIR}}`
|
|
19
|
+
- Task reviews: `{{TASK_REVIEW_DIR}}`
|
|
20
|
+
|
|
21
|
+
## Tasks
|
|
22
|
+
|
|
23
|
+
- Before validating, confirm the deterministic guard `ReadyForFinalValidation` was executed successfully for this run.
|
|
24
|
+
- Verify that all tasks were executed or explicitly cancelled with reason.
|
|
25
|
+
- Verify that all task reviews passed or have documented correction.
|
|
26
|
+
- Verify work-unit acceptance criteria.
|
|
27
|
+
- Verify tests and commands run.
|
|
28
|
+
- Verify documentation and decision log.
|
|
29
|
+
- List blocking and non-blocking pending items.
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
|
|
33
|
+
Write `{{WORK_UNIT_VALIDATION_OUTPUT}}`:
|
|
34
|
+
|
|
35
|
+
```md
|
|
36
|
+
# {{WORK_UNIT_KEY}} Final Validation
|
|
37
|
+
|
|
38
|
+
## Result
|
|
39
|
+
|
|
40
|
+
Passed | Passed With Follow Ups | Blocked
|
|
41
|
+
|
|
42
|
+
## Scope Validation
|
|
43
|
+
## Acceptance Criteria Validation
|
|
44
|
+
## Task Review Summary
|
|
45
|
+
## Tests And Commands
|
|
46
|
+
## Documentation Validation
|
|
47
|
+
## Decision Log Validation
|
|
48
|
+
## Blockers
|
|
49
|
+
## Follow Ups
|
|
50
|
+
```
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "work-unit-implementation",
|
|
3
|
-
"status": "available",
|
|
4
|
-
"title": "Work Unit Implementation",
|
|
5
|
-
"summary": "Plans, audits, repairs, gates, implements, reviews and validates one release work unit at a time using task-level TDD and deterministic guards.",
|
|
6
|
-
"commands": {
|
|
7
|
-
"cli": [
|
|
8
|
-
"wefter work-unit run",
|
|
9
|
-
"wefter work-unit guard"
|
|
10
|
-
],
|
|
11
|
-
"opencode": ["/wefter-run-work-unit"]
|
|
12
|
-
},
|
|
13
|
-
"source": "Ported from the reference implementation-slice workflow semantics. The standalone Wefter terminology is work unit."
|
|
14
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"id": "work-unit-implementation",
|
|
3
|
+
"status": "available",
|
|
4
|
+
"title": "Work Unit Implementation",
|
|
5
|
+
"summary": "Plans, audits, repairs, gates, implements, reviews and validates one release work unit at a time using task-level TDD and deterministic guards.",
|
|
6
|
+
"commands": {
|
|
7
|
+
"cli": [
|
|
8
|
+
"wefter work-unit run",
|
|
9
|
+
"wefter work-unit guard"
|
|
10
|
+
],
|
|
11
|
+
"opencode": ["/wefter-run-work-unit"]
|
|
12
|
+
},
|
|
13
|
+
"source": "Ported from the reference implementation-slice workflow semantics. The standalone Wefter terminology is work unit."
|
|
14
|
+
}
|