@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.
Files changed (94) hide show
  1. package/CHANGELOG.md +25 -14
  2. package/LICENSE +21 -21
  3. package/README.md +125 -112
  4. package/bin/wefter.js +8 -8
  5. package/docs/ARCHITECTURE.md +75 -79
  6. package/docs/INSTALLATION.md +47 -46
  7. package/docs/SAFETY_MODEL.md +17 -17
  8. package/docs/SELF_AUDIT.md +35 -0
  9. package/docs/WORKFLOWS.md +15 -13
  10. package/package.json +45 -45
  11. package/schemas/documentation-audit-profile.schema.json +55 -47
  12. package/schemas/product-shaping-config.schema.json +63 -0
  13. package/schemas/product-shaping-contract.schema.json +204 -0
  14. package/schemas/product-shaping-profile.schema.json +39 -0
  15. package/schemas/product-shaping-run-manifest.schema.json +103 -0
  16. package/schemas/run-manifest.schema.json +14 -14
  17. package/schemas/wefter.config.schema.json +62 -31
  18. package/schemas/work-unit-config.schema.json +44 -44
  19. package/schemas/work-unit-profile.schema.json +38 -38
  20. package/schemas/work-unit-review-result.schema.json +13 -13
  21. package/schemas/workflow-manifest.schema.json +21 -21
  22. package/src/cli/main.js +2646 -1858
  23. package/src/workflows/documentation-audit/README.md +37 -37
  24. package/src/workflows/documentation-audit/templates/README.md.tmpl +47 -47
  25. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-consolidator.md.tmpl +27 -27
  26. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-orchestrator.md.tmpl +65 -65
  27. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-profile-builder.md.tmpl +58 -58
  28. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-validator.md.tmpl +26 -26
  29. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-auditor.md.tmpl +28 -28
  30. package/src/workflows/documentation-audit/templates/opencode/skills/documentation-audit/SKILL.md.tmpl +38 -38
  31. package/src/workflows/documentation-audit/templates/prompts/auditor-prompt.md +97 -97
  32. package/src/workflows/documentation-audit/templates/prompts/consolidator-prompt.md +84 -84
  33. package/src/workflows/documentation-audit/templates/prompts/validator-prompt.md +92 -92
  34. package/src/workflows/documentation-audit/workflow.json +24 -24
  35. package/src/workflows/documentation-repair/README.md +11 -11
  36. package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repair-orchestrator.md.tmpl +33 -33
  37. package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repair-planner.md.tmpl +17 -17
  38. package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repair-reviewer.md.tmpl +17 -17
  39. package/src/workflows/documentation-repair/templates/opencode/agent/wefter-doc-repairer.md.tmpl +14 -14
  40. package/src/workflows/documentation-repair/templates/opencode/skills/documentation-repair/SKILL.md.tmpl +17 -17
  41. package/src/workflows/documentation-repair/templates/prompts/repair-apply-prompt.md +43 -43
  42. package/src/workflows/documentation-repair/templates/prompts/repair-plan-prompt.md +73 -73
  43. package/src/workflows/documentation-repair/templates/prompts/repair-review-prompt.md +47 -47
  44. package/src/workflows/documentation-repair/workflow.json +10 -10
  45. package/src/workflows/product-shaping/README.md +1245 -7
  46. package/src/workflows/product-shaping/compatibility.md +33 -0
  47. package/src/workflows/product-shaping/contracts/product-spec-contract.json +250 -0
  48. package/src/workflows/product-shaping/templates/default-config.json +34 -0
  49. package/src/workflows/product-shaping/templates/default-profile.json +48 -0
  50. package/src/workflows/product-shaping/templates/documentation-audit/workflow-self-audit-auditor-prompt.md +116 -0
  51. package/src/workflows/product-shaping/templates/documentation-audit-profile.json +80 -0
  52. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-auditor.md.tmpl +22 -0
  53. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-domain-modeler.md.tmpl +31 -0
  54. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-intake-analyst.md.tmpl +31 -0
  55. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-orchestrator.md.tmpl +48 -0
  56. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-reference-researcher.md.tmpl +29 -0
  57. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-release-planner.md.tmpl +34 -0
  58. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-repairer.md.tmpl +25 -0
  59. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-shaper.md.tmpl +31 -0
  60. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-validator.md.tmpl +23 -0
  61. package/src/workflows/product-shaping/templates/opencode/skills/product-shaping/SKILL.md.tmpl +45 -0
  62. package/src/workflows/product-shaping/templates/prompts/domain-modeler-prompt.md +27 -0
  63. package/src/workflows/product-shaping/templates/prompts/intake-prompt.md +30 -0
  64. package/src/workflows/product-shaping/templates/prompts/product-auditor-prompt.md +53 -0
  65. package/src/workflows/product-shaping/templates/prompts/product-repairer-prompt.md +25 -0
  66. package/src/workflows/product-shaping/templates/prompts/product-shaper-prompt.md +26 -0
  67. package/src/workflows/product-shaping/templates/prompts/product-validator-prompt.md +55 -0
  68. package/src/workflows/product-shaping/templates/prompts/reference-research-prompt.md +25 -0
  69. package/src/workflows/product-shaping/templates/prompts/release-planner-prompt.md +34 -0
  70. package/src/workflows/product-shaping/workflow.json +33 -10
  71. package/src/workflows/technical-shaping/README.md +5 -5
  72. package/src/workflows/technical-shaping/workflow.json +10 -10
  73. package/src/workflows/work-unit-implementation/README.md +71 -71
  74. package/src/workflows/work-unit-implementation/templates/default-config.json +46 -46
  75. package/src/workflows/work-unit-implementation/templates/default-profile.json +57 -57
  76. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-orchestrator.md.tmpl +62 -62
  77. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-auditor.md.tmpl +26 -26
  78. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-consolidator.md.tmpl +26 -26
  79. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-repairer.md.tmpl +25 -25
  80. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-plan-validator.md.tmpl +25 -25
  81. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-planner.md.tmpl +27 -27
  82. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-task-implementer.md.tmpl +30 -30
  83. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-task-reviewer.md.tmpl +28 -28
  84. package/src/workflows/work-unit-implementation/templates/opencode/agent/wefter-work-unit-validator.md.tmpl +26 -26
  85. package/src/workflows/work-unit-implementation/templates/opencode/skills/work-unit-implementation/SKILL.md.tmpl +25 -25
  86. package/src/workflows/work-unit-implementation/templates/prompts/plan-auditor-prompt.md +89 -89
  87. package/src/workflows/work-unit-implementation/templates/prompts/plan-consolidator-prompt.md +64 -64
  88. package/src/workflows/work-unit-implementation/templates/prompts/plan-repairer-prompt.md +42 -42
  89. package/src/workflows/work-unit-implementation/templates/prompts/plan-validator-prompt.md +84 -84
  90. package/src/workflows/work-unit-implementation/templates/prompts/planner-prompt.md +150 -150
  91. package/src/workflows/work-unit-implementation/templates/prompts/task-implementation-prompt.md +57 -57
  92. package/src/workflows/work-unit-implementation/templates/prompts/task-review-prompt.md +69 -69
  93. package/src/workflows/work-unit-implementation/templates/prompts/work-unit-validator-prompt.md +50 -50
  94. package/src/workflows/work-unit-implementation/workflow.json +14 -14
