agentera 3.0.0-dev.3 → 3.0.0-dev.5

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 (131) hide show
  1. package/README.md +39 -6
  2. package/bundle/.agentera-npx-bundle.json +1 -1
  3. package/bundle/references/cli/agent-ready-state-contract.yaml +20 -17
  4. package/bundle/references/cli/bundle-skill-vocabulary.yaml +1 -1
  5. package/bundle/references/cli/capability-instruction-contract.yaml +98 -57
  6. package/bundle/references/cli/routing-execution-vocabulary.yaml +6 -6
  7. package/bundle/references/cli/update-channels.yaml +27 -7
  8. package/bundle/references/cli/vocabulary-index.yaml +3 -3
  9. package/bundle/references/cli/vocabulary.md +28 -19
  10. package/bundle/registry.json +1 -1
  11. package/bundle/skills/agentera/SKILL.md +38 -21
  12. package/bundle/skills/agentera/agents/dokumentera.toml +1 -1
  13. package/bundle/skills/agentera/agents/hej.toml +1 -1
  14. package/bundle/skills/agentera/agents/inspektera.toml +1 -1
  15. package/bundle/skills/agentera/agents/inspirera.toml +1 -1
  16. package/bundle/skills/agentera/agents/optimera.toml +1 -1
  17. package/bundle/skills/agentera/agents/orkestrera.toml +1 -1
  18. package/bundle/skills/agentera/agents/planera.toml +1 -1
  19. package/bundle/skills/agentera/agents/profilera.toml +1 -1
  20. package/bundle/skills/agentera/agents/realisera.toml +1 -1
  21. package/bundle/skills/agentera/agents/resonera.toml +1 -1
  22. package/bundle/skills/agentera/agents/visionera.toml +1 -1
  23. package/bundle/skills/agentera/agents/visualisera.toml +1 -1
  24. package/bundle/skills/agentera/capabilities/orkestrera/schemas/validation.yaml +26 -13
  25. package/bundle/skills/agentera/capability_schema_contract.yaml +33 -14
  26. package/bundle/skills/agentera/references/contract.md +2 -2
  27. package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +1 -1
  28. package/bundle/skills/agentera/schemas/artifacts/progress.yaml +15 -36
  29. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +14 -0
  30. package/bundle/skills/hej/SKILL.md +1 -1
  31. package/dist/analytics/usageStats.js +23 -1
  32. package/dist/analytics/usageStats.js.map +1 -1
  33. package/dist/capabilities/dokumentera/instructions.js +6 -0
  34. package/dist/capabilities/dokumentera/instructions.js.map +1 -0
  35. package/dist/capabilities/hej/instructions.js +6 -0
  36. package/dist/capabilities/hej/instructions.js.map +1 -0
  37. package/dist/capabilities/index.js +38 -0
  38. package/dist/capabilities/index.js.map +1 -0
  39. package/dist/capabilities/inspektera/instructions.js +6 -0
  40. package/dist/capabilities/inspektera/instructions.js.map +1 -0
  41. package/dist/capabilities/inspirera/instructions.js +6 -0
  42. package/dist/capabilities/inspirera/instructions.js.map +1 -0
  43. package/dist/capabilities/optimera/instructions.js +6 -0
  44. package/dist/capabilities/optimera/instructions.js.map +1 -0
  45. package/dist/capabilities/orkestrera/instructions.js +6 -0
  46. package/dist/capabilities/orkestrera/instructions.js.map +1 -0
  47. package/dist/capabilities/planera/instructions.js +6 -0
  48. package/dist/capabilities/planera/instructions.js.map +1 -0
  49. package/dist/capabilities/profilera/instructions.js +6 -0
  50. package/dist/capabilities/profilera/instructions.js.map +1 -0
  51. package/dist/capabilities/realisera/instructions.js +6 -0
  52. package/dist/capabilities/realisera/instructions.js.map +1 -0
  53. package/dist/capabilities/resonera/instructions.js +6 -0
  54. package/dist/capabilities/resonera/instructions.js.map +1 -0
  55. package/dist/capabilities/visionera/instructions.js +6 -0
  56. package/dist/capabilities/visionera/instructions.js.map +1 -0
  57. package/dist/capabilities/visualisera/instructions.js +6 -0
  58. package/dist/capabilities/visualisera/instructions.js.map +1 -0
  59. package/dist/cli/capabilityContext.js +92 -26
  60. package/dist/cli/capabilityContext.js.map +1 -1
  61. package/dist/cli/commands/capability.js +1 -8
  62. package/dist/cli/commands/capability.js.map +1 -1
  63. package/dist/cli/commands/doctor.js +42 -3
  64. package/dist/cli/commands/doctor.js.map +1 -1
  65. package/dist/cli/commands/report.js +5 -1
  66. package/dist/cli/commands/report.js.map +1 -1
  67. package/dist/cli/commands/state.js +22 -11
  68. package/dist/cli/commands/state.js.map +1 -1
  69. package/dist/cli/commands/validate.js +12 -2
  70. package/dist/cli/commands/validate.js.map +1 -1
  71. package/dist/cli/commands/verify.js +6 -0
  72. package/dist/cli/commands/verify.js.map +1 -1
  73. package/dist/cli/dispatch.js +508 -172
  74. package/dist/cli/dispatch.js.map +1 -1
  75. package/dist/cli/errors.js +53 -0
  76. package/dist/cli/errors.js.map +1 -0
  77. package/dist/cli/help.js +201 -0
  78. package/dist/cli/help.js.map +1 -0
  79. package/dist/cli/orientation.js +9 -6
  80. package/dist/cli/orientation.js.map +1 -1
  81. package/dist/cli/stateQuery.js +7 -0
  82. package/dist/cli/stateQuery.js.map +1 -1
  83. package/dist/cli/todoMarkdown.js +33 -0
  84. package/dist/cli/todoMarkdown.js.map +1 -0
  85. package/dist/hooks/common.js +0 -2
  86. package/dist/hooks/common.js.map +1 -1
  87. package/dist/hooks/validateArtifact.js +10 -8
  88. package/dist/hooks/validateArtifact.js.map +1 -1
  89. package/dist/registries/capabilityContract.js +12 -11
  90. package/dist/registries/capabilityContract.js.map +1 -1
  91. package/dist/registries/evaluatorHandoffContract.js +171 -0
  92. package/dist/registries/evaluatorHandoffContract.js.map +1 -0
  93. package/dist/setup/codex.js +146 -5
  94. package/dist/setup/codex.js.map +1 -1
  95. package/dist/setup/doctor.js +22 -1
  96. package/dist/setup/doctor.js.map +1 -1
  97. package/dist/setup/smokeChecks.js +111 -0
  98. package/dist/setup/smokeChecks.js.map +1 -0
  99. package/dist/upgrade/channels.js +9 -3
  100. package/dist/upgrade/channels.js.map +1 -1
  101. package/dist/upgrade/migrateArtifactsV1ToV2.js +0 -1
  102. package/dist/upgrade/migrateArtifactsV1ToV2.js.map +1 -1
  103. package/dist/upgrade/nextMajorDoctor.js +121 -0
  104. package/dist/upgrade/nextMajorDoctor.js.map +1 -0
  105. package/dist/upgrade/runtimeMigration.js +19 -3
  106. package/dist/upgrade/runtimeMigration.js.map +1 -1
  107. package/dist/upgrade/versionResolution.js +4 -4
  108. package/dist/upgrade/versionResolution.js.map +1 -1
  109. package/dist/validate/appHomeContract.js +1 -1
  110. package/dist/validate/appHomeContract.js.map +1 -1
  111. package/dist/validate/capability.js +11 -3
  112. package/dist/validate/capability.js.map +1 -1
  113. package/package.json +3 -3
  114. package/bundle/skills/agentera/capabilities/dokumentera/instructions.md +0 -428
  115. package/bundle/skills/agentera/capabilities/hej/instructions.md +0 -331
  116. package/bundle/skills/agentera/capabilities/inspektera/instructions.md +0 -514
  117. package/bundle/skills/agentera/capabilities/inspirera/instructions.md +0 -280
  118. package/bundle/skills/agentera/capabilities/optimera/instructions.md +0 -437
  119. package/bundle/skills/agentera/capabilities/orkestrera/instructions.md +0 -433
  120. package/bundle/skills/agentera/capabilities/planera/instructions.md +0 -368
  121. package/bundle/skills/agentera/capabilities/profilera/instructions.md +0 -419
  122. package/bundle/skills/agentera/capabilities/realisera/instructions.md +0 -403
  123. package/bundle/skills/agentera/capabilities/resonera/instructions.md +0 -329
  124. package/bundle/skills/agentera/capabilities/visionera/instructions.md +0 -309
  125. package/bundle/skills/agentera/capabilities/visualisera/instructions.md +0 -400
  126. package/dist/cli/commands/backfill.js +0 -84
  127. package/dist/cli/commands/backfill.js.map +0 -1
  128. package/dist/core/git.js +0 -43
  129. package/dist/core/git.js.map +0 -1
  130. package/dist/state/progressCommit.js +0 -289
  131. package/dist/state/progressCommit.js.map +0 -1
