Stage 4 Build Plan — WO-001 STM EA Agent
Stage 4 Build Plan — WO-001 STM EA Agent
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Take the existing reference implementation at C:/Projects/agent-ea/ and run it through Stage 4 (Build) of the digital-talent production line — cleaning, fixing, documenting, and verifying it for client delivery.
Architecture: The agent already exists and works. This is a cleanup-and-package pass, not a build-from-scratch. We fix the dry run issues (A-01 through A-08), create missing documentation (Phase G), verify consistency (Phase H), and produce a completed assembly checklist.
Pre-existing phases (confirmed, not rebuilt):
- Phase A (Repository Setup) — repo exists with correct structure
- Phase D (Template Library) — 9 Draw.io templates already in place
- Phase E (Reference Materials) — content-in/ populated with methodology, meta-model, tools
- Phase F (Orchestration) — ea-hlsd.md orchestrator already built and functional
Working directories:
- Reference/product repo:
C:/Projects/agent-ea/ - Order directory:
C:/Projects/talent-factory/production-lines/orders/stm-ea-agent/ - Templates:
C:/Projects/talent-factory/production-lines/digital-talent/templates/
Task 1: CLAUDE.md Cleanup (A-01, A-03, A-04)
Files:
Modify:
C:/Projects/agent-ea/CLAUDE.mdStep 1: Remove workspace freeze notice (A-04)
Remove lines 3-6 (the "WORKSPACE GELE" block):
> **WORKSPACE GELÉ** — Ne plus modifier directement.
> Source de vérité: `C:\Projects\bmad-v6\`
> Ce workspace reste fonctionnel pour les demandes EA en cours mais ne reçoit plus de mises à jour de skills.
> Tout nouveau développement (skills, agents, portage) se fait dans bmad-v6.
- Step 2: Remove bmad-v6 factory reference (A-03)
Remove line 18: Les références et KDDs sont dans C:\Projects\bmad-v6` (source de vérité).Also remove line 17:Skills EA v1.0 figés disponibles localement dans .claude/commands/ — ne plus modifier.Replace both with:Les skills EA sont dans .claude/commands/. Les références sont dans content-in/.`
- Step 3: Remove phantom skill references (A-01)
In the Known Issues section (line 339), the entry references /ea-note — this is a phantom. Remove or fix the entry.
Search the entire CLAUDE.md for /ea-note and /ea-validate references. Remove any that point to non-existent commands.
- Step 4: Remove Boris quote and factory-internal references
Line 238: > **Boris**: "Opus a moins de chances d'erreurs..." — Replace with a generic note:
> Utiliser Opus quand 3+ options ont des avantages/inconvénients et que les erreurs coûtent cher à corriger.
Line 1: Read and follow all rules in WORKSPACE_RULES.md before responding. — Check if WORKSPACE_RULES.md exists and is needed. If it contains factory-internal rules, merge relevant parts into CLAUDE.md and remove the reference.
- Step 5: Update the header to be client-appropriate
Replace the opening lines with a clean client-facing header:
# CLAUDE.md — Agent EA STM
## Rôle de ce projet
**agent-ea** est l'agent d'architecture d'entreprise pour la STM.
Il produit les livrables d'architecture d'entreprise: A100, A230, A270, A280, A290.
Méthodologie: **Macroscope STM** · TOGAF ADM · SAP LeanIX v4 · ArchiMate 3.x
Task 2: Resolve Extra Skills (A-02)
Files:
- Modify:
C:/Projects/agent-ea/CLAUDE.md(skills table) - Possibly remove:
C:/Projects/agent-ea/.claude/commands/bmad-add-creer-note.md - Possibly remove:
C:/Projects/agent-ea/.claude/commands/bmad-add-revoir-note.md - Possibly remove:
C:/Projects/agent-ea/.claude/commands/do-work.md - Possibly remove:
C:/Projects/agent-ea/.claude/commands/ae-creer-diagramme-hautniveau.md - Keep and document:
C:/Projects/agent-ea/.claude/commands/ea-archi-extraction.md
Analysis of the 5 extra skills:
| Skill | Verdict | Reason |
|---|---|---|
ea-archi-extraction |
KEEP | Legitimate EA skill (LeanIX reverse-engineering from docs). Add to skills table. |
ae-creer-diagramme-hautniveau |
REMOVE | Superseded by ea-commun-diagramme. Older version with different naming. |
bmad-add-creer-note |
REMOVE | Factory-prefixed dev tool. Overlaps with ea-exigences-note. |
bmad-add-revoir-note |
REMOVE | Factory-prefixed dev tool. Overlaps with ea-exigences-note-revue. |
do-work |
REMOVE | Dev task queue tool, not an EA skill. |
- Step 1: Move removed skills to a
_dev-archive/directory
Don't delete — move to C:/Projects/agent-ea/_dev-archive/commands/ for reference. This directory won't ship (will be in the packaging exclude list).
mkdir -p "C:/Projects/agent-ea/_dev-archive/commands"
mv "C:/Projects/agent-ea/.claude/commands/bmad-add-creer-note.md" "C:/Projects/agent-ea/_dev-archive/commands/"
mv "C:/Projects/agent-ea/.claude/commands/bmad-add-revoir-note.md" "C:/Projects/agent-ea/_dev-archive/commands/"
mv "C:/Projects/agent-ea/.claude/commands/do-work.md" "C:/Projects/agent-ea/_dev-archive/commands/"
mv "C:/Projects/agent-ea/.claude/commands/ae-creer-diagramme-hautniveau.md" "C:/Projects/agent-ea/_dev-archive/commands/"
- Step 2: Move dev-only .claude/skills/ to archive (A-06)
mv "C:/Projects/agent-ea/.claude/skills/" "C:/Projects/agent-ea/_dev-archive/skills/"
- Step 3: Add ea-archi-extraction to CLAUDE.md skills table
Add to the "Service: Architecture d'entreprise" section:
| `/ea-archi-extraction` | Reverse-engineering LeanIX depuis un doc EA existant | document EA | CSV LeanIX + workbook | Haiku |
- Step 4: Move related workflow directories
mv "C:/Projects/agent-ea/workflows/creer-note" "C:/Projects/agent-ea/_dev-archive/workflows-creer-note"
mv "C:/Projects/agent-ea/workflows/revoir-note" "C:/Projects/agent-ea/_dev-archive/workflows-revoir-note"
Task 3: Clean Up Internal Dev Files (A-08)
Files to move to _dev-archive/:
C:/Projects/agent-ea/ARCHITECTURE-ARCHI-DEV-PROD-PLAN.mdC:/Projects/agent-ea/ARCHITECTURE-HUB-SPOKE-PROPOSAL.mdC:/Projects/agent-ea/STRUCTURE-ANALYSIS-2026-02-23.mdC:/Projects/agent-ea/TODO.mdC:/Projects/agent-ea/MEMORY-model-optimization-template.mdC:/Projects/agent-ea/NEW-PROJECT-SETUP.mdC:/Projects/agent-ea/DEPLOYED.mdC:/Projects/agent-ea/install-agent.ps1C:/Projects/agent-ea/setup-agent-repo.ps1C:/Projects/agent-ea/WORKSPACE_RULES.md(merge relevant rules into CLAUDE.md first)C:/Projects/agent-ea/notes/(dev notes directory)C:/Projects/agent-ea/prompts/(dev prompts directory)C:/Projects/agent-ea/emp/(dev directory)C:/Projects/agent-ea/Agent-ae/(dev directory)Step 1: Read WORKSPACE_RULES.md and identify client-relevant rules
Any rules that define agent behavior (not factory development rules) should be merged into CLAUDE.md before archiving.
- Step 2: Move all dev files to _dev-archive/
mkdir -p "C:/Projects/agent-ea/_dev-archive"
mv "C:/Projects/agent-ea/ARCHITECTURE-ARCHI-DEV-PROD-PLAN.md" "C:/Projects/agent-ea/_dev-archive/"
mv "C:/Projects/agent-ea/ARCHITECTURE-HUB-SPOKE-PROPOSAL.md" "C:/Projects/agent-ea/_dev-archive/"
mv "C:/Projects/agent-ea/STRUCTURE-ANALYSIS-2026-02-23.md" "C:/Projects/agent-ea/_dev-archive/"
mv "C:/Projects/agent-ea/TODO.md" "C:/Projects/agent-ea/_dev-archive/"
mv "C:/Projects/agent-ea/MEMORY-model-optimization-template.md" "C:/Projects/agent-ea/_dev-archive/"
mv "C:/Projects/agent-ea/NEW-PROJECT-SETUP.md" "C:/Projects/agent-ea/_dev-archive/"
mv "C:/Projects/agent-ea/DEPLOYED.md" "C:/Projects/agent-ea/_dev-archive/"
mv "C:/Projects/agent-ea/install-agent.ps1" "C:/Projects/agent-ea/_dev-archive/"
mv "C:/Projects/agent-ea/setup-agent-repo.ps1" "C:/Projects/agent-ea/_dev-archive/"
mv "C:/Projects/agent-ea/WORKSPACE_RULES.md" "C:/Projects/agent-ea/_dev-archive/"
# Directories
mv "C:/Projects/agent-ea/notes/" "C:/Projects/agent-ea/_dev-archive/notes/"
mv "C:/Projects/agent-ea/prompts/" "C:/Projects/agent-ea/_dev-archive/prompts/"
mv "C:/Projects/agent-ea/emp/" "C:/Projects/agent-ea/_dev-archive/emp/"
mv "C:/Projects/agent-ea/Agent-ae/" "C:/Projects/agent-ea/_dev-archive/Agent-ae/"
- Step 3: Verify remaining structure matches expected product layout
After cleanup, C:/Projects/agent-ea/ should contain only:
.claude/commands/ (16 skills: 15 from WO + ea-archi-extraction)
.claude/commands/templates/ (9 Draw.io templates + README)
.claude/settings.json (shipping permissions)
content-in/ (reference materials)
content-out/ (if exists — output staging)
demandes-ae/ (request folders)
memory/ (agent memory)
templates/ (if exists — document templates)
tools/ (if PowerShell scripts are needed by client)
workflows/ (if any remain after cleanup)
docs/ (client documentation — 4 files)
CLAUDE.md
README.md
CHANGELOG.md
agent-ea.code-workspace
Task 4: Fix MCP Configuration (A-07)
Files:
Modify:
C:/Projects/agent-ea/.mcp.jsonStep 1: Review .mcp.json
Current config has two servers:
drawio-diagrams→npx drawio-mcp— KEEP (npm package, available in any environment)ea-apps→node C:/Projects/bmad-v6/tools/mcp-ea-apps/server.js— REMOVE (factory-internal path)Step 2: Update .mcp.json
Remove the ea-apps entry. Keep only drawio-diagrams.
{
"mcpServers": {
"drawio-diagrams": {
"command": "npx",
"args": ["drawio-mcp"]
}
}
}
Task 5: Create Client Documentation (A-05 / Phase G)
Files:
- Create:
C:/Projects/agent-ea/docs/guide-utilisateur.md - Create:
C:/Projects/agent-ea/docs/guide-configuration.md - Create:
C:/Projects/agent-ea/docs/carte-reference-skills.md - Create:
C:/Projects/agent-ea/docs/demarrage-rapide.md
Templates: Use templates from C:/Projects/talent-factory/production-lines/digital-talent/templates/ as structural reference, but write content in French Canadian matching the agent's language.
- Step 1: Create docs/ directory
mkdir -p "C:/Projects/agent-ea/docs"
- Step 2: Write guide-utilisateur.md (User Guide)
Based on user-guide-template.md. Content in French Canadian. Cover:
What the EA agent does (9 capabilities from WO)
Getting started (Claude Code setup, model selection)
How to start a new EA request (DAE-NNNN folder, provide notes)
Skill-by-skill guide (all 16 skills with examples)
Standard HLSD workflow (the 7-step pipeline)
Interpreting outputs (Draw.io, Confluence pages, LeanIX validation)
Troubleshooting (model selection, path resolution, common errors)
Step 3: Write guide-configuration.md (Config Guide)
Based on config-guide-template.md. Cover:
Updating reference materials in content-in/
Adjusting naming conventions in CLAUDE.md
Adding new Draw.io templates
Model selection and cost optimization
Managing .claude/settings.json permissions
Adding new request types
Step 4: Write carte-reference-skills.md (Skill Reference Card)
Based on skill-reference-card-template.md. One-page table with all 16 skills:
Category, Skill Name, Command, What It Does, Input, Output, Recommended Model.
Organized by service category (Exigences, Architecture, Changement, Qualite, Commun, Outils).
- Step 5: Write demarrage-rapide.md (Quick-Start)
Based on quick-start-template.md. One page:
- Prerequisites (Claude Code installed, model set)
- Setup verification (3 checks)
- First request walkthrough (create DAE folder, add note, run /ea-exigences-note-revue)
- Top 3 skills with one-line examples
- Where to get help
Task 6: Verification (Phase H)
Files:
Read:
C:/Projects/agent-ea/CLAUDE.mdRead: All files in
C:/Projects/agent-ea/.claude/commands/Step 1: H1 — Structural verification
Verify all expected files exist:
CLAUDE.md (all 9 sections)
README.md
16 skills in .claude/commands/
9 Draw.io templates in .claude/commands/templates/
Reference materials in content-in/
Documentation in docs/ (4 files)
Workflow files (if any remain)
Step 2: H4 — CLAUDE.md consistency check
Compare the skills table in CLAUDE.md against actual files in .claude/commands/:
Every listed skill has a corresponding .md file
Every .md file has a table entry
No phantom references (like /ea-note, /ea-validate)
Step 3: H5 — Cross-reference check
Verify:
All file path references in CLAUDE.md point to existing files
No references to factory-internal paths (bmad-v6, talent-factory, etc.)
Language is consistently French Canadian throughout
Model recommendations in skills table match the cost optimization section
Step 4: H2 — Skill smoke tests
For 3 representative skills (one per category), verify they respond correctly to minimal input:
/ea-exigences-note-revue(Exigences) — provide a short test note, verify it produces Q&R structure/ea-commun-diagramme(Commun) — provide a minimal intrant, verify it produces valid Draw.io XML/kdd(Outils) — ask a test architecture question, verify ADR structure
Note: Full functional testing is Stage 5 (Quinn). These are build-time smoke tests to confirm skills are structurally functional after cleanup. Test in a fresh Claude Code session using the model specified in the skill.
- Step 5: H3 — End-to-end orchestrator test
Create a minimal test request in demandes-ae/DAE-TEST/. Provide a sample note. Run /ea-hlsd test. Verify:
- Orchestrator detects empty state correctly
- First step (note-revue) is invoked
- Quality gate halt point is reached
- Status file is created
Clean up test request folder after verification.
Note: This validates the orchestrator's state detection and routing, not the quality of each skill's output (that's Stage 5).
- Step 6: H6 — Confirm dev artifacts removed
Verify .claude/skills/ is gone (moved to _dev-archive).
Verify no bmad-prefixed files in .claude/commands/.
Verify no internal TODO, ARCHITECTURE, STRUCTURE files in root.
Task 7: Fill Assembly Checklist
Files:
- Create:
C:/Projects/talent-factory/production-lines/orders/stm-ea-agent/assembly-checklist.md
Template: Copy from C:/Projects/talent-factory/production-lines/digital-talent/templates/assembly-checklist-template.md
- Step 1: Copy template to order directory
cp "C:/Projects/talent-factory/production-lines/digital-talent/templates/assembly-checklist-template.md" \
"C:/Projects/talent-factory/production-lines/orders/stm-ea-agent/assembly-checklist.md"
- Step 2: Fill in all fields
Fill in the checklist with actual counts and results from tasks 1-6:
Product: Enterprise Architecture Agent for STM
Order: WO-001
Skills built: 16 / 16
Templates: 9 Draw.io + README
Documentation: 4 files (guide-utilisateur, guide-configuration, carte-reference, demarrage-rapide)
All verification results from Task 6
Step 3: Create stage-4-complete.md handoff
Create C:/Projects/talent-factory/production-lines/orders/stm-ea-agent/stage-4-complete.md per the handoff protocol:
- Completion date
- Worker: Pablo
- Deliverables list with file paths
- Gate criteria checklist (all passed)
- Notes for Quinn (Stage 5)
- Test data location
Task 8: Commit All Changes
- Step 1: Commit agent-ea changes
In C:/Projects/agent-ea/:
git add CLAUDE.md .claude/commands/ .mcp.json docs/ _dev-archive/
git commit -m "feat: Stage 4 production line build — cleanup, documentation, verification (WO-001)"
- Step 2: Commit order artifacts in talent-factory
In C:/Projects/talent-factory/:
git add production-lines/orders/stm-ea-agent/assembly-checklist.md \
production-lines/orders/stm-ea-agent/stage-4-build-plan.md \
production-lines/orders/stm-ea-agent/stage-4-complete.md
git commit -m "feat: WO-001 Stage 4 complete — assembly checklist and handoff"