azclaude-copilot 0.4.39 → 0.5.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.
Files changed (45) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/README.md +9 -7
  4. package/bin/cli.js +53 -1
  5. package/package.json +2 -2
  6. package/templates/CLAUDE.md +35 -1
  7. package/templates/agents/cc-cli-integrator.md +5 -0
  8. package/templates/agents/cc-template-author.md +7 -0
  9. package/templates/agents/cc-test-maintainer.md +5 -0
  10. package/templates/agents/code-reviewer.md +11 -0
  11. package/templates/agents/constitution-guard.md +9 -0
  12. package/templates/agents/devops-engineer.md +9 -0
  13. package/templates/agents/loop-controller.md +7 -0
  14. package/templates/agents/milestone-builder.md +7 -0
  15. package/templates/agents/orchestrator-init.md +9 -1
  16. package/templates/agents/orchestrator.md +8 -0
  17. package/templates/agents/problem-architect.md +29 -1
  18. package/templates/agents/qa-engineer.md +9 -0
  19. package/templates/agents/security-auditor.md +9 -0
  20. package/templates/agents/spec-reviewer.md +9 -0
  21. package/templates/agents/test-writer.md +11 -0
  22. package/templates/capabilities/manifest.md +2 -0
  23. package/templates/capabilities/shared/context-inoculation.md +39 -0
  24. package/templates/capabilities/shared/reward-hack-detection.md +32 -0
  25. package/templates/commands/audit.md +8 -0
  26. package/templates/commands/ghost-test.md +99 -0
  27. package/templates/commands/inoculate.md +76 -0
  28. package/templates/commands/sentinel.md +3 -0
  29. package/templates/commands/ship.md +6 -0
  30. package/templates/commands/test.md +10 -0
  31. package/templates/hooks/post-tool-use.js +341 -277
  32. package/templates/hooks/pre-tool-use.js +344 -292
  33. package/templates/hooks/stop.js +198 -151
  34. package/templates/hooks/user-prompt.js +369 -163
  35. package/templates/scripts/statusline.sh +105 -0
  36. package/templates/skills/agent-creator/SKILL.md +11 -0
  37. package/templates/skills/architecture-advisor/SKILL.md +21 -16
  38. package/templates/skills/debate/SKILL.md +5 -0
  39. package/templates/skills/env-scanner/SKILL.md +5 -0
  40. package/templates/skills/frontend-design/SKILL.md +5 -0
  41. package/templates/skills/mcp/SKILL.md +3 -0
  42. package/templates/skills/security/SKILL.md +3 -0
  43. package/templates/skills/session-guard/SKILL.md +3 -0
  44. package/templates/skills/skill-creator/SKILL.md +12 -0
  45. package/templates/skills/test-first/SKILL.md +5 -0
