yadflow 4.5.1 → 4.6.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 -0
- package/bin/yad.mjs +7 -3
- package/cli/docs.mjs +1 -1
- package/cli/epic-state.mjs +39 -114
- package/cli/gate.mjs +82 -15
- package/cli/lib.mjs +12 -1
- package/cli/lifecycle/defaults/1.json +96 -0
- package/cli/lifecycle/lifecycle.schema.json +121 -0
- package/cli/lifecycle.mjs +695 -0
- package/cli/pr-list.mjs +44 -0
- package/cli/ship-drift.mjs +353 -0
- package/cli/thread.mjs +46 -3
- package/package.json +4 -3
- package/skills/sdlc/config.yaml +27 -19
- package/skills/yad-backfill/references/backfill.md +8 -1
- package/skills/yad-backfill/templates/checks/backfill-check.sh +50 -2
- package/skills/yad-checks/SKILL.md +13 -0
- package/skills/yad-checks/references/check-gates.md +55 -2
- package/skills/yad-checks/templates/checks/contract-check.sh +313 -35
- package/skills/yad-docs/templates/app/package-lock.json +5 -5
- package/skills/yad-docs/templates/app/package.json +1 -1
- package/skills/yad-epic/references/state-schema.md +8 -4
- package/skills/yad-product-bridge/references/bridge.md +26 -5
- package/skills/yad-product-bridge/templates/github/yad-gate-sync.yml +2 -2
- package/skills/yad-reconcile/SKILL.md +24 -0
- package/skills/yad-review-gate/SKILL.md +4 -2
- package/skills/yad-spec/SKILL.md +5 -1
- package/skills/yad-spec/references/spec-handoff.md +18 -2
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 10,
|
|
3
|
+
"extends": "yadflow-default@1",
|
|
4
|
+
"phases": [
|
|
5
|
+
{ "id": "foundation", "name": "Foundation", "level": "product", "runs": "once", "built": true },
|
|
6
|
+
{ "id": "discover", "name": "Discover", "part": "Shape", "level": "feature", "runs": "once", "built": true },
|
|
7
|
+
{ "id": "design", "name": "Design", "part": "Shape", "level": "feature", "runs": "once", "built": true },
|
|
8
|
+
{ "id": "plan", "name": "Plan", "part": "Shape", "level": "feature", "runs": "once", "built": true },
|
|
9
|
+
{ "id": "build", "name": "Build", "part": "Build", "level": "feature", "runs": "loop", "over": ["story", "repo"], "built": true },
|
|
10
|
+
{ "id": "release", "name": "Release", "part": "Run", "level": "feature", "runs": "loop", "over": ["release"], "built": false },
|
|
11
|
+
{ "id": "operate", "name": "Operate", "part": "Run", "level": "feature", "runs": "once", "built": false }
|
|
12
|
+
],
|
|
13
|
+
"steps": [
|
|
14
|
+
{ "id": "foundation", "name": "Foundation", "phase": "foundation", "kind": "author",
|
|
15
|
+
"artifact": { "type": "set", "path": "foundation/",
|
|
16
|
+
"files": ["purpose.md", "market.md", "scope.md", "mvp.md", "roadmap.md", "stack.md", "repos.md", "risks.md"],
|
|
17
|
+
"optional": ["market.md", "risks.md"] },
|
|
18
|
+
"optional": false, "gate": { "riskTags": [] }, "skills": ["yad-discovery"], "behaviours": ["product-level"],
|
|
19
|
+
"extraPaths": [], "inputs": [], "replaces": "discovery",
|
|
20
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "foundation" } },
|
|
21
|
+
{ "id": "discovery", "name": "Discovery", "phase": "foundation", "kind": "author",
|
|
22
|
+
"artifact": { "type": "set", "path": "discovery/",
|
|
23
|
+
"files": ["market-research.md", "competitor-analysis.md", "current-state.md", "feasibility.md", "requirements.md", "roadmap.md"],
|
|
24
|
+
"optional": [] },
|
|
25
|
+
"optional": false, "gate": { "riskTags": [] }, "skills": ["yad-discovery"], "behaviours": ["product-level"],
|
|
26
|
+
"extraPaths": [], "inputs": [], "retired": true,
|
|
27
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "discovery" } },
|
|
28
|
+
{ "id": "analysis", "name": "Analysis", "phase": "discover", "kind": "author",
|
|
29
|
+
"artifact": { "type": "file", "path": "analysis.md" },
|
|
30
|
+
"optional": false, "gate": { "riskTags": [] }, "skills": ["yad-analysis"], "behaviours": [],
|
|
31
|
+
"extraPaths": [], "inputs": [],
|
|
32
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "analysis" } },
|
|
33
|
+
{ "id": "epic", "name": "Epic", "phase": "discover", "kind": "author",
|
|
34
|
+
"artifact": { "type": "file", "path": "epic.md" },
|
|
35
|
+
"optional": false, "gate": { "riskTags": [] }, "skills": ["yad-epic"], "behaviours": ["work-item-source"],
|
|
36
|
+
"extraPaths": [], "inputs": ["analysis"],
|
|
37
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "epic" } },
|
|
38
|
+
{ "id": "architecture", "name": "Architecture", "phase": "design", "kind": "author",
|
|
39
|
+
"artifact": { "type": "file", "path": "architecture.md" },
|
|
40
|
+
"optional": false, "gate": { "riskTags": ["contract"] }, "skills": ["yad-architecture"], "behaviours": ["locks-contract"],
|
|
41
|
+
"extraPaths": ["contract.md", ".sdlc/contract-lock.json"], "inputs": ["epic"],
|
|
42
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "architecture" } },
|
|
43
|
+
{ "id": "ui-design", "name": "UI design", "phase": "design", "kind": "author",
|
|
44
|
+
"artifact": { "type": "file", "path": "ui-design.md" },
|
|
45
|
+
"optional": false, "gate": { "riskTags": [] }, "skills": ["yad-ui"], "behaviours": [],
|
|
46
|
+
"extraPaths": ["DESIGN.md", ".sdlc/design-links.json"], "inputs": ["epic", "architecture"],
|
|
47
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "ui-design" } },
|
|
48
|
+
{ "id": "stories", "name": "Stories", "phase": "plan", "kind": "author",
|
|
49
|
+
"artifact": { "type": "folder", "path": "stories/", "unit": "story" },
|
|
50
|
+
"optional": false, "gate": { "riskTags": [] }, "skills": ["yad-stories"], "behaviours": ["ends-shape"],
|
|
51
|
+
"extraPaths": [], "inputs": ["epic", "architecture", "ui-design"],
|
|
52
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "stories" } },
|
|
53
|
+
{ "id": "test-cases", "name": "Test cases", "phase": "plan", "kind": "author",
|
|
54
|
+
"artifact": { "type": "file", "path": "test-cases.md" },
|
|
55
|
+
"optional": false, "gate": { "riskTags": [] }, "skills": ["yad-test-cases"], "behaviours": ["parallel-with-build"],
|
|
56
|
+
"extraPaths": [".sdlc/test-links.json"], "inputs": ["stories"],
|
|
57
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "test-cases" } },
|
|
58
|
+
{ "id": "spec", "name": "Spec", "phase": "build", "kind": "author",
|
|
59
|
+
"artifact": null,
|
|
60
|
+
"optional": false, "gate": null, "skills": ["yad-spec"], "behaviours": ["spec-source"],
|
|
61
|
+
"extraPaths": [], "inputs": ["stories"],
|
|
62
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "spec" } },
|
|
63
|
+
{ "id": "tasks", "name": "Tasks", "phase": "build", "kind": "author",
|
|
64
|
+
"artifact": null,
|
|
65
|
+
"optional": false, "gate": null, "skills": ["yad-spec"], "behaviours": [],
|
|
66
|
+
"extraPaths": [], "inputs": ["spec"],
|
|
67
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "tasks" } },
|
|
68
|
+
{ "id": "implement", "name": "Implement", "phase": "build", "kind": "author",
|
|
69
|
+
"artifact": null,
|
|
70
|
+
"optional": false, "gate": null, "skills": ["yad-implement"], "behaviours": ["code-change"],
|
|
71
|
+
"extraPaths": [], "inputs": ["tasks"],
|
|
72
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "implement" } },
|
|
73
|
+
{ "id": "checks", "name": "Checks", "phase": "build", "kind": "author",
|
|
74
|
+
"artifact": null,
|
|
75
|
+
"optional": false, "gate": null, "skills": ["yad-checks"], "behaviours": ["ci-gates"],
|
|
76
|
+
"extraPaths": [], "inputs": ["implement"],
|
|
77
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "checks" } },
|
|
78
|
+
{ "id": "engineer-review", "name": "Engineer review", "phase": "build", "kind": "review",
|
|
79
|
+
"artifact": null,
|
|
80
|
+
"optional": false, "gate": null, "skills": ["yad-engineer-review"], "behaviours": ["merge-gate"],
|
|
81
|
+
"extraPaths": [], "inputs": ["checks"],
|
|
82
|
+
"provider": { "id": "yadflow", "version": 1, "origin": "engineer-review" } }
|
|
83
|
+
],
|
|
84
|
+
"routes": [
|
|
85
|
+
{ "id": "classic", "name": "the 10-step chain",
|
|
86
|
+
"steps": ["epic", "architecture", { "id": "ui-design", "optional": true }, "stories", "test-cases"] },
|
|
87
|
+
{ "id": "analysis-first", "name": "the 12-step chain",
|
|
88
|
+
"steps": ["analysis", "epic", "architecture", { "id": "ui-design", "optional": true }, "stories", "test-cases"] },
|
|
89
|
+
{ "id": "chore", "name": "the upkeep lane", "steps": ["epic", "stories"] },
|
|
90
|
+
{ "id": "spike", "name": "the investigation lane", "steps": ["analysis", "epic", "stories"] },
|
|
91
|
+
{ "id": "discovery", "name": "the product front-zero", "steps": ["discovery"], "retired": true },
|
|
92
|
+
{ "id": "foundation", "name": "the Product Foundation", "steps": ["foundation"] },
|
|
93
|
+
{ "id": "lane", "name": "the Build lane", "steps": ["spec", "tasks", "implement", "checks", "engineer-review"] }
|
|
94
|
+
],
|
|
95
|
+
"plugins": []
|
|
96
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/abdelrahmannasr/yadflow/cli/lifecycle/lifecycle.schema.json",
|
|
4
|
+
"title": "yadflow lifecycle definition, version 1",
|
|
5
|
+
"description": "The phases, steps and routes of a yadflow lifecycle. For editors only: yadflow checks a file with its own validator (lifecycleProblems in cli/lifecycle.mjs), which also applies rules a schema cannot express — the behaviour rules; a Build phase runs in a loop and a loop names what it loops \"over\"; a \"set\" artifact lists its \"files\"; a step whose id yadflow ships keeps \"provider\": { \"id\": \"yadflow\", \"origin\": <its id> } and the files it shipped with; no two steps claim files a review branch finds by one name; a Build-loop step has no gate and is never optional. Unknown keys are allowed so a file from a newer yadflow still loads.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schemaVersion", "phases", "steps", "routes"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string", "description": "Optional: binds this schema in an editor." },
|
|
10
|
+
"schemaVersion": { "type": "integer", "description": "The project's file shape when the file was written." },
|
|
11
|
+
"extends": { "type": "string", "pattern": "^yadflow-default@[1-9][0-9]*$", "description": "The shipped default this file was copied from." },
|
|
12
|
+
"phases": { "type": "array", "items": { "$ref": "#/$defs/phase" } },
|
|
13
|
+
"steps": { "type": "array", "items": { "$ref": "#/$defs/step" } },
|
|
14
|
+
"routes": { "type": "array", "items": { "$ref": "#/$defs/route" } },
|
|
15
|
+
"plugins": { "type": "array", "description": "Reserved for plugins (E142)." }
|
|
16
|
+
},
|
|
17
|
+
"$defs": {
|
|
18
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
19
|
+
"phase": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"required": ["id", "name", "level"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"id": { "$ref": "#/$defs/id" },
|
|
24
|
+
"name": { "type": "string", "minLength": 1 },
|
|
25
|
+
"description": { "type": "string" },
|
|
26
|
+
"part": { "enum": ["Shape", "Build", "Run"], "description": "Feature phases only; a product phase belongs to no part." },
|
|
27
|
+
"level": { "enum": ["feature", "product"] },
|
|
28
|
+
"runs": { "enum": ["once", "loop"], "default": "once" },
|
|
29
|
+
"over": { "type": "array", "items": { "type": "string" }, "description": "For a loop: what it loops over, such as story and repo." },
|
|
30
|
+
"built": { "type": "boolean", "default": true }
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"artifact": {
|
|
34
|
+
"oneOf": [
|
|
35
|
+
{ "type": "null" },
|
|
36
|
+
{
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["type", "path"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"type": { "enum": ["file", "folder", "set"] },
|
|
41
|
+
"path": { "type": "string", "minLength": 1, "description": "Relative to the epic folder. For a \"set\", the path is the set's name, written like a folder (\"foundation/\"); it is the key its review branch uses, not a folder on disk: the set's files sit directly in the set's epic folder." },
|
|
42
|
+
"unit": { "type": "string", "description": "A folder: the word for one item in it, such as story." },
|
|
43
|
+
"files": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1, "pattern": "^(?!\\.\\.?$)[^/\\\\]+$" }, "description": "A set: every file in it, by name; the files sit directly in the set's epic folder." },
|
|
44
|
+
"optional": { "type": "array", "items": { "type": "string" }, "description": "A set: the files it may leave out." },
|
|
45
|
+
"in": { "enum": ["product", "repo"], "description": "Reserved." }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"gate": {
|
|
51
|
+
"oneOf": [
|
|
52
|
+
{ "type": "null" },
|
|
53
|
+
{
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"riskTags": { "type": "array", "items": { "type": "string" } },
|
|
57
|
+
"skills": { "type": "array", "items": { "type": "string" } }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"provider": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"properties": {
|
|
65
|
+
"id": { "type": "string" },
|
|
66
|
+
"version": { "type": "integer" },
|
|
67
|
+
"origin": { "type": "string", "description": "The step's original id, so a rename is not a removal." }
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"step": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"required": ["id", "name", "phase", "kind"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"id": { "$ref": "#/$defs/id" },
|
|
75
|
+
"name": { "type": "string", "minLength": 1 },
|
|
76
|
+
"description": { "type": "string" },
|
|
77
|
+
"phase": { "type": "string" },
|
|
78
|
+
"kind": { "enum": ["author", "review"] },
|
|
79
|
+
"artifact": { "$ref": "#/$defs/artifact" },
|
|
80
|
+
"optional": { "type": "boolean", "default": false },
|
|
81
|
+
"gate": { "$ref": "#/$defs/gate" },
|
|
82
|
+
"skills": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
83
|
+
"behaviours": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": { "enum": ["work-item-source", "locks-contract", "ends-shape", "parallel-with-build", "product-level", "spec-source", "code-change", "ci-gates", "merge-gate"] }
|
|
86
|
+
},
|
|
87
|
+
"extraPaths": { "type": "array", "items": { "type": "string", "minLength": 1, "pattern": "[^/]$" } },
|
|
88
|
+
"inputs": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
89
|
+
"retired": { "type": "boolean", "default": false },
|
|
90
|
+
"replaces": { "type": "string" },
|
|
91
|
+
"provider": { "$ref": "#/$defs/provider" }
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"route": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"required": ["id", "name", "steps"],
|
|
97
|
+
"properties": {
|
|
98
|
+
"id": { "$ref": "#/$defs/id" },
|
|
99
|
+
"name": { "type": "string", "minLength": 1 },
|
|
100
|
+
"description": { "type": "string" },
|
|
101
|
+
"steps": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"minItems": 1,
|
|
104
|
+
"items": {
|
|
105
|
+
"oneOf": [
|
|
106
|
+
{ "type": "string" },
|
|
107
|
+
{
|
|
108
|
+
"type": "object",
|
|
109
|
+
"required": ["id"],
|
|
110
|
+
"properties": { "id": { "type": "string" }, "optional": { "type": "boolean" } }
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"bindings": { "type": "object" },
|
|
116
|
+
"retired": { "type": "boolean", "default": false },
|
|
117
|
+
"provider": { "$ref": "#/$defs/provider" }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|