sdg-agents 1.0.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 (130) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +161 -0
  3. package/package.json +88 -0
  4. package/src/assets/dev-guides/agent-deep-flow.md +139 -0
  5. package/src/assets/dev-guides/prompt-tracks/00-lite-mode/01-project-scope-and-mvp.md +45 -0
  6. package/src/assets/dev-guides/prompt-tracks/00-lite-mode/02-stack-and-data-model.md +56 -0
  7. package/src/assets/dev-guides/prompt-tracks/00-lite-mode/03-external-integrations.md +44 -0
  8. package/src/assets/dev-guides/prompt-tracks/00-lite-mode/04-launch-checklist.md +26 -0
  9. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/01-project-vision.md +77 -0
  10. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/02-problem-definition.md +63 -0
  11. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/03-success-metrics.md +48 -0
  12. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/05-engineering-culture-and-silos.md +41 -0
  13. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/00-foundation/06-foundation-approval.md +57 -0
  14. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/01-setup/01-tech-stack.md +62 -0
  15. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/01-setup/02-local-environment.md +50 -0
  16. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/01-setup/03-version-control-and-tracking.md +65 -0
  17. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/01-setup/04-hello-world-validation.md +37 -0
  18. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/01-setup/05-setup-approval.md +61 -0
  19. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/01-folder-structure.md +49 -0
  20. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/02-design-patterns.md +59 -0
  21. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/03-apis-and-communication.md +55 -0
  22. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/04-security-and-access.md +63 -0
  23. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/05-security-audit.md +64 -0
  24. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/06-design-system-ux.md +72 -0
  25. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/07-ai-strategy.md +72 -0
  26. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/08-observability.md +65 -0
  27. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/09-technical-documentation.md +64 -0
  28. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/10-infrastructure-and-costs.md +40 -0
  29. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/11-data-privacy-compliance.md +41 -0
  30. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/12-performance-and-scale.md +46 -0
  31. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/13-disaster-recovery.md +39 -0
  32. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/02-architecture/14-architecture-approval.md +81 -0
  33. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/03-delivery/01-ci-cd-pipeline.md +49 -0
  34. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/03-delivery/02-quality-standards.md +46 -0
  35. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/03-delivery/03-delivery-approval.md +58 -0
  36. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/00-feature-template.md +30 -0
  37. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/01-context-and-scope.md +46 -0
  38. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/02-business-rules.md +39 -0
  39. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/03-architecture-and-design.md +50 -0
  40. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/04-testing-strategy.md +48 -0
  41. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/05-implementation-plan.md +45 -0
  42. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/04-features/06-feature-approval.md +46 -0
  43. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/05-evolution/01-rfcs-and-changes.md +63 -0
  44. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/05-evolution/02-incident-postmortems.md +64 -0
  45. package/src/assets/dev-guides/prompt-tracks/01-new-evolution/05-evolution/03-adr-template.md +66 -0
  46. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/00-foundation/01-legacy-vision.md +73 -0
  47. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/00-foundation/02-foundation-approval.md +53 -0
  48. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/01-analysis/01-tech-debt-inventory.md +55 -0
  49. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/01-analysis/02-security-audit.md +63 -0
  50. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/01-analysis/03-regression-baseline.md +49 -0
  51. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/01-analysis/04-analysis-approval.md +65 -0
  52. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/02-strategy/01-modernization-approach.md +60 -0
  53. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/02-strategy/02-versioning-and-coexistence.md +57 -0
  54. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/02-strategy/03-new-demands-triage.md +41 -0
  55. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/02-strategy/04-strategy-approval.md +56 -0
  56. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/03-refactor/01-cleanup-backlog.md +45 -0
  57. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/03-refactor/02-refactor-approval.md +53 -0
  58. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/04-migration/01-migration-roadmap.md +47 -0
  59. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/04-migration/02-data-sync-strategy.md +56 -0
  60. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/04-migration/03-migration-approval.md +55 -0
  61. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/05-sunset/01-decommission-plan.md +47 -0
  62. package/src/assets/dev-guides/prompt-tracks/02-legacy-modernization/05-sunset/02-sunset-approval.md +60 -0
  63. package/src/assets/dev-guides/prompt-tracks/README.md +144 -0
  64. package/src/assets/dev-guides/software-development-lifecycle-sdlc.md +147 -0
  65. package/src/assets/dev-guides/spec-driven-dev-guide.md +81 -0
  66. package/src/assets/dev-guides/ui-prompt-guide.md +181 -0
  67. package/src/assets/img/sdg-agents-icon-dark.svg +55 -0
  68. package/src/assets/img/sdg-agents-icon-light.svg +55 -0
  69. package/src/assets/img/sdg-agents-menu-v1.png +0 -0
  70. package/src/assets/img/sdg-icon.svg +110 -0
  71. package/src/assets/instructions/commands/sdg-docs.md +69 -0
  72. package/src/assets/instructions/commands/sdg-feat.md +45 -0
  73. package/src/assets/instructions/commands/sdg-fix.md +41 -0
  74. package/src/assets/instructions/commands/sdg-land.md +128 -0
  75. package/src/assets/instructions/competencies/backend.md +353 -0
  76. package/src/assets/instructions/competencies/frontend.md +439 -0
  77. package/src/assets/instructions/core/agent-roles.md +104 -0
  78. package/src/assets/instructions/core/api-design.md +65 -0
  79. package/src/assets/instructions/core/ci-cd.md +144 -0
  80. package/src/assets/instructions/core/cloud.md +63 -0
  81. package/src/assets/instructions/core/code-style.md +144 -0
  82. package/src/assets/instructions/core/containers.md +115 -0
  83. package/src/assets/instructions/core/data-access.md +119 -0
  84. package/src/assets/instructions/core/engineering-standards.md +502 -0
  85. package/src/assets/instructions/core/naming.md +136 -0
  86. package/src/assets/instructions/core/observability.md +73 -0
  87. package/src/assets/instructions/core/security-pipeline.md +209 -0
  88. package/src/assets/instructions/core/security.md +45 -0
  89. package/src/assets/instructions/core/sql-style.md +138 -0
  90. package/src/assets/instructions/core/staff-dna.md +72 -0
  91. package/src/assets/instructions/core/testing-principles.md +212 -0
  92. package/src/assets/instructions/core/ui/architecture.md +171 -0
  93. package/src/assets/instructions/core/ui/design-thinking.md +319 -0
  94. package/src/assets/instructions/core/ui/presets.md +200 -0
  95. package/src/assets/instructions/core/ui/standards.md +144 -0
  96. package/src/assets/instructions/core/writing-soul.md +82 -0
  97. package/src/assets/instructions/flavors/legacy/principles.md +64 -0
  98. package/src/assets/instructions/flavors/lite/principles.md +39 -0
  99. package/src/assets/instructions/flavors/mvc/principles.md +124 -0
  100. package/src/assets/instructions/flavors/vertical-slice/principles.md +178 -0
  101. package/src/assets/instructions/idioms/csharp/patterns.md +367 -0
  102. package/src/assets/instructions/idioms/flutter/patterns.md +97 -0
  103. package/src/assets/instructions/idioms/go/patterns.md +193 -0
  104. package/src/assets/instructions/idioms/java/patterns.md +233 -0
  105. package/src/assets/instructions/idioms/javascript/patterns.md +223 -0
  106. package/src/assets/instructions/idioms/kotlin/patterns.md +94 -0
  107. package/src/assets/instructions/idioms/python/patterns.md +185 -0
  108. package/src/assets/instructions/idioms/rust/patterns.md +189 -0
  109. package/src/assets/instructions/idioms/scripts/patterns.md +81 -0
  110. package/src/assets/instructions/idioms/sql/patterns.md +109 -0
  111. package/src/assets/instructions/idioms/swift/patterns.md +97 -0
  112. package/src/assets/instructions/idioms/typescript/patterns.md +304 -0
  113. package/src/assets/instructions/idioms/vbnet/patterns.md +96 -0
  114. package/src/assets/instructions/idioms/vbnet-legacy/patterns.md +104 -0
  115. package/src/assets/instructions/templates/workflow.md +244 -0
  116. package/src/assets/instructions/workflows/governance.md +162 -0
  117. package/src/engine/bin/add-idiom.mjs +186 -0
  118. package/src/engine/bin/index.mjs +226 -0
  119. package/src/engine/config/stack-display.mjs +75 -0
  120. package/src/engine/config/stack-versions.mjs +76 -0
  121. package/src/engine/lib/cli-parser.mjs +80 -0
  122. package/src/engine/lib/display-utils.mjs +20 -0
  123. package/src/engine/lib/fs-utils.mjs +99 -0
  124. package/src/engine/lib/instruction-assembler.mjs +487 -0
  125. package/src/engine/lib/manifest-utils.mjs +128 -0
  126. package/src/engine/lib/prompt-utils.mjs +137 -0
  127. package/src/engine/lib/result-utils.mjs +14 -0
  128. package/src/engine/lib/ruleset-injector.mjs +183 -0
  129. package/src/engine/lib/ui-utils.mjs +216 -0
  130. package/src/engine/lib/wizard.mjs +472 -0