@@ -0,0 +1,35 @@
1
+ # Self Audit
2
+
3
+ Wefter can run `documentation-audit` against its own workflow source before publishing a workflow as available.
4
+
5
+ The CLI command generates the audit run and auditor prompts. It does not execute the prompts by itself; a documentation-audit orchestrator or agent must resume the generated run and complete the raw audit, consolidation and validation steps.
6
+
7
+ Use this pattern for any workflow-specific audit profile:
8
+
9
+ ```bash
10
+ node bin/wefter.js docs audit --profile-path <workflow-audit-profile.json> --run-name <workflow-id>-self-audit --passes-per-lens 1 --max-audits 0
11
+ ```
12
+
13
+ `--max-audits 0` means no audit prompt cap.
14
+
15
+ Product-shaping example:
16
+
17
+ ```bash
18
+ node bin/wefter.js docs audit --profile-path src/workflows/product-shaping/templates/documentation-audit-profile.json --run-name product-shaping-self-audit --passes-per-lens 1 --max-audits 0
19
+ ```
20
+
21
+ Seed prompt:
22
+
23
+ ```text
24
+ Audit the current workflow release against CHANGELOG.md and the workflow README.
25
+ Focus on doctrine drift, missing runtime enforcement, handoff or gate bypasses, OpenCode execution gaps, schema/contract mismatch, weak tests and release artifacts that should not be committed.
26
+ Treat prior review findings as hypotheses, not conclusions.
27
+ ```
28
+
29
+ After the run is generated, resume it with:
30
+
31
+ ```text
32
+ Resume the documentation audit run at .wefter/runs/documentation-audit/<run-id>.
33
+ Read manifest.json, execute every auditor prompt listed there, write each raw output to its assigned path, then run prompts/consolidate.md and prompts/validate.md.
34
+ Do not edit source files. Write only under the run directory.
35
+ ```
package/docs/WORKFLOWS.md CHANGED
@@ -1,13 +1,15 @@
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.
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 product validate` | `/wefter-shape-product` | Available |
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 `0.2.0` release promotes `product-shaping` to available. `documentation-audit` remains executable end-to-end. `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.
14
+
15
+ For workflow dogfooding and release self-audit, see `docs/SELF_AUDIT.md`.
package/package.json CHANGED
@@ -1,45 +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
- }
1
+ {
2
+ "name": "@wefter/opencode",
3
+ "version": "0.2.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
+ }
@@ -1,47 +1,55 @@
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
- }
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
+ "auditorPromptPath": { "$ref": "#/$defs/relativePath" },
9
+ "corpus": {
10
+ "type": "object",
11
+ "required": ["include", "exclude"],
12
+ "properties": {
13
+ "include": { "type": "array", "items": { "type": "string", "minLength": 1 } },
14
+ "exclude": { "type": "array", "items": { "type": "string", "minLength": 1 } }
15
+ },
16
+ "additionalProperties": false
17
+ },
18
+ "variants": {
19
+ "type": "array",
20
+ "minItems": 1,
21
+ "items": {
22
+ "type": "object",
23
+ "required": ["id", "title", "instruction"],
24
+ "properties": {
25
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
26
+ "title": { "type": "string", "minLength": 1 },
27
+ "instruction": { "type": "string", "minLength": 1 }
28
+ },
29
+ "additionalProperties": false
30
+ }
31
+ },
32
+ "lenses": {
33
+ "type": "array",
34
+ "minItems": 1,
35
+ "items": {
36
+ "type": "object",
37
+ "required": ["id", "title", "focus"],
38
+ "properties": {
39
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
40
+ "title": { "type": "string", "minLength": 1 },
41
+ "focus": { "type": "string", "minLength": 1 }
42
+ },
43
+ "additionalProperties": false
44
+ }
45
+ }
46
+ },
47
+ "additionalProperties": false,
48
+ "$defs": {
49
+ "relativePath": {
50
+ "type": "string",
51
+ "minLength": 1,
52
+ "pattern": "^(?![A-Za-z]:)(?![\\\\/])(?!.*(?:^|/)\\.\\.(?:/|$))[^\\\\\r\n]+$"
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://wefter.dev/schemas/product-shaping-config.schema.json",
4
+ "type": "object",
5
+ "required": ["version", "workflowName", "releaseId", "specRoot", "runRoot", "contractPath", "processDocPath", "requiredFiles", "completionGate"],
6
+ "properties": {
7
+ "version": { "const": 1 },
8
+ "workflowName": { "const": "product-shaping" },
9
+ "releaseId": { "type": "string", "minLength": 1 },
10
+ "specRoot": { "$ref": "#/$defs/relativePath", "default": ".wefter/specs" },
11
+ "runRoot": { "$ref": "#/$defs/relativePath", "default": ".wefter/runs/product-shaping" },
12
+ "contractPath": { "$ref": "#/$defs/relativePath" },
13
+ "processDocPath": { "$ref": "#/$defs/relativePath" },
14
+ "requiredFiles": {
15
+ "type": "array",
16
+ "minItems": 17,
17
+ "maxItems": 17,
18
+ "prefixItems": [
19
+ { "const": "README.md" },
20
+ { "const": "discovery/SOURCE_MATERIALS.md" },
21
+ { "const": "discovery/IDEA_BRIEF.md" },
22
+ { "const": "discovery/OPEN_QUESTIONS.md" },
23
+ { "const": "references/README.md" },
24
+ { "const": "PRODUCT_VISION.md" },
25
+ { "const": "product/FEATURE_CATALOG.md" },
26
+ { "const": "product/MODULE_ROADMAP.md" },
27
+ { "const": "product/DOMAIN_MODEL.md" },
28
+ { "const": "product/OPERATIONAL_FLOW.md" },
29
+ { "const": "product/PRODUCT_DECISIONS.md" },
30
+ { "const": "releases/README.md" },
31
+ { "const": "releases/<release-id>/README.md" },
32
+ { "const": "releases/<release-id>/SCOPE.md" },
33
+ { "const": "releases/<release-id>/DOMAIN_SPEC.md" },
34
+ { "const": "releases/<release-id>/ACCEPTANCE_CRITERIA.md" },
35
+ { "const": "releases/<release-id>/DELIVERABLES.md" }
36
+ ],
37
+ "items": false
38
+ },
39
+ "completionGate": {
40
+ "type": "object",
41
+ "required": ["requireNoReleaseBlockingQuestions", "requireAdversarialReview", "requireFinalValidation", "readyDeliverableStatuses"],
42
+ "properties": {
43
+ "requireNoReleaseBlockingQuestions": { "type": "boolean" },
44
+ "requireAdversarialReview": { "const": true },
45
+ "requireFinalValidation": { "const": true },
46
+ "readyDeliverableStatuses": {
47
+ "type": "array",
48
+ "minItems": 1,
49
+ "items": { "enum": ["ready"] }
50
+ }
51
+ },
52
+ "additionalProperties": false
53
+ }
54
+ },
55
+ "additionalProperties": false,
56
+ "$defs": {
57
+ "relativePath": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "pattern": "^(?![A-Za-z]:)(?![\\\\/])(?!.*(?:^|/)\\.\\.(?:/|$))[^\\\\\r\n]+$"
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,204 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://wefter.dev/schemas/product-shaping-contract.schema.json",
4
+ "type": "object",
5
+ "required": ["version", "workflowId", "defaultRoots", "vocabulary", "statusEnums", "dynamicCollections", "creationOrderScope", "creationOrder", "utilizationOrder", "precedence", "requiredFiles"],
6
+ "properties": {
7
+ "version": { "const": 1 },
8
+ "workflowId": { "const": "product-shaping" },
9
+ "defaultRoots": {
10
+ "type": "object",
11
+ "required": ["specRoot", "workflowRoot", "runRoot"],
12
+ "properties": {
13
+ "specRoot": { "const": ".wefter/specs" },
14
+ "workflowRoot": { "const": ".wefter/workflows" },
15
+ "runRoot": { "const": ".wefter/runs/product-shaping" }
16
+ },
17
+ "additionalProperties": false
18
+ },
19
+ "vocabulary": {
20
+ "type": "array",
21
+ "minItems": 5,
22
+ "maxItems": 5,
23
+ "prefixItems": [
24
+ { "const": "idea" },
25
+ { "const": "product specs" },
26
+ { "const": "release" },
27
+ { "const": "deliverable" },
28
+ { "const": "task" }
29
+ ],
30
+ "items": false
31
+ },
32
+ "statusEnums": {
33
+ "type": "object",
34
+ "required": ["feature", "question", "decision", "deliverable"],
35
+ "properties": {
36
+ "feature": { "const": ["candidate", "core", "future", "rejected", "needs-decision"] },
37
+ "question": { "const": ["open", "answered", "deferred", "obsolete"] },
38
+ "decision": { "const": ["accepted", "superseded", "rejected"] },
39
+ "deliverable": { "const": ["candidate", "ready", "blocked", "deferred", "done"] }
40
+ },
41
+ "additionalProperties": false
42
+ },
43
+ "dynamicCollections": {
44
+ "type": "object",
45
+ "required": ["references"],
46
+ "properties": {
47
+ "references": {
48
+ "type": "object",
49
+ "required": ["index", "itemPattern", "listingPattern", "creationOrder", "zeroItemsAllowedWithExplicitIndexStatement", "rule"],
50
+ "properties": {
51
+ "index": { "const": "references/README.md" },
52
+ "itemPattern": { "const": "references/<reference>.md" },
53
+ "listingPattern": { "const": "references/<reference>.md" },
54
+ "creationOrder": { "type": "string", "minLength": 1 },
55
+ "zeroItemsAllowedWithExplicitIndexStatement": { "const": true },
56
+ "rule": { "type": "string", "minLength": 1 }
57
+ },
58
+ "additionalProperties": false
59
+ }
60
+ },
61
+ "additionalProperties": false
62
+ },
63
+ "creationOrderScope": { "const": "fixed-required-files" },
64
+ "creationOrder": { "$ref": "#/$defs/creationOrder" },
65
+ "utilizationOrder": { "$ref": "#/$defs/utilizationOrder" },
66
+ "precedence": {
67
+ "type": "object",
68
+ "required": ["release", "product", "decision", "blockingQuestionRule"],
69
+ "properties": {
70
+ "release": { "$ref": "#/$defs/pathList" },
71
+ "product": { "$ref": "#/$defs/pathList" },
72
+ "decision": { "type": "string", "minLength": 1 },
73
+ "blockingQuestionRule": { "type": "string", "minLength": 1 }
74
+ },
75
+ "additionalProperties": false
76
+ },
77
+ "requiredFiles": {
78
+ "type": "array",
79
+ "minItems": 17,
80
+ "maxItems": 17,
81
+ "items": {
82
+ "type": "object",
83
+ "required": ["path", "responsibility", "limits", "createdAfter", "usedBefore", "consumers", "minimumContent", "hardRules"],
84
+ "properties": {
85
+ "path": { "$ref": "#/$defs/requiredFilePath" },
86
+ "responsibility": { "type": "string", "minLength": 1 },
87
+ "limits": { "type": "string", "minLength": 1 },
88
+ "createdAfter": { "$ref": "#/$defs/pathList" },
89
+ "usedBefore": { "$ref": "#/$defs/pathList" },
90
+ "consumers": { "$ref": "#/$defs/stringList" },
91
+ "minimumContent": { "$ref": "#/$defs/stringList" },
92
+ "hardRules": { "$ref": "#/$defs/stringList" }
93
+ },
94
+ "additionalProperties": false
95
+ },
96
+ "allOf": [
97
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "README.md" } } } },
98
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "discovery/SOURCE_MATERIALS.md" } } } },
99
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "discovery/IDEA_BRIEF.md" } } } },
100
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "discovery/OPEN_QUESTIONS.md" } } } },
101
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "references/README.md" } } } },
102
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "PRODUCT_VISION.md" } } } },
103
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "product/FEATURE_CATALOG.md" } } } },
104
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "product/MODULE_ROADMAP.md" } } } },
105
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "product/DOMAIN_MODEL.md" } } } },
106
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "product/OPERATIONAL_FLOW.md" } } } },
107
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "product/PRODUCT_DECISIONS.md" } } } },
108
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "releases/README.md" } } } },
109
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "releases/<release-id>/README.md" } } } },
110
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "releases/<release-id>/SCOPE.md" } } } },
111
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "releases/<release-id>/DOMAIN_SPEC.md" } } } },
112
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "releases/<release-id>/ACCEPTANCE_CRITERIA.md" } } } },
113
+ { "contains": { "type": "object", "required": ["path"], "properties": { "path": { "const": "releases/<release-id>/DELIVERABLES.md" } } } }
114
+ ]
115
+ }
116
+ },
117
+ "additionalProperties": false,
118
+ "$defs": {
119
+ "pathList": {
120
+ "type": "array",
121
+ "items": { "type": "string", "minLength": 1 }
122
+ },
123
+ "requiredFilePath": {
124
+ "enum": [
125
+ "README.md",
126
+ "discovery/SOURCE_MATERIALS.md",
127
+ "discovery/IDEA_BRIEF.md",
128
+ "discovery/OPEN_QUESTIONS.md",
129
+ "references/README.md",
130
+ "PRODUCT_VISION.md",
131
+ "product/FEATURE_CATALOG.md",
132
+ "product/MODULE_ROADMAP.md",
133
+ "product/DOMAIN_MODEL.md",
134
+ "product/OPERATIONAL_FLOW.md",
135
+ "product/PRODUCT_DECISIONS.md",
136
+ "releases/README.md",
137
+ "releases/<release-id>/README.md",
138
+ "releases/<release-id>/SCOPE.md",
139
+ "releases/<release-id>/DOMAIN_SPEC.md",
140
+ "releases/<release-id>/ACCEPTANCE_CRITERIA.md",
141
+ "releases/<release-id>/DELIVERABLES.md"
142
+ ]
143
+ },
144
+ "creationOrder": {
145
+ "type": "array",
146
+ "minItems": 17,
147
+ "maxItems": 17,
148
+ "prefixItems": [
149
+ { "const": "README.md" },
150
+ { "const": "discovery/SOURCE_MATERIALS.md" },
151
+ { "const": "discovery/IDEA_BRIEF.md" },
152
+ { "const": "discovery/OPEN_QUESTIONS.md" },
153
+ { "const": "references/README.md" },
154
+ { "const": "PRODUCT_VISION.md" },
155
+ { "const": "product/FEATURE_CATALOG.md" },
156
+ { "const": "product/MODULE_ROADMAP.md" },
157
+ { "const": "product/DOMAIN_MODEL.md" },
158
+ { "const": "product/OPERATIONAL_FLOW.md" },
159
+ { "const": "product/PRODUCT_DECISIONS.md" },
160
+ { "const": "releases/README.md" },
161
+ { "const": "releases/<release-id>/README.md" },
162
+ { "const": "releases/<release-id>/SCOPE.md" },
163
+ { "const": "releases/<release-id>/DOMAIN_SPEC.md" },
164
+ { "const": "releases/<release-id>/ACCEPTANCE_CRITERIA.md" },
165
+ { "const": "releases/<release-id>/DELIVERABLES.md" }
166
+ ],
167
+ "items": false
168
+ },
169
+ "utilizationOrder": {
170
+ "type": "array",
171
+ "minItems": 15,
172
+ "maxItems": 15,
173
+ "prefixItems": [
174
+ { "const": "README.md" },
175
+ { "const": "releases/<release-id>/README.md" },
176
+ { "const": "PRODUCT_VISION.md" },
177
+ { "const": "product/PRODUCT_DECISIONS.md" },
178
+ { "const": "releases/<release-id>/SCOPE.md" },
179
+ { "const": "releases/<release-id>/DOMAIN_SPEC.md" },
180
+ { "const": "releases/<release-id>/ACCEPTANCE_CRITERIA.md" },
181
+ { "const": "releases/<release-id>/DELIVERABLES.md" },
182
+ { "const": "product/DOMAIN_MODEL.md" },
183
+ { "const": "product/OPERATIONAL_FLOW.md" },
184
+ { "const": "product/FEATURE_CATALOG.md" },
185
+ { "const": "product/MODULE_ROADMAP.md" },
186
+ { "const": "discovery/OPEN_QUESTIONS.md" },
187
+ { "const": "discovery/IDEA_BRIEF.md" },
188
+ { "const": "references/" }
189
+ ],
190
+ "items": false
191
+ },
192
+ "stringList": {
193
+ "type": "array",
194
+ "minItems": 1,
195
+ "items": { "type": "string", "minLength": 1 }
196
+ },
197
+ "stringEnum": {
198
+ "type": "array",
199
+ "minItems": 1,
200
+ "uniqueItems": true,
201
+ "items": { "type": "string", "minLength": 1 }
202
+ }
203
+ }
204
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://wefter.dev/schemas/product-shaping-profile.schema.json",
4
+ "type": "object",
5
+ "required": ["version", "workflowName", "variants", "lenses"],
6
+ "properties": {
7
+ "version": { "const": 1 },
8
+ "workflowName": { "const": "product-shaping" },
9
+ "variants": {
10
+ "type": "array",
11
+ "minItems": 1,
12
+ "items": {
13
+ "type": "object",
14
+ "required": ["id", "title", "instruction"],
15
+ "properties": {
16
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
17
+ "title": { "type": "string", "minLength": 1 },
18
+ "instruction": { "type": "string", "minLength": 1 }
19
+ },
20
+ "additionalProperties": false
21
+ }
22
+ },
23
+ "lenses": {
24
+ "type": "array",
25
+ "minItems": 1,
26
+ "items": {
27
+ "type": "object",
28
+ "required": ["id", "title", "focus"],
29
+ "properties": {
30
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
31
+ "title": { "type": "string", "minLength": 1 },
32
+ "focus": { "type": "string", "minLength": 1 }
33
+ },
34
+ "additionalProperties": false
35
+ }
36
+ }
37
+ },
38
+ "additionalProperties": false
39
+ }