@brad-frost-web/eddie-brain 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +109 -0
- package/dist/analyze/drift-detector.d.ts +30 -0
- package/dist/analyze/drift-detector.d.ts.map +1 -0
- package/dist/analyze/drift-detector.js +310 -0
- package/dist/analyze/drift-detector.js.map +1 -0
- package/dist/analyze/health-scorer.d.ts +71 -0
- package/dist/analyze/health-scorer.d.ts.map +1 -0
- package/dist/analyze/health-scorer.js +420 -0
- package/dist/analyze/health-scorer.js.map +1 -0
- package/dist/analyze/index.d.ts +11 -0
- package/dist/analyze/index.d.ts.map +1 -0
- package/dist/analyze/index.js +11 -0
- package/dist/analyze/index.js.map +1 -0
- package/dist/analyze/naming-validator.d.ts +99 -0
- package/dist/analyze/naming-validator.d.ts.map +1 -0
- package/dist/analyze/naming-validator.js +430 -0
- package/dist/analyze/naming-validator.js.map +1 -0
- package/dist/analyze/slot-contract-validator.d.ts +68 -0
- package/dist/analyze/slot-contract-validator.d.ts.map +1 -0
- package/dist/analyze/slot-contract-validator.js +232 -0
- package/dist/analyze/slot-contract-validator.js.map +1 -0
- package/dist/analyze/token-validator.d.ts +62 -0
- package/dist/analyze/token-validator.d.ts.map +1 -0
- package/dist/analyze/token-validator.js +348 -0
- package/dist/analyze/token-validator.js.map +1 -0
- package/dist/cli/brain.d.ts +12 -0
- package/dist/cli/brain.d.ts.map +1 -0
- package/dist/cli/brain.js +641 -0
- package/dist/cli/brain.js.map +1 -0
- package/dist/cli/formatters/json.d.ts +15 -0
- package/dist/cli/formatters/json.d.ts.map +1 -0
- package/dist/cli/formatters/json.js +18 -0
- package/dist/cli/formatters/json.js.map +1 -0
- package/dist/cli/formatters/terminal.d.ts +19 -0
- package/dist/cli/formatters/terminal.d.ts.map +1 -0
- package/dist/cli/formatters/terminal.js +125 -0
- package/dist/cli/formatters/terminal.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +7 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/data/governance-rules.json +94 -0
- package/dist/governance/audit-log.d.ts +17 -0
- package/dist/governance/audit-log.d.ts.map +1 -0
- package/dist/governance/audit-log.js +44 -0
- package/dist/governance/audit-log.js.map +1 -0
- package/dist/governance/index.d.ts +8 -0
- package/dist/governance/index.d.ts.map +1 -0
- package/dist/governance/index.js +8 -0
- package/dist/governance/index.js.map +1 -0
- package/dist/governance/permissions.d.ts +26 -0
- package/dist/governance/permissions.d.ts.map +1 -0
- package/dist/governance/permissions.js +75 -0
- package/dist/governance/permissions.js.map +1 -0
- package/dist/governance/rules-engine.d.ts +24 -0
- package/dist/governance/rules-engine.d.ts.map +1 -0
- package/dist/governance/rules-engine.js +111 -0
- package/dist/governance/rules-engine.js.map +1 -0
- package/dist/governance/trust-manager.d.ts +34 -0
- package/dist/governance/trust-manager.d.ts.map +1 -0
- package/dist/governance/trust-manager.js +148 -0
- package/dist/governance/trust-manager.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/knowledge-graph/component-index.d.ts +320 -0
- package/dist/knowledge-graph/component-index.d.ts.map +1 -0
- package/dist/knowledge-graph/component-index.js +1033 -0
- package/dist/knowledge-graph/component-index.js.map +1 -0
- package/dist/knowledge-graph/index.d.ts +134 -0
- package/dist/knowledge-graph/index.d.ts.map +1 -0
- package/dist/knowledge-graph/index.js +249 -0
- package/dist/knowledge-graph/index.js.map +1 -0
- package/dist/knowledge-graph/learning-history.d.ts +77 -0
- package/dist/knowledge-graph/learning-history.d.ts.map +1 -0
- package/dist/knowledge-graph/learning-history.js +187 -0
- package/dist/knowledge-graph/learning-history.js.map +1 -0
- package/dist/knowledge-graph/relationship-map.d.ts +55 -0
- package/dist/knowledge-graph/relationship-map.d.ts.map +1 -0
- package/dist/knowledge-graph/relationship-map.js +238 -0
- package/dist/knowledge-graph/relationship-map.js.map +1 -0
- package/dist/knowledge-graph/token-taxonomy.d.ts +127 -0
- package/dist/knowledge-graph/token-taxonomy.d.ts.map +1 -0
- package/dist/knowledge-graph/token-taxonomy.js +357 -0
- package/dist/knowledge-graph/token-taxonomy.js.map +1 -0
- package/dist/loop/fix-agent.d.ts +55 -0
- package/dist/loop/fix-agent.d.ts.map +1 -0
- package/dist/loop/fix-agent.js +344 -0
- package/dist/loop/fix-agent.js.map +1 -0
- package/dist/loop/index.d.ts +8 -0
- package/dist/loop/index.d.ts.map +1 -0
- package/dist/loop/index.js +8 -0
- package/dist/loop/index.js.map +1 -0
- package/dist/loop/issue-fetcher.d.ts +51 -0
- package/dist/loop/issue-fetcher.d.ts.map +1 -0
- package/dist/loop/issue-fetcher.js +188 -0
- package/dist/loop/issue-fetcher.js.map +1 -0
- package/dist/loop/observer.d.ts +42 -0
- package/dist/loop/observer.d.ts.map +1 -0
- package/dist/loop/observer.js +220 -0
- package/dist/loop/observer.js.map +1 -0
- package/dist/loop/pacer.d.ts +44 -0
- package/dist/loop/pacer.d.ts.map +1 -0
- package/dist/loop/pacer.js +90 -0
- package/dist/loop/pacer.js.map +1 -0
- package/dist/loop/reporter.d.ts +9 -0
- package/dist/loop/reporter.d.ts.map +1 -0
- package/dist/loop/reporter.js +119 -0
- package/dist/loop/reporter.js.map +1 -0
- package/dist/loop/runner.d.ts +57 -0
- package/dist/loop/runner.d.ts.map +1 -0
- package/dist/loop/runner.js +390 -0
- package/dist/loop/runner.js.map +1 -0
- package/dist/loop/types.d.ts +151 -0
- package/dist/loop/types.d.ts.map +1 -0
- package/dist/loop/types.js +22 -0
- package/dist/loop/types.js.map +1 -0
- package/dist/mcp/index.d.ts +7 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +7 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +12 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +618 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/pipeline/agent-runner.d.ts +34 -0
- package/dist/pipeline/agent-runner.d.ts.map +1 -0
- package/dist/pipeline/agent-runner.js +323 -0
- package/dist/pipeline/agent-runner.js.map +1 -0
- package/dist/pipeline/agents/accessibility-auditor.d.ts +10 -0
- package/dist/pipeline/agents/accessibility-auditor.d.ts.map +1 -0
- package/dist/pipeline/agents/accessibility-auditor.js +69 -0
- package/dist/pipeline/agents/accessibility-auditor.js.map +1 -0
- package/dist/pipeline/agents/code-reviewer.d.ts +10 -0
- package/dist/pipeline/agents/code-reviewer.d.ts.map +1 -0
- package/dist/pipeline/agents/code-reviewer.js +75 -0
- package/dist/pipeline/agents/code-reviewer.js.map +1 -0
- package/dist/pipeline/agents/code-writer.d.ts +10 -0
- package/dist/pipeline/agents/code-writer.d.ts.map +1 -0
- package/dist/pipeline/agents/code-writer.js +103 -0
- package/dist/pipeline/agents/code-writer.js.map +1 -0
- package/dist/pipeline/agents/component-architect.d.ts +13 -0
- package/dist/pipeline/agents/component-architect.d.ts.map +1 -0
- package/dist/pipeline/agents/component-architect.js +81 -0
- package/dist/pipeline/agents/component-architect.js.map +1 -0
- package/dist/pipeline/agents/index.d.ts +16 -0
- package/dist/pipeline/agents/index.d.ts.map +1 -0
- package/dist/pipeline/agents/index.js +24 -0
- package/dist/pipeline/agents/index.js.map +1 -0
- package/dist/pipeline/agents/library-researcher.d.ts +12 -0
- package/dist/pipeline/agents/library-researcher.d.ts.map +1 -0
- package/dist/pipeline/agents/library-researcher.js +85 -0
- package/dist/pipeline/agents/library-researcher.js.map +1 -0
- package/dist/pipeline/agents/quality-gate.d.ts +9 -0
- package/dist/pipeline/agents/quality-gate.d.ts.map +1 -0
- package/dist/pipeline/agents/quality-gate.js +71 -0
- package/dist/pipeline/agents/quality-gate.js.map +1 -0
- package/dist/pipeline/agents/spec-analyst.d.ts +10 -0
- package/dist/pipeline/agents/spec-analyst.d.ts.map +1 -0
- package/dist/pipeline/agents/spec-analyst.js +72 -0
- package/dist/pipeline/agents/spec-analyst.js.map +1 -0
- package/dist/pipeline/agents/story-author.d.ts +9 -0
- package/dist/pipeline/agents/story-author.d.ts.map +1 -0
- package/dist/pipeline/agents/story-author.js +65 -0
- package/dist/pipeline/agents/story-author.js.map +1 -0
- package/dist/pipeline/artifact-store.d.ts +27 -0
- package/dist/pipeline/artifact-store.d.ts.map +1 -0
- package/dist/pipeline/artifact-store.js +77 -0
- package/dist/pipeline/artifact-store.js.map +1 -0
- package/dist/pipeline/conversational-gate.d.ts +26 -0
- package/dist/pipeline/conversational-gate.d.ts.map +1 -0
- package/dist/pipeline/conversational-gate.js +122 -0
- package/dist/pipeline/conversational-gate.js.map +1 -0
- package/dist/pipeline/index.d.ts +14 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +17 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/iteration-tracker.d.ts +29 -0
- package/dist/pipeline/iteration-tracker.d.ts.map +1 -0
- package/dist/pipeline/iteration-tracker.js +102 -0
- package/dist/pipeline/iteration-tracker.js.map +1 -0
- package/dist/pipeline/learning-bridge.d.ts +37 -0
- package/dist/pipeline/learning-bridge.d.ts.map +1 -0
- package/dist/pipeline/learning-bridge.js +118 -0
- package/dist/pipeline/learning-bridge.js.map +1 -0
- package/dist/pipeline/orchestrator.d.ts +45 -0
- package/dist/pipeline/orchestrator.d.ts.map +1 -0
- package/dist/pipeline/orchestrator.js +473 -0
- package/dist/pipeline/orchestrator.js.map +1 -0
- package/dist/pipeline/templates/architecture.d.ts +27 -0
- package/dist/pipeline/templates/architecture.d.ts.map +1 -0
- package/dist/pipeline/templates/architecture.js +111 -0
- package/dist/pipeline/templates/architecture.js.map +1 -0
- package/dist/pipeline/templates/brief.d.ts +22 -0
- package/dist/pipeline/templates/brief.d.ts.map +1 -0
- package/dist/pipeline/templates/brief.js +121 -0
- package/dist/pipeline/templates/brief.js.map +1 -0
- package/dist/pipeline/templates/component-rules.d.ts +25 -0
- package/dist/pipeline/templates/component-rules.d.ts.map +1 -0
- package/dist/pipeline/templates/component-rules.js +93 -0
- package/dist/pipeline/templates/component-rules.js.map +1 -0
- package/dist/pipeline/templates/index.d.ts +9 -0
- package/dist/pipeline/templates/index.d.ts.map +1 -0
- package/dist/pipeline/templates/index.js +7 -0
- package/dist/pipeline/templates/index.js.map +1 -0
- package/dist/pipeline/tool-handler.d.ts +25 -0
- package/dist/pipeline/tool-handler.d.ts.map +1 -0
- package/dist/pipeline/tool-handler.js +392 -0
- package/dist/pipeline/tool-handler.js.map +1 -0
- package/dist/pipeline/types.d.ts +146 -0
- package/dist/pipeline/types.d.ts.map +1 -0
- package/dist/pipeline/types.js +27 -0
- package/dist/pipeline/types.js.map +1 -0
- package/dist/plan/action-types.d.ts +31 -0
- package/dist/plan/action-types.d.ts.map +1 -0
- package/dist/plan/action-types.js +83 -0
- package/dist/plan/action-types.js.map +1 -0
- package/dist/plan/decision-engine.d.ts +57 -0
- package/dist/plan/decision-engine.d.ts.map +1 -0
- package/dist/plan/decision-engine.js +162 -0
- package/dist/plan/decision-engine.js.map +1 -0
- package/dist/plan/index.d.ts +6 -0
- package/dist/plan/index.d.ts.map +1 -0
- package/dist/plan/index.js +6 -0
- package/dist/plan/index.js.map +1 -0
- package/dist/types.d.ts +351 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +26 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/anthropic.d.ts +15 -0
- package/dist/utils/anthropic.d.ts.map +1 -0
- package/dist/utils/anthropic.js +40 -0
- package/dist/utils/anthropic.js.map +1 -0
- package/dist/utils/id.d.ts +8 -0
- package/dist/utils/id.d.ts.map +1 -0
- package/dist/utils/id.js +14 -0
- package/dist/utils/id.js.map +1 -0
- package/package.json +80 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent 4 — Code Writer
|
|
3
|
+
*
|
|
4
|
+
* Consumes all three UNDERSTAND artifacts plus existing source code.
|
|
5
|
+
* For modifications: applies targeted changes to existing code.
|
|
6
|
+
* For new components: generates files following reference patterns exactly.
|
|
7
|
+
*/
|
|
8
|
+
export const codeWriterConfig = {
|
|
9
|
+
id: 'code-writer',
|
|
10
|
+
name: 'Code Writer',
|
|
11
|
+
phase: 'build',
|
|
12
|
+
inputArtifacts: [
|
|
13
|
+
'brief.md', 'component-rules.md', 'architecture.md',
|
|
14
|
+
'existing-component.ts', 'existing-component.scss', 'existing-component.stories.ts',
|
|
15
|
+
'reference-component.ts', 'reference-component.scss', 'reference-component.stories.ts',
|
|
16
|
+
'code-guidelines.md',
|
|
17
|
+
],
|
|
18
|
+
outputArtifacts: ['component.ts', 'component.scss', 'component.stories.ts'],
|
|
19
|
+
tools: ['eddie_validate_file', 'eddie_suggest_fix', 'eddie_get_token', 'eddie_get_component', 'eddie_read_file'],
|
|
20
|
+
maxIterations: 2,
|
|
21
|
+
hasConversationalGate: false,
|
|
22
|
+
systemPrompt: `You are the Code Writer for the Eddie Design System component pipeline.
|
|
23
|
+
|
|
24
|
+
IMPORTANT: Read component-rules.md FIRST before writing any code. It contains mandatory rules (CR-*) that you MUST follow.
|
|
25
|
+
|
|
26
|
+
## Eddie Code Guidelines (AUTHORITATIVE — your code MUST match these patterns)
|
|
27
|
+
{{code-guidelines.md}}
|
|
28
|
+
|
|
29
|
+
## Input Artifacts
|
|
30
|
+
|
|
31
|
+
### component-rules.md (READ THIS FIRST)
|
|
32
|
+
{{component-rules.md}}
|
|
33
|
+
|
|
34
|
+
### brief.md
|
|
35
|
+
{{brief.md}}
|
|
36
|
+
|
|
37
|
+
### architecture.md
|
|
38
|
+
{{architecture.md}}
|
|
39
|
+
|
|
40
|
+
## EXISTING FILES TO MODIFY
|
|
41
|
+
|
|
42
|
+
If existing source is provided below, you MUST:
|
|
43
|
+
1. Copy the ENTIRE existing file as your starting point
|
|
44
|
+
2. Apply ONLY the changes from architecture.md
|
|
45
|
+
3. Output the COMPLETE modified file — not a description of changes
|
|
46
|
+
|
|
47
|
+
### FILE TO MODIFY: component.ts
|
|
48
|
+
{{existing-component.ts}}
|
|
49
|
+
|
|
50
|
+
### FILE TO MODIFY: component.scss
|
|
51
|
+
{{existing-component.scss}}
|
|
52
|
+
|
|
53
|
+
### FILE TO MODIFY: component.stories.ts
|
|
54
|
+
{{existing-component.stories.ts}}
|
|
55
|
+
|
|
56
|
+
## REFERENCE PATTERN (for new components only)
|
|
57
|
+
{{reference-component.ts}}
|
|
58
|
+
{{reference-component.scss}}
|
|
59
|
+
{{reference-component.stories.ts}}
|
|
60
|
+
|
|
61
|
+
## RULES
|
|
62
|
+
|
|
63
|
+
1. **NEVER describe changes in prose** — output the complete modified files
|
|
64
|
+
2. Preserve ALL existing: imports, class structure, property decorators, methods, style patterns
|
|
65
|
+
3. Match the EXACT same coding style (spacing, naming, comment style)
|
|
66
|
+
4. Do NOT refactor, reorganize, or "improve" existing code
|
|
67
|
+
5. The diff between your output and the existing code should be MINIMAL
|
|
68
|
+
6. Use eddie_get_token to VERIFY every new token name before using it
|
|
69
|
+
7. Use eddie_read_file to check how similar components handle the pattern you're implementing
|
|
70
|
+
|
|
71
|
+
### If Creating a New Component
|
|
72
|
+
1. Follow the reference component patterns EXACTLY
|
|
73
|
+
2. Use the same import style: \`import classnames from 'classnames'\`, \`import { html, unsafeCSS } from 'lit'\`, etc.
|
|
74
|
+
3. Use the same style loading: \`static get styles() { return unsafeCSS(styles.toString()); }\`
|
|
75
|
+
4. Use the same class computation: \`classnames('ed-c-name', { 'ed-c-name--variant': condition })\`
|
|
76
|
+
5. Use the same story format: default export with title/component, named exports with arrow functions
|
|
77
|
+
6. Use the same SCSS structure: \`@use\` imports, flat BEM selectors, token variables
|
|
78
|
+
7. Use eddie_read_file to read additional component examples if you need more pattern references
|
|
79
|
+
|
|
80
|
+
### Token Usage
|
|
81
|
+
- Use eddie_get_token to VERIFY every token name before using it
|
|
82
|
+
- If a token doesn't exist, use eddie_read_file to check what tokens similar components use
|
|
83
|
+
- NEVER invent token names — only use verified ones
|
|
84
|
+
|
|
85
|
+
## Output Format
|
|
86
|
+
|
|
87
|
+
YOU MUST output all three COMPLETE files as tagged code blocks. Do not describe changes — output the full files with changes applied. This is critical for the pipeline to work.
|
|
88
|
+
|
|
89
|
+
\`\`\`typescript:component.ts
|
|
90
|
+
... COMPLETE component code (existing code + your modifications) ...
|
|
91
|
+
\`\`\`
|
|
92
|
+
|
|
93
|
+
\`\`\`scss:component.scss
|
|
94
|
+
... COMPLETE styles (existing styles + your modifications) ...
|
|
95
|
+
\`\`\`
|
|
96
|
+
|
|
97
|
+
\`\`\`typescript:component.stories.ts
|
|
98
|
+
... COMPLETE stories (existing stories + your new stories) ...
|
|
99
|
+
\`\`\`
|
|
100
|
+
|
|
101
|
+
NEVER output just a description of changes. ALWAYS output the complete file contents.`,
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=code-writer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-writer.js","sourceRoot":"","sources":["../../../src/pipeline/agents/code-writer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,CAAC,MAAM,gBAAgB,GAAgB;IAC3C,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,OAAO;IACd,cAAc,EAAE;QACd,UAAU,EAAE,oBAAoB,EAAE,iBAAiB;QACnD,uBAAuB,EAAE,yBAAyB,EAAE,+BAA+B;QACnF,wBAAwB,EAAE,0BAA0B,EAAE,gCAAgC;QACtF,oBAAoB;KACrB;IACD,eAAe,EAAE,CAAC,cAAc,EAAE,gBAAgB,EAAE,sBAAsB,CAAC;IAC3E,KAAK,EAAE,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,iBAAiB,CAAC;IAChH,aAAa,EAAE,CAAC;IAChB,qBAAqB,EAAE,KAAK;IAE5B,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sFA+EsE;CACrF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent 3 — Component Architect
|
|
3
|
+
*
|
|
4
|
+
* Consumes brief.md + component-rules.md. Designs the TS property interface,
|
|
5
|
+
* slot strategy, BEM class hierarchy, compound component split.
|
|
6
|
+
* Produces architecture.md with push-back markers.
|
|
7
|
+
*
|
|
8
|
+
* This agent has a conversational gate — the pipeline pauses after it
|
|
9
|
+
* for human review of the architecture.
|
|
10
|
+
*/
|
|
11
|
+
import type { AgentConfig } from '../types.js';
|
|
12
|
+
export declare const componentArchitectConfig: AgentConfig;
|
|
13
|
+
//# sourceMappingURL=component-architect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-architect.d.ts","sourceRoot":"","sources":["../../../src/pipeline/agents/component-architect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,eAAO,MAAM,wBAAwB,EAAE,WAsEtC,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent 3 — Component Architect
|
|
3
|
+
*
|
|
4
|
+
* Consumes brief.md + component-rules.md. Designs the TS property interface,
|
|
5
|
+
* slot strategy, BEM class hierarchy, compound component split.
|
|
6
|
+
* Produces architecture.md with push-back markers.
|
|
7
|
+
*
|
|
8
|
+
* This agent has a conversational gate — the pipeline pauses after it
|
|
9
|
+
* for human review of the architecture.
|
|
10
|
+
*/
|
|
11
|
+
export const componentArchitectConfig = {
|
|
12
|
+
id: 'component-architect',
|
|
13
|
+
name: 'Component Architect',
|
|
14
|
+
phase: 'understand',
|
|
15
|
+
inputArtifacts: ['brief.md', 'component-rules.md', 'existing-component.ts', 'existing-component.scss', 'code-guidelines.md'],
|
|
16
|
+
outputArtifacts: ['architecture.md'],
|
|
17
|
+
tools: ['eddie_get_component', 'eddie_get_token', 'eddie_get_relationships', 'eddie_read_file'],
|
|
18
|
+
maxIterations: 1,
|
|
19
|
+
hasConversationalGate: true,
|
|
20
|
+
systemPrompt: `You are the Component Architect for the Eddie Design System component pipeline.
|
|
21
|
+
|
|
22
|
+
Your job is to design the complete technical architecture for a new component or modification based on brief.md and component-rules.md.
|
|
23
|
+
|
|
24
|
+
## Eddie Code Guidelines (AUTHORITATIVE)
|
|
25
|
+
{{code-guidelines.md}}
|
|
26
|
+
|
|
27
|
+
## Input Artifacts
|
|
28
|
+
|
|
29
|
+
### brief.md
|
|
30
|
+
{{brief.md}}
|
|
31
|
+
|
|
32
|
+
### component-rules.md
|
|
33
|
+
{{component-rules.md}}
|
|
34
|
+
|
|
35
|
+
## Existing Component Source (if modifying)
|
|
36
|
+
|
|
37
|
+
### TypeScript
|
|
38
|
+
{{existing-component.ts}}
|
|
39
|
+
|
|
40
|
+
### SCSS
|
|
41
|
+
{{existing-component.scss}}
|
|
42
|
+
|
|
43
|
+
## CRITICAL: Modification vs New Component
|
|
44
|
+
|
|
45
|
+
**If existing source code is provided above**, you are designing CHANGES to an existing component. Your architecture.md must:
|
|
46
|
+
1. Show ONLY the changes needed — not a complete rewrite
|
|
47
|
+
2. Reference the existing code by quoting the relevant lines
|
|
48
|
+
3. Specify exactly WHERE new code goes (e.g., "Add after the existing variant property")
|
|
49
|
+
4. Preserve ALL existing patterns: imports, classnames usage, style approach, property decorators, etc.
|
|
50
|
+
5. Use the EXACT same coding style as the existing source
|
|
51
|
+
|
|
52
|
+
**If no existing source is provided**, design a new component following the patterns in the code guidelines.
|
|
53
|
+
|
|
54
|
+
## Instructions
|
|
55
|
+
|
|
56
|
+
### For Modifications
|
|
57
|
+
- Use eddie_read_file to read similar components for pattern reference if needed
|
|
58
|
+
- Show the specific diff: what lines to add/change/remove
|
|
59
|
+
- The architecture should read like a surgical change plan, not a full design
|
|
60
|
+
|
|
61
|
+
### For New Components
|
|
62
|
+
- Use eddie_get_token to verify tokens exist at the correct tier
|
|
63
|
+
- Design TS property interface, slot strategy, BEM class hierarchy
|
|
64
|
+
- Follow the exact patterns from Eddie's code guidelines
|
|
65
|
+
|
|
66
|
+
## Push-Back Protocol
|
|
67
|
+
|
|
68
|
+
If you find conflicts or issues, add push-back markers in the Push-Backs section:
|
|
69
|
+
|
|
70
|
+
- \`[BLOCKING] Category: Message. Recommendation: ...\` — Pipeline stops. Human must decide.
|
|
71
|
+
- \`[OVERRIDE] Category: Message. Rationale: ...\` — You proceed with your judgment, but flag it.
|
|
72
|
+
- \`[SUGGESTION] Category: Message.\` — Optional improvement for human to consider.
|
|
73
|
+
|
|
74
|
+
## Output Format
|
|
75
|
+
|
|
76
|
+
Output the completed architecture.md as:
|
|
77
|
+
\`\`\`markdown:architecture.md
|
|
78
|
+
... your content ...
|
|
79
|
+
\`\`\``,
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=component-architect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-architect.js","sourceRoot":"","sources":["../../../src/pipeline/agents/component-architect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,CAAC,MAAM,wBAAwB,GAAgB;IACnD,EAAE,EAAE,qBAAqB;IACzB,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,YAAY;IACnB,cAAc,EAAE,CAAC,UAAU,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,oBAAoB,CAAC;IAC5H,eAAe,EAAE,CAAC,iBAAiB,CAAC;IACpC,KAAK,EAAE,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,iBAAiB,CAAC;IAC/F,aAAa,EAAE,CAAC;IAChB,qBAAqB,EAAE,IAAI;IAE3B,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2DT;CACN,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Configs — Re-exports all 8 agent configurations
|
|
3
|
+
*/
|
|
4
|
+
import type { AgentConfig, AgentId } from '../types.js';
|
|
5
|
+
import { specAnalystConfig } from './spec-analyst.js';
|
|
6
|
+
import { libraryResearcherConfig } from './library-researcher.js';
|
|
7
|
+
import { componentArchitectConfig } from './component-architect.js';
|
|
8
|
+
import { codeWriterConfig } from './code-writer.js';
|
|
9
|
+
import { accessibilityAuditorConfig } from './accessibility-auditor.js';
|
|
10
|
+
import { storyAuthorConfig } from './story-author.js';
|
|
11
|
+
import { codeReviewerConfig } from './code-reviewer.js';
|
|
12
|
+
import { qualityGateConfig } from './quality-gate.js';
|
|
13
|
+
export { specAnalystConfig, libraryResearcherConfig, componentArchitectConfig, codeWriterConfig, accessibilityAuditorConfig, storyAuthorConfig, codeReviewerConfig, qualityGateConfig, };
|
|
14
|
+
/** Map from agent ID to its configuration */
|
|
15
|
+
export declare const AGENT_CONFIGS: Record<AgentId, AgentConfig>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pipeline/agents/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EAChB,0BAA0B,EAC1B,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE,WAAW,CAStD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Configs — Re-exports all 8 agent configurations
|
|
3
|
+
*/
|
|
4
|
+
import { specAnalystConfig } from './spec-analyst.js';
|
|
5
|
+
import { libraryResearcherConfig } from './library-researcher.js';
|
|
6
|
+
import { componentArchitectConfig } from './component-architect.js';
|
|
7
|
+
import { codeWriterConfig } from './code-writer.js';
|
|
8
|
+
import { accessibilityAuditorConfig } from './accessibility-auditor.js';
|
|
9
|
+
import { storyAuthorConfig } from './story-author.js';
|
|
10
|
+
import { codeReviewerConfig } from './code-reviewer.js';
|
|
11
|
+
import { qualityGateConfig } from './quality-gate.js';
|
|
12
|
+
export { specAnalystConfig, libraryResearcherConfig, componentArchitectConfig, codeWriterConfig, accessibilityAuditorConfig, storyAuthorConfig, codeReviewerConfig, qualityGateConfig, };
|
|
13
|
+
/** Map from agent ID to its configuration */
|
|
14
|
+
export const AGENT_CONFIGS = {
|
|
15
|
+
'spec-analyst': specAnalystConfig,
|
|
16
|
+
'library-researcher': libraryResearcherConfig,
|
|
17
|
+
'component-architect': componentArchitectConfig,
|
|
18
|
+
'code-writer': codeWriterConfig,
|
|
19
|
+
'accessibility-auditor': accessibilityAuditorConfig,
|
|
20
|
+
'story-author': storyAuthorConfig,
|
|
21
|
+
'code-reviewer': codeReviewerConfig,
|
|
22
|
+
'quality-gate': qualityGateConfig,
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pipeline/agents/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EAChB,0BAA0B,EAC1B,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAEF,6CAA6C;AAC7C,MAAM,CAAC,MAAM,aAAa,GAAiC;IACzD,cAAc,EAAE,iBAAiB;IACjC,oBAAoB,EAAE,uBAAuB;IAC7C,qBAAqB,EAAE,wBAAwB;IAC/C,aAAa,EAAE,gBAAgB;IAC/B,uBAAuB,EAAE,0BAA0B;IACnD,cAAc,EAAE,iBAAiB;IACjC,eAAe,EAAE,kBAAkB;IACnC,cAAc,EAAE,iBAAiB;CAClC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent 2 — Library Researcher
|
|
3
|
+
*
|
|
4
|
+
* Consumes brief.md and the knowledge graph. Audits EdElement/EdFormElement
|
|
5
|
+
* capabilities, slot patterns, composition conventions. Produces
|
|
6
|
+
* component-rules.md with CR-* (mandatory) and AR-* (advisory) rules.
|
|
7
|
+
*
|
|
8
|
+
* Also queries the design-systems MCP for industry best practices.
|
|
9
|
+
*/
|
|
10
|
+
import type { AgentConfig } from '../types.js';
|
|
11
|
+
export declare const libraryResearcherConfig: AgentConfig;
|
|
12
|
+
//# sourceMappingURL=library-researcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-researcher.d.ts","sourceRoot":"","sources":["../../../src/pipeline/agents/library-researcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,eAAO,MAAM,uBAAuB,EAAE,WA2ErC,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent 2 — Library Researcher
|
|
3
|
+
*
|
|
4
|
+
* Consumes brief.md and the knowledge graph. Audits EdElement/EdFormElement
|
|
5
|
+
* capabilities, slot patterns, composition conventions. Produces
|
|
6
|
+
* component-rules.md with CR-* (mandatory) and AR-* (advisory) rules.
|
|
7
|
+
*
|
|
8
|
+
* Also queries the design-systems MCP for industry best practices.
|
|
9
|
+
*/
|
|
10
|
+
export const libraryResearcherConfig = {
|
|
11
|
+
id: 'library-researcher',
|
|
12
|
+
name: 'Library Researcher',
|
|
13
|
+
phase: 'understand',
|
|
14
|
+
inputArtifacts: ['brief.md', 'existing-component.ts', 'existing-component.scss', 'code-guidelines.md'],
|
|
15
|
+
outputArtifacts: ['component-rules.md'],
|
|
16
|
+
tools: [
|
|
17
|
+
'eddie_get_component', 'eddie_get_token', 'eddie_get_relationships', 'eddie_search',
|
|
18
|
+
'eddie_read_file',
|
|
19
|
+
'ds_search_design_knowledge', 'ds_search_chunks',
|
|
20
|
+
],
|
|
21
|
+
maxIterations: 1,
|
|
22
|
+
hasConversationalGate: false,
|
|
23
|
+
systemPrompt: `You are the Library Researcher for the Eddie Design System component pipeline.
|
|
24
|
+
|
|
25
|
+
Your job is to analyze brief.md and produce component-rules.md — a set of mandatory (CR-*) and advisory (AR-*) rules that the code writer must follow.
|
|
26
|
+
|
|
27
|
+
## Eddie Code Guidelines (AUTHORITATIVE — follow these exactly)
|
|
28
|
+
{{code-guidelines.md}}
|
|
29
|
+
|
|
30
|
+
## Input: brief.md
|
|
31
|
+
{{brief.md}}
|
|
32
|
+
|
|
33
|
+
## Existing Component Source (if modifying)
|
|
34
|
+
|
|
35
|
+
### TypeScript
|
|
36
|
+
{{existing-component.ts}}
|
|
37
|
+
|
|
38
|
+
### SCSS
|
|
39
|
+
{{existing-component.scss}}
|
|
40
|
+
|
|
41
|
+
## Instructions
|
|
42
|
+
|
|
43
|
+
### If Modifying an Existing Component
|
|
44
|
+
If existing source code is provided above, this is a MODIFICATION. Your rules must:
|
|
45
|
+
- Preserve all existing patterns, imports, class structure, and conventions
|
|
46
|
+
- Focus rules on WHAT IS CHANGING, not the entire component
|
|
47
|
+
- Reference the exact patterns used in the existing code (e.g., how classnames are used, how styles are imported)
|
|
48
|
+
- NEVER suggest changing patterns that already work (imports, base class, style approach, etc.)
|
|
49
|
+
|
|
50
|
+
### Research Strategy
|
|
51
|
+
|
|
52
|
+
1. **Study existing source**: If provided, the existing code is your primary reference. Match its patterns exactly.
|
|
53
|
+
2. **Use eddie_read_file** to read 2-3 similar components to understand Eddie's actual coding patterns.
|
|
54
|
+
3. **Use eddie_get_component** to get metadata for the target and similar components.
|
|
55
|
+
4. **Use ds_search_design_knowledge** and **ds_search_chunks** to research how other major design systems (Material, Spectrum, Carbon, Polaris) handle this component type. This provides industry context for API design, accessibility patterns, and naming.
|
|
56
|
+
5. **Use eddie_get_token** to verify specific token names exist — this is critical. If a token doesn't exist, note it.
|
|
57
|
+
6. **Use eddie_get_relationships** to understand composition patterns.
|
|
58
|
+
|
|
59
|
+
### Mandatory Rules (CR-*)
|
|
60
|
+
|
|
61
|
+
Include:
|
|
62
|
+
- CR-001: Tag name and CSS class name
|
|
63
|
+
- CR-002: BEM naming structure
|
|
64
|
+
- CR-003: Token usage rules (reference ACTUAL token names from the token taxonomy — verify with eddie_get_token)
|
|
65
|
+
- CR-004: Base class contract (match existing component's base class)
|
|
66
|
+
- CR-005: Slot strategy
|
|
67
|
+
- Add more as needed
|
|
68
|
+
|
|
69
|
+
### Advisory Rules (AR-*)
|
|
70
|
+
|
|
71
|
+
Include:
|
|
72
|
+
- AR-001: Composition patterns
|
|
73
|
+
- AR-002: Reuse opportunities
|
|
74
|
+
- AR-003: Industry best practices (from design-systems research)
|
|
75
|
+
|
|
76
|
+
## Output Format
|
|
77
|
+
|
|
78
|
+
Output the completed component-rules.md as:
|
|
79
|
+
\`\`\`markdown:component-rules.md
|
|
80
|
+
... your content ...
|
|
81
|
+
\`\`\`
|
|
82
|
+
|
|
83
|
+
Every mandatory rule must be specific and actionable. Every advisory rule must include rationale.`,
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=library-researcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-researcher.js","sourceRoot":"","sources":["../../../src/pipeline/agents/library-researcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,MAAM,CAAC,MAAM,uBAAuB,GAAgB;IAClD,EAAE,EAAE,oBAAoB;IACxB,IAAI,EAAE,oBAAoB;IAC1B,KAAK,EAAE,YAAY;IACnB,cAAc,EAAE,CAAC,UAAU,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,oBAAoB,CAAC;IACtG,eAAe,EAAE,CAAC,oBAAoB,CAAC;IACvC,KAAK,EAAE;QACL,qBAAqB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,cAAc;QACnF,iBAAiB;QACjB,4BAA4B,EAAE,kBAAkB;KACjD;IACD,aAAa,EAAE,CAAC;IAChB,qBAAqB,EAAE,KAAK;IAE5B,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kGA4DkF;CACjG,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent 8 — Quality Gate
|
|
3
|
+
*
|
|
4
|
+
* Final verification: validates against Eddie conventions, runs
|
|
5
|
+
* eddie_validate_file. One retry. Same error twice = bail.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgentConfig } from '../types.js';
|
|
8
|
+
export declare const qualityGateConfig: AgentConfig;
|
|
9
|
+
//# sourceMappingURL=quality-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-gate.d.ts","sourceRoot":"","sources":["../../../src/pipeline/agents/quality-gate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,eAAO,MAAM,iBAAiB,EAAE,WAgE/B,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent 8 — Quality Gate
|
|
3
|
+
*
|
|
4
|
+
* Final verification: validates against Eddie conventions, runs
|
|
5
|
+
* eddie_validate_file. One retry. Same error twice = bail.
|
|
6
|
+
*/
|
|
7
|
+
export const qualityGateConfig = {
|
|
8
|
+
id: 'quality-gate',
|
|
9
|
+
name: 'Quality Gate',
|
|
10
|
+
phase: 'verify',
|
|
11
|
+
inputArtifacts: ['component.ts', 'component.scss', 'component.stories.ts', 'code-guidelines.md'],
|
|
12
|
+
outputArtifacts: ['component.ts', 'component.scss', 'component.stories.ts'],
|
|
13
|
+
tools: ['eddie_validate_file', 'eddie_read_file'],
|
|
14
|
+
maxIterations: 2,
|
|
15
|
+
hasConversationalGate: false,
|
|
16
|
+
systemPrompt: `You are the Quality Gate for the Eddie Design System component pipeline.
|
|
17
|
+
|
|
18
|
+
You are the final checkpoint. Verify the code matches Eddie's conventions exactly.
|
|
19
|
+
|
|
20
|
+
## Eddie Code Guidelines (THE STANDARD)
|
|
21
|
+
{{code-guidelines.md}}
|
|
22
|
+
|
|
23
|
+
## Code to Verify
|
|
24
|
+
|
|
25
|
+
### component.ts
|
|
26
|
+
{{component.ts}}
|
|
27
|
+
|
|
28
|
+
### component.scss
|
|
29
|
+
{{component.scss}}
|
|
30
|
+
|
|
31
|
+
### component.stories.ts
|
|
32
|
+
{{component.stories.ts}}
|
|
33
|
+
|
|
34
|
+
## Quality Checks
|
|
35
|
+
|
|
36
|
+
1. **Pattern Conformance** (most important):
|
|
37
|
+
- Import style matches Eddie: \`import classnames from 'classnames'\`, \`import { html, unsafeCSS } from 'lit'\`
|
|
38
|
+
- Style loading: \`static get styles() { return unsafeCSS(styles.toString()); }\`
|
|
39
|
+
- SCSS uses \`@use\` imports for tokens
|
|
40
|
+
- Stories use spread directive pattern
|
|
41
|
+
|
|
42
|
+
2. **Validation**:
|
|
43
|
+
- Run eddie_validate_file on .ts and .scss files
|
|
44
|
+
- No raw hex/px/font values in SCSS
|
|
45
|
+
- BEM naming correct
|
|
46
|
+
|
|
47
|
+
3. **TypeScript Correctness**:
|
|
48
|
+
- No \`any\` types
|
|
49
|
+
- Strict equality only
|
|
50
|
+
- Line length under 150 characters
|
|
51
|
+
|
|
52
|
+
4. **Final Check**:
|
|
53
|
+
- Use eddie_read_file to read one similar real component and compare patterns
|
|
54
|
+
|
|
55
|
+
IMPORTANT: If same error appears twice, STOP and report it as unresolvable.
|
|
56
|
+
|
|
57
|
+
## Output Format
|
|
58
|
+
|
|
59
|
+
\`\`\`typescript:component.ts
|
|
60
|
+
... final code ...
|
|
61
|
+
\`\`\`
|
|
62
|
+
|
|
63
|
+
\`\`\`scss:component.scss
|
|
64
|
+
... final styles ...
|
|
65
|
+
\`\`\`
|
|
66
|
+
|
|
67
|
+
\`\`\`typescript:component.stories.ts
|
|
68
|
+
... final stories ...
|
|
69
|
+
\`\`\``,
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=quality-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-gate.js","sourceRoot":"","sources":["../../../src/pipeline/agents/quality-gate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAAgB;IAC5C,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,QAAQ;IACf,cAAc,EAAE,CAAC,cAAc,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,oBAAoB,CAAC;IAChG,eAAe,EAAE,CAAC,cAAc,EAAE,gBAAgB,EAAE,sBAAsB,CAAC;IAC3E,KAAK,EAAE,CAAC,qBAAqB,EAAE,iBAAiB,CAAC;IACjD,aAAa,EAAE,CAAC;IAChB,qBAAqB,EAAE,KAAK;IAE5B,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqDT;CACN,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent 1 — Spec Analyst
|
|
3
|
+
*
|
|
4
|
+
* Consumes a human brief (natural language) and expands it into the
|
|
5
|
+
* structured brief.md artifact. Searches the knowledge graph to understand
|
|
6
|
+
* whether this is a new component, variant, recipe, or composition.
|
|
7
|
+
*/
|
|
8
|
+
import type { AgentConfig } from '../types.js';
|
|
9
|
+
export declare const specAnalystConfig: AgentConfig;
|
|
10
|
+
//# sourceMappingURL=spec-analyst.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-analyst.d.ts","sourceRoot":"","sources":["../../../src/pipeline/agents/spec-analyst.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,eAAO,MAAM,iBAAiB,EAAE,WA+D/B,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent 1 — Spec Analyst
|
|
3
|
+
*
|
|
4
|
+
* Consumes a human brief (natural language) and expands it into the
|
|
5
|
+
* structured brief.md artifact. Searches the knowledge graph to understand
|
|
6
|
+
* whether this is a new component, variant, recipe, or composition.
|
|
7
|
+
*/
|
|
8
|
+
import { BRIEF_TEMPLATE } from '../templates/brief.js';
|
|
9
|
+
export const specAnalystConfig = {
|
|
10
|
+
id: 'spec-analyst',
|
|
11
|
+
name: 'Spec Analyst',
|
|
12
|
+
phase: 'understand',
|
|
13
|
+
inputArtifacts: ['existing-component.ts', 'existing-component.scss', 'existing-component.stories.ts', 'code-guidelines.md'],
|
|
14
|
+
outputArtifacts: ['brief.md'],
|
|
15
|
+
tools: ['eddie_search', 'eddie_compose_recipe', 'eddie_read_file'],
|
|
16
|
+
maxIterations: 1,
|
|
17
|
+
hasConversationalGate: false,
|
|
18
|
+
systemPrompt: `You are the Spec Analyst for the Eddie Design System component pipeline.
|
|
19
|
+
|
|
20
|
+
Your job is to take a human's natural language brief and expand it into a structured brief.md artifact. You must determine whether the request is for:
|
|
21
|
+
- A MODIFICATION to an existing component (adding a variant, size, property, etc.)
|
|
22
|
+
- A new component
|
|
23
|
+
- A recipe (composition of existing components)
|
|
24
|
+
|
|
25
|
+
## Eddie Code Guidelines
|
|
26
|
+
{{code-guidelines.md}}
|
|
27
|
+
|
|
28
|
+
## Existing Component Source (if modifying)
|
|
29
|
+
|
|
30
|
+
### TypeScript
|
|
31
|
+
{{existing-component.ts}}
|
|
32
|
+
|
|
33
|
+
### SCSS
|
|
34
|
+
{{existing-component.scss}}
|
|
35
|
+
|
|
36
|
+
### Stories
|
|
37
|
+
{{existing-component.stories.ts}}
|
|
38
|
+
|
|
39
|
+
## Instructions
|
|
40
|
+
|
|
41
|
+
1. Read the human's brief carefully.
|
|
42
|
+
2. If existing component source is provided above, this is a MODIFICATION — not a new component. Study the existing code carefully.
|
|
43
|
+
3. Use eddie_search to find related existing components in the Eddie library.
|
|
44
|
+
4. Use eddie_compose_recipe to check if this UI pattern already exists as a recipe.
|
|
45
|
+
5. Use eddie_read_file to read any additional source files you need for context.
|
|
46
|
+
6. Expand the brief into the structured template below.
|
|
47
|
+
7. For modifications, focus on WHAT CHANGES are needed — not a full spec of the entire component.
|
|
48
|
+
8. For anything unclear, add a [PENDING] marker rather than guessing.
|
|
49
|
+
|
|
50
|
+
## Template
|
|
51
|
+
|
|
52
|
+
${BRIEF_TEMPLATE}
|
|
53
|
+
|
|
54
|
+
## Output Format
|
|
55
|
+
|
|
56
|
+
Output the completed brief.md as a single markdown document. Tag it as:
|
|
57
|
+
\`\`\`markdown:brief.md
|
|
58
|
+
... your content ...
|
|
59
|
+
\`\`\`
|
|
60
|
+
|
|
61
|
+
## Quality Checklist
|
|
62
|
+
|
|
63
|
+
Before outputting, verify:
|
|
64
|
+
- [ ] Intent is clear and specific (one sentence)
|
|
65
|
+
- [ ] For modifications: clearly states what is CHANGING vs what already exists
|
|
66
|
+
- [ ] Variants are explicitly listed
|
|
67
|
+
- [ ] Sizes use t-shirt notation (xs, sm, md, lg, xl)
|
|
68
|
+
- [ ] Accessibility requirements are stated
|
|
69
|
+
- [ ] Token categories are identified
|
|
70
|
+
- [ ] [PENDING] markers for anything genuinely unclear`,
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=spec-analyst.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-analyst.js","sourceRoot":"","sources":["../../../src/pipeline/agents/spec-analyst.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,CAAC,MAAM,iBAAiB,GAAgB;IAC5C,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,YAAY;IACnB,cAAc,EAAE,CAAC,uBAAuB,EAAE,yBAAyB,EAAE,+BAA+B,EAAE,oBAAoB,CAAC;IAC3H,eAAe,EAAE,CAAC,UAAU,CAAC;IAC7B,KAAK,EAAE,CAAC,cAAc,EAAE,sBAAsB,EAAE,iBAAiB,CAAC;IAClE,aAAa,EAAE,CAAC;IAChB,qBAAqB,EAAE,KAAK;IAE5B,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCd,cAAc;;;;;;;;;;;;;;;;;;uDAkBuC;CACtD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent 6 — Story Author
|
|
3
|
+
*
|
|
4
|
+
* Generates comprehensive CSF stories following Eddie's exact story patterns.
|
|
5
|
+
* Must match the existing story format used across the library.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgentConfig } from '../types.js';
|
|
8
|
+
export declare const storyAuthorConfig: AgentConfig;
|
|
9
|
+
//# sourceMappingURL=story-author.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"story-author.d.ts","sourceRoot":"","sources":["../../../src/pipeline/agents/story-author.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,eAAO,MAAM,iBAAiB,EAAE,WA0D/B,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent 6 — Story Author
|
|
3
|
+
*
|
|
4
|
+
* Generates comprehensive CSF stories following Eddie's exact story patterns.
|
|
5
|
+
* Must match the existing story format used across the library.
|
|
6
|
+
*/
|
|
7
|
+
export const storyAuthorConfig = {
|
|
8
|
+
id: 'story-author',
|
|
9
|
+
name: 'Story Author',
|
|
10
|
+
phase: 'build',
|
|
11
|
+
inputArtifacts: [
|
|
12
|
+
'brief.md', 'component.ts', 'component.scss',
|
|
13
|
+
'existing-component.stories.ts',
|
|
14
|
+
'reference-component.stories.ts',
|
|
15
|
+
'code-guidelines.md',
|
|
16
|
+
],
|
|
17
|
+
outputArtifacts: ['component.stories.ts'],
|
|
18
|
+
tools: ['eddie_get_component', 'eddie_read_file'],
|
|
19
|
+
maxIterations: 2,
|
|
20
|
+
hasConversationalGate: false,
|
|
21
|
+
systemPrompt: `You are the Story Author for the Eddie Design System component pipeline.
|
|
22
|
+
|
|
23
|
+
Your job is to generate Storybook stories that match Eddie's existing story patterns EXACTLY.
|
|
24
|
+
|
|
25
|
+
## Eddie Code Guidelines
|
|
26
|
+
{{code-guidelines.md}}
|
|
27
|
+
|
|
28
|
+
## Existing Stories (if modifying — START HERE and add to it)
|
|
29
|
+
{{existing-component.stories.ts}}
|
|
30
|
+
|
|
31
|
+
## Reference Stories (if creating new — FOLLOW THIS PATTERN)
|
|
32
|
+
{{reference-component.stories.ts}}
|
|
33
|
+
|
|
34
|
+
## Component Source
|
|
35
|
+
### component.ts
|
|
36
|
+
{{component.ts}}
|
|
37
|
+
|
|
38
|
+
### brief.md
|
|
39
|
+
{{brief.md}}
|
|
40
|
+
|
|
41
|
+
## CRITICAL: Match Existing Patterns
|
|
42
|
+
|
|
43
|
+
Study the existing/reference stories above carefully. Eddie stories follow this pattern:
|
|
44
|
+
- Import \`html\` from \`lit\`
|
|
45
|
+
- Import \`spread\` from the directives
|
|
46
|
+
- Side-effect import of the component
|
|
47
|
+
- Default export with \`title\` (using atomic design categories) and \`component\`
|
|
48
|
+
- Named story exports as arrow functions returning \`html\` tagged templates
|
|
49
|
+
- Use \`spread(args)\` directive for Default story
|
|
50
|
+
- Simple, minimal stories — NOT verbose CSF3 Meta/StoryObj pattern
|
|
51
|
+
|
|
52
|
+
If existing stories are provided, ADD new stories to them — do not rewrite.
|
|
53
|
+
Use eddie_read_file to read 2-3 other component stories for more pattern examples.
|
|
54
|
+
|
|
55
|
+
## Output Format
|
|
56
|
+
|
|
57
|
+
YOU MUST output the COMPLETE stories file as a tagged code block (not just descriptions):
|
|
58
|
+
|
|
59
|
+
\`\`\`typescript:component.stories.ts
|
|
60
|
+
... COMPLETE stories file contents ...
|
|
61
|
+
\`\`\`
|
|
62
|
+
|
|
63
|
+
NEVER output just a description of changes. ALWAYS output the complete file contents.`,
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=story-author.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"story-author.js","sourceRoot":"","sources":["../../../src/pipeline/agents/story-author.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAAgB;IAC5C,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,OAAO;IACd,cAAc,EAAE;QACd,UAAU,EAAE,cAAc,EAAE,gBAAgB;QAC5C,+BAA+B;QAC/B,gCAAgC;QAChC,oBAAoB;KACrB;IACD,eAAe,EAAE,CAAC,sBAAsB,CAAC;IACzC,KAAK,EAAE,CAAC,qBAAqB,EAAE,iBAAiB,CAAC;IACjD,aAAa,EAAE,CAAC;IAChB,qBAAqB,EAAE,KAAK;IAE5B,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sFA0CsE;CACrF,CAAC"}
|