@@ -0,0 +1,181 @@
1
+ # UI Specification Guide — Designing Interfaces for AI Agents
2
+
3
+ > **Audience:** Technical leads and engineers who need to communicate UI requirements through precise technical specifications.
4
+ >
5
+ > **Core principle:** AI agents operate as execution engines for provided design tokens and layout contracts. Precision in input density directly correlates with output accuracy.
6
+
7
+ ---
8
+
9
+ ## Why UI Specifications Fail
10
+
11
+ Vague UI requests produce generic outputs. agents default to the most common training patterns when gaps exist in the specification. Standardizing the following inputs prevents architectural drift:
12
+
13
+ 1. **Visual System** — palette (OKLCH), preset, typography
14
+ 2. **Structural Content** — sections, component hierarchy, data sources
15
+ 3. **Execution State** — interactions, lifecycle states (loading/empty/error)
16
+ 4. **Negative Constraints** — explicit exclusions to prevent logic drift
17
+
18
+ ---
19
+
20
+ ## The UI Prompt Template
21
+
22
+ Copy and fill this template when requesting any UI work (page, component, or screen):
23
+
24
+ ```markdown
25
+ ## UI Request
26
+
27
+ ### 1. Context
28
+
29
+ What is this interface for? Who uses it? What problem does it solve?
30
+
31
+ - Audience: [developers / consumers / internal ops / etc.]
32
+ - Purpose: [data entry / data visualization / marketing / onboarding / etc.]
33
+
34
+ ### 2. Visual Identity
35
+
36
+ - Palette: [Default Zinc+Blue | Custom: primary=___ secondary=___]
37
+ OR: "Match the existing project palette"
38
+ - Preset: [BENTO | GLASS | CLEAN | MONO | NEOBRUTALISM | PAPER]
39
+ OR: "Follow the project preset"
40
+ - Typography: [Precision/Dev | Premium/SaaS | Editorial | Bold | Corporate | Startup | Luxury]
41
+ OR: "Use project fonts"
42
+ - Theme: [Light only | Dark only | Both (default)]
43
+
44
+ ### 3. Sections & Components
45
+
46
+ List every visible section in order, top to bottom:
47
+
48
+ - [ ] Section name — brief description of content
49
+ - [ ] Section name — brief description of content
50
+
51
+ ### 4. Interactions & States
52
+
53
+ - What happens on click/hover/focus?
54
+ - Which states must be handled? [Loading | Empty | Error | Disabled]
55
+ - Any animations? [None | Subtle entry | Explicit: ___]
56
+
57
+ ### 5. Constraints
58
+
59
+ - What should NOT be included?
60
+ - Fixed breakpoints or layout restrictions?
61
+ - Any component or library limitations?
62
+
63
+ ### 6. Reference
64
+
65
+ - Closest existing page/component to derive from: [page name or "none"]
66
+ - Visual reference (if any): [URL or description]
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Learn by Example
72
+
73
+ ### ❌ Weak Specification (Low Density)
74
+
75
+ ```markdown
76
+ Create a dashboard for my SaaS app with cards showing metrics and a table.
77
+ Make it look modern and professional with a dark theme.
78
+ ```
79
+
80
+ > **Rationale for failure:** Missing palette definition forces arbitrary color selection. "Modern" and "professional" are subjective terms that trigger generic training defaults. Lack of section enumeration results in layout invention. Missing state definitions (loading/empty) creates incomplete execution contracts.
81
+
82
+ ---
83
+
84
+ ### ✅ Strong Specification (High Density)
85
+
86
+ ```markdown
87
+ ## UI Request
88
+
89
+ ### 1. Context
90
+
91
+ Analytics dashboard for a B2B SaaS tool.
92
+ Audience: internal ops team (power users, 8+ hours/day).
93
+ Purpose: monitor pipeline health — volume, conversion rate, and blocked deals.
94
+
95
+ ### 2. Visual Identity
96
+
97
+ - Palette: Default Zinc+Blue
98
+ - Preset: BENTO + GLASS
99
+ - Typography: Precision/Dev (JetBrains Mono display, Inter body)
100
+ - Theme: Both (dark as default)
101
+
102
+ ### 3. Sections & Components
103
+
104
+ - [ ] Header — app logo left, user avatar + notifications right
105
+ - [ ] KPI Row — 3 metric cards: Total Leads, Conversion Rate, Avg Deal Size
106
+ - [ ] Pipeline Chart — horizontal bar chart by stage (Bento cell, full width)
107
+ - [ ] Deals Table — sortable columns: Deal, Owner, Stage, Value, Last Activity
108
+ - [ ] Sidebar — collapsible, nav links: Overview / Deals / Reports / Settings
109
+
110
+ ### 4. Interactions & States
111
+
112
+ - KPI cards: hover shows sparkline trend (last 30 days)
113
+ - Table: row hover highlights, click opens deal detail drawer
114
+ - All data sections: skeleton loading state required
115
+ - Empty state for table: "No deals match your filters" + clear filters button
116
+
117
+ ### 5. Constraints
118
+
119
+ - No pie charts — bar and line charts only
120
+ - Table must be sticky-header on scroll
121
+ - Sidebar collapsed by default on screens < 1280px
122
+ - Do not add onboarding tooltips or modals
123
+
124
+ ### 6. Reference
125
+
126
+ - Derive from existing DashboardPage component
127
+ - Visual reference: Linear issue tracker table density
128
+ ```
129
+
130
+ > **Rationale for success:** Palette specification ensures correct OKLCH token generation. Preset usage locks the visual language. Enumerated sections prevent layout invention. Explicit state requirements ensure full lifecycle handling. Negative constraints block common drift patterns. Reference gives the execution engine a starting point and a density target.
131
+
132
+ ---
133
+
134
+ ## Visual Identity Map
135
+
136
+ Correlating UI requirements with technical standards:
137
+
138
+ | You want... | Preset | Palette suggestion | Typography |
139
+ | :-------------------------------- | :------------ | :------------------------ | :-------------- |
140
+ | Clean B2B SaaS dashboard | BENTO + CLEAN | Zinc + Blue (H=250) | Corporate |
141
+ | Polished, layered premium product | BENTO + GLASS | Zinc + Violet (H=290) | Premium/SaaS |
142
+ | Developer tool or CLI companion | MONO | Zinc monochromatic | Precision/Dev |
143
+ | Bold marketing or landing page | NEOBRUTALISM | High Chroma (Orange H=70) | Bold/Expressive |
144
+ | Content-heavy editorial or docs | PAPER | Zinc + Amber (H=80) | Editorial |
145
+ | Modern startup / Next.js app vibe | BENTO + CLEAN | Zinc + Blue (H=250) | Startup/Modern |
146
+ | Luxury product or high-end brand | GLASS + PAPER | Custom (ask agent) | Luxury/Refined |
147
+
148
+ ---
149
+
150
+ ## The 4 Most Common Drift Patterns (and How to Prevent Them)
151
+
152
+ | Drift | How it shows up | Prevention in prompt |
153
+ | :------------------- | :-------------------------------------- | :--------------------------------------------- |
154
+ | **Palette drift** | Random colors, poor light/dark contrast | Always specify Palette or say "match project" |
155
+ | **Layout invention** | Agent adds sections you didn't ask for | List every section explicitly; add Constraints |
156
+ | **State omission** | No loading/empty/error states | Enumerate states in Interactions section |
157
+ | **Visual pollution** | Border + shadow + bg-color all together | Specify the preset — it constrains decoration |
158
+
159
+ ---
160
+
161
+ ## Minimal Prompt (When You're in a Hurry)
162
+
163
+ When speed matters more than precision, provide at minimum:
164
+
165
+ ```markdown
166
+ ## UI Request (Minimal)
167
+
168
+ Context: [1 sentence — what and who]
169
+ Palette: [Default | Custom H=___]
170
+ Preset: [BENTO | GLASS | CLEAN | MONO | NEOBRUTALISM | PAPER]
171
+ Sections: [section 1], [section 2], [section 3]
172
+ Must-handle states: [Loading | Empty | Error]
173
+ Do NOT include: [constraint 1], [constraint 2]
174
+ ```
175
+
176
+ > **Rationale:** Palette + Preset are the two inputs that prevent the most common failures. Everything else can be iterated. Never omit these two.
177
+
178
+ ---
179
+
180
+ > [!TIP]
181
+ > **Technical iteration is continuous.** A well-structured specification achieves high-level accuracy in the first pass. Use targeted refinement prompts for specific sections that require higher density.
@@ -0,0 +1,55 @@
1
+ <svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
2
+
3
+ <!-- Clipboard board - dark warm tone -->
4
+ <rect x="96" y="72" width="320" height="400" rx="28" fill="#3E3224"/>
5
+ <!-- Board inner face -->
6
+ <rect x="104" y="80" width="304" height="384" rx="24" fill="#4A3C2C"/>
7
+
8
+ <!-- Metal clip - muted steel -->
9
+ <rect x="186" y="48" width="140" height="56" rx="8" fill="#546E7A"/>
10
+ <rect x="186" y="48" width="140" height="28" rx="8" fill="#607D8B"/>
11
+ <!-- Clip hole -->
12
+ <rect x="218" y="34" width="76" height="36" rx="18" fill="#4A3C2C"/>
13
+ <rect x="228" y="42" width="56" height="20" rx="10" fill="#5C4A36"/>
14
+
15
+ <!-- Paper sheet - dark surface -->
16
+ <rect x="124" y="100" width="264" height="352" rx="12" fill="#1A1A1A"/>
17
+ <!-- Paper fold accent -->
18
+ <path d="M364 100L388 124L364 124Z" fill="#242424"/>
19
+
20
+ <!-- Title pill badge -->
21
+ <rect x="152" y="120" width="208" height="32" rx="16" fill="#7C8FE4"/>
22
+ <text x="256" y="141" text-anchor="middle" dominant-baseline="central" font-family="system-ui, -apple-system, sans-serif" font-size="13" font-weight="700" fill="#FFFFFF" letter-spacing="1.2">SPEC DRIVEN GUIDE</text>
23
+
24
+ <!-- Checklist rows -->
25
+ <!-- Row 1 - SPEC -->
26
+ <circle cx="168" cy="192" r="14" fill="#66BB6A"/>
27
+ <path d="M161 192L166 197L176 187" fill="none" stroke="#1A1A1A" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
28
+ <text x="196" y="197" font-family="system-ui, -apple-system, sans-serif" font-size="18" font-weight="700" fill="#E0DDD6" letter-spacing="1">SPEC</text>
29
+ <rect x="196" y="205" width="80" height="4" rx="2" fill="#333"/>
30
+
31
+ <!-- Row 2 - PLAN -->
32
+ <circle cx="168" cy="248" r="14" fill="#66BB6A"/>
33
+ <path d="M161 248L166 253L176 243" fill="none" stroke="#1A1A1A" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
34
+ <text x="196" y="253" font-family="system-ui, -apple-system, sans-serif" font-size="18" font-weight="700" fill="#E0DDD6" letter-spacing="1">PLAN</text>
35
+ <rect x="196" y="261" width="100" height="4" rx="2" fill="#333"/>
36
+
37
+ <!-- Row 3 - CODE -->
38
+ <circle cx="168" cy="304" r="14" fill="#66BB6A"/>
39
+ <path d="M161 304L166 309L176 299" fill="none" stroke="#1A1A1A" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
40
+ <text x="196" y="309" font-family="system-ui, -apple-system, sans-serif" font-size="18" font-weight="700" fill="#E0DDD6" letter-spacing="1">CODE</text>
41
+ <rect x="196" y="317" width="120" height="4" rx="2" fill="#333"/>
42
+
43
+ <!-- Row 4 - TEST -->
44
+ <circle cx="168" cy="360" r="14" fill="#66BB6A"/>
45
+ <path d="M161 360L166 365L176 355" fill="none" stroke="#1A1A1A" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
46
+ <text x="196" y="365" font-family="system-ui, -apple-system, sans-serif" font-size="18" font-weight="700" fill="#E0DDD6" letter-spacing="1">TEST</text>
47
+ <rect x="196" y="373" width="90" height="4" rx="2" fill="#333"/>
48
+
49
+ <!-- Row 5 - END -->
50
+ <circle cx="168" cy="416" r="14" fill="#66BB6A"/>
51
+ <path d="M161 416L166 421L176 411" fill="none" stroke="#1A1A1A" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
52
+ <text x="196" y="421" font-family="system-ui, -apple-system, sans-serif" font-size="18" font-weight="700" fill="#E0DDD6" letter-spacing="1">END</text>
53
+ <rect x="196" y="429" width="68" height="4" rx="2" fill="#333"/>
54
+
55
+ </svg>
@@ -0,0 +1,55 @@
1
+ <svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
2
+
3
+ <!-- Clipboard board - warm flat tone -->
4
+ <rect x="96" y="72" width="320" height="400" rx="28" fill="#8B6F47"/>
5
+ <!-- Board inner face -->
6
+ <rect x="104" y="80" width="304" height="384" rx="24" fill="#A07D52"/>
7
+
8
+ <!-- Metal clip - flat silver -->
9
+ <rect x="186" y="48" width="140" height="56" rx="8" fill="#78909C"/>
10
+ <rect x="186" y="48" width="140" height="28" rx="8" fill="#90A4AE"/>
11
+ <!-- Clip hole -->
12
+ <rect x="218" y="34" width="76" height="36" rx="18" fill="#A07D52"/>
13
+ <rect x="228" y="42" width="56" height="20" rx="10" fill="#BFA476"/>
14
+
15
+ <!-- Paper sheet - crisp white with slight round -->
16
+ <rect x="124" y="100" width="264" height="352" rx="12" fill="#FFFFFF"/>
17
+ <!-- Paper fold accent -->
18
+ <path d="M364 100L388 124L364 124Z" fill="#E8E5DE"/>
19
+
20
+ <!-- Title pill badge -->
21
+ <rect x="152" y="120" width="208" height="32" rx="16" fill="#1D2E3D"/>
22
+ <text x="256" y="136" text-anchor="middle" dominant-baseline="central" font-family="system-ui, -apple-system, sans-serif" font-size="13" font-weight="700" fill="#D1D5DB" letter-spacing="1.2">SPEC DRIVEN GUIDE</text>
23
+
24
+ <!-- Checklist rows -->
25
+ <!-- Row 1 - SPEC -->
26
+ <circle cx="168" cy="192" r="14" fill="#34D399"/>
27
+ <path d="M161 192L166 197L176 187" fill="none" stroke="#fff" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
28
+ <text x="196" y="197" font-family="system-ui, -apple-system, sans-serif" font-size="18" font-weight="700" fill="#37474F" letter-spacing="1">SPEC</text>
29
+ <rect x="196" y="205" width="80" height="4" rx="2" fill="#E0E0E0"/>
30
+
31
+ <!-- Row 2 - PLAN -->
32
+ <circle cx="168" cy="248" r="14" fill="#34D399"/>
33
+ <path d="M161 248L166 253L176 243" fill="none" stroke="#fff" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
34
+ <text x="196" y="253" font-family="system-ui, -apple-system, sans-serif" font-size="18" font-weight="700" fill="#37474F" letter-spacing="1">PLAN</text>
35
+ <rect x="196" y="261" width="100" height="4" rx="2" fill="#E0E0E0"/>
36
+
37
+ <!-- Row 3 - CODE -->
38
+ <circle cx="168" cy="304" r="14" fill="#34D399"/>
39
+ <path d="M161 304L166 309L176 299" fill="none" stroke="#fff" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
40
+ <text x="196" y="309" font-family="system-ui, -apple-system, sans-serif" font-size="18" font-weight="700" fill="#37474F" letter-spacing="1">CODE</text>
41
+ <rect x="196" y="317" width="120" height="4" rx="2" fill="#E0E0E0"/>
42
+
43
+ <!-- Row 4 - TEST -->
44
+ <circle cx="168" cy="360" r="14" fill="#34D399"/>
45
+ <path d="M161 360L166 365L176 355" fill="none" stroke="#fff" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
46
+ <text x="196" y="365" font-family="system-ui, -apple-system, sans-serif" font-size="18" font-weight="700" fill="#37474F" letter-spacing="1">TEST</text>
47
+ <rect x="196" y="373" width="90" height="4" rx="2" fill="#E0E0E0"/>
48
+
49
+ <!-- Row 5 - END -->
50
+ <circle cx="168" cy="416" r="14" fill="#34D399"/>
51
+ <path d="M161 416L166 421L176 411" fill="none" stroke="#fff" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
52
+ <text x="196" y="421" font-family="system-ui, -apple-system, sans-serif" font-size="18" font-weight="700" fill="#37474F" letter-spacing="1">END</text>
53
+ <rect x="196" y="429" width="68" height="4" rx="2" fill="#E0E0E0"/>
54
+
55
+ </svg>
@@ -0,0 +1,110 @@
1
+ <svg viewBox="0 0 512 560" xmlns="http://www.w3.org/2000/svg">
2
+ <defs>
3
+ <!-- Gradient background -->
4
+ <linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
5
+ <stop offset="0%" stop-color="#6C63FF" />
6
+ <stop offset="50%" stop-color="#48BFE3" />
7
+ <stop offset="100%" stop-color="#56CFB2" />
8
+ </linearGradient>
9
+
10
+ <!-- Glass fill -->
11
+ <linearGradient id="glass" x1="0" y1="0" x2="0.3" y2="1">
12
+ <stop offset="0%" stop-color="#ffffff" stop-opacity="0.35" />
13
+ <stop offset="100%" stop-color="#ffffff" stop-opacity="0.12" />
14
+ </linearGradient>
15
+
16
+ <!-- Paper glass fill - more opaque -->
17
+ <linearGradient id="paper" x1="0" y1="0" x2="0.2" y2="1">
18
+ <stop offset="0%" stop-color="#ffffff" stop-opacity="0.75" />
19
+ <stop offset="100%" stop-color="#ffffff" stop-opacity="0.5" />
20
+ </linearGradient>
21
+
22
+ <!-- Clip metallic -->
23
+ <linearGradient id="clip" x1="0" y1="0" x2="0" y2="1">
24
+ <stop offset="0%" stop-color="#ffffff" stop-opacity="0.6" />
25
+ <stop offset="100%" stop-color="#ffffff" stop-opacity="0.25" />
26
+ </linearGradient>
27
+
28
+ <!-- Check gradient -->
29
+ <linearGradient id="chk" x1="0" y1="0" x2="1" y2="1">
30
+ <stop offset="0%" stop-color="#34D399" />
31
+ <stop offset="100%" stop-color="#10B981" />
32
+ </linearGradient>
33
+
34
+ <!-- Soft blur for background shapes -->
35
+ <filter id="blur1">
36
+ <feGaussianBlur in="SourceGraphic" stdDeviation="40" />
37
+ </filter>
38
+ <filter id="blur2">
39
+ <feGaussianBlur in="SourceGraphic" stdDeviation="30" />
40
+ </filter>
41
+
42
+ <!-- Rounded clip for background -->
43
+ <clipPath id="bgClip">
44
+ <rect x="0" y="0" width="512" height="560" rx="0" />
45
+ </clipPath>
46
+ </defs>
47
+
48
+ <!-- Background -->
49
+ <rect x="0" y="0" width="512" height="560" fill="#1A1A2E" />
50
+
51
+ <!-- Blurred color blobs -->
52
+ <g clip-path="url(#bgClip)">
53
+ <circle cx="120" cy="140" r="160" fill="#6C63FF" opacity="0.5" filter="url(#blur1)" />
54
+ <circle cx="400" cy="420" r="140" fill="#48BFE3" opacity="0.4" filter="url(#blur1)" />
55
+ <circle cx="360" cy="120" r="100" fill="#56CFB2" opacity="0.35" filter="url(#blur2)" />
56
+ <circle cx="140" cy="460" r="120" fill="#A78BFA" opacity="0.3" filter="url(#blur2)" />
57
+ </g>
58
+
59
+ <!-- Clipboard board - glass -->
60
+ <rect x="106" y="82" width="300" height="400" rx="24" fill="url(#glass)" stroke="rgba(255,255,255,0.2)" stroke-width="1.5" />
61
+
62
+ <!-- Paper sheet - brighter glass -->
63
+ <rect x="122" y="118" width="268" height="348" rx="16" fill="url(#paper)" stroke="rgba(255,255,255,0.3)" stroke-width="1" />
64
+
65
+ <!-- Clip -->
66
+ <rect x="206" y="62" width="100" height="44" rx="10" fill="url(#clip)" stroke="rgba(255,255,255,0.35)" stroke-width="1.2" />
67
+ <rect x="228" y="52" width="56" height="26" rx="13" fill="rgba(255,255,255,0.15)" stroke="rgba(255,255,255,0.4)" stroke-width="1.2" />
68
+
69
+ <!-- Title -->
70
+ <text x="256" y="162" text-anchor="middle" font-family="system-ui, -apple-system, sans-serif" font-size="15" font-weight="600" fill="rgba(255,255,255,0.9)" letter-spacing="2">SPEC DRIVEN GUIDE</text>
71
+
72
+ <!-- Thin separator -->
73
+ <line x1="160" y1="178" x2="352" y2="178" stroke="rgba(255,255,255,0.2)" stroke-width="1" stroke-linecap="round" />
74
+
75
+ <!-- Row 1 - SPEC -->
76
+ <g>
77
+ <rect x="152" y="200" width="24" height="24" rx="7" fill="url(#chk)" opacity="0.9" />
78
+ <path d="M158 212L164 218L172 206" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" />
79
+ <text x="192" y="217" font-family="system-ui, -apple-system, sans-serif" font-size="16" font-weight="500" fill="rgba(255,255,255,0.85)" letter-spacing="2">SPEC</text>
80
+ </g>
81
+
82
+ <!-- Row 2 - PLAN -->
83
+ <g>
84
+ <rect x="152" y="248" width="24" height="24" rx="7" fill="url(#chk)" opacity="0.9" />
85
+ <path d="M158 260L164 266L172 254" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" />
86
+ <text x="192" y="265" font-family="system-ui, -apple-system, sans-serif" font-size="16" font-weight="500" fill="rgba(255,255,255,0.85)" letter-spacing="2">PLAN</text>
87
+ </g>
88
+
89
+ <!-- Row 3 - CODE -->
90
+ <g>
91
+ <rect x="152" y="296" width="24" height="24" rx="7" fill="url(#chk)" opacity="0.9" />
92
+ <path d="M158 308L164 314L172 302" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" />
93
+ <text x="192" y="313" font-family="system-ui, -apple-system, sans-serif" font-size="16" font-weight="500" fill="rgba(255,255,255,0.85)" letter-spacing="2">CODE</text>
94
+ </g>
95
+
96
+ <!-- Row 4 - TEST -->
97
+ <g>
98
+ <rect x="152" y="344" width="24" height="24" rx="7" fill="url(#chk)" opacity="0.9" />
99
+ <path d="M158 356L164 362L172 350" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" />
100
+ <text x="192" y="361" font-family="system-ui, -apple-system, sans-serif" font-size="16" font-weight="500" fill="rgba(255,255,255,0.85)" letter-spacing="2">TEST</text>
101
+ </g>
102
+
103
+ <!-- Row 5 - END -->
104
+ <g>
105
+ <rect x="152" y="392" width="24" height="24" rx="7" fill="url(#chk)" opacity="0.9" />
106
+ <path d="M158 404L164 410L172 398" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" />
107
+ <text x="192" y="409" font-family="system-ui, -apple-system, sans-serif" font-size="16" font-weight="500" fill="rgba(255,255,255,0.85)" letter-spacing="2">END</text>
108
+ </g>
109
+
110
+ </svg>
@@ -0,0 +1,69 @@
1
+ # Technical Documentation — Context Preparation
2
+
3
+ Executing documentation for: $ARGUMENTS. This command prepares the context for the **Docs Cycle**.
4
+
5
+ ## Step 0 — Document Classification
6
+
7
+ 1. **Context Check**: Identify the document type needed based on the goal:
8
+ - **CHANGELOG**: Release entry or version synchronization → `CHANGELOG.md` at project root.
9
+ - **FEAT (Especificação da Funcionalidade)**: Document _what_ was built and _how_ it fits the pipeline → `docs/specs/FEAT-NNN-slug.md`.
10
+ - **ADR (Architecture Decision Record)**: Document _why_ a technical path was chosen (trade-offs) → `docs/decisions/ADR-NNN-slug.md`.
11
+ 2. **Numbering**: Use sequential zero-padded numbers (`ADR-001`, `FEAT-042`). Check existing files to find the next available number.
12
+ 3. **Current Alignment**: Read existing files in the target directory to maintain style and numbering consistency.
13
+
14
+ ---
15
+
16
+ ## Phase: SPEC (Draft Specialization)
17
+
18
+ Follow the **Phase: SPEC** from the **Working Protocol**, using these templates for the "Drafting" logic:
19
+
20
+ ### Template A: CHANGELOG (Keep a Changelog)
21
+
22
+ ```md
23
+ ## [vX.Y.Z] - YYYY-MM-DD
24
+
25
+ ### Added | Changed | Fixed | Removed
26
+
27
+ - [Brief entries from Unreleased]
28
+ ```
29
+
30
+ ### Template B: FEAT (Especificação da Funcionalidade)
31
+
32
+ ```md
33
+ # FEAT-[NNN]: [Feature Name]
34
+
35
+ ## Status: Draft | Review | Approved
36
+
37
+ ## Goal / Context / Solution / Verification
38
+ ```
39
+
40
+ ### Template C: ADR (Architecture Decision Record)
41
+
42
+ ```md
43
+ # ADR-[NNN]: [Decision Title]
44
+
45
+ ## Context (Why) / Decision (What) / Consequences (Impact)
46
+ ```
47
+
48
+ ---
49
+
50
+ ---
51
+
52
+ ## Phase: END (Hardened)
53
+
54
+ Follow the **Phase: END** from the **Working Protocol**. Documentation must be accurate and mirror the code state perfectly. Sync the backlog and **WAIT** for authorization before `commit`/`push`.
55
+
56
+ ---
57
+
58
+ > [!TIP]
59
+ > **Multi-Agent Optimization (Claude Code only)**
60
+ >
61
+ > The Docs Cycle is entirely analytical — there is no CODE phase, so Fast is never invoked. All phases run under the **Planning** role.
62
+ >
63
+ > | Phase | Role | Why |
64
+ > | :--------- | :----------- | :-------------------------------------------------------- |
65
+ > | SPEC + END | **Planning** | Document classification, structure review, accuracy check |
66
+ >
67
+ > Planning's strength here is accuracy and coherence: cross-referencing code state, CHANGELOG history, and ADR decisions before committing any documentation artifact.
68
+ >
69
+ > Read `.ai/instructions/core/agent-roles.md` for the full protocol.
@@ -0,0 +1,45 @@
1
+ # Feature Execution — Context Preparation
2
+
3
+ We are initializing a new feature: $ARGUMENTS. This command prepares the context for the development lifecycle following the **Working Protocol**.
4
+
5
+ ## Step 0 — Context Preparation
6
+
7
+ 1. **Roadmap Check**: If `ROADMAP.md` exists, read it to identify where this feature fits in the project's long-term vision.
8
+ 2. **Domain Scope**:
9
+ - **Backend** (API/Domain/DB) → read `.ai/instructions/competencies/backend.md`
10
+ - **Frontend** (UI/UX) → read `.ai/instructions/competencies/frontend.md`
11
+ - **Fullstack** → read both
12
+ 3. **Architecture Standards**: If `.ai/instructions/flavor/principles.md` exists, read the established data pipeline (Vertical Slice, MVC, etc.).
13
+ 4. **Code Style Load** (mandatory — do not skip):
14
+ - **Engineering Standards** → read `.ai/instructions/core/engineering-standards.md`
15
+ - **Code Style & NarrativeCascade** → read `.ai/instructions/core/code-style.md`
16
+ 5. **Quality & Debugging**:
17
+ - **Testing Strategy** → read `.ai/instructions/core/testing-principles.md`
18
+ - **Observability** → read `.ai/instructions/core/observability.md`
19
+
20
+ ---
21
+
22
+ ## Phase: SPEC (Especificação da Funcionalidade)
23
+
24
+ Follow the **Phase: SPEC** from the **Working Protocol**, with these mandatory additions:
25
+
26
+ - **Domain Modeling**: Explicitly define the primary entities and aggregate roots involved.
27
+ - **Configuration Contract**: Define the environment variables required for this feature (keys must be **abstract**; pro-tip: `AUTH_SECRET` over `CLERK_SECRET`).
28
+ - **Contract-First**: Define the Public Interface (API endpoints, public methods, or Component Props) before listing implementation steps.
29
+ - **Storytelling**: The SPEC must describe the "User Journey" or the "Data Life Cycle".
30
+ - **Backend SPEC (mandatory addition)**: If the domain includes API work, define the response contract before listing implementation steps:
31
+ - Use the Contract template from `backend.md`'s ContractFirst rule
32
+ - Define: endpoint method + path, input fields with types, output shape (envelope fields), and all error codes with conditions
33
+ - This contract must appear in the SPEC and be approved before PLAN begins
34
+ - **Frontend SPEC (mandatory addition)**: If the domain includes UI work, define the section structure before any code:
35
+ - List each section by type (`section.hero`, `section.cards`, `section.form`, etc.)
36
+ - Define the layout skeleton: grid columns, main content blocks, and their data sources
37
+ - Identify which states must be handled: Loading / Empty / Error
38
+ - This wireframe contract must appear in the SPEC and be approved before PLAN begins
39
+ - **Testing SPEC (mandatory addition)**: Explicitly define at least three scenarios: One Happy Path, one Edge Case, and one Expected Failure.
40
+ - Format as: `Scenario [Name] (Input: { ... }) -> Expected: [Result/State]`
41
+ - This testing contract must appear in the SPEC and be approved before PLAN begins
42
+
43
+ ---
44
+
45
+ > Read `.ai/instructions/core/agent-roles.md` for the multi-agent handoff protocol (Planning + Fast roles).
@@ -0,0 +1,41 @@
1
+ # Incident Correction — Context Preparation
2
+
3
+ We are correcting a recorded incident: $ARGUMENTS. This command prepares the context for the **Fix Cycle** defined in the **Working Protocol**.
4
+
5
+ ## Step 0 — Incident Analysis
6
+
7
+ 1. **Reproduction Scenario**: Read existing logs or provided data to define the exact steps to reproduce the issue.
8
+ 2. **Domain Scope**:
9
+ - **Backend** (Logic/Data) → read `.ai/instructions/competencies/backend.md`
10
+ - **Frontend** (UI/UX) → read `.ai/instructions/competencies/frontend.md`
11
+ - **Fullstack** → read both
12
+ 3. **Architecture Standards**: If `.ai/instructions/flavor/principles.md` exists, read the architectural principles.
13
+ 4. **Code Style & Standards** (mandatory):
14
+ - **Engineering Standards** → read `.ai/instructions/core/engineering-standards.md`
15
+ - **Code Style & Narrative Scansion** → read `.ai/instructions/core/code-style.md`
16
+ 5. **Diagnostic Standards**:
17
+ - **Testing Principles** → read `.ai/instructions/core/testing-principles.md`
18
+ - **Observability** → read `.ai/instructions/core/observability.md`
19
+
20
+ ---
21
+
22
+ ## Phase: SPEC (Fix Specialization)
23
+
24
+ Follow the **Phase: SPEC** from the **Working Protocol**, with these mandatory additions:
25
+
26
+ - **Root Cause Analysis (RCA)**: Explicitly identify the layer, file, and line where the contract or logic breaks.
27
+ - **Observed vs Expected**: Contrast the current broken behavior with the desired outcome.
28
+ - **Minimal Surface**: Ensure the proposed fix targets ONLY the bug. No refactors allowed in this cycle.
29
+ - **Configuration Contract**: If this fix introduces or changes any environment variable, list it here with its abstract key and purpose. Keys must hide vendor/infrastructure details (e.g., `AUTH_PROVIDER_SECRET` over `CLERK_SECRET`). No committed templates.
30
+
31
+ ---
32
+
33
+ ## Phase: PLAN (Regression Focus)
34
+
35
+ Follow the **Phase: PLAN** from the **Working Protocol**, with this mandatory addition:
36
+
37
+ - **Regression Test**: Include a task specifically for a test that reproduces the bug (Characterization Test). Use the patterns from `testing-principles.md`. This task must appear in the PLAN before approval.
38
+
39
+ ---
40
+
41
+ > Read `.ai/instructions/core/agent-roles.md` for the multi-agent handoff protocol (Planning + Fast roles).