@@ -1,400 +0,0 @@
1
- # VISUALISERA
2
-
3
- **Visual Identity: Systematic Unified Aesthetic Language. Render, Establish, Articulate.**
4
-
5
- The visual steward of DESIGN.md. Deep creation through codebase exploration, domain research, and Socratic challenge about aesthetics. Opinionated enough to enforce consistency, flexible enough to evolve, concrete enough for any agent to generate correct UI.
6
-
7
- Three modes: **create**, **refine**, **audit**.
8
-
9
- ---
10
-
11
- ## Visual identity
12
-
13
- Glyph: **◰** (protocol ref: SG11). Used in the mandatory exit marker.
14
-
15
- ---
16
-
17
- ## State artifacts
18
-
19
- One file in `.agentera/`.
20
-
21
- | Artifact | Purpose | Bootstrap |
22
- |----------|---------|-----------|
23
- | `DESIGN.md` | Visual identity. Colors, typography, spacing, constraints, components, themes. An agent-readable design system. | Created via deep design conversation. |
24
-
25
- Use this prose plus `agentera describe --format json` and its `artifact_schemas` entry for `design` as the active design artifact specification; do not search Agentera directories manually. The design schema covers `<!-- design:X -->` marker syntax, standard sections, YAML token block format, and naming conventions.
26
-
27
- ### Artifact path resolution
28
-
29
- Before reading or writing any artifact, check if `.agentera/docs.yaml` exists. If it has an Artifact Mapping section, use the path specified for each canonical filename (.agentera/design.yaml, etc.). If `.agentera/docs.yaml` doesn't exist or has no mapping for a given artifact, use the default layout: TODO.md, CHANGELOG.md, and DESIGN.md at the project root; canonical VISION.md at `.agentera/vision.yaml`; other agent-facing artifacts at `.agentera/*.yaml`. This applies to all artifact references in this capability, including cross-capability reads (VISION.md, .agentera/decisions.yaml, PROFILE.md).
30
-
31
- ### Contract values
32
-
33
- Contract values are inlined where referenced. Visual tokens from protocol: severity arrows VT5-VT8, trend arrows VT12-VT13, progress bar VT18, inline separator VT16 (·), list item VT15 (▸), section divider VT14, flow/target VT17 (→). Skill glyph SG11 for the exit marker. Exit signals EX1-EX4 for the exit marker. Confidence scale CS1-CS5 for decision profile consumption.
34
-
35
- `references/contract.md` (at the v2 skill location `skills/agentera/references/contract.md`) remains available as a full-spec reference for ambiguous cases or cross-checking.
36
-
37
- ---
38
-
39
- ## DESIGN.md format (condensed)
40
-
41
- Standard Markdown with structured YAML blocks inside fenced code regions, delineated by HTML comment markers for machine parseability.
42
-
43
- ```markdown
44
- # [Project Name] Design System
45
-
46
- ## Philosophy
47
- [Human prose: design principles, aesthetic rationale, visual personality]
48
-
49
- ## Colors
50
- <!-- design:colors -->
51
- ```yaml
52
- brand-primary: oklch(50% 0.25 25)
53
- brand-secondary: oklch(60% 0.15 250)
54
- background: oklch(100% 0 0)
55
- foreground: oklch(0% 0 0)
56
- ```
57
-
58
- ## Typography
59
- <!-- design:typography -->
60
- ```yaml
61
- text-heading:
62
- font-family: "Inter", sans-serif
63
- font-weight: 700
64
- text-body:
65
- font-family: "Inter", sans-serif
66
- font-weight: 400
67
- ```
68
-
69
- ## Constraints
70
- <!-- design:constraints -->
71
- ```yaml
72
- aesthetic:
73
- - property: box-shadow
74
- rule: prohibited
75
- reason: "Depth via borders and contrast, not shadows"
76
- structural:
77
- - pattern: arbitrary-values
78
- rule: prohibited
79
- scope: [colors, spacing]
80
- ```
81
-
82
- ```
83
-
84
- Standard sections: `colors`, `font-sizes`, `fonts`, `typography`, `spacing`, `radius`, `shadows`, `theme`, `constraints`, `components`, `tw-merge-preserve`. All optional. Custom sections use the same `design:` prefix with any name.
85
-
86
- Use this section and `skills/agentera/references/contract.md` as the active specification for token block formats, theme mappings, component contracts, naming conventions, and monorepo nesting rules.
87
-
88
- ---
89
-
90
- ## Step 0: Detect mode
91
-
92
- **If DESIGN.md does NOT exist**: Proceed to **Create** mode (Step 1).
93
-
94
- **If DESIGN.md exists**: Present the mode choice.
95
-
96
- Narration voice (riff, don't script):
97
-
98
- - "Design system's already in place. Evolve it, audit it, or start fresh?" · "Found your visual identity. Refine, check for mismatches, or clean slate?"
99
-
100
- Offer:
101
-
102
- > **Refine**: Evolve the existing design system based on what you've learned. Reads the current DESIGN.md, the codebase state, and recent progress to propose informed updates.
103
- >
104
- > **Audit**: Check the current design system for consistency, completeness, and mismatches with the codebase.
105
- >
106
- > **Replace**: Start fresh with a deep design conversation. Archives the current DESIGN.md and creates a new one from scratch.
107
-
108
- If **Refine**, skip to Refine mode.
109
- If **Audit**, skip to Audit mode.
110
- If **Replace**, archive current DESIGN.md to `.agentera/archive/design-{date}.yaml`, then proceed to Create mode.
111
-
112
- ---
113
-
114
- ## Create mode
115
-
116
- Step markers: display `── step N/7: verb` before each step.
117
- Steps: explore, research, converse, audit, write, validate, next.
118
-
119
- ### Step 1: Explore the codebase
120
-
121
- If code exists, read deeply before asking questions. Arriving informed distinguishes visualisera from a blank-slate design interview.
122
-
123
- 1. **Map the structure**: directory layout, UI components, pages
124
- 2. **VISION.md Identity section**: declared personality, voice, emotional register. The visual system must cohere with this.
125
- 3. **Existing theme/style files**: CSS properties, Tailwind config, color declarations, font imports, component libraries
126
- 4. **Dependency manifests**: UI framework, component library, CSS approach (determines token format)
127
- 5. **Parent DESIGN.md**: for monorepos, the inherited design system (nested overrides)
128
- 6. **CLAUDE.md, AGENTS.md**: existing design instructions
129
- 7. **Decision profile**: read `$PROFILERA_PROFILE_DIR/PROFILE.md` (default: `$XDG_DATA_HOME/agentera/PROFILE.md`) directly per protocol confidence scale (CS1-CS5) conventions. Aesthetic preferences inform the design conversation. If missing, proceed without persona grounding.
130
- 8. `git log --oneline -20`: recent visual story
131
-
132
- Synthesize: "The project uses X with Y. Palette is Z. Typography is A. Strongest patterns: B. Inconsistencies: C." If VISION.md Identity exists, connect it to the visual system.
133
-
134
- Greenfield? Skip to Step 2.
135
-
136
- ### Step 2: Research the domain
137
-
138
- Search for design context that grounds the identity in what works:
139
-
140
- 1. **Stack design systems**: Tailwind themes, shadcn/ui, Radix, Material Design. Defaults and customization points.
141
- 2. **Similar projects**: competing tools, adjacent products, established patterns
142
- 3. **State of the art**: recent trends, emerging patterns in similar domains
143
- 4. **Stack constraints**: framework limitations, component library opinions
144
-
145
- 3-5 targeted searches. Read promising results deeply. Synthesize: "Common approach is X. Opportunity to differentiate is Y."
146
-
147
- ### Step 3: The conversation
148
-
149
- Engage the user. Ask one question at a time through the runtime question tool
150
- (`AskUserQuestion`, always include `Done` option).
151
-
152
- **Personality**: the sharp colleague, here to design, not collect requirements. Exacting about details: "That's good, but what if the palette was braver?"
153
-
154
- Follow a narrative arc, not a checklist. Adapt, but cover:
155
-
156
- 1. **The philosophy**: "Based on what I see in the codebase [and the VISION.md Identity], here's the visual impression I'd expect: [synthesis]. What should this project FEEL like visually? If someone sees the UI for 3 seconds, what impression should they have? Brutalist? Playful? Clinical? Luxurious?"
157
-
158
- If VISION.md Identity exists, propose defaults: "Your identity says 'bold and direct.' That suggests sharp edges, high contrast, no decorative shadows. Does that resonate?"
159
-
160
- Push beyond generic: "'Clean and modern' is too vague. Apple-clean with whitespace, or Stripe-clean with dense information hierarchy? Very different."
161
-
162
- 2. **The color strategy**: "What's the color philosophy? Monochrome with a single punctuation color? Rich and saturated? Muted and professional? What color means 'this is us'?"
163
-
164
- Be specific: "Two-color with single accent, or multi-color with semantic meaning? What carries the brand: background or foreground?"
165
-
166
- Reference existing code colors: "`#2563eb` as primary: intentional or inherited?"
167
-
168
- 3. **The typography**: "How should text feel? Monospace for that developer-tool edge? Clean sans-serif for clarity? What's the hierarchy: how do you distinguish a label from a heading from body text?"
169
-
170
- Push: "System fonts or custom? Geometric (Inter), humanist (Source Sans), industrial (JetBrains Mono)?"
171
-
172
- 4. **The constraints**: "What should NEVER happen in this UI? Shadows? Rounded corners? Gradients? Arbitrary values? What are the bright lines?"
173
-
174
- Maps to `<!-- design:constraints -->`. "Every constraint prevents a class of visual mismatch."
175
-
176
- 5. **The components**: "What are the core UI building blocks? Buttons, cards, inputs. What variants does each need? What's the interaction pattern?"
177
-
178
- Maps to `<!-- design:components -->`. Focus on contracts: "What props, variants, refusals? This becomes the contract agents build against."
179
-
180
- ### Step 4: Pre-write self-audit
181
-
182
- Pre-write self-audit: run `agentera lint --artifact <ARTIFACT> --text "<DRAFT>"` (or `--file <PATH>`; schema names such as `decisions` auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns).
183
- Max 3 revision attempts. Flag with [post-audit-flagged] if still failing.
184
-
185
- Narration voice (riff, don't script):
186
-
187
- - "Tightening this up..." · "Cutting the filler first..." · "One more pass..."
188
-
189
- ### Step 5: Write DESIGN.md
190
-
191
- Synthesize the conversation into a structured design system document.
192
-
193
- **Tone**: prose sections opinionated and evocative (why tokens exist, how they relate); YAML blocks precise and machine-parseable.
194
-
195
- **Structure**: follow the spec. Every section gets prose + YAML. At minimum:
196
-
197
- - **Philosophy**: prose only, the aesthetic rationale
198
- - **Colors**: `<!-- design:colors -->` with OKLCH/HSL values and semantic aliases
199
- - **Typography**: `<!-- design:typography -->` with composite token definitions
200
- - **Spacing**: `<!-- design:spacing -->` with a consistent scale (8pt grid recommended)
201
- - **Constraints**: `<!-- design:constraints -->` with aesthetic and structural rules
202
- - **Components**: `<!-- design:components -->` with variant contracts (if the project has UI)
203
-
204
- Add `theme`, `radius`, `shadows`, `font-sizes`, `fonts` as warranted.
205
-
206
- Use established scales: OKLCH for colors, 8pt grid for spacing, modular scale for type. No arbitrary values. Present draft, get explicit approval before writing.
207
-
208
- Artifact writing follows contract Section 24 (Artifact Writing Conventions): banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.
209
-
210
- ### Step 6: Validate
211
-
212
- Validate the written file against the `DESIGN.md` structure described in this capability. Agentera v2 does not ship a standalone design validator; fix malformed sections, missing token fields, or unresolved references before presenting.
213
-
214
- ### Step 7: Next steps
215
-
216
- ▸ **Set up enforcement**: propose project-local checks for tokens, component usage, and visual mismatches; no separate Agentera enforcement reference ships in v2
217
- ▸ **Build to the spec**: use ⧉ realisera to implement UI that respects the design tokens
218
- ▸ **Document it**: use ▤ dokumentera to add the design system to project documentation
219
- ▸ **Refine later**: use ◰ visualisera again to evolve the design as the project matures
220
-
221
- ---
222
-
223
- ## Refine mode
224
-
225
- Evolve an existing design system based on what's changed.
226
-
227
- Step markers: display `── step N/4: verb` before each step.
228
- Steps: read, propose, audit, update.
229
-
230
- ### Step 1: Read current state
231
-
232
- 1. Current DESIGN.md: all token blocks, constraints, prose
233
- 2. Codebase: focused on changes since DESIGN.md was written (git log, new components)
234
- 3. VISION.md Identity: has verbal identity evolved?
235
- 4. PROGRESS.md: UI work and inline design decisions
236
- 5. TODO.md: design-related issues
237
-
238
- ### Step 2: Propose changes
239
-
240
- > Here's what's changed since the design system was written:
241
- >
242
- > - New components [A, B] were built that aren't in the component contracts
243
- > - The color palette is out of sync: [file:line] uses [value] not in the token set
244
- > - VISION.md Identity now says [X], and the visual system [does/doesn't] reflect that
245
- >
246
- > I'd suggest updating:
247
- >
248
- > - [Section]: [what to change and why]
249
-
250
- Brief conversation (2-4 exchanges) to refine proposed changes.
251
-
252
- ### Step 3: Pre-write self-audit
253
-
254
- Pre-write self-audit: run `agentera lint --artifact <ARTIFACT> --text "<DRAFT>"` (or `--file <PATH>`; schema names such as `decisions` auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns).
255
- Max 3 revision attempts. Flag with [post-audit-flagged] if still failing.
256
-
257
- Narration voice (riff, don't script):
258
-
259
- - "Tightening this up..." · "Cutting the filler first..." · "One more pass..."
260
-
261
- ### Step 4: Update DESIGN.md
262
-
263
- Show diff with rationale. Get approval. Run validation after writing.
264
-
265
- Artifact writing follows contract Section 24 (Artifact Writing Conventions): banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.
266
-
267
- ---
268
-
269
- ## Audit mode
270
-
271
- Two-phase check: deterministic validation (script), then agent-driven code analysis.
272
-
273
- Step markers: display `── step N/3: verb` before each step.
274
- Steps: validate, check, report.
275
-
276
- ### Step 1: Validate structure
277
-
278
- Inspect `DESIGN.md` and report structural issues: malformed YAML blocks, missing sections, unresolved references, or token entries without category/name/value.
279
-
280
- ### Step 2: Check adherence
281
-
282
- Scan codebase for design mismatches:
283
-
284
- 1. **Token usage**: undeclared colors, fonts, or spacing values in code
285
- 2. **Constraint violations**: prohibited properties in use (e.g., shadows when banned)
286
- 3. **Component mismatch**: undeclared variants or prohibited props
287
- 4. **Consistency**: ad-hoc styling on similar elements
288
-
289
- ### Step 3: Report
290
-
291
- Categorize findings by severity (protocol refs: SF1-SF3 for finding severity):
292
-
293
- - ⇶ **Critical** (VT5): tokens in code that don't exist in DESIGN.md (uncontrolled styling)
294
- - ⇉ **Warning** (VT6): declared tokens not used anywhere (dead tokens), mild inconsistencies
295
- - ⇢ **Info** (VT8): suggestions for new tokens or constraints based on observed patterns
296
-
297
- Present with file:line references. For each finding, offer to:
298
- ▸ **Fix DESIGN.md**: add missing tokens or constraints
299
- ▸ **File to TODO.md**: if the code is wrong (design is right, code is out of sync)
300
- ▸ **Skip**: intentional or not worth fixing
301
-
302
- For framework-specific enforcement beyond audits, derive checks from the project's stack and record them directly in DESIGN.md or TODO.md.
303
-
304
- ---
305
-
306
- ## Safety rails
307
-
308
- <critical>
309
- - NEVER modify DESIGN.md without explicit user approval. Present drafts and get confirmation.
310
- - NEVER write design tokens that conflict with VISION.md Identity. If the verbal identity says "warm and approachable" and the user wants a cold, brutalist palette, surface the tension explicitly and let the user resolve it.
311
- - NEVER impose aesthetic preferences. The user's taste drives the design. Have opinions, push for specificity, but defer to the user's choices.
312
- - NEVER skip the validation step after writing DESIGN.md. Inspect the structure and fix any errors before presenting the result.
313
- - NEVER create arbitrary token values. Use established scales (8pt grid for spacing, modular type scale for font sizes, OKLCH for perceptual color uniformity). The design system must practice what it preaches.
314
- - NEVER modify code files. Visualisera writes DESIGN.md; realisera implements it. The separation of declaration and implementation is fundamental.
315
- - NEVER skip the codebase exploration (Step 1) when code exists. Arriving informed is what makes the conversation productive rather than generic.
316
- </critical>
317
-
318
- ---
319
-
320
- ## Exit signals
321
-
322
- Report one of these statuses at workflow completion (protocol refs: EX1-EX4).
323
-
324
- Format: `◰ visualisera · <status>` followed by a summary sentence.
325
- For flagged, stuck, and waiting: add `▸` (VT15) bullet details below the summary.
326
-
327
- - **complete** (EX1): DESIGN.md was written (Create/Replace mode), updated (Refine mode), or audited with findings reported (Audit mode). Validation script ran without errors, and all changes had explicit user approval before writing.
328
- - **flagged** (EX2): The design system was produced or audited but with issues worth surfacing. Possible causes: validation passed but with advisory warnings, the design mismatches VISION.md Identity in ways the user acknowledged, or audit findings were discovered that were neither fixed nor filed to TODO.md.
329
- - **stuck** (EX3): Cannot write DESIGN.md because the user declined to approve the draft, the validation script reports errors that cannot be resolved without user input on the design intent, or the project's UI stack is inaccessible and token defaults cannot be reliably inferred.
330
- - **waiting** (EX4): The visual identity direction is entirely undefined and the user has not engaged with the design conversation, or the project has no UI layer and DESIGN.md would serve no purpose without clarification of what is being designed.
331
-
332
- ---
333
-
334
- ## Cross-capability integration
335
-
336
- Visualisera is part of a twelve-capability suite. It is the visual identity layer, the capability that defines how the project looks.
337
-
338
- ### Visualisera reads visionera output
339
-
340
- VISION.md's Identity section declares the verbal personality (bold, warm, playful, etc.). Visualisera reads this to propose visual tokens coherent with the declared identity. If Identity says "industrial and direct," visualisera proposes sharp edges and monospace type. Visionera reads DESIGN.md in return; neither writes the other's artifact.
341
-
342
- ### Visualisera feeds realisera
343
-
344
- DESIGN.md's tokens and constraints guide autonomous UI development. When realisera builds components or pages, it reads DESIGN.md to understand what colors, typography, spacing, and constraints to use. The design system prevents visual mismatches across cycles.
345
-
346
- ### Visualisera is informed by dokumentera
347
-
348
- DOCS.md tracks DESIGN.md in the artifact mapping. Dokumentera may document the design system as part of project documentation.
349
-
350
- ### Visualisera is informed by inspektera
351
-
352
- When inspektera audits architecture alignment or pattern consistency, design system adherence is a relevant dimension. Future integration may include design-specific audit dimensions.
353
-
354
- ### Visualisera is informed by profilera
355
-
356
- The decision profile captures aesthetic preferences, specifically the user's established patterns around visual design, typography choices, and UI conventions. Visualisera reads these as defaults during the create conversation.
357
-
358
- ### Visualisera is informed by inspirera
359
-
360
- When inspirera analyzes external design systems or visual patterns, the findings can feed into visualisera's research step or refine mode. External design references enrich the conversation.
361
-
362
- ### Visualisera is informed by resonera
363
-
364
- When design decisions require deliberation, suggest ❈ resonera before committing. Use it for competing aesthetics, brand evolution, or significant visual pivots.
365
-
366
- ---
367
-
368
- ## Getting started
369
-
370
- ### New project: design before building
371
-
372
- 1. ⛥ visionera: create VISION.md with Identity section (who the project IS)
373
- 2. ◰ visualisera: create DESIGN.md (how it LOOKS), coherent with the Identity
374
- 3. ⧉ realisera: build UI to the design spec
375
-
376
- ### Existing project: capture the visual identity
377
-
378
- 1. ◰ visualisera: reads existing styles, proposes tokens from what's already there
379
- 2. Review and refine the generated DESIGN.md
380
- 3. Set up enforcement from project-local checks
381
-
382
- ### Audit existing design
383
-
384
- ```
385
-
386
- /agentera design
387
-
388
- ```
389
-
390
- Select "Audit" mode. Validates structure and scans code for mismatches.
391
-
392
- ### Refine after evolution
393
-
394
- ```
395
-
396
- /agentera design
397
-
398
- ```
399
-
400
- Select "Refine" mode. Reviews what's changed and proposes design system updates.
@@ -1,84 +0,0 @@
1
- import fs from "node:fs";
2
- import path from "node:path";
3
- import { resolvePath } from "../../core/paths.js";
4
- import { computeBackfill, rewriteCycleCommits } from "../../state/progressCommit.js";
5
- import { discoverSchemasDir, loadSchemas } from "../appContext.js";
6
- import { emitStructured } from "../structured.js";
7
- function pyStr(value) {
8
- if (value === null || value === undefined)
9
- return "None";
10
- if (value === true)
11
- return "True";
12
- if (value === false)
13
- return "False";
14
- return String(value);
15
- }
16
- export function backfillProgressPath(project) {
17
- const schemas = loadSchemas(discoverSchemasDir());
18
- const info = schemas.progress;
19
- const rel = info && info.path ? String(info.path) : ".agentera/progress.yaml";
20
- return path.isAbsolute(rel) ? rel : path.join(project, rel);
21
- }
22
- function changesToObject(changes) {
23
- const obj = {};
24
- for (const [n, v] of changes)
25
- obj[String(n)] = v;
26
- return obj;
27
- }
28
- function emitBackfill(payload, format, out) {
29
- if (format === "json") {
30
- emitStructured(payload, "json", out);
31
- return;
32
- }
33
- out(`status=${payload.status} | mode=${payload.mode ?? "None"} | path=${payload.path}\n`);
34
- if (payload.message)
35
- out(`${payload.message}\n`);
36
- for (const op of payload.operations ?? []) {
37
- out(`- cycle=${op.cycle} | commit=${pyStr(op.commit)} | state=${op.state} | action=${op.action}\n`);
38
- }
39
- const changes = (payload.changes ?? {});
40
- const keys = Object.keys(changes);
41
- if (keys.length > 0) {
42
- const sorted = keys.sort((a, b) => Number(b) - Number(a));
43
- out("changes=" + sorted.map((n) => `${n}->${changes[n]}`).join(", ") + "\n");
44
- }
45
- }
46
- export function cmdBackfill(args, io = {}) {
47
- const out = io.out ?? ((t) => process.stdout.write(t));
48
- const project = resolvePath(args.project ?? process.cwd());
49
- const mode = args.mode ?? "check";
50
- const p = backfillProgressPath(project);
51
- const payload = {
52
- command: "backfill",
53
- status: "ok",
54
- project,
55
- mode,
56
- path: p,
57
- operations: [],
58
- changes: {},
59
- };
60
- if (!fs.existsSync(p)) {
61
- payload.status = "noop";
62
- payload.message = `progress artifact not found at ${p}`;
63
- emitBackfill(payload, args.format ?? "text", out);
64
- return 0;
65
- }
66
- const text = fs.readFileSync(p, "utf8");
67
- const result = computeBackfill(text, {
68
- mode,
69
- targetCommit: args.commit ?? null,
70
- targetCycle: args.cycle ?? null,
71
- cwd: project,
72
- });
73
- payload.status = result.status;
74
- payload.operations = result.operations;
75
- payload.changes = changesToObject(result.changes);
76
- if (result.message !== null)
77
- payload.message = result.message;
78
- if (result.status === "fixed") {
79
- fs.writeFileSync(p, rewriteCycleCommits(text, new Map(result.changes)), "utf8");
80
- }
81
- emitBackfill(payload, args.format ?? "text", out);
82
- return result.exitCode;
83
- }
84
- //# sourceMappingURL=backfill.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"backfill.js","sourceRoot":"","sources":["../../../src/cli/commands/backfill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAYlD,SAAS,KAAK,CAAC,KAAc;IAC3B,IAAI,KAAK,KAAK,IAAI,IAAI,KAA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CAAC;IAClF,CAAC;IAED,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,IAAI,MAAM,EAAE,GAAG,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC"}
package/dist/core/git.js DELETED
@@ -1,43 +0,0 @@
1
- import { spawnSync } from "node:child_process";
2
- /** Run `git` in `cwd`; return `null` if git cannot be invoked. */
3
- export function gitRun(args, cwd) {
4
- const result = spawnSync("git", args, { cwd, encoding: "utf8" });
5
- if (result.error) {
6
- return null;
7
- }
8
- return {
9
- status: result.status,
10
- stdout: result.stdout ?? "",
11
- stderr: result.stderr ?? "",
12
- };
13
- }
14
- /**
15
- * Classify `token` relative to HEAD: `ancestor` (already in history), `stale`
16
- * (resolves but not an ancestor of HEAD), `unknown` (not a commit object here),
17
- * or `unavailable` (git/HEAD missing). Faithful port of progress_commit.ancestor_state.
18
- */
19
- export function ancestorState(token, cwd) {
20
- const head = gitRun(["rev-parse", "--verify", "--quiet", "HEAD"], cwd);
21
- if (head === null || head.status !== 0) {
22
- return "unavailable";
23
- }
24
- const exists = gitRun(["rev-parse", "--verify", "--quiet", `${token}^{commit}`], cwd);
25
- if (exists === null) {
26
- return "unavailable";
27
- }
28
- if (exists.status !== 0) {
29
- return "unknown";
30
- }
31
- const ancestor = gitRun(["merge-base", "--is-ancestor", token, "HEAD"], cwd);
32
- if (ancestor === null) {
33
- return "unavailable";
34
- }
35
- if (ancestor.status === 0) {
36
- return "ancestor";
37
- }
38
- if (ancestor.status === 1) {
39
- return "stale";
40
- }
41
- return "unavailable";
42
- }
43
- //# sourceMappingURL=git.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/core/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAQ/C,kEAAkE;AAClE,MAAM,UAAU,MAAM,CAAC,IAAc,EAAE,GAAW;IAChD,MAAM,MAAM,GAAG,S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