@@ -8,8 +8,8 @@
8
8
  "plugins": [
9
9
  {
10
10
  "name": "azclaude",
11
- "description": "AZCLAUDE is a complete AI coding environment for Claude Code. It installs 37 commands, 10 auto-invoked skills, 15 specialized agents, 4 hooks, and a persistent memory system — in one command.\n\nKey features:\n• Memory across sessions — goals.md + checkpoints injected automatically before every session\n• Self-improving loop — /reflect fixes stale CLAUDE.md rules, /reflexes learns from tool-use patterns, /evolve creates agents from git evidence\n• Autonomous copilot mode — /copilot runs a three-tier team (orchestrator → problem-architect → milestone-builder) across sessions until the product ships\n• Spec-driven workflow — /constitute writes project rules, /spec writes structured ACs, /analyze detects plan drift and ghost milestones, /blueprint traces every milestone to a spec\n• Security layer — 111-rule environment scan (/sentinel), pre-write secret blocking, pre-ship credential audit\n• Progressive levels 0–10 — start with CLAUDE.md, grow into multi-agent pipelines and self-evolving environments\n• Zero dependencies — no npm packages, no external APIs, no vector databases. Plain markdown files and Claude Code's native architecture.\n• Smart install — npx azclaude-copilot@latest auto-detects first install vs upgrade vs verify. Context-aware onboarding shows the right next command for your project state.\n\nExample use cases:\n• /setup — scan an existing project, detect stack + domain + scale, fill CLAUDE.md, generate project-specific skills and agents automatically\n• /copilot \"Build a compliance SaaS with trilingual support\" — walk away, come back to working code across multiple sessions\n• /sentinel — run a scored security audit (0–100, grade A–F) across hooks, permissions, MCP servers, agent configs, and secrets\n• /evolve — detect gaps in the environment, generate new skills and agents from git co-change evidence, report score delta (e.g. 42/100 → 68/100)\n• /constitute — write your project's constitution (non-negotiables, architectural commitments, definition of done) — gates all future AI actions\n• /analyze — cross-artifact consistency check: ghost milestones, spec vs. code drift, unplanned commits\n• /reflect — find stale, missing, or contradicting rules in CLAUDE.md and propose exact fixes\n• /debate \"REST vs GraphQL for this project\" — adversarial evidence-based decision with order-independent scoring, logged to decisions.md",
12
- "version": "0.4.39",
11
+ "description": "AZCLAUDE is a complete AI coding environment for Claude Code. It installs 39 commands, 10 auto-invoked skills, 15 specialized agents, 4 hooks, and a persistent memory system — in one command.\n\nKey features:\n• Memory across sessions — goals.md + checkpoints injected automatically before every session\n• Self-improving loop — /reflect fixes stale CLAUDE.md rules, /reflexes learns from tool-use patterns, /evolve creates agents from git evidence\n• Autonomous copilot mode — /copilot runs a three-tier team (orchestrator → problem-architect → milestone-builder) across sessions until the product ships\n• Spec-driven workflow — /constitute writes project rules, /spec writes structured ACs, /analyze detects plan drift and ghost milestones, /blueprint traces every milestone to a spec\n• Security layer — 111-rule environment scan (/sentinel), pre-write secret blocking, pre-ship credential audit\n• Progressive levels 0–10 — start with CLAUDE.md, grow into multi-agent pipelines and self-evolving environments\n• Zero dependencies — no npm packages, no external APIs, no vector databases. Plain markdown files and Claude Code's native architecture.\n• Smart install — npx azclaude-copilot@latest auto-detects first install vs upgrade vs verify. Context-aware onboarding shows the right next command for your project state.\n\nExample use cases:\n• /setup — scan an existing project, detect stack + domain + scale, fill CLAUDE.md, generate project-specific skills and agents automatically\n• /copilot \"Build a compliance SaaS with trilingual support\" — walk away, come back to working code across multiple sessions\n• /sentinel — run a scored security audit (0–100, grade A–F) across hooks, permissions, MCP servers, agent configs, and secrets\n• /evolve — detect gaps in the environment, generate new skills and agents from git co-change evidence, report score delta (e.g. 42/100 → 68/100)\n• /constitute — write your project's constitution (non-negotiables, architectural commitments, definition of done) — gates all future AI actions\n• /analyze — cross-artifact consistency check: ghost milestones, spec vs. code drift, unplanned commits\n• /reflect — find stale, missing, or contradicting rules in CLAUDE.md and propose exact fixes\n• /debate \"REST vs GraphQL for this project\" — adversarial evidence-based decision with order-independent scoring, logged to decisions.md",
12
+ "version": "0.5.0",
13
13
  "source": {
14
14
  "source": "github",
15
15
  "repo": "haytamAroui/AZ-CLAUDE-COPILOT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "azclaude",
3
- "version": "0.4.39",
4
- "description": "AZCLAUDE is a complete AI coding environment for Claude Code. It installs 37 commands, 10 auto-invoked skills, 15 specialized agents, 4 hooks, and a persistent memory system — in one command.\n\nKey features:\n• Memory across sessions — goals.md + checkpoints injected automatically before every session\n• Self-improving loop — /reflect fixes stale CLAUDE.md rules, /reflexes learns from tool-use patterns, /evolve creates agents from git evidence\n• Autonomous copilot mode — /copilot runs a three-tier team (orchestrator → problem-architect → milestone-builder) across sessions until the product ships\n• Spec-driven workflow — /constitute writes project rules, /spec writes structured ACs, /analyze detects plan drift and ghost milestones, /blueprint traces every milestone to a spec\n• Security layer — 111-rule environment scan (/sentinel), pre-write secret blocking, pre-ship credential audit\n• Progressive levels 0–10 — start with CLAUDE.md, grow into multi-agent pipelines and self-evolving environments\n• Zero dependencies — no npm packages, no external APIs, no vector databases. Plain markdown files and Claude Code's native architecture.\n• Smart install — npx azclaude-copilot@latest auto-detects first install vs upgrade vs verify. Context-aware onboarding shows the right next command for your project state.\n\nExample use cases:\n• /setup — scan an existing project, detect stack + domain + scale, fill CLAUDE.md, generate project-specific skills and agents automatically\n• /copilot \"Build a compliance SaaS with trilingual support\" — walk away, come back to working code across multiple sessions\n• /sentinel — run a scored security audit (0–100, grade A–F) across hooks, permissions, MCP servers, agent configs, and secrets\n• /evolve — detect gaps in the environment, generate new skills and agents from git co-change evidence, report score delta (e.g. 42/100 → 68/100)\n• /constitute — write your project's constitution (non-negotiables, architectural commitments, definition of done) — gates all future AI actions\n• /analyze — cross-artifact consistency check: ghost milestones, spec vs. code drift, unplanned commits\n• /reflect — find stale, missing, or contradicting rules in CLAUDE.md and propose exact fixes\n• /debate \"REST vs GraphQL for this project\" — adversarial evidence-based decision with order-independent scoring, logged to decisions.md",
3
+ "version": "0.5.0",
4
+ "description": "AZCLAUDE is a complete AI coding environment for Claude Code. It installs 39 commands, 10 auto-invoked skills, 15 specialized agents, 4 hooks, and a persistent memory system — in one command.\n\nKey features:\n• Memory across sessions — goals.md + checkpoints injected automatically before every session\n• Self-improving loop — /reflect fixes stale CLAUDE.md rules, /reflexes learns from tool-use patterns, /evolve creates agents from git evidence\n• Autonomous copilot mode — /copilot runs a three-tier team (orchestrator → problem-architect → milestone-builder) across sessions until the product ships\n• Spec-driven workflow — /constitute writes project rules, /spec writes structured ACs, /analyze detects plan drift and ghost milestones, /blueprint traces every milestone to a spec\n• Security layer — 111-rule environment scan (/sentinel), pre-write secret blocking, pre-ship credential audit\n• Progressive levels 0–10 — start with CLAUDE.md, grow into multi-agent pipelines and self-evolving environments\n• Zero dependencies — no npm packages, no external APIs, no vector databases. Plain markdown files and Claude Code's native architecture.\n• Smart install — npx azclaude-copilot@latest auto-detects first install vs upgrade vs verify. Context-aware onboarding shows the right next command for your project state.\n\nExample use cases:\n• /setup — scan an existing project, detect stack + domain + scale, fill CLAUDE.md, generate project-specific skills and agents automatically\n• /copilot \"Build a compliance SaaS with trilingual support\" — walk away, come back to working code across multiple sessions\n• /sentinel — run a scored security audit (0–100, grade A–F) across hooks, permissions, MCP servers, agent configs, and secrets\n• /evolve — detect gaps in the environment, generate new skills and agents from git co-change evidence, report score delta (e.g. 42/100 → 68/100)\n• /constitute — write your project's constitution (non-negotiables, architectural commitments, definition of done) — gates all future AI actions\n• /analyze — cross-artifact consistency check: ghost milestones, spec vs. code drift, unplanned commits\n• /reflect — find stale, missing, or contradicting rules in CLAUDE.md and propose exact fixes\n• /debate \"REST vs GraphQL for this project\" — adversarial evidence-based decision with order-independent scoring, logged to decisions.md",
5
5
  "author": {
6
6
  "name": "haytamAroui",
7
7
  "url": "https://github.com/haytamAroui"
package/README.md CHANGED
@@ -64,7 +64,7 @@ AZCLAUDE inverts this. **You start with almost nothing. The environment builds i
64
64
  npx azclaude-copilot@latest # one command. that's it.
65
65
  ```
66
66
 
67
- No agent files to write. No skills to configure. No prompt engineering. `npx azclaude-copilot` installs 37 commands, 4 hooks, memory structure, and a manifest. The rest is generated from your actual codebase as you work. Run the same command again later — it auto-detects whether to skip, install, or upgrade.
67
+ No agent files to write. No skills to configure. No prompt engineering. `npx azclaude-copilot` installs 39 commands, 4 hooks, memory structure, and a manifest. The rest is generated from your actual codebase as you work. Run the same command again later — it auto-detects whether to skip, install, or upgrade.
68
68
 
69
69
  **What the environment looks like across sessions:**
70
70
 
@@ -119,7 +119,7 @@ npx azclaude-copilot@latest
119
119
 
120
120
  One command, no flags. Auto-detects whether this is a fresh install or an upgrade:
121
121
 
122
- - **First time** → full install (37 commands, 4 hooks, 15 agents, 10 skills, memory, reflexes)
122
+ - **First time** → full install (39 commands, 4 hooks, 15 agents, 10 skills, memory, reflexes)
123
123
  - **Already installed, older version** → auto-upgrades everything to latest templates
124
124
  - **Already up to date** → verifies, no overwrites
125
125
 
@@ -131,12 +131,12 @@ npx azclaude-copilot@latest doctor # 32 checks — verify everything is wired
131
131
 
132
132
  ## What You Get
133
133
 
134
- **37 commands** · **10 auto-invoked skills** · **15 agents** · **4 hooks** · **memory across sessions** · **learned reflexes** · **self-evolving environment**
134
+ **39 commands** · **10 auto-invoked skills** · **15 agents** · **4 hooks** · **memory across sessions** · **learned reflexes** · **self-evolving environment**
135
135
 
136
136
  ```
137
137
  .claude/
138
138
  ├── CLAUDE.md ← dispatch table: conventions, stack, routing
139
- ├── commands/ ← 37 slash commands (/add, /fix, /copilot, /parallel, /mcp, /sentinel...)
139
+ ├── commands/ ← 39 slash commands (/add, /fix, /copilot, /parallel, /mcp, /sentinel...)
140
140
  ├── skills/ ← 10 skills (test-first, security, architecture-advisor, frontend-design...)
141
141
  ├── agents/ ← 15 agents (orchestrator, spec-reviewer, constitution-guard...)
142
142
  ├── capabilities/ ← 43 files, lazy-loaded via manifest.md (~380 tokens/task)
@@ -627,7 +627,7 @@ evidence_count: 6
627
627
 
628
628
  ---
629
629
 
630
- ## All 37 Commands
630
+ ## All 39 Commands
631
631
 
632
632
  ### Build and Ship
633
633
 
@@ -661,6 +661,8 @@ evidence_count: 6
661
661
  | `/mcp` | Recommend and install MCP servers for your stack. |
662
662
  | `/driven` | Generate code-rules.md — DO/DO NOT coding contract. |
663
663
  | `/verify` | Audit code against code-rules.md. Reports violations at `file:line`. |
664
+ | `/inoculate` | Scan agents/skills for context inoculation coverage. Based on Anthropic's misalignment paper. |
665
+ | `/ghost-test` | Detect reward hacking in test suites (AlwaysEqual, sys.exit bypass, framework patching). |
664
666
 
665
667
  ### Think and Improve
666
668
 
@@ -756,11 +758,11 @@ An agent is a sub-process. Use one when work must happen **in parallel** or **in
756
758
 
757
759
  ## Verified
758
760
 
759
- 1578 tests. Every template, command, capability, agent, hook, and CLI feature verified.
761
+ 1758 tests. Every template, command, capability, agent, hook, and CLI feature verified.
760
762
 
761
763
  ```bash
762
764
  bash tests/test-features.sh
763
- # Results: 1578 passed, 0 failed, 1578 total
765
+ # Results: 1758 passed, 0 failed, 1758 total
764
766
  ```
765
767
 
766
768
  ---
package/bin/cli.js CHANGED
@@ -8,7 +8,7 @@ const { execSync } = require('child_process');
8
8
 
9
9
  const TEMPLATE_DIR = path.join(__dirname, '..', 'templates');
10
10
  const CORE_COMMANDS = ['setup', 'fix', 'add', 'audit', 'test', 'blueprint', 'ship', 'pulse', 'explain', 'snapshot', 'persist'];
11
- const EXTENDED_COMMANDS = ['dream', 'refactor', 'doc', 'loop', 'migrate', 'deps', 'find', 'create', 'reflect', 'hookify', 'sentinel', 'clarify', 'spec', 'analyze', 'constitute', 'tasks', 'issues', 'driven', 'mcp', 'verify'];
11
+ const EXTENDED_COMMANDS = ['dream', 'refactor', 'doc', 'loop', 'migrate', 'deps', 'find', 'create', 'reflect', 'hookify', 'sentinel', 'clarify', 'spec', 'analyze', 'constitute', 'tasks', 'issues', 'driven', 'mcp', 'verify', 'inoculate', 'ghost-test'];
12
12
  const ADVANCED_COMMANDS = ['evolve', 'debate', 'level-up', 'copilot', 'reflexes', 'parallel'];
13
13
  const COMMANDS = [...CORE_COMMANDS, ...EXTENDED_COMMANDS, ...ADVANCED_COMMANDS];
14
14
 
@@ -441,6 +441,43 @@ function installScripts(projectDir, cfg) {
441
441
  ok(`Scripts installed/updated (${cfg}/scripts/)`);
442
442
  }
443
443
 
444
+ // ─── Statusline (auto-updating cost/context bar) ─────────────────────────────
445
+
446
+ function installStatusline(projectDir, cfg) {
447
+ const scriptSrc = path.join(TEMPLATE_DIR, 'scripts', 'statusline.sh');
448
+ if (!fs.existsSync(scriptSrc)) return;
449
+
450
+ // Copy statusline script to ~/.claude/statusline.sh (global — shared across projects)
451
+ const globalDir = path.join(os.homedir(), '.claude');
452
+ const scriptDst = path.join(globalDir, 'statusline.sh');
453
+ fs.mkdirSync(globalDir, { recursive: true });
454
+ fs.copyFileSync(scriptSrc, scriptDst);
455
+ try { fs.chmodSync(scriptDst, '755'); } catch {}
456
+
457
+ // Configure in global settings.json (statusLine is a global Claude Code setting)
458
+ const settingsPath = path.join(globalDir, 'settings.json');
459
+ let settings = {};
460
+ if (fs.existsSync(settingsPath)) {
461
+ try { settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8')); } catch {}
462
+ }
463
+
464
+ // Only add if not already configured (don't overwrite user customization)
465
+ if (!settings.statusLine) {
466
+ // Use forward-slash path for cross-platform shell compatibility
467
+ const scriptPath = scriptDst.replace(/\\/g, '/');
468
+ settings.statusLine = {
469
+ type: 'command',
470
+ command: scriptPath,
471
+ padding: 1
472
+ };
473
+ atomicWriteFileSync(settingsPath, JSON.stringify(settings, null, 2));
474
+ ok('Statusline installed — context %, rate limit, session time visible after every turn');
475
+ } else {
476
+ // Always refresh the script even if config exists
477
+ info('Statusline already configured — script refreshed');
478
+ }
479
+ }
480
+
444
481
  // ─── Agents ───────────────────────────────────────────────────────────────────
445
482
 
446
483
  const AGENTS = ['orchestrator-init', 'code-reviewer', 'test-writer', 'loop-controller', 'cc-template-author', 'cc-cli-integrator', 'cc-test-maintainer', 'orchestrator', 'problem-architect', 'milestone-builder', 'security-auditor', 'spec-reviewer', 'constitution-guard', 'devops-engineer', 'qa-engineer'];
@@ -955,6 +992,20 @@ function runDoctor() {
955
992
  chk(`${cli.rulesFile} filled (no {{placeholders}})`, !r.includes('{{'));
956
993
  }
957
994
 
995
+ // ── Statusline ──────────────────────────────────────────────────────────
996
+ console.log('\n[ Statusline ]');
997
+ const statuslineScript = path.join(os.homedir(), '.claude', 'statusline.sh');
998
+ chk('statusline.sh exists (~/.claude/statusline.sh)', fs.existsSync(statuslineScript));
999
+ if (cli.hooksDir) {
1000
+ const globalSettingsPath = path.join(cli.hooksDir, 'settings.json');
1001
+ if (fs.existsSync(globalSettingsPath)) {
1002
+ try {
1003
+ const gs = JSON.parse(fs.readFileSync(globalSettingsPath, 'utf8'));
1004
+ chk('statusLine configured in settings.json', !!gs.statusLine);
1005
+ } catch { chk('statusLine configured in settings.json', false); }
1006
+ }
1007
+ }
1008
+
958
1009
  // ── Commands ─────────────────────────────────────────────────────────────
959
1010
  console.log('\n[ Commands ]');
960
1011
  const cmdDir = path.join(projectDir, cfg, 'commands');
@@ -1126,6 +1177,7 @@ installCapabilities(projectDir, cli.cfg, fullInstall);
1126
1177
  installCommands(projectDir, cli.cfg);
1127
1178
  installSkills(projectDir, cli.cfg);
1128
1179
  installScripts(projectDir, cli.cfg);
1180
+ installStatusline(projectDir, cli.cfg);
1129
1181
  installAgents(projectDir, cli.cfg);
1130
1182
  installRulesFile(projectDir, cli.cfg, cli.rulesFile);
1131
1183
  createDirectories(projectDir, cli.cfg);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "azclaude-copilot",
3
- "version": "0.4.39",
4
- "description": "AI coding environment — 37 commands, 10 skills, 15 agents, memory, reflexes, evolution. Install: npx azclaude-copilot@latest, then open Claude Code.",
3
+ "version": "0.5.0",
4
+ "description": "AI coding environment — 39 commands, 10 skills, 15 agents, memory, reflexes, evolution. Install: npx azclaude-copilot@latest, then open Claude Code.",
5
5
  "bin": {
6
6
  "azclaude": "bin/cli.js",
7
7
  "azclaude-copilot": "bin/copilot.js"
@@ -58,6 +58,40 @@ When running parallel agents (/copilot with parallel waves, or /parallel):
58
58
 
59
59
  Unknown capability → grep manifest.md by description, load match
60
60
 
61
+ ## Agent Auto-Dispatch
62
+ Agents live in `.claude/agents/`. Spawn them via the Agent tool with the matching `subagent_type`.
63
+ **You MUST spawn the matching agent when these conditions are met — do not handle these tasks yourself.**
64
+
65
+ | Condition | Agent to spawn | Why |
66
+ |-----------|---------------|-----|
67
+ | Task touches 3+ files or crosses module boundaries | `problem-architect` | Pre-flight analysis: team spec, risks, file ownership |
68
+ | Architecture decision between 2+ real options | `architecture-advisor` (skill) | Evidence-based trade-off analysis, not gut feeling |
69
+ | Code was written or modified | `code-reviewer` | Catches bugs, security issues, style violations |
70
+ | Code needs test coverage | `test-writer` | Generates tests matching project framework + patterns |
71
+ | Task spans 2+ milestones or needs parallel work | `orchestrator` | Owns plan.md, dispatches milestone-builder agents |
72
+ | Security-sensitive change (auth, keys, hooks, deploy) | `security-auditor` | 111-rule scan, structured report with file:line refs |
73
+ | Infrastructure, CI/CD, Docker, deploy config | `devops-engineer` | Pipeline, container, cloud infrastructure specialist |
74
+ | Test strategy, E2E, release readiness | `qa-engineer` | Risk-based coverage, acceptance criteria validation |
75
+ | Spec file provided for planning | `spec-reviewer` | Validates spec quality before /blueprint uses it |
76
+ | Milestone about to be implemented | `constitution-guard` | Checks milestone against constitution.md non-negotiables |
77
+
78
+ **Mandatory pipeline for ALL code tasks (enforced by hook on every message):**
79
+ 1. **ALWAYS** spawn `problem-architect` FIRST → get Team Spec (agents, skills, files, risks)
80
+ 2. Follow Team Spec exactly: load listed skills, pre-read listed files, in order
81
+ 3. If structural decision flagged → spawn `architecture-advisor` skill or run /debate
82
+ 4. Implement following Team Spec patterns
83
+ 5. **ALWAYS** spawn `code-reviewer` after implementation
84
+ 6. **ALWAYS** spawn `test-writer` if tests are needed
85
+
86
+ **Skip pipeline only if:** message is a pure question with no action verb (e.g., "what does this function do?").
87
+ **Never skip for:** any code change, no matter how small. The pipeline catches bugs in 1-line changes too.
88
+
89
+ **Self-healing:** If problem-architect's Team Spec lists a MISSING skill or agent (domain expertise not installed):
90
+ - Use `skill-creator` to generate the missing skill before implementation
91
+ - Use `agent-creator` to generate the missing agent before implementation
92
+ - The created skill/agent is immediately available and persists for all future tasks
93
+ - Example: task needs GraphQL expertise → no GraphQL skill exists → skill-creator generates one → use it
94
+
61
95
  ## Trade-Off Hierarchies
62
96
  When priorities conflict:
63
97
  1. {{PRIORITY_1}}
@@ -65,4 +99,4 @@ When priorities conflict:
65
99
  3. {{PRIORITY_3}}
66
100
 
67
101
  ## Available Commands
68
- /dream · /setup · /fix · /add · /audit · /test · /blueprint · /evolve · /debate · /snapshot · /persist · /level-up · /ship · /pulse · /explain · /loop · /refactor · /doc · /migrate · /deps · /find · /create · /reflect · /hookify · /spec · /clarify · /analyze · /constitute · /tasks · /issues · /driven · /mcp · /parallel · /verify
102
+ /dream · /setup · /fix · /add · /audit · /test · /blueprint · /evolve · /debate · /snapshot · /persist · /level-up · /ship · /pulse · /explain · /loop · /refactor · /doc · /migrate · /deps · /find · /create · /reflect · /hookify · /spec · /clarify · /analyze · /constitute · /tasks · /issues · /driven · /mcp · /parallel · /verify · /inoculate · /ghost-test
@@ -12,10 +12,13 @@ tools: [Read, Write, Edit, Glob, Grep, Bash]
12
12
  disallowedTools: [Agent]
13
13
  permissionMode: acceptEdits
14
14
  maxTurns: 40
15
+ tags: [cli, install, hook, routing, copilot-runner]
15
16
  ---
16
17
 
17
18
  ## Layer 1: PERSONA
18
19
 
20
+ <instructions>
21
+
19
22
  CLI integration specialist. Wires new commands and features into the AZCLAUDE
20
23
  CLI toolchain (`bin/cli.js`, `bin/copilot.js`). Ensures new template commands
21
24
  are routable, new agents are installable, and the copilot runner handles all
@@ -97,6 +100,8 @@ SKILLS = ['session-guard', 'test-first', 'env-scanner', 'debate', 'se
97
100
  The `installAgents()` function copies from `templates/agents/{name}.md` to
98
101
  `{project}/.claude/agents/{name}.md` with path substitution.
99
102
 
103
+ </instructions>
104
+
100
105
  ## Self-Correction
101
106
 
102
107
  If CLI changes break tests: read the failing test assertion, compare with
@@ -12,8 +12,13 @@ tools: [Read, Write, Edit, Glob, Grep, Bash]
12
12
  disallowedTools: [Agent]
13
13
  permissionMode: acceptEdits
14
14
  maxTurns: 40
15
+ tags: [template, command, capability, markdown, azclaude]
15
16
  ---
16
17
 
18
+ # CC Template Author
19
+
20
+ <instructions>
21
+
17
22
  ## Layer 1: PERSONA
18
23
 
19
24
  Template author for AZCLAUDE Copilot. Writes precise, machine-readable markdown
@@ -107,3 +112,5 @@ that Claude Code follows during autonomous sessions (no human in the loop).
107
112
  If tests fail after template change: re-read the test expectations from
108
113
  `tests/test-features.sh`, fix the template to match, re-run.
109
114
  After 2 attempts: stop and report what the test expects vs what the template has.
115
+
116
+ </instructions>
@@ -12,10 +12,13 @@ tools: [Read, Write, Edit, Glob, Grep, Bash]
12
12
  disallowedTools: [Agent]
13
13
  permissionMode: acceptEdits
14
14
  maxTurns: 40
15
+ tags: [test, grep, assertion, test-features, coverage]
15
16
  ---
16
17
 
17
18
  ## Layer 1: PERSONA
18
19
 
20
+ <instructions>
21
+
19
22
  Test maintainer for AZCLAUDE Copilot. Writes and maintains grep-based tests
20
23
  in `tests/test-features.sh`. Every template, command, capability, and CLI
21
24
  feature must have test coverage before commit.
@@ -94,6 +97,8 @@ echo " Results: $PASS passed, $FAIL failed, $((PASS + FAIL)) total"
94
97
 
95
98
  **Current test count: 862. Every new feature adds to this.**
96
99
 
100
+ </instructions>
101
+
97
102
  ## Self-Correction
98
103
 
99
104
  If a new test fails: read the file it's testing, verify the grep pattern
@@ -10,8 +10,13 @@ tools: [Read, Glob, Grep, Bash]
10
10
  disallowedTools: [Write, Edit, Agent]
11
11
  permissionMode: plan
12
12
  maxTurns: 30
13
+ tags: [review, pr, quality, lint, feedback]
13
14
  ---
14
15
 
16
+ # Code Reviewer
17
+
18
+ <instructions>
19
+
15
20
  ## Layer 1: PERSONA
16
21
 
17
22
  Code review specialist. Read-only — never modifies code, only reports findings.
@@ -113,6 +118,10 @@ if [ -f pytest.ini ] || [ -f pyproject.toml ]; then python -m pytest 2>&1 | tail
113
118
  - If uncertain after re-reading, downgrade BLOCKING to NOTE
114
119
  - Only BLOCKING findings you would bet on survive this step
115
120
 
121
+ </instructions>
122
+
123
+ <output_format>
124
+
116
125
  ## Output Format
117
126
 
118
127
  ```
@@ -131,6 +140,8 @@ if [ -f pytest.ini ] || [ -f pyproject.toml ]; then python -m pytest 2>&1 | tail
131
140
  ### Verdict: APPROVE | REQUEST_CHANGES | NEEDS_TESTS
132
141
  ```
133
142
 
143
+ </output_format>
144
+
134
145
  ## Self-Correction
135
146
  If test command fails to run: try alternative test runners.
136
147
  After 2 attempts: report the test setup issue as a BLOCKING finding.
@@ -8,10 +8,13 @@ description: >
8
8
  Spawned by /copilot before each milestone is dispatched to milestone-builder.
9
9
  model: haiku
10
10
  tools: [Read, Grep, Glob]
11
+ tags: [constitution, compliance, non-negotiable, gate, block]
11
12
  ---
12
13
 
13
14
  # Constitution Guard — Pre-Implementation Compliance Gate
14
15
 
16
+ <instructions>
17
+
15
18
  You read the constitution. You check the milestone. You block violations before they ship.
16
19
  You never write code. You never modify anything. You return a verdict.
17
20
 
@@ -93,6 +96,10 @@ Does the milestone `Commit:` field suggest the definition of done will NOT be me
93
96
 
94
97
  ---
95
98
 
99
+ </instructions>
100
+
101
+ <output_format>
102
+
96
103
  ## Verdict Format
97
104
 
98
105
  ```
@@ -113,6 +120,8 @@ If APPROVED: `VERDICT: APPROVED` and nothing else.
113
120
  If VIOLATION: list only the violated rules with one-line explanation each.
114
121
  A VIOLATION causes /copilot to log the milestone to blockers.md and skip it pending human review.
115
122
 
123
+ </output_format>
124
+
116
125
  ---
117
126
 
118
127
  ## After Completing
@@ -11,10 +11,13 @@ tools: [Read, Write, Edit, Glob, Grep, Bash]
11
11
  disallowedTools: [Agent]
12
12
  permissionMode: acceptEdits
13
13
  maxTurns: 40
14
+ tags: [ci, docker, deploy, kubernetes, pipeline, infrastructure]
14
15
  ---
15
16
 
16
17
  ## Layer 1: PERSONA
17
18
 
19
+ <instructions>
20
+
18
21
  DevOps specialist. Owns CI/CD pipelines, containerization, infrastructure as code,
19
22
  monitoring, and deployment procedures. Makes deployments boring and outages rare.
20
23
  Never introduces manual steps in deployment — everything is code and automation.
@@ -151,6 +154,10 @@ act --list 2>&1 | head -20
151
154
  grep -r "password\|secret\|api_key\|token" --include="*.yml" --include="*.yaml" . | grep -v "env\.\|secrets\.\|#"
152
155
  ```
153
156
 
157
+ </instructions>
158
+
159
+ <output_format>
160
+
154
161
  ## Output Format
155
162
 
156
163
  ```
@@ -173,6 +180,8 @@ Open questions (if any):
173
180
  - {question that requires project-specific knowledge}
174
181
  ```
175
182
 
183
+ </output_format>
184
+
176
185
  ## Self-Correction
177
186
  If a pipeline config can't be validated locally: document the assumption clearly.
178
187
  If the stack is ambiguous: read CLAUDE.md and package.json before asking.
@@ -12,10 +12,13 @@ description: >
12
12
  model: opus
13
13
  tools: [Read, Write, Edit, Bash, Glob, Grep, Agent]
14
14
  maxTurns: 100
15
+ tags: [evolve, iterate, gap-detect, topology, knowledge]
15
16
  ---
16
17
 
17
18
  ## Loop Controller — Level 10
18
19
 
20
+ <instructions>
21
+
19
22
  This agent runs autonomously. All logic lives in the capability files — this agent
20
23
  loads them on demand and orchestrates the sequence. It does not duplicate content.
21
24
 
@@ -96,6 +99,9 @@ Skip if: Cycle 1 PLAN was empty AND no topology friction detected.
96
99
 
97
100
  ## Completion Rule
98
101
 
102
+ </instructions>
103
+
104
+ <output_format>
99
105
  Show the full cycle report:
100
106
  ```
101
107
  Evolution Cycle Complete
@@ -116,3 +122,4 @@ Next actions: {top 3}
116
122
 
117
123
  Update `.claude/memory/goals.md` with next actions.
118
124
  Never say "evolution complete" without showing the metrics.
125
+ </output_format>
@@ -9,10 +9,13 @@ description: >
9
9
  model: sonnet
10
10
  permissionMode: acceptEdits
11
11
  tools: [Read, Write, Edit, Bash, Grep, Glob]
12
+ tags: [implement, build, code, commit, milestone]
12
13
  ---
13
14
 
14
15
  # Milestone Builder — The Builder
15
16
 
17
+ <instructions>
18
+
16
19
  You implement. You receive complete context before starting.
17
20
  You never decide what to build — orchestrator and architect decided that.
18
21
  You decide HOW to build it.
@@ -134,6 +137,7 @@ git push
134
137
 
135
138
  Report to orchestrator:
136
139
 
140
+ <output_format>
137
141
  ```
138
142
  ## Milestone {N} — {title}: COMPLETE
139
143
 
@@ -154,6 +158,7 @@ PASS — {N} tests passing
154
158
  ### New Anti-Patterns Discovered
155
159
  {anti-pattern description} — or "none"
156
160
  ```
161
+ </output_format>
157
162
 
158
163
  **Worktree coordination errors** (errors in files outside your declared scope):
159
164
  - DO NOT attempt to fix them
@@ -170,3 +175,5 @@ PASS — {N} tests passing
170
175
  - **ALWAYS show test output.** Never say "tests should pass."
171
176
  - **NEVER commit without passing tests.** Failing tests → report to orchestrator.
172
177
  - Commit message: `{type}: {what} — {why}`
178
+
179
+ </instructions>
@@ -5,9 +5,12 @@ description: >
5
5
  Analyzes the project, fills CLAUDE.md, creates goals.md, installs capabilities.
6
6
  Does NOT persist between sessions — not a routing agent.
7
7
  tokens: ~400
8
+ tags: [setup, init, onboarding, first-run, project-scan]
8
9
  ---
9
10
 
10
- ## Project Initialization
11
+ # Project Initialization
12
+
13
+ <instructions>
11
14
 
12
15
  This agent runs once. After setup is complete, it exits.
13
16
  It does NOT sit in memory between sessions. There is no persistent orchestrator.
@@ -191,6 +194,11 @@ Create `knowledge-index.md`:
191
194
  ---
192
195
 
193
196
  ## Completion Rule
197
+
198
+ </instructions>
199
+
200
+ <output_format>
194
201
  Print the filled CLAUDE.md content.
195
202
  Print goals.md content.
196
203
  Show both files as proof — do not say "setup complete" without showing them.
204
+ </output_format>
@@ -8,10 +8,13 @@ description: >
8
8
  Model: sonnet by default — use --deep flag for opus on complex projects.
9
9
  model: sonnet
10
10
  tools: [Read, Grep, Glob, Bash, Task, AskUserQuestion]
11
+ tags: [copilot, dispatch, milestone, autonomous, tech-lead]
11
12
  ---
12
13
 
13
14
  # Orchestrator — The Tech Lead
14
15
 
16
+ <instructions>
17
+
15
18
  You direct. You never code. Your job is DECISIONS, not implementation.
16
19
 
17
20
  ## Session Loop
@@ -104,6 +107,7 @@ If verdict is `APPROVED` or `APPROVED (no constitution found)`: proceed to Step
104
107
  **Parallel dispatch (2+ milestones in wave with disjoint Files Written):**
105
108
 
106
109
  Load `capabilities/shared/parallel-coordination.md` first.
110
+ Load `capabilities/shared/context-inoculation.md` and prepend its Required Preamble to every agent prompt below.
107
111
 
108
112
  1. Write `.claude/ownership.md` table (branch, directories, status) for every agent in this wave
109
113
  2. Spawn each builder via Task with `isolation: "worktree"` in the same message (true parallel)
@@ -113,6 +117,8 @@ Load `capabilities/shared/parallel-coordination.md` first.
113
117
 
114
118
  **Sequential dispatch (single milestone OR overlapping files):**
115
119
 
120
+ Load `capabilities/shared/context-inoculation.md` and prepend its Required Preamble to the agent prompt below.
121
+
116
122
  Spawn milestone-builder via Task with fully packaged context:
117
123
 
118
124
  ```
@@ -208,3 +214,5 @@ After all non-blocked milestones complete:
208
214
  - **ALWAYS run /debate** for technology choices that lock future milestones.
209
215
  - You OWN plan.md. No other agent modifies milestone status.
210
216
  - You CAN create new agents if /evolve reveals a gap mid-run.
217
+
218
+ </instructions>
@@ -7,11 +7,14 @@ description: >
7
7
  NEVER implements. NEVER writes to project files. Read-only analysis only.
8
8
  Spawned by orchestrator before every milestone dispatch.
9
9
  model: sonnet
10
- tools: [Read, Grep, Glob, Bash]
10
+ tools: [Read, Grep, Glob, Bash, WebSearch, WebFetch]
11
+ tags: [analyze, scope, team-spec, complexity, pre-flight]
11
12
  ---
12
13
 
13
14
  # Problem Architect — The Analyst
14
15
 
16
+ <instructions>
17
+
15
18
  You analyze. You never build.
16
19
  Given a milestone, you return exactly what the implementation team needs.
17
20
 
@@ -53,6 +56,20 @@ Also read:
53
56
 
54
57
  ---
55
58
 
59
+ ### Step 2b: Web Research (MANDATORY for unfamiliar technologies)
60
+
61
+ If the milestone involves ANY technology, framework, API, or library:
62
+ 1. **WebSearch** for "{technology} best practices {current year}" and "{technology} common pitfalls"
63
+ 2. **WebFetch** the official documentation page for the specific API/library version in use
64
+ 3. Note any breaking changes, deprecations, or migration guides that affect this milestone
65
+
66
+ **Why this step is mandatory:** Claude's training data is frozen. APIs change, libraries release breaking
67
+ versions, and best practices evolve. A 30-second web search prevents hours of debugging deprecated code.
68
+
69
+ **Skip only if:** the technology is pure internal code with no external dependencies.
70
+
71
+ ---
72
+
56
73
  ### Step 3: Identify What's Needed
57
74
 
58
75
  **Agents:**
@@ -65,6 +82,9 @@ If milestone crosses 2+ agent boundaries → recommend sequential: agent-A first
65
82
  - Touches auth/payments/secrets? → security
66
83
  - Architecture decision? → architecture-advisor
67
84
  - Domain-specific knowledge? → domain advisor (if exists in .claude/skills/)
85
+ - **GAP DETECTION:** If this milestone needs domain expertise not covered by any installed skill
86
+ (e.g., GraphQL, Stripe, i18n, accessibility, ML pipeline), mark it as MISSING in the Team Spec.
87
+ The orchestrator will use skill-creator to generate it before dispatch.
68
88
 
69
89
  **Pre-Read Files:**
70
90
  - Schema files (if touching DB)
@@ -95,6 +115,9 @@ A missed file here causes silent data loss.
95
115
 
96
116
  ### Step 4: Return Team Spec
97
117
 
118
+ </instructions>
119
+
120
+ <output_format>
98
121
  Output this EXACT format — the orchestrator parses it:
99
122
 
100
123
  ```
@@ -108,6 +131,10 @@ Output this EXACT format — the orchestrator parses it:
108
131
  ### Skills to Load
109
132
  - {skill-name}: because {specific reason tied to this milestone}
110
133
 
134
+ ### Missing Skills (GAP — create before dispatch)
135
+ - {domain/technology}: needed because {reason} — use skill-creator to generate
136
+ (omit this section if all needed skills are installed)
137
+
111
138
  ### Pre-Read Files
112
139
  - {file-path}: for {specific context reason}
113
140
 
@@ -135,6 +162,7 @@ If NO: reason = {specific conflict — shared file, schema dependency, runtime o
135
162
  The orchestrator uses this to decide whether to use worktree isolation or sequential dispatch.
136
163
  Parallel Safe = YES requires: isolated directories, no shared config/schema, no runtime dependency on a sibling milestone.
137
164
  ```
165
+ </output_format>
138
166
 
139
167
  ---
140
168
 
@@ -12,10 +12,13 @@ tools: [Read, Write, Edit, Glob, Grep, Bash]
12
12
  disallowedTools: [Agent]
13
13
  permissionMode: acceptEdits
14
14
  maxTurns: 50
15
+ tags: [qa, e2e, playwright, acceptance, regression, release]
15
16
  ---
16
17
 
17
18
  ## Layer 1: PERSONA
18
19
 
20
+ <instructions>
21
+
19
22
  QA specialist. Owns test strategy, risk-based coverage, E2E automation, and release
20
23
  readiness. Goes beyond writing tests — defines what to test, at which level, and
21
24
  whether the product is ready to ship. Never blocks a release without documented evidence.
@@ -150,6 +153,10 @@ npx cypress run 2>&1 | tail -30
150
153
  npx playwright test --repeat-each=3 2>&1 | grep -E "passed|failed|flaky"
151
154
  ```
152
155
 
156
+ </instructions>
157
+
158
+ <output_format>
159
+
153
160
  ## Output Format
154
161
 
155
162
  **E2E tests:**
@@ -181,6 +188,8 @@ Result: {N} passed, {N} failed
181
188
  Blocked by: {issue title + severity} (if applicable)
182
189
  ```
183
190
 
191
+ </output_format>
192
+
184
193
  ## Self-Correction
185
194
  If test framework is unknown: detect from package.json before writing any tests.
186
195
  If tests fail after writing: read the error, fix the test, re-run once. Report if still failing.