@tacuchi/agent-workflow-cli 20.26.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 (110) 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/semantic-operation/protocol.js +18 -12
  17. package/dist/application/semantic-operation/protocol.js.map +1 -1
  18. package/dist/application/semantic-operation/publish.js +56 -9
  19. package/dist/application/semantic-operation/publish.js.map +1 -1
  20. package/dist/application/skills-resolver-service.js +19 -4
  21. package/dist/application/skills-resolver-service.js.map +1 -1
  22. package/dist/application/status-service.js +1 -0
  23. package/dist/application/status-service.js.map +1 -1
  24. package/dist/application/workline-index-service.js +6 -0
  25. package/dist/application/workline-index-service.js.map +1 -1
  26. package/dist/application/workspace-init-service.js +9 -1
  27. package/dist/application/workspace-init-service.js.map +1 -1
  28. package/dist/cli/commands/designs.js +110 -0
  29. package/dist/cli/commands/designs.js.map +1 -0
  30. package/dist/cli/commands/index.js +2 -0
  31. package/dist/cli/commands/index.js.map +1 -1
  32. package/dist/cli/commands/resume.js +8 -0
  33. package/dist/cli/commands/resume.js.map +1 -1
  34. package/dist/cli/commands/status.js +45 -0
  35. package/dist/cli/commands/status.js.map +1 -1
  36. package/dist/cli/help-groups.js +3 -0
  37. package/dist/cli/help-groups.js.map +1 -1
  38. package/dist/cli/parser.js +1 -0
  39. package/dist/cli/parser.js.map +1 -1
  40. package/dist/domain/design/artifact-body.js +223 -0
  41. package/dist/domain/design/artifact-body.js.map +1 -0
  42. package/dist/domain/design/artifact.js +606 -0
  43. package/dist/domain/design/artifact.js.map +1 -0
  44. package/dist/domain/design/baseline.js +359 -0
  45. package/dist/domain/design/baseline.js.map +1 -0
  46. package/dist/domain/design/capability.js +51 -0
  47. package/dist/domain/design/capability.js.map +1 -0
  48. package/dist/domain/design/closure.js +161 -0
  49. package/dist/domain/design/closure.js.map +1 -0
  50. package/dist/domain/design/governance.js +298 -0
  51. package/dist/domain/design/governance.js.map +1 -0
  52. package/dist/domain/design/identity.js +145 -0
  53. package/dist/domain/design/identity.js.map +1 -0
  54. package/dist/domain/design/manifest.js +552 -0
  55. package/dist/domain/design/manifest.js.map +1 -0
  56. package/dist/domain/design/maturity.js +234 -0
  57. package/dist/domain/design/maturity.js.map +1 -0
  58. package/dist/domain/design/naming.js +117 -0
  59. package/dist/domain/design/naming.js.map +1 -0
  60. package/dist/domain/design/projections.js +165 -0
  61. package/dist/domain/design/projections.js.map +1 -0
  62. package/dist/domain/design/reference.js +234 -0
  63. package/dist/domain/design/reference.js.map +1 -0
  64. package/dist/domain/design/retired.js +61 -0
  65. package/dist/domain/design/retired.js.map +1 -0
  66. package/dist/domain/design/revision.js +219 -0
  67. package/dist/domain/design/revision.js.map +1 -0
  68. package/dist/domain/design/secrets.js +86 -0
  69. package/dist/domain/design/secrets.js.map +1 -0
  70. package/dist/domain/design/validation.js +75 -0
  71. package/dist/domain/design/validation.js.map +1 -0
  72. package/dist/domain/design/yaml-subset.js +390 -0
  73. package/dist/domain/design/yaml-subset.js.map +1 -0
  74. package/dist/domain/safe-path.js +23 -0
  75. package/dist/domain/safe-path.js.map +1 -0
  76. package/dist/domain/skills.js +27 -3
  77. package/dist/domain/skills.js.map +1 -1
  78. package/package.json +1 -1
  79. package/skills/w/SKILL.md +10 -8
  80. package/skills/w/artifacts/README.md +3 -4
  81. package/skills/w/artifacts/artifacts-core/CHECKPOINT.md +2 -2
  82. package/skills/w/commands/plan-exec.md +11 -5
  83. package/skills/w/commands/plan-new.md +6 -2
  84. package/skills/w/commands/plan-refine.md +6 -3
  85. package/skills/w/commands/quick.md +2 -2
  86. package/skills/w/commands/spec-new.md +2 -2
  87. package/skills/w/commands/spec-refine.md +1 -0
  88. package/skills/w/context/MANIFEST.json +19 -8
  89. package/skills/w/loops/CHASSIS.md +2 -2
  90. package/skills/w/loops/CODE-POLICIES.md +22 -7
  91. package/skills/w/loops/README.md +1 -1
  92. package/skills/w/loops/plan-exec-loop/LOOP.md +127 -61
  93. package/skills/w/loops/plan-new-loop/LOOP.md +66 -70
  94. package/skills/w/loops/plan-refine-loop/LOOP.md +15 -7
  95. package/skills/w/loops/spec-refine-loop/LOOP.md +14 -12
  96. package/skills/w/modules/DESIGN-REFERENCES.md +109 -0
  97. package/skills/w/modules/PERSIST-ROUTING.md +1 -0
  98. package/skills/w/modules/PLAN-EXECUTION-BATCHES.md +84 -0
  99. package/skills/w/roles/README.md +7 -5
  100. package/skills/w/roles/design/ROLE.md +217 -0
  101. package/skills/w/schemas/design/design-baseline.v1.schema.json +71 -0
  102. package/skills/w/schemas/design/design-manifest.v1.schema.json +322 -0
  103. package/skills/w/schemas/design/design-review.v1.schema.json +72 -0
  104. package/skills/w/schemas/design/design-revocation.v1.schema.json +54 -0
  105. package/skills/w/schemas/design/ui-flow.v1.schema.json +211 -0
  106. package/skills/w/schemas/design/ui-screen.v1.schema.json +214 -0
  107. package/skills/w/artifacts/artifacts-design/SPEC.md +0 -42
  108. package/skills/w/modules/PLAN-DESIGN-SPECS.md +0 -12
  109. package/skills/w/modules/PLAN-REFINE-DESIGN-SPECS.md +0 -7
  110. package/skills/w/roles/ui-spec/ROLE.md +0 -147
