@tacuchi/agent-workflow-cli 20.25.0 → 21.0.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 (124) hide show
  1. package/README.md +1 -1
  2. package/dist/adapters/node-file-system.js +3 -0
  3. package/dist/adapters/node-file-system.js.map +1 -1
  4. package/dist/application/design/design-gate-service.js +246 -0
  5. package/dist/application/design/design-gate-service.js.map +1 -0
  6. package/dist/application/design/design-graph-service.js +85 -0
  7. package/dist/application/design/design-graph-service.js.map +1 -0
  8. package/dist/application/design/design-index-service.js +132 -0
  9. package/dist/application/design/design-index-service.js.map +1 -0
  10. package/dist/application/design/design-publish-service.js +488 -0
  11. package/dist/application/design/design-publish-service.js.map +1 -0
  12. package/dist/application/design/design-resolver-service.js +165 -0
  13. package/dist/application/design/design-resolver-service.js.map +1 -0
  14. package/dist/application/resume-service.js +23 -4
  15. package/dist/application/resume-service.js.map +1 -1
  16. package/dist/application/self/install-skill.js +25 -8
  17. package/dist/application/self/install-skill.js.map +1 -1
  18. package/dist/application/semantic-operation/protocol.js +18 -12
  19. package/dist/application/semantic-operation/protocol.js.map +1 -1
  20. package/dist/application/semantic-operation/publish.js +56 -9
  21. package/dist/application/semantic-operation/publish.js.map +1 -1
  22. package/dist/application/skills-resolver-service.js +19 -4
  23. package/dist/application/skills-resolver-service.js.map +1 -1
  24. package/dist/application/status-service.js +1 -0
  25. package/dist/application/status-service.js.map +1 -1
  26. package/dist/application/workline-index-service.js +6 -0
  27. package/dist/application/workline-index-service.js.map +1 -1
  28. package/dist/application/workspace-init-service.js +9 -1
  29. package/dist/application/workspace-init-service.js.map +1 -1
  30. package/dist/cli/commands/designs.js +110 -0
  31. package/dist/cli/commands/designs.js.map +1 -0
  32. package/dist/cli/commands/index.js +2 -0
  33. package/dist/cli/commands/index.js.map +1 -1
  34. package/dist/cli/commands/resume.js +8 -0
  35. package/dist/cli/commands/resume.js.map +1 -1
  36. package/dist/cli/commands/status.js +45 -0
  37. package/dist/cli/commands/status.js.map +1 -1
  38. package/dist/cli/help-groups.js +3 -0
  39. package/dist/cli/help-groups.js.map +1 -1
  40. package/dist/cli/parser.js +1 -0
  41. package/dist/cli/parser.js.map +1 -1
  42. package/dist/domain/design/artifact-body.js +223 -0
  43. package/dist/domain/design/artifact-body.js.map +1 -0
  44. package/dist/domain/design/artifact.js +606 -0
  45. package/dist/domain/design/artifact.js.map +1 -0
  46. package/dist/domain/design/baseline.js +359 -0
  47. package/dist/domain/design/baseline.js.map +1 -0
  48. package/dist/domain/design/capability.js +51 -0
  49. package/dist/domain/design/capability.js.map +1 -0
  50. package/dist/domain/design/closure.js +161 -0
  51. package/dist/domain/design/closure.js.map +1 -0
  52. package/dist/domain/design/governance.js +298 -0
  53. package/dist/domain/design/governance.js.map +1 -0
  54. package/dist/domain/design/identity.js +145 -0
  55. package/dist/domain/design/identity.js.map +1 -0
  56. package/dist/domain/design/manifest.js +552 -0
  57. package/dist/domain/design/manifest.js.map +1 -0
  58. package/dist/domain/design/maturity.js +234 -0
  59. package/dist/domain/design/maturity.js.map +1 -0
  60. package/dist/domain/design/naming.js +117 -0
  61. package/dist/domain/design/naming.js.map +1 -0
  62. package/dist/domain/design/projections.js +165 -0
  63. package/dist/domain/design/projections.js.map +1 -0
  64. package/dist/domain/design/reference.js +234 -0
  65. package/dist/domain/design/reference.js.map +1 -0
  66. package/dist/domain/design/retired.js +61 -0
  67. package/dist/domain/design/retired.js.map +1 -0
  68. package/dist/domain/design/revision.js +219 -0
  69. package/dist/domain/design/revision.js.map +1 -0
  70. package/dist/domain/design/secrets.js +86 -0
  71. package/dist/domain/design/secrets.js.map +1 -0
  72. package/dist/domain/design/validation.js +75 -0
  73. package/dist/domain/design/validation.js.map +1 -0
  74. package/dist/domain/design/yaml-subset.js +390 -0
  75. package/dist/domain/design/yaml-subset.js.map +1 -0
  76. package/dist/domain/safe-path.js +23 -0
  77. package/dist/domain/safe-path.js.map +1 -0
  78. package/dist/domain/skills.js +27 -3
  79. package/dist/domain/skills.js.map +1 -1
  80. package/package.json +1 -1
  81. package/skills/w/SKILL.md +13 -11
  82. package/skills/w/artifacts/README.md +3 -4
  83. package/skills/w/artifacts/artifacts-core/CHECKPOINT.md +2 -2
  84. package/skills/w/commands/README.md +2 -0
  85. package/skills/w/commands/export-diagrams.md +1 -1
  86. package/skills/w/commands/export-manuals.md +1 -1
  87. package/skills/w/commands/export-reports.md +1 -1
  88. package/skills/w/commands/export-scripts.md +1 -1
  89. package/skills/w/commands/fix-git.md +1 -1
  90. package/skills/w/commands/generate-launch.md +2 -2
  91. package/skills/w/commands/persist.md +2 -2
  92. package/skills/w/commands/plan-exec.md +13 -7
  93. package/skills/w/commands/plan-new.md +8 -4
  94. package/skills/w/commands/plan-refine.md +8 -5
  95. package/skills/w/commands/quick.md +4 -4
  96. package/skills/w/commands/resume.md +2 -2
  97. package/skills/w/commands/spec-new.md +4 -4
  98. package/skills/w/commands/spec-refine.md +3 -2
  99. package/skills/w/commands/status.md +1 -1
  100. package/skills/w/commands/workspace-init.md +1 -1
  101. package/skills/w/context/MANIFEST.json +19 -8
  102. package/skills/w/harness/HARNESS.md +14 -10
  103. package/skills/w/loops/CHASSIS.md +9 -8
  104. package/skills/w/loops/CODE-POLICIES.md +22 -7
  105. package/skills/w/loops/README.md +1 -1
  106. package/skills/w/loops/plan-exec-loop/LOOP.md +127 -61
  107. package/skills/w/loops/plan-new-loop/LOOP.md +66 -70
  108. package/skills/w/loops/plan-refine-loop/LOOP.md +15 -7
  109. package/skills/w/loops/spec-refine-loop/LOOP.md +14 -12
  110. package/skills/w/modules/DESIGN-REFERENCES.md +109 -0
  111. package/skills/w/modules/PERSIST-ROUTING.md +1 -0
  112. package/skills/w/modules/PLAN-EXECUTION-BATCHES.md +84 -0
  113. package/skills/w/roles/README.md +7 -5
  114. package/skills/w/roles/design/ROLE.md +217 -0
  115. package/skills/w/schemas/design/design-baseline.v1.schema.json +71 -0
  116. package/skills/w/schemas/design/design-manifest.v1.schema.json +322 -0
  117. package/skills/w/schemas/design/design-review.v1.schema.json +72 -0
  118. package/skills/w/schemas/design/design-revocation.v1.schema.json +54 -0
  119. package/skills/w/schemas/design/ui-flow.v1.schema.json +211 -0
  120. package/skills/w/schemas/design/ui-screen.v1.schema.json +214 -0
  121. package/skills/w/artifacts/artifacts-design/SPEC.md +0 -42
  122. package/skills/w/modules/PLAN-DESIGN-SPECS.md +0 -12
  123. package/skills/w/modules/PLAN-REFINE-DESIGN-SPECS.md +0 -7
  124. package/skills/w/roles/ui-spec/ROLE.md +0 -147
@@ -0,0 +1,72 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://workline.dev/schemas/design-review.v1.schema.json",
4
+ "title": "Workline design review record v1",
5
+ "description": "An external review of one exact baseline revision. It lives OUTSIDE the baseline it reviews, so no digest is self-referential, and it never grants anything to a later revision.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema",
10
+ "id",
11
+ "target",
12
+ "target_digest",
13
+ "author",
14
+ "date",
15
+ "decision",
16
+ "evidence",
17
+ "digest"
18
+ ],
19
+ "properties": {
20
+ "schema": {
21
+ "const": "workline.design-review/v1"
22
+ },
23
+ "id": {
24
+ "type": "string",
25
+ "pattern": "^REV-(?:[0-9]{3}|[1-9][0-9]{3,})$"
26
+ },
27
+ "target": {
28
+ "description": "The exact baseline this record decides on.",
29
+ "$ref": "#/$defs/baselineRef"
30
+ },
31
+ "target_digest": {
32
+ "description": "The digest that baseline had. A record decides on BYTES, not on a name.",
33
+ "$ref": "#/$defs/digest"
34
+ },
35
+ "author": {
36
+ "description": "Who decided, or the role that did.",
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "date": {
41
+ "type": "string",
42
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
43
+ },
44
+ "decision": {
45
+ "description": "`proposed` is the state a baseline is born in; only `approved` grants anything.",
46
+ "enum": ["proposed", "approved", "rejected"]
47
+ },
48
+ "evidence": {
49
+ "description": "Optional: where the decision was taken. Never a substitute for the decision.",
50
+ "type": "array",
51
+ "uniqueItems": true,
52
+ "items": {
53
+ "type": "string",
54
+ "minLength": 1
55
+ }
56
+ },
57
+ "digest": {
58
+ "description": "SHA-256 of this record's canonical JSON WITHOUT this field.",
59
+ "$ref": "#/$defs/digest"
60
+ }
61
+ },
62
+ "$defs": {
63
+ "baselineRef": {
64
+ "type": "string",
65
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})@r[1-9][0-9]{0,5}$"
66
+ },
67
+ "digest": {
68
+ "type": "string",
69
+ "pattern": "^sha256:[0-9a-f]{64}$"
70
+ }
71
+ }
72
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://workline.dev/schemas/design-revocation.v1.schema.json",
4
+ "title": "Workline design revocation record v1",
5
+ "description": "An explicit, audited block on one exact baseline revision. The ONLY thing that forbids executing against a published revision.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema", "id", "target", "target_digest", "author", "date", "reason", "digest"],
9
+ "properties": {
10
+ "schema": {
11
+ "const": "workline.design-revocation/v1"
12
+ },
13
+ "id": {
14
+ "type": "string",
15
+ "pattern": "^RVK-(?:[0-9]{3}|[1-9][0-9]{3,})$"
16
+ },
17
+ "target": {
18
+ "description": "The exact baseline this record decides on.",
19
+ "$ref": "#/$defs/baselineRef"
20
+ },
21
+ "target_digest": {
22
+ "description": "The digest that baseline had. A record decides on BYTES, not on a name.",
23
+ "$ref": "#/$defs/digest"
24
+ },
25
+ "author": {
26
+ "description": "Who decided, or the role that did.",
27
+ "type": "string",
28
+ "minLength": 1
29
+ },
30
+ "date": {
31
+ "type": "string",
32
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
33
+ },
34
+ "reason": {
35
+ "description": "Why this revision must not be executed. Not optional: a block without a reason is not auditable.",
36
+ "type": "string",
37
+ "minLength": 1
38
+ },
39
+ "digest": {
40
+ "description": "SHA-256 of this record's canonical JSON WITHOUT this field.",
41
+ "$ref": "#/$defs/digest"
42
+ }
43
+ },
44
+ "$defs": {
45
+ "baselineRef": {
46
+ "type": "string",
47
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})@r[1-9][0-9]{0,5}$"
48
+ },
49
+ "digest": {
50
+ "type": "string",
51
+ "pattern": "^sha256:[0-9a-f]{64}$"
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,211 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://workline.dev/schemas/design/ui-flow.v1.schema.json",
4
+ "title": "Workline UI Design Package v1 — Flow Specification frontmatter",
5
+ "description": "Machine-readable half of a User Flow / Task Flow. Identity, graph, dependencies and traceability resolve from here alone: nothing normative may require reading the Markdown body.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema",
10
+ "id",
11
+ "revision",
12
+ "maturity",
13
+ "supersedes",
14
+ "purpose",
15
+ "platform",
16
+ "actors",
17
+ "entry",
18
+ "nodes",
19
+ "edges",
20
+ "dependencies",
21
+ "trace",
22
+ "unknowns",
23
+ "not_applicable",
24
+ "external"
25
+ ],
26
+ "properties": {
27
+ "schema": {
28
+ "const": "workline.ui-flow/v1"
29
+ },
30
+ "id": {
31
+ "description": "Qualified identity WITHOUT the revision — the revision is its own field.",
32
+ "type": "string",
33
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})/FLW-(?:[0-9]{3}|[1-9][0-9]{3,})$"
34
+ },
35
+ "revision": {
36
+ "$ref": "#/$defs/revision"
37
+ },
38
+ "maturity": {
39
+ "$ref": "#/$defs/maturity"
40
+ },
41
+ "supersedes": {
42
+ "description": "An EARLIER revision of this same flow, or null. Currentness is derived from it.",
43
+ "type": ["string", "null"],
44
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})/FLW-(?:[0-9]{3}|[1-9][0-9]{3,})@r[1-9][0-9]{0,5}$"
45
+ },
46
+ "purpose": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "platform": {
51
+ "type": "string",
52
+ "minLength": 1
53
+ },
54
+ "actors": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "string",
58
+ "minLength": 1
59
+ },
60
+ "uniqueItems": true
61
+ },
62
+ "entry": {
63
+ "description": "The screen STATE the flow starts at. Must also appear in `nodes`.",
64
+ "$ref": "#/$defs/stateRef"
65
+ },
66
+ "nodes": {
67
+ "description": "Every screen state the flow visits, by exact reference.",
68
+ "type": "array",
69
+ "items": {
70
+ "$ref": "#/$defs/stateRef"
71
+ },
72
+ "uniqueItems": true
73
+ },
74
+ "edges": {
75
+ "description": "Transitions. Both endpoints must be declared nodes, so the graph closes on itself.",
76
+ "type": "array",
77
+ "items": {
78
+ "type": "object",
79
+ "additionalProperties": false,
80
+ "required": ["from", "trigger", "action", "condition", "to"],
81
+ "properties": {
82
+ "from": {
83
+ "$ref": "#/$defs/stateRef"
84
+ },
85
+ "trigger": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ },
89
+ "action": {
90
+ "type": ["string", "null"],
91
+ "minLength": 1
92
+ },
93
+ "condition": {
94
+ "type": ["string", "null"],
95
+ "minLength": 1
96
+ },
97
+ "to": {
98
+ "$ref": "#/$defs/stateRef"
99
+ }
100
+ }
101
+ }
102
+ },
103
+ "dependencies": {
104
+ "description": "Rules and tokens the flow itself depends on, by exact reference.",
105
+ "type": "array",
106
+ "items": {
107
+ "$ref": "#/$defs/artifactRef"
108
+ },
109
+ "uniqueItems": true
110
+ },
111
+ "trace": {
112
+ "$ref": "#/$defs/trace"
113
+ },
114
+ "unknowns": {
115
+ "$ref": "#/$defs/unknowns"
116
+ },
117
+ "not_applicable": {
118
+ "$ref": "#/$defs/notApplicable"
119
+ },
120
+ "external": {
121
+ "type": "array",
122
+ "uniqueItems": true,
123
+ "items": {
124
+ "$ref": "#/$defs/externalDesignSystem"
125
+ }
126
+ }
127
+ },
128
+ "$defs": {
129
+ "revision": {
130
+ "type": "integer",
131
+ "minimum": 1
132
+ },
133
+ "maturity": {
134
+ "enum": ["outline", "handoff"]
135
+ },
136
+ "artifactRef": {
137
+ "type": "string",
138
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})/(?:FLW|SCR|RUL|TOK|VIS)-(?:[0-9]{3}|[1-9][0-9]{3,})@r[1-9][0-9]{0,5}(#[A-Za-z0-9][A-Za-z0-9_-]*)?$"
139
+ },
140
+ "stateRef": {
141
+ "description": "A screen state: `DES-001/SCR-002@r2#empty`. The anchor is required.",
142
+ "type": "string",
143
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})/SCR-(?:[0-9]{3}|[1-9][0-9]{3,})@r[1-9][0-9]{0,5}#[A-Za-z0-9][A-Za-z0-9_-]*$"
144
+ },
145
+ "trace": {
146
+ "description": "Acceptance criteria this artifact answers to. Emptiness is the maturity profile's business, not this schema's.",
147
+ "type": "array",
148
+ "items": {
149
+ "type": "object",
150
+ "additionalProperties": false,
151
+ "required": ["criterion", "source"],
152
+ "properties": {
153
+ "criterion": {
154
+ "type": "string",
155
+ "minLength": 1
156
+ },
157
+ "source": {
158
+ "type": ["string", "null"],
159
+ "minLength": 1
160
+ }
161
+ }
162
+ }
163
+ },
164
+ "unknowns": {
165
+ "description": "Open questions, explicit. `blocking: true` is what a handoff gate refuses.",
166
+ "type": "array",
167
+ "items": {
168
+ "type": "object",
169
+ "additionalProperties": false,
170
+ "required": ["question", "blocking"],
171
+ "properties": {
172
+ "question": {
173
+ "type": "string",
174
+ "minLength": 1
175
+ },
176
+ "blocking": {
177
+ "type": "boolean"
178
+ }
179
+ }
180
+ }
181
+ },
182
+ "notApplicable": {
183
+ "description": "Conditional section → reason. Only conditional sections may appear, and a reason is never empty. Essential sections cannot be waived at all.",
184
+ "type": "object",
185
+ "additionalProperties": {
186
+ "type": "string",
187
+ "minLength": 1
188
+ }
189
+ },
190
+ "externalDesignSystem": {
191
+ "description": "Where foreign rules, tokens or assets came from. A `handoff` that depends on someone else's design system pins it and keeps the subset locally (AC-PKG-09).",
192
+ "type": "object",
193
+ "additionalProperties": false,
194
+ "required": ["provider", "revision", "digest"],
195
+ "properties": {
196
+ "provider": {
197
+ "type": "string",
198
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})$"
199
+ },
200
+ "revision": {
201
+ "type": "integer",
202
+ "minimum": 1
203
+ },
204
+ "digest": {
205
+ "type": "string",
206
+ "pattern": "^sha256:[0-9a-f]{64}$"
207
+ }
208
+ }
209
+ }
210
+ }
211
+ }
@@ -0,0 +1,214 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://workline.dev/schemas/design/ui-screen.v1.schema.json",
4
+ "title": "Workline UI Design Package v1 — Screen Specification frontmatter",
5
+ "description": "Machine-readable half of a Screen Specification. Identity, states, dependencies and traceability resolve from here alone: nothing normative may require reading the Markdown body.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema",
10
+ "id",
11
+ "revision",
12
+ "maturity",
13
+ "supersedes",
14
+ "title",
15
+ "purpose",
16
+ "platform",
17
+ "default_state",
18
+ "states",
19
+ "flow_refs",
20
+ "dependencies",
21
+ "trace",
22
+ "unknowns",
23
+ "not_applicable",
24
+ "external"
25
+ ],
26
+ "properties": {
27
+ "schema": {
28
+ "const": "workline.ui-screen/v1"
29
+ },
30
+ "id": {
31
+ "description": "Qualified identity WITHOUT the revision — the revision is its own field.",
32
+ "type": "string",
33
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})/SCR-(?:[0-9]{3}|[1-9][0-9]{3,})$"
34
+ },
35
+ "revision": {
36
+ "$ref": "#/$defs/revision"
37
+ },
38
+ "maturity": {
39
+ "$ref": "#/$defs/maturity"
40
+ },
41
+ "supersedes": {
42
+ "description": "An EARLIER revision of this same screen, or null. Currentness is derived from it.",
43
+ "type": ["string", "null"],
44
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})/SCR-(?:[0-9]{3}|[1-9][0-9]{3,})@r[1-9][0-9]{0,5}$"
45
+ },
46
+ "title": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "purpose": {
51
+ "type": "string",
52
+ "minLength": 1
53
+ },
54
+ "platform": {
55
+ "type": "string",
56
+ "minLength": 1
57
+ },
58
+ "default_state": {
59
+ "description": "Anchor of the base state. Must be one of the declared `states`.",
60
+ "type": "string",
61
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$"
62
+ },
63
+ "states": {
64
+ "description": "Observable states. The anchor is what flows, tasks and renditions address, so it is unique WITHIN this revision.",
65
+ "type": "array",
66
+ "items": {
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": ["anchor", "purpose"],
70
+ "properties": {
71
+ "anchor": {
72
+ "type": "string",
73
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$"
74
+ },
75
+ "purpose": {
76
+ "type": "string",
77
+ "minLength": 1
78
+ }
79
+ }
80
+ }
81
+ },
82
+ "flow_refs": {
83
+ "description": "Flows this screen participates in, by exact reference.",
84
+ "type": "array",
85
+ "items": {
86
+ "type": "string",
87
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})/FLW-(?:[0-9]{3}|[1-9][0-9]{3,})@r[1-9][0-9]{0,5}$"
88
+ },
89
+ "uniqueItems": true
90
+ },
91
+ "dependencies": {
92
+ "type": "object",
93
+ "additionalProperties": false,
94
+ "required": ["rules", "tokens", "assets"],
95
+ "properties": {
96
+ "rules": {
97
+ "type": "array",
98
+ "items": {
99
+ "type": "string",
100
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})/RUL-(?:[0-9]{3}|[1-9][0-9]{3,})@r[1-9][0-9]{0,5}$"
101
+ },
102
+ "uniqueItems": true
103
+ },
104
+ "tokens": {
105
+ "type": "array",
106
+ "items": {
107
+ "type": "string",
108
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})/TOK-(?:[0-9]{3}|[1-9][0-9]{3,})@r[1-9][0-9]{0,5}$"
109
+ },
110
+ "uniqueItems": true
111
+ },
112
+ "assets": {
113
+ "description": "Content-addressed: an asset is depended on by digest, never by name.",
114
+ "type": "array",
115
+ "items": {
116
+ "type": "string",
117
+ "pattern": "^sha256:[0-9a-f]{64}$"
118
+ },
119
+ "uniqueItems": true
120
+ }
121
+ }
122
+ },
123
+ "trace": {
124
+ "$ref": "#/$defs/trace"
125
+ },
126
+ "unknowns": {
127
+ "$ref": "#/$defs/unknowns"
128
+ },
129
+ "not_applicable": {
130
+ "$ref": "#/$defs/notApplicable"
131
+ },
132
+ "external": {
133
+ "type": "array",
134
+ "uniqueItems": true,
135
+ "items": {
136
+ "$ref": "#/$defs/externalDesignSystem"
137
+ }
138
+ }
139
+ },
140
+ "$defs": {
141
+ "revision": {
142
+ "type": "integer",
143
+ "minimum": 1
144
+ },
145
+ "maturity": {
146
+ "enum": ["outline", "handoff"]
147
+ },
148
+ "trace": {
149
+ "description": "Acceptance criteria this artifact answers to. Emptiness is the maturity profile's business, not this schema's.",
150
+ "type": "array",
151
+ "items": {
152
+ "type": "object",
153
+ "additionalProperties": false,
154
+ "required": ["criterion", "source"],
155
+ "properties": {
156
+ "criterion": {
157
+ "type": "string",
158
+ "minLength": 1
159
+ },
160
+ "source": {
161
+ "type": ["string", "null"],
162
+ "minLength": 1
163
+ }
164
+ }
165
+ }
166
+ },
167
+ "unknowns": {
168
+ "description": "Open questions, explicit. `blocking: true` is what a handoff gate refuses.",
169
+ "type": "array",
170
+ "items": {
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "required": ["question", "blocking"],
174
+ "properties": {
175
+ "question": {
176
+ "type": "string",
177
+ "minLength": 1
178
+ },
179
+ "blocking": {
180
+ "type": "boolean"
181
+ }
182
+ }
183
+ }
184
+ },
185
+ "notApplicable": {
186
+ "description": "Conditional section → reason. Only conditional sections may appear, and a reason is never empty. Essential sections cannot be waived at all.",
187
+ "type": "object",
188
+ "additionalProperties": {
189
+ "type": "string",
190
+ "minLength": 1
191
+ }
192
+ },
193
+ "externalDesignSystem": {
194
+ "description": "Where foreign rules, tokens or assets came from. A `handoff` that depends on someone else's design system pins it and keeps the subset locally (AC-PKG-09).",
195
+ "type": "object",
196
+ "additionalProperties": false,
197
+ "required": ["provider", "revision", "digest"],
198
+ "properties": {
199
+ "provider": {
200
+ "type": "string",
201
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})$"
202
+ },
203
+ "revision": {
204
+ "type": "integer",
205
+ "minimum": 1
206
+ },
207
+ "digest": {
208
+ "type": "string",
209
+ "pattern": "^sha256:[0-9a-f]{64}$"
210
+ }
211
+ }
212
+ }
213
+ }
214
+ }
@@ -1,42 +0,0 @@
1
- # NNN-SPEC-<SLUG>.md — design SPEC (UI)
2
-
3
- > What it is: the **design specification of ONE screen** (modal, dashboard, form, …), produced by composing the **`ui-design`** capability (built-in default [`ui-spec`](../../roles/ui-spec/ROLE.md)) when the **plan includes UI**. It is a **session artifact** of the PLAN loops (`plan-new-loop` · `plan-refine-loop`) — process-facing, internal — and `plan-exec-loop` reads it as the **design reference** when implementing the UI tasks.
4
- >
5
- > **It is NOT the spec.** The requirement-spec (`docs/specs/NNN-spec-<slug>.md`) and the plan remain **documents** (invariant 3). The design SPEC is a different thing: the per-screen UI design detail, ephemeral and process-facing, living inside the session. Spelling disambiguates: `SPEC` (UPPERCASE, artifact) vs `spec` (lowercase, document).
6
-
7
- ## Naming
8
-
9
- `NNN-SPEC-<SLUG>.md`, all UPPERCASE (session-artifact convention):
10
-
11
- - `NNN` — sequence **local to the session** (001, 002, … in creation order). Numbered by **the loop**; the CLI is not involved (do not confuse with the global session `NNN` from `aw session-create`, nor with `aw next-number` for `docs/`).
12
- - `SLUG` — short screen name in UPPER-KEBAB (`[A-Z0-9-]`, ≤ ~4 words).
13
- - **One screen per file.** Several screens = several SPECs.
14
-
15
- Examples: `001-SPEC-MODAL-EXPORT.md` · `002-SPEC-ADMIN-DASHBOARD.md`.
16
-
17
- ## Schema
18
-
19
- Trace header (blockquote) + the [`ui-spec`](../../roles/ui-spec/ROLE.md) Markdown render (same structure, vocabulary and exact render rules; **a single screen**):
20
-
21
- ```markdown
22
- > Design SPEC · generated via the ui-design capability
23
- > Origin: docs/plans/PPP-plan-<slug>.md (· docs/specs/NNN-spec-<slug>.md § UI spec, if present)
24
- > Design options: material3 · light · es
25
- > Tasks: T3.2 · T3.3
26
-
27
- # Modal Export
28
- **Tipo**: modal | **Plataforma**: web
29
-
30
- ## Componentes
31
- - **Formato** (select)
32
- - **Rango de fechas** (datePicker)
33
- - **Exportar** (button)
34
- - **Cancelar** (link)
35
- ```
36
-
37
- ## Rules
38
-
39
- 1. Authored by the **`ui-design`** capability (rebindable via `.workflow/skills.toml`; `off` → the UI gap degrades to human / `Open questions`, like any disabled capability).
40
- 2. The **plan-doc references** the path of the governing SPEC (in its UI Tasks / `Solution`): that reference is the **source of truth** for which SPEC governs each screen. A re-refine that changes a screen produces the updated SPEC **in its own session** (each loop manages the artifacts of ITS session) and re-points the plan reference.
41
- 3. **Derives** from the spec's `## UI spec` section when present: splits it per screen and elevates it to executable detail; a SPEC↔`## UI spec` contradiction is a **gap** (plan↔spec drift). If the spec has no `## UI spec`, it is authored from the `Requirement` via structured-choice (design system, theme, screen ambiguities).
42
- 4. Ephemeral and internal like every artifact: promotion to `docs/` happens **only** via `export-*` (never automatically by the loop).
@@ -1,12 +0,0 @@
1
- # PLAN-DESIGN-SPECS — per-screen design SPECs when the plan includes UI
2
-
3
- Loaded when the plan includes UI (signal `ui`).
4
-
5
- ## Delta 4 — Design SPECs (when the plan includes UI)
6
-
7
- The **UI without design SPEC** gap is resolved by **composing** the **`ui-design`** capability (built-in default [`ui-spec`](../roles/ui-spec/ROLE.md); rebindable via `.workflow/skills.toml`; `off` → degrades to human / `Open questions`):
8
-
9
- - It authors **one design SPEC per screen** as a session artifact: `NNN-SPEC-<SLUG>.md` (numbering local to the session — see [`SPEC.md`](../artifacts/artifacts-design/SPEC.md)).
10
- - It **derives** from the spec's `## UI spec` section when present (splits it per screen and raises it to executable detail); otherwise it authors from the `Requirement` (design system/theme/ambiguities via *structured-choice*, counts in the batch).
11
- - The plan's **UI Tasks reference** their SPEC's path — that reference is the **source of truth** — and `plan-exec-loop` reads them as the design reference.
12
- - It is the chassis' composed-capability resolution mode (next to *research*, *probe* and *human*).
@@ -1,7 +0,0 @@
1
- # PLAN-REFINE-DESIGN-SPECS — design SPECs for the screens a refine touches
2
-
3
- Loaded when the refine touches UI (signal `ui`).
4
-
5
- ## Delta 4 — Design SPECs (when the refine touches UI)
6
-
7
- Same mechanism as [`plan-new-loop`](../loops/plan-new-loop/LOOP.md) (§ *Delta 4*: the **`ui-design`** capability → per-screen `NNN-SPEC-<SLUG>.md`, see [`SPEC.md`](../artifacts/artifacts-design/SPEC.md)), **scoped to the delta**: only the screens **new or changed** by the refine get a design SPEC. The updated SPEC is written in **plan-refine's own session** (each loop manages ITS session's artifacts — it never edits plan-new's) and the plan **re-points** the UI Task reference to the current SPEC. Untouched screens keep their original SPEC.