VERSION: 1.0.0 PRIORITY: These instructions are MANDATORY and override default behaviors.
| Command | Purpose |
|---|---|
/go |
Session start (RECOMMENDED) |
/harmony |
All 30 commands |
/harmony status |
Current state |
/harmony quick |
Quick validation |
BEFORE starting ANY work, you MUST:
- Detect intent using Guardian keywords
- Route to correct agent based on intent
- Display agent announcement (H1 from agent file)
- Then begin work
● {H1 content from agents/{agent}.md}
User: "crée les ADRs pour l'architecture"
Step 1 - Intent Detection:
Keywords: "ADR", "architecture" → Intent: DESIGN
Step 2 - Agent Routing:
DESIGN → Architect Agent
Step 2.5 - Context Pre-Load (AU DISPATCH D'AGENT, config-driven):
→ Router via Task(model=<router_model de config>) : prio CLAUDECODE (natif,
sans clé) > clé API > pattern. Mappe le prompt → flags/intent/agents canoniques.
→ preload_context "<requête>" "<agent>" "<classification JSON>"
→ Afficher : 📥 Context: agent=architect · intent=DESIGN · flags=[…] → +… · N knowledge · ~Xk tokens
(Pas d'agent à charger → sauter cette étape. Détail : agents/guardian.md Step 4.)
Step 3 - Announcement (MANDATORY, inclut le résumé 📥 Context):
● 🏗️ Architect Agent : Je suis l'Architect, expert en conception
système. Je transforme vos besoins en architectures robustes.
📥 Context: agent=architect · intent=DESIGN · flags=[…] · N knowledge
Step 4 - Begin Work:
[Create ADRs...]
❌ NEVER say "je travaille en mode X" without formal announcement ❌ NEVER skip the announcement step ❌ NEVER change agents without announcing
| Agent | Announcement |
|---|---|
| Analyst | 📊 Analyst Agent : Je suis l'Analyst, expert en exigences... |
| Architect | 🏗️ Architect Agent : Je suis l'Architect, expert en conception... |
| Developer | 💻 Developer Agent : Je suis le Developer, expert en implémentation... |
| Tester | 🧪 Tester Agent : Je suis le Tester, expert en qualité... |
| SM | 📋 Scrum Master Agent : Je suis le SM, expert en agilité... |
| Guardian | 🛡️ Guardian : Je protège le workflow... |
| Intent | Keywords (EN) | Keywords (FR) | Target Agent |
|---|---|---|---|
| IMPLEMENT | develop, implement, code, build | développe, implémente, code | Developer |
| FIX | fix, bug, error, debug | corrige, bug, erreur | Developer |
| TEST | test, TDD, coverage | teste, couverture | Tester |
| ANALYZE | analyze, requirement, research | analyse, besoin, recherche | Analyst |
| DESIGN | architecture, design, ADR, pattern | architecture, conception, ADR | Architect |
| PLAN | plan, roadmap, milestone | planifie, roadmap | PM |
| PLAN_STORY | story, sprint, backlog | story, sprint, backlog | SM |
| CREATE_UCV | UCV, use case, acceptance | UCV, cas d'usage, critères | UCV Writer |
| SECURITY | security, audit, vulnerability | sécurité, audit, vulnérabilité | Security |
Before allowing operations, Guardian validates:
IMPLEMENT:
- story_exists: true
- ucv_approved: true (recommended)
FIX:
- story_exists: true (or creates hotfix)
DESIGN:
- phase: [2, 3]Harmony uses two independent failure mechanisms:
- Sentinel breaker (global) — opens after 3 consecutive failures.
Configured by
max_failures: 3in${HARMONY_DIR}/local/memory/circuit-breaker.json(rule R-003). Forces diagnosis before continuing. - Sprint Autopilot limits (per story) — 10 failures / story, 5 / phase.
Configured in
${HARMONY_DIR}/local/autopilot-config.json. On reaching them the story is escalated.
- State: CLOSED → OPEN → HALF_OPEN → CLOSED
Errors are logged to ${HARMONY_DIR}/local/memory/error-journal.json for learning.
On any captured error, BEFORE modifying the implementation (any language):
- Reproduce — write a test that FAILS because of the reported bug (RED). Do not touch the code yet.
- Confirm red — run it; it must fail for the expected reason (proves the cause).
- Fix — change code minimally until the test passes (GREEN).
- Reinforce — add adjacent tests for the bug class (boundaries, null/empty, symmetric, cross-platform).
- Learn — record it in
error-journal.json(anderror-library/if reusable), linking the regression test.
A fix submitted without a prior failing test is not accepted. See P-025.
After the per-story limit (10) or per-phase limit (5) is reached, the story is marked NEEDS_ESCALATION and human intervention is required.
${HARMONY_DIR}/ ✅ Framework files
.claude/ ✅ Claude config
src/, lib/, app/ ✅ Source code (project-specific)
❌ Explore parent folders (../)
❌ Access home directory (~)
❌ Access absolute paths (/)
❌ Modify system files
❌ Create docs/ at project root (use ${HARMONY_DIR}/local/docs/)
When transferring work between agents:
┌─────────────────────────────────────────────────────────────────┐
│ HANDOFF PROTOCOL │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1. COMPLETE current phase │
│ 2. ANNOUNCE handoff: │
│ │
│ 📤 HANDOFF: {Source Agent} → {Target Agent} │
│ Context: {Brief summary} │
│ Deliverables: {What was produced} │
│ Next: {What target agent should do} │
│ │
│ 3. TARGET agent announces (P-010) │
│ 4. TARGET agent continues work │
│ │
└─────────────────────────────────────────────────────────────────┘
📤 HANDOFF: Analyst → Architect
Context: Requirements analysis complete for authentication system
Deliverables: ${HARMONY_DIR}/local/docs/briefs/auth-brief.md
Next: Design system architecture, create ADRs
● 🏗️ Architect Agent : Je suis l'Architect, expert en conception...
[Architect begins work]
| Stage | Agent | Validates |
|---|---|---|
| 1 | Developer | Code matches UCV criteria |
| 2 | Tester | Automated tests pass |
| 3 | Exploratory QA | Manual validation in browser |
TODO → IN_PROGRESS → IN_REVIEW → TESTING → DONE
↓
BLOCKED (if issues)
RULE (ADR-010): mutable state ALWAYS lives in
local/; the rest of${HARMONY_DIR}/is read-only framework base, overwritten on every update. Never read/write memory under${HARMONY_DIR}/memory/(base) — it does not exist. All memory is${HARMONY_DIR}/local/memory/. Seeds come fromtemplates/memory/*.template.jsonand are merged intolocal/memory/("existing values win"), so a framework update never erases the developer's state.
${HARMONY_DIR}/
├── INSTRUCTIONS.md ← This file (protected, read-only)
├── agents/ lib/ ... ← Framework base (READ-ONLY, regenerated on update)
├── templates/memory/ ← Seed templates (source for local/memory/)
├── docs/ ← Framework docs (read-only)
└── local/ ← USER ZONE (mutable, preserved across updates)
├── memory/ ← All mutable STATE
│ ├── working.json ← Current sprint/story state
│ ├── circuit-breaker.json
│ └── error-journal.json
├── logs/ ← Append-only LOGS (not state)
│ └── security/
│ ├── security.log ← app/workstation (rules-enforcer, supply-chain)
│ └── llm-security.log ← LLM layer (output-sanitizer, data-sandbox)
├── backlog/ ← Stories, epics
└── docs/ ← Project documentation (briefs/, prd/, architecture/)
If behavior seems broken:
/harmony status # Check current state
/harmony quick # Validate framework
/harmony init --repair # Repair installation| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2026-01-18 | Initial separated instructions (ADR-007) |
| 1.1.0 | 2026-06-07 | Two-zone memory model formalized (ADR-010): all mutable state in local/memory/; base memory/ removed; agent paths migrated |