@wefter/opencode 0.1.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 (65) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/LICENSE +21 -0
  3. package/README.md +112 -0
  4. package/bin/wefter.js +8 -0
  5. package/docs/ARCHITECTURE.md +79 -0
  6. package/docs/INSTALLATION.md +46 -0
  7. package/docs/SAFETY_MODEL.md +17 -0
  8. package/docs/WORKFLOWS.md +13 -0
  9. package/package.json +45 -0
  10. package/schemas/documentation-audit-profile.schema.json +47 -0
  11. package/schemas/run-manifest.schema.json +14 -0
  12. package/schemas/wefter.config.schema.json +31 -0
  13. package/schemas/work-unit-config.schema.json +44 -0
  14. package/schemas/work-unit-profile.schema.json +38 -0
  15. package/schemas/work-unit-review-result.schema.json +13 -0
  16. package/schemas/workflow-manifest.schema.json +21 -0
  17. package/src/cli/main.js +1858 -0
  18. package/src/workflows/documentation-audit/README.md +37 -0
  19. package/src/workflows/documentation-audit/templates/README.md.tmpl +47 -0
  20. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-consolidator.md.tmpl +27 -0
  21. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-orchestrator.md.tmpl +65 -0
  22. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-profile-builder.md.tmpl +58 -0
  23. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-validator.md.tmpl +26 -0
  24. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-auditor.md.tmpl +28 -0
  25. package/src/workflows/documentation-audit/templates/opencode/skills/documentation-audit/SKILL.md.tmpl +38 -0
  26. package/src/workflows/documentation-audit/templates/prompts/auditor-prompt.md +97 -0
  27. package/src/workflows/documentation-audit/templates/prompts/consolidator-prompt.md +84 -0
  28. package/src/workflows/documentation-audit/templates/prompts/validator-prompt.md +92 -0
  29. package/src/workflows/documentation-audit/workflow.json +24 -0
  30. package/src/workflows/documentation-repair/README.md +11 -0
  31. package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repair-orchestrator.md.tmpl +33 -0
  32. package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repair-planner.md.tmpl +17 -0
  33. package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repair-reviewer.md.tmpl +17 -0
  34. package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repairer.md.tmpl +14 -0
  35. package/src/workflows/documentation-repair/templates/opencode/skills/documentation-repair/SKILL.md.tmpl +17 -0
  36. package/src/workflows/documentation-repair/templates/prompts/repair-apply-prompt.md +43 -0
  37. package/src/workflows/documentation-repair/templates/prompts/repair-plan-prompt.md +73 -0
  38. package/src/workflows/documentation-repair/templates/prompts/repair-review-prompt.md +47 -0
  39. package/src/workflows/documentation-repair/workflow.json +10 -0
  40. package/src/workflows/product-shaping/README.md +7 -0
  41. package/src/workflows/product-shaping/workflow.json +10 -0
  42. package/src/workflows/technical-shaping/README.md +5 -0
  43. package/src/workflows/technical-shaping/workflow.json +10 -0
  44. package/src/workflows/work-unit-implementation/README.md +71 -0
  45. package/src/workflows/work-unit-implementation/templates/default-config.json +46 -0
  46. package/src/workflows/work-unit-implementation/templates/default-profile.json +57 -0
  47. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-orchestrator.md.tmpl +62 -0
  48. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-auditor.md.tmpl +26 -0
  49. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-consolidator.md.tmpl +26 -0
  50. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-repairer.md.tmpl +25 -0
  51. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-validator.md.tmpl +25 -0
  52. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-planner.md.tmpl +27 -0
  53. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-task-implementer.md.tmpl +30 -0
  54. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-task-reviewer.md.tmpl +28 -0
  55. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-validator.md.tmpl +26 -0
  56. package/src/workflows/work-unit-implementation/templates/opencode/skills/work-unit-implementation/SKILL.md.tmpl +25 -0
  57. package/src/workflows/work-unit-implementation/templates/prompts/plan-auditor-prompt.md +89 -0
  58. package/src/workflows/work-unit-implementation/templates/prompts/plan-consolidator-prompt.md +64 -0
  59. package/src/workflows/work-unit-implementation/templates/prompts/plan-repairer-prompt.md +42 -0
  60. package/src/workflows/work-unit-implementation/templates/prompts/plan-validator-prompt.md +84 -0
  61. package/src/workflows/work-unit-implementation/templates/prompts/planner-prompt.md +150 -0
  62. package/src/workflows/work-unit-implementation/templates/prompts/task-implementation-prompt.md +57 -0
  63. package/src/workflows/work-unit-implementation/templates/prompts/task-review-prompt.md +69 -0
  64. package/src/workflows/work-unit-implementation/templates/prompts/work-unit-validator-prompt.md +50 -0
  65. package/src/workflows/work-unit-implementation/workflow.json +14 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## 0.1.0 - 2026-06-02
6
+
7
+ Initial public release of Wefter for OpenCode.
8
+
9
+ - Added the `wefter` CLI for installing and validating OpenCode workflow packs.
10
+ - Added documentation audit workflow generation, profile import, profile scaffolding, and doctor validation.
11
+ - Added documentation repair workflow generation from validated audit reports.
12
+ - Added work-unit implementation workflow generation and task/review guard validation.
13
+ - Added reusable OpenCode agents, skills, commands, workflow manifests, prompt templates, and schemas.
14
+ - Added path-safety checks and automated CLI tests for core workflow operations.
package/LICENSE ADDED
@@ -0,0 +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.
package/README.md ADDED
@@ -0,0 +1,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
+ Early product extraction. The package is usable locally for `documentation-audit`, `documentation-repair`, and `work-unit-implementation`; the other workflows are architecture scaffolds.
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` | Planned | Shape an initial idea into product docs, scope and explicit decisions. |
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-audit-docs
54
+ /wefter-repair-docs
55
+ /wefter-run-work-unit
56
+ ```
57
+
58
+ CLI checks are also available:
59
+
60
+ ```bash
61
+ wefter doctor
62
+ wefter docs audit --passes-per-lens 1 --max-audits 12
63
+ wefter docs audit --profile-path docs/audits/lenses.json --passes-per-lens 1 --max-audits 12
64
+ wefter profile import --source docs/audits/lenses.json --force
65
+ wefter docs repair --audit-report .audit/wefter/documentation-audit/<run-id>/final/final-documentation-audit-report.md
66
+ wefter new-run documentation-audit --passes-per-lens 1 --max-audits 12
67
+ ```
68
+
69
+ ## Default Config
70
+
71
+ ```json
72
+ {
73
+ "version": 1,
74
+ "workflowRoot": ".wefter/workflows",
75
+ "profilePath": ".wefter/workflows/documentation-audit/profile.json",
76
+ "artifactRoot": ".audit/wefter/documentation-audit",
77
+ "templateRoot": ".wefter/workflows/documentation-audit/templates",
78
+ "processDocPath": ".wefter/workflows/documentation-audit/README.md",
79
+ "runnerCommand": "node <path-to-wefter>/bin/wefter.js",
80
+ "workflows": {
81
+ "product-shaping": { "status": "planned", "enabled": false },
82
+ "documentation-audit": { "status": "available", "enabled": true },
83
+ "documentation-repair": { "status": "available", "enabled": true },
84
+ "technical-shaping": { "status": "planned", "enabled": false },
85
+ "work-unit-implementation": {
86
+ "status": "available",
87
+ "enabled": true,
88
+ "configPath": ".wefter/workflows/work-unit-implementation/config.json",
89
+ "profilePath": ".wefter/workflows/work-unit-implementation/profile.json"
90
+ }
91
+ }
92
+ }
93
+ ```
94
+
95
+ ## Safety Model
96
+
97
+ - Installed audit agents render permissions using the configured artifact root and profile path.
98
+ - `docs audit` writes through a staging directory and only moves the final run after all files are generated.
99
+ - `docs audit --profile-path` can use a repository-specific audit profile for one run without changing `wefter.config.json`.
100
+ - `profile import` validates and copies an existing repository-relative audit profile into the configured Wefter profile path.
101
+ - `docs repair` writes through a staging directory and requires an existing repository-relative audit report path.
102
+ - Paths in `wefter.config.json` must be relative to the target repository and must not contain `..`.
103
+ - Run names are plain directory names and cannot contain path separators.
104
+ - Audit execution must not edit source documentation; correction is a separate workflow.
105
+ - Repair execution must pause when validated findings require unresolved human decisions.
106
+
107
+ ## Product Direction
108
+
109
+ Next steps before a stable release:
110
+
111
+ 1. Add installation manifest/uninstall support.
112
+ 2. Harden release and package publishing automation.
package/bin/wefter.js ADDED
@@ -0,0 +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
+ });
@@ -0,0 +1,79 @@
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 the currently available documentation audit workflow.
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-audit-orchestrator.md`
67
+ - `.opencode/agent/wefter-doc-auditor.md`
68
+ - `.opencode/agent/wefter-doc-audit-consolidator.md`
69
+ - `.opencode/agent/wefter-doc-audit-validator.md`
70
+ - `.opencode/agent/wefter-doc-audit-profile-builder.md`
71
+ - `.opencode/agent/wefter-doc-repair-orchestrator.md`
72
+ - `.opencode/agent/wefter-doc-repair-planner.md`
73
+ - `.opencode/agent/wefter-doc-repairer.md`
74
+ - `.opencode/agent/wefter-doc-repair-reviewer.md`
75
+ - `.opencode/skills/documentation-audit/SKILL.md`
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.
@@ -0,0 +1,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-audit-docs
20
+ /wefter-repair-docs
21
+ /wefter-run-work-unit
22
+ ```
23
+
24
+ Validate an installation with:
25
+
26
+ ```bash
27
+ wefter doctor
28
+ ```
29
+
30
+ Import an existing repository-specific documentation audit profile, such as a legacy `docs/audits/lenses.json`, with:
31
+
32
+ ```bash
33
+ wefter profile import --source docs/audits/lenses.json --force
34
+ ```
35
+
36
+ Run a one-off audit with a repository-specific profile without changing config:
37
+
38
+ ```bash
39
+ wefter docs audit --profile-path docs/audits/lenses.json --passes-per-lens 1 --max-audits 12
40
+ ```
41
+
42
+ Generate a documentation repair run from a validated audit report with:
43
+
44
+ ```bash
45
+ wefter docs repair --audit-report .audit/wefter/documentation-audit/<run-id>/final/final-documentation-audit-report.md
46
+ ```
@@ -0,0 +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/` by default.
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.
@@ -0,0 +1,13 @@
1
+ # Workflows
2
+
3
+ Wefter workflow IDs are stable nouns. CLI and OpenCode commands use verbs.
4
+
5
+ | Workflow ID | CLI | OpenCode | Status |
6
+ | --- | --- | --- | --- |
7
+ | `product-shaping` | `wefter product shape` | `/wefter-shape-product` | Planned |
8
+ | `documentation-audit` | `wefter docs audit` | `/wefter-audit-docs` | Available |
9
+ | `documentation-repair` | `wefter docs repair` | `/wefter-repair-docs` | Available |
10
+ | `technical-shaping` | `wefter technical shape` | `/wefter-shape-technical` | Planned |
11
+ | `work-unit-implementation` | `wefter work-unit run`, `wefter work-unit guard` | `/wefter-run-work-unit` | Available |
12
+
13
+ The first implementation release keeps `documentation-audit` executable and registers the full architecture. `documentation-repair` can generate repair runs from final audit reports with planning, human-decision gates, repair application and review prompts. `work-unit-implementation` can generate planning runs, orchestrate plan review, enforce deterministic task/review guards and validate a completed work unit.
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@wefter/opencode",
3
+ "version": "0.1.0",
4
+ "description": "Installable Wefter workflows for OpenCode projects.",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+ssh://git@github.com/Wuerike/wefter.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/Wuerike/wefter/issues"
12
+ },
13
+ "homepage": "https://github.com/Wuerike/wefter#readme",
14
+ "bin": {
15
+ "wefter": "bin/wefter.js"
16
+ },
17
+ "scripts": {
18
+ "check": "node --check bin/wefter.js && node --check src/cli/main.js",
19
+ "doctor:self": "node bin/wefter.js --help",
20
+ "test": "node --test"
21
+ },
22
+ "keywords": [
23
+ "opencode",
24
+ "wefter",
25
+ "documentation",
26
+ "audit",
27
+ "workflow",
28
+ "llm"
29
+ ],
30
+ "license": "MIT",
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "engines": {
35
+ "node": ">=18.17"
36
+ },
37
+ "files": [
38
+ "bin/",
39
+ "src/",
40
+ "schemas/",
41
+ "docs/",
42
+ "CHANGELOG.md",
43
+ "README.md"
44
+ ]
45
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://wefter.dev/schemas/documentation-audit-profile.schema.json",
4
+ "type": "object",
5
+ "required": ["version", "corpus", "variants", "lenses"],
6
+ "properties": {
7
+ "version": { "const": 1 },
8
+ "corpus": {
9
+ "type": "object",
10
+ "required": ["include", "exclude"],
11
+ "properties": {
12
+ "include": { "type": "array", "items": { "type": "string", "minLength": 1 } },
13
+ "exclude": { "type": "array", "items": { "type": "string", "minLength": 1 } }
14
+ },
15
+ "additionalProperties": false
16
+ },
17
+ "variants": {
18
+ "type": "array",
19
+ "minItems": 1,
20
+ "items": {
21
+ "type": "object",
22
+ "required": ["id", "title", "instruction"],
23
+ "properties": {
24
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
25
+ "title": { "type": "string", "minLength": 1 },
26
+ "instruction": { "type": "string", "minLength": 1 }
27
+ },
28
+ "additionalProperties": false
29
+ }
30
+ },
31
+ "lenses": {
32
+ "type": "array",
33
+ "minItems": 1,
34
+ "items": {
35
+ "type": "object",
36
+ "required": ["id", "title", "focus"],
37
+ "properties": {
38
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
39
+ "title": { "type": "string", "minLength": 1 },
40
+ "focus": { "type": "string", "minLength": 1 }
41
+ },
42
+ "additionalProperties": false
43
+ }
44
+ }
45
+ },
46
+ "additionalProperties": false
47
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://wefter.dev/schemas/run-manifest.schema.json",
4
+ "type": "object",
5
+ "required": ["version", "runId", "generatedAt", "paths"],
6
+ "properties": {
7
+ "version": { "const": 1 },
8
+ "workflowId": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
9
+ "runId": { "type": "string", "minLength": 1 },
10
+ "generatedAt": { "type": "string", "format": "date-time" },
11
+ "paths": { "type": "object" }
12
+ },
13
+ "additionalProperties": true
14
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://wefter.dev/schemas/wefter.config.schema.json",
4
+ "type": "object",
5
+ "required": ["version", "workflowRoot", "profilePath", "artifactRoot", "templateRoot", "processDocPath", "runnerCommand", "workflows"],
6
+ "properties": {
7
+ "$schema": { "type": "string" },
8
+ "version": { "const": 1 },
9
+ "workflowRoot": { "type": "string", "minLength": 1 },
10
+ "profilePath": { "type": "string", "minLength": 1 },
11
+ "artifactRoot": { "type": "string", "minLength": 1 },
12
+ "templateRoot": { "type": "string", "minLength": 1 },
13
+ "processDocPath": { "type": "string", "minLength": 1 },
14
+ "runnerCommand": { "type": "string", "minLength": 1 },
15
+ "workflows": {
16
+ "type": "object",
17
+ "additionalProperties": {
18
+ "type": "object",
19
+ "required": ["status", "enabled"],
20
+ "properties": {
21
+ "status": { "enum": ["available", "planned"] },
22
+ "enabled": { "type": "boolean" },
23
+ "profilePath": { "type": "string", "minLength": 1 },
24
+ "configPath": { "type": "string", "minLength": 1 }
25
+ },
26
+ "additionalProperties": false
27
+ }
28
+ }
29
+ },
30
+ "additionalProperties": false
31
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://wefter.dev/schemas/work-unit-config.schema.json",
4
+ "type": "object",
5
+ "required": ["version", "workflowName", "releaseId", "workUnitsDocument", "sourceDocs", "runArtifactsRoot", "versionedArtifacts", "defaultWorkUnitId", "defaultPlanAuditPassesPerLens", "gatePolicy"],
6
+ "properties": {
7
+ "version": { "const": 1 },
8
+ "workflowName": { "const": "work-unit-implementation" },
9
+ "releaseId": { "type": "string", "minLength": 1 },
10
+ "workUnitsDocument": { "type": "string", "minLength": 1 },
11
+ "sourceDocs": {
12
+ "type": "object",
13
+ "required": ["include", "exclude"],
14
+ "properties": {
15
+ "include": { "type": "array", "items": { "type": "string", "minLength": 1 } },
16
+ "exclude": { "type": "array", "items": { "type": "string", "minLength": 1 } }
17
+ },
18
+ "additionalProperties": false
19
+ },
20
+ "runArtifactsRoot": { "type": "string", "minLength": 1 },
21
+ "versionedArtifacts": {
22
+ "type": "object",
23
+ "required": ["executionRoot", "decisionLogRoot"],
24
+ "properties": {
25
+ "executionRoot": { "type": "string", "minLength": 1 },
26
+ "decisionLogRoot": { "type": "string", "minLength": 1 }
27
+ },
28
+ "additionalProperties": false
29
+ },
30
+ "defaultWorkUnitId": { "type": "string", "minLength": 1 },
31
+ "defaultPlanAuditPassesPerLens": { "type": "integer", "minimum": 1 },
32
+ "gatePolicy": {
33
+ "type": "object",
34
+ "required": ["mode", "structuralWorkUnits", "alwaysPauseOn"],
35
+ "properties": {
36
+ "mode": { "type": "string", "minLength": 1 },
37
+ "structuralWorkUnits": { "type": "array", "items": { "type": "string", "minLength": 1 } },
38
+ "alwaysPauseOn": { "type": "array", "items": { "type": "string", "minLength": 1 } }
39
+ },
40
+ "additionalProperties": false
41
+ }
42
+ },
43
+ "additionalProperties": false
44
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://wefter.dev/schemas/work-unit-profile.schema.json",
4
+ "type": "object",
5
+ "required": ["version", "variants", "lenses"],
6
+ "properties": {
7
+ "version": { "const": 1 },
8
+ "variants": {
9
+ "type": "array",
10
+ "minItems": 1,
11
+ "items": {
12
+ "type": "object",
13
+ "required": ["id", "title", "instruction"],
14
+ "properties": {
15
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
16
+ "title": { "type": "string", "minLength": 1 },
17
+ "instruction": { "type": "string", "minLength": 1 }
18
+ },
19
+ "additionalProperties": false
20
+ }
21
+ },
22
+ "lenses": {
23
+ "type": "array",
24
+ "minItems": 1,
25
+ "items": {
26
+ "type": "object",
27
+ "required": ["id", "title", "focus"],
28
+ "properties": {
29
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
30
+ "title": { "type": "string", "minLength": 1 },
31
+ "focus": { "type": "string", "minLength": 1 }
32
+ },
33
+ "additionalProperties": false
34
+ }
35
+ }
36
+ },
37
+ "additionalProperties": false
38
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://wefter.dev/schemas/work-unit-review-result.schema.json",
4
+ "type": "object",
5
+ "required": ["taskId", "result", "reviewIteration", "blockingFindings"],
6
+ "properties": {
7
+ "taskId": { "type": "string", "minLength": 1 },
8
+ "result": { "enum": ["Pass", "Needs Fix", "Blocked"] },
9
+ "reviewIteration": { "type": "integer", "minimum": 1 },
10
+ "blockingFindings": { "type": "array", "items": { "type": "string" } }
11
+ },
12
+ "additionalProperties": false
13
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://wefter.dev/schemas/workflow-manifest.schema.json",
4
+ "type": "object",
5
+ "required": ["id", "status", "title", "summary", "commands"],
6
+ "properties": {
7
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
8
+ "status": { "enum": ["available", "planned"] },
9
+ "title": { "type": "string", "minLength": 1 },
10
+ "summary": { "type": "string", "minLength": 1 },
11
+ "commands": {
12
+ "type": "object",
13
+ "properties": {
14
+ "cli": { "type": "array", "items": { "type": "string", "minLength": 1 } },
15
+ "opencode": { "type": "array", "items": { "type": "string", "minLength": 1 } }
16
+ },
17
+ "additionalProperties": false
18
+ }
19
+ },
20
+ "additionalProperties": true
21
+ }