@@ -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.
@@ -1,147 +0,0 @@
1
- ---
2
- name: ui-spec
3
- description: >-
4
- UI spec authoring — built-in default for the `ui-design` capability. Given a UI
5
- requirement, author a structured, framework-agnostic screen specification as
6
- **Markdown** (single output format). Knows the conceptual screen structure, the
7
- kind/region vocabulary, the authoring rules, design-system / theme / variant
8
- handling, and the exact Markdown render format. Two landing zones, same render:
9
- in SPEC (`spec-refine-loop`) it authors the `## UI spec` section of the spec doc;
10
- in PLAN (`plan-new-loop`/`plan-refine-loop`) it authors per-screen **design
11
- SPECs** (`NNN-SPEC-<SLUG>.md`) as session artifacts. Use when a loop is refining
12
- a spec or building/refining a plan that involves screens, forms, dashboards,
13
- modals or any UI surface.
14
- ---
15
-
16
- # ui-spec — UI spec authoring
17
-
18
- ## Role
19
-
20
- `ui-design` — this is its **built-in default implementation**. Rebindable in `.workflow/skills.toml` to a third-party skill (installed via skills.sh) or `off`. Resolution: built-in default → `~/.workflow/skills.toml` (global) → `.workflow/skills.toml` (workspace).
21
-
22
- ## Purpose
23
-
24
- Given a UI requirement, author a **structured Markdown description** of the screens and their components — descriptive (what exists and what for) and structured (regions → components, consistent vocabulary), framework-agnostic. The AI authors it **natively**, guided by this skill; there is no endpoint to call. **Single output format: Markdown** (no parallel JSON representation).
25
-
26
- ## Composed by
27
-
28
- Two levels, same capability:
29
-
30
- - **`spec-refine-loop`** (see `../../loops/spec-refine-loop/LOOP.md`) — resolving the **UI unspecified** gap (when the requirement involves UI): authors the spec's `## UI spec` section (the UI's *what*, coarse-grain screens).
31
- - **`plan-new-loop` · `plan-refine-loop`** (see `../../modules/PLAN-DESIGN-SPECS.md`, the plan loops' `ui` module) — resolving the **UI without design SPEC** gap (when the **plan includes UI**): authors per-screen **design SPECs** (`NNN-SPEC-<SLUG>.md`) as **PLAN session artifacts** (see `../../artifacts/artifacts-design/SPEC.md`); they derive from `## UI spec` when it exists.
32
-
33
- In both, the composing loop contributes:
34
-
35
- - **Asking the human** (design system, theme, screen ambiguities) via *structured-choice* (canonical rule: `../../loops/CHASSIS.md` § *Structured-choice*; per-harness binding: `../../harness/HARNESS.md`).
36
- - **Gap-driven iteration** until convergence.
37
- - Offering **variants** and **curating** the result.
38
-
39
- Any loop could compose it; the primary cases are SPEC and PLAN. In SPEC the description lands as a section of the spec document (`docs/specs/NNN-spec-<slug>.md`) — the spec remains a document (invariant 3). In PLAN it lands as **design SPECs** (session artifacts) — which are **not** the requirement-spec: they are the per-screen design detail, process-facing.
40
-
41
- ## Knowledge
42
-
43
- ### Conceptual structure (universal, recursive)
44
-
45
- A **screen** has: `name`, `type` (semantic purpose: auth, dashboard, form, list, detail, error, …), `platform` (web by default, mobile, …), optional `description`, and **either regions** (complex screen) **or** direct **components** (simple screen) — **never both**.
46
-
47
- - A **region** groups components and has a `type`.
48
- - A **component** has a `kind`, and optionally `role`, `label` and `children` (nestable, recursive).
49
-
50
- It is a conceptual model to guide authoring; **it is never serialized to JSON** — the only output is the Markdown render (see Output).
51
-
52
- - `type` (region) ∈ `header · main · footer · sidebar · filters · summary`
53
- - `kind` (component) by category:
54
- - **Containers**: `card · panel · modal`
55
- - **Data**: `table · list · grid`
56
- - **Visualization**: `chart · metric · badge · image`
57
- - **Input**: `textInput · select · checkbox · datePicker · toggle`
58
- - **Actions**: `button · link · actionGroup`
59
- - **Navigation**: `navBar · tabs · breadcrumb`
60
- - **Feedback**: `alert · progress`
61
-
62
- ### Rules
63
-
64
- 1. **Concise** — only the essential. No filler, no speculative components.
65
- 2. Simple screen (login, password recovery, error) → direct `components`, **no** `regions`.
66
- 3. Complex screen (dashboard, CRUD maintenance) → `regions` to organize.
67
- 4. `role` is **optional** — only when it adds clarity (`role:"logo"`, `role:"primary"`).
68
- 5. Limits: **≤100 components**, **≤5 nesting levels**.
69
- 6. One screen per `#` block; a multi-screen requirement lists them one after another (each with its own `#`).
70
-
71
- ### Design options (the loop asks the human)
72
-
73
- These options **guide content/labels**; the screen structure is design-system **agnostic** and does NOT carry them in the model. They are **annotated in the spec** (section header):
74
-
75
- - **Design system**: `material3 · bootstrap5 · tailwind3 · antDesign · chakraUI · custom`.
76
- - **Theme**: `light · dark · auto`.
77
- - **Language**: `es · en · …` (affects the `label`s — user-facing content follows the user's language).
78
- - **Density** (optional): `compact · comfortable · spacious`.
79
- - **maxWidth** (optional): pixels, 320–3840 (layout annotation).
80
-
81
- ### Variants
82
-
83
- When the requirement admits more than one reasonable layout (e.g. table vs. card grid; tabs vs. accordion), offer **2-3 variants** as alternative Markdown screens and ask the human to pick. The chosen variant is curated and stays; discarded ones are not persisted.
84
-
85
- ### Disambiguation
86
-
87
- Before authoring, resolve ambiguities via *structured-choice* (the loop triggers it):
88
-
89
- - Simple or complex screen (does it need `regions`?).
90
- - Which primary/secondary actions exist.
91
- - What data it shows (table, metrics, both).
92
- - Whether there are states (loading, empty, error) the spec must enumerate.
93
-
94
- If the human does not answer, assume the simplest case coherent with the description and note the assumption.
95
-
96
- ### Examples (few-shot; labels in the user's language)
97
-
98
- **Simple (no regions)** — `Recuperar Contraseña` (auth, web):
99
-
100
- ```markdown
101
- # Recuperar Contraseña
102
- **Tipo**: auth | **Plataforma**: web
103
-
104
- ## Componentes
105
- - **logo** (image)
106
- - **Correo electrónico** (textInput)
107
- - **Enviar enlace** (button)
108
- - **Volver al login** (link)
109
- ```
110
-
111
- **Complex (with regions)** — "Dashboard" (web):
112
-
113
- ```markdown
114
- # Dashboard
115
- **Tipo**: dashboard | **Plataforma**: web
116
-
117
- ## Summary
118
- - **Total** (metric)
119
- - **Pendientes** (metric)
120
-
121
- ## Main
122
- - **Registros** (table)
123
- ```
124
-
125
- ## Output — two landing zones, one format (Markdown)
126
-
127
- **Single output format: Markdown.** The loop writes it (never this skill on its own). The **render is identical** at both levels; what changes is where it lands, per the composing loop:
128
-
129
- | Composing loop | Lands in | Grain |
130
- |---|---|---|
131
- | `spec-refine-loop` | the spec's `## UI spec` section (`docs/specs/NNN-spec-<slug>.md`) — document, in place | all the requirement's screens, coarse grain |
132
- | `plan-new-loop` · `plan-refine-loop` | **design SPECs** `NNN-SPEC-<SLUG>.md` — artifacts in the **PLAN session** (one **per screen**, with a trace header; see `../../artifacts/artifacts-design/SPEC.md`) | one screen per file, executable detail |
133
-
134
- Head the section (or the SPEC's trace header) with the chosen design options (design system, theme, language) in one line. Then the Markdown render, with these exact rules:
135
-
136
- - `# {name}`
137
- - `**Tipo**: {type} | **Plataforma**: {platform}`
138
- - `description` as a separate paragraph (only if present).
139
- - With regions: one `## {Capitalized type}` per region (capitalize the `type`'s first letter).
140
- - Without regions: a single `## Componentes`.
141
- - Each component: `- **{label || role || kind}**`, followed by ` ({kind})` **only if** there was a `label` or `role`.
142
- - `children` indented **2 spaces per level**.
143
- - Multiple screens are listed one after another (each with its own `#`).
144
-
145
- ## Source
146
-
147
- Rationale and history: design (`docs/referencias/workflow-roles/ui-spec.md`).