oh-my-customcode 0.16.4 → 0.17.1

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 (29) hide show
  1. package/README.md +6 -7
  2. package/dist/cli/index.js +54 -0
  3. package/dist/index.js +54 -0
  4. package/package.json +1 -1
  5. package/templates/.claude/agents/mgr-sauron.md +16 -19
  6. package/templates/.claude/agents/mgr-updater.md +1 -0
  7. package/templates/.claude/agents/sys-memory-keeper.md +16 -1
  8. package/templates/.claude/hooks/hooks.json +5 -1
  9. package/templates/.claude/ontology/agents.yaml +1 -13
  10. package/templates/.claude/ontology/graphs/agent-skill.json +1 -2
  11. package/templates/.claude/ontology/graphs/full-graph.json +2 -9
  12. package/templates/.claude/ontology/graphs/routing.json +0 -2
  13. package/templates/.claude/ontology/skills.yaml +1 -1
  14. package/templates/.claude/rules/MUST-orchestrator-coordination.md +42 -0
  15. package/templates/.claude/rules/MUST-sync-verification.md +2 -2
  16. package/templates/.claude/rules/SHOULD-hud-statusline.md +55 -11
  17. package/templates/.claude/rules/SHOULD-memory-integration.md +32 -0
  18. package/templates/.claude/skills/claude-code-bible/SKILL.md +5 -94
  19. package/templates/.claude/skills/intent-detection/patterns/agent-triggers.yaml +0 -8
  20. package/templates/.claude/skills/sauron-watch/SKILL.md +61 -49
  21. package/templates/.claude/skills/secretary-routing/SKILL.md +3 -6
  22. package/templates/.claude/statusline.sh +263 -0
  23. package/templates/CLAUDE.md.en +4 -4
  24. package/templates/CLAUDE.md.ko +4 -4
  25. package/templates/guides/claude-code/08-testing.md +0 -2
  26. package/templates/guides/claude-code/09-guardrails.md +0 -2
  27. package/templates/guides/claude-code/10-monitoring.md +0 -2
  28. package/templates/manifest.json +2 -2
  29. package/templates/.claude/agents/mgr-sync-checker.md +0 -38
package/README.md CHANGED
@@ -21,7 +21,7 @@ Like oh-my-zsh transformed shell customization, oh-my-customcode makes personali
21
21
 
22
22
  | Feature | Description |
23
23
  |---------|-------------|
24
- | **Batteries Included** | 42 agents, 55 skills, 22 guides, 18 rules, 2 hooks, 4 contexts, ontology graph - ready to use out of the box |
24
+ | **Batteries Included** | 41 agents, 55 skills, 22 guides, 18 rules, 2 hooks, 4 contexts, ontology graph - ready to use out of the box |
25
25
  | **Sub-Agent Model** | Supports hierarchical agent orchestration with specialized roles |
26
26
  | **Dead Simple Customization** | Create a folder + markdown file = new agent or skill |
27
27
  | **Mix and Match** | Use built-in components, create your own, or combine both |
@@ -85,8 +85,7 @@ Claude Code selects the appropriate model and parallelizes independent tasks (up
85
85
  ```
86
86
  /create-agent
87
87
  ├── mgr-creator:sonnet — agent scaffolding
88
- ├── mgr-supplier:haiku — dependency check
89
- └── mgr-sync-checker:haiku — registry verification
88
+ └── mgr-supplier:haiku — dependency check
90
89
 
91
90
  /code-review
92
91
  ├── lang-golang-expert:sonnet — Go implementation
@@ -108,11 +107,11 @@ Claude Code selects the appropriate model and parallelizes independent tasks (up
108
107
 
109
108
  ## What's Included
110
109
 
111
- ### Agents (42)
110
+ ### Agents (41)
112
111
 
113
112
  | Category | Count | Agents |
114
113
  |----------|-------|--------|
115
- | **Managers** | 7 | mgr-creator, mgr-updater, mgr-supplier, mgr-gitnerd, mgr-sync-checker, mgr-sauron, mgr-claude-code-bible |
114
+ | **Managers** | 6 | mgr-creator, mgr-updater, mgr-supplier, mgr-gitnerd, mgr-sauron, mgr-claude-code-bible |
116
115
  | **System** | 2 | sys-memory-keeper, sys-naggy |
117
116
  | **Languages** | 6 | lang-golang-expert, lang-python-expert, lang-rust-expert, lang-kotlin-expert, lang-typescript-expert, lang-java21-expert |
118
117
  | **Frontend** | 3 | fe-vercel-agent, fe-vuejs-agent, fe-svelte-agent |
@@ -123,7 +122,7 @@ Claude Code selects the appropriate model and parallelizes independent tasks (up
123
122
  | **Architecture** | 2 | arch-documenter, arch-speckit-agent |
124
123
  | **Infrastructure** | 2 | infra-docker-expert, infra-aws-expert |
125
124
  | **QA** | 3 | qa-planner, qa-writer, qa-engineer |
126
- | **Total** | **42** | |
125
+ | **Total** | **41** | |
127
126
 
128
127
  ### Skills (55)
129
128
 
@@ -221,7 +220,7 @@ your-project/
221
220
  ├── rules/ # Behavior rules (18 total)
222
221
  ├── hooks/ # Event hooks (2 total)
223
222
  ├── contexts/ # Context files (4 total)
224
- ├── agents/ # Agent definitions (42 flat .md files)
223
+ ├── agents/ # Agent definitions (41 flat .md files)
225
224
  │ ├── lang-golang-expert.md
226
225
  │ ├── be-fastapi-expert.md
227
226
  │ ├── mgr-creator.md
package/dist/cli/index.js CHANGED
@@ -12805,6 +12805,11 @@ async function listFiles(dir2, options = {}) {
12805
12805
  }
12806
12806
  return files;
12807
12807
  }
12808
+ async function copyFile(src, dest) {
12809
+ const fs = await import("node:fs/promises");
12810
+ await ensureDirectory(dirname2(dest));
12811
+ await fs.copyFile(src, dest);
12812
+ }
12808
12813
  function matchesPattern(filename, pattern) {
12809
12814
  const regexPattern = pattern.replace(/\./g, "\\.").replace(/\*/g, ".*").replace(/\?/g, ".");
12810
12815
  const regex = new RegExp(`^${regexPattern}$`);
@@ -13984,6 +13989,53 @@ async function installSingleComponent(targetDir, component, options, result) {
13984
13989
  result.warnings.push(`Failed to install ${component}: ${message}`);
13985
13990
  }
13986
13991
  }
13992
+ async function installStatusline(targetDir, options, _result) {
13993
+ const layout = getProviderLayout();
13994
+ const srcPath = resolveTemplatePath(join4(layout.rootDir, "statusline.sh"));
13995
+ const destPath = join4(targetDir, layout.rootDir, "statusline.sh");
13996
+ if (!await fileExists(srcPath)) {
13997
+ debug("install.statusline_not_found", { path: srcPath });
13998
+ return;
13999
+ }
14000
+ if (await fileExists(destPath)) {
14001
+ if (!options.force && !options.backup) {
14002
+ debug("install.statusline_skipped", { reason: "exists" });
14003
+ return;
14004
+ }
14005
+ }
14006
+ await copyFile(srcPath, destPath);
14007
+ const fs2 = await import("node:fs/promises");
14008
+ await fs2.chmod(destPath, 493);
14009
+ debug("install.statusline_installed", {});
14010
+ }
14011
+ async function installSettingsLocal(targetDir, result) {
14012
+ const layout = getProviderLayout();
14013
+ const settingsPath = join4(targetDir, layout.rootDir, "settings.local.json");
14014
+ const statusLineConfig = {
14015
+ statusLine: {
14016
+ type: "command",
14017
+ command: ".claude/statusline.sh",
14018
+ padding: 0
14019
+ }
14020
+ };
14021
+ if (await fileExists(settingsPath)) {
14022
+ try {
14023
+ const existing = await readJsonFile(settingsPath);
14024
+ if (!existing.statusLine) {
14025
+ existing.statusLine = statusLineConfig.statusLine;
14026
+ await writeJsonFile(settingsPath, existing);
14027
+ debug("install.settings_local_merged", {});
14028
+ } else {
14029
+ debug("install.settings_local_skipped", { reason: "statusLine exists" });
14030
+ }
14031
+ } catch {
14032
+ result.warnings.push("Failed to parse existing settings.local.json, skipping statusLine config");
14033
+ }
14034
+ return;
14035
+ }
14036
+ await writeJsonFile(settingsPath, statusLineConfig);
14037
+ debug("install.settings_local_created", {});
14038
+ }
13987
14039
  async function installEntryDocWithTracking(targetDir, options, result) {
13988
14040
  const language = options.language ?? DEFAULT_LANGUAGE2;
13989
14041
  const overwrite = !!(options.force || options.backup);
@@ -14010,6 +14062,8 @@ async function install(options) {
14010
14062
  await checkAndWarnExisting(options.targetDir, !!options.force, !!options.backup, result);
14011
14063
  await verifyTemplateDirectory();
14012
14064
  await installAllComponents(options.targetDir, options, result);
14065
+ await installStatusline(options.targetDir, options, result);
14066
+ await installSettingsLocal(options.targetDir, result);
14013
14067
  await installEntryDocWithTracking(options.targetDir, options, result);
14014
14068
  await updateInstallConfig(options.targetDir, options, result.installedComponents);
14015
14069
  result.success = true;
package/dist/index.js CHANGED
@@ -163,6 +163,11 @@ function resolveTemplatePath(relativePath) {
163
163
  const packageRoot = getPackageRoot();
164
164
  return join(packageRoot, "templates", relativePath);
165
165
  }
166
+ async function copyFile(src, dest) {
167
+ const fs = await import("node:fs/promises");
168
+ await ensureDirectory(dirname(dest));
169
+ await fs.copyFile(src, dest);
170
+ }
166
171
  function matchesPattern(filename, pattern) {
167
172
  const regexPattern = pattern.replace(/\./g, "\\.").replace(/\*/g, ".*").replace(/\?/g, ".");
168
173
  const regex = new RegExp(`^${regexPattern}$`);
@@ -846,6 +851,53 @@ async function installSingleComponent(targetDir, component, options, result) {
846
851
  result.warnings.push(`Failed to install ${component}: ${message}`);
847
852
  }
848
853
  }
854
+ async function installStatusline(targetDir, options, _result) {
855
+ const layout = getProviderLayout();
856
+ const srcPath = resolveTemplatePath(join3(layout.rootDir, "statusline.sh"));
857
+ const destPath = join3(targetDir, layout.rootDir, "statusline.sh");
858
+ if (!await fileExists(srcPath)) {
859
+ debug("install.statusline_not_found", { path: srcPath });
860
+ return;
861
+ }
862
+ if (await fileExists(destPath)) {
863
+ if (!options.force && !options.backup) {
864
+ debug("install.statusline_skipped", { reason: "exists" });
865
+ return;
866
+ }
867
+ }
868
+ await copyFile(srcPath, destPath);
869
+ const fs = await import("node:fs/promises");
870
+ await fs.chmod(destPath, 493);
871
+ debug("install.statusline_installed", {});
872
+ }
873
+ async function installSettingsLocal(targetDir, result) {
874
+ const layout = getProviderLayout();
875
+ const settingsPath = join3(targetDir, layout.rootDir, "settings.local.json");
876
+ const statusLineConfig = {
877
+ statusLine: {
878
+ type: "command",
879
+ command: ".claude/statusline.sh",
880
+ padding: 0
881
+ }
882
+ };
883
+ if (await fileExists(settingsPath)) {
884
+ try {
885
+ const existing = await readJsonFile(settingsPath);
886
+ if (!existing.statusLine) {
887
+ existing.statusLine = statusLineConfig.statusLine;
888
+ await writeJsonFile(settingsPath, existing);
889
+ debug("install.settings_local_merged", {});
890
+ } else {
891
+ debug("install.settings_local_skipped", { reason: "statusLine exists" });
892
+ }
893
+ } catch {
894
+ result.warnings.push("Failed to parse existing settings.local.json, skipping statusLine config");
895
+ }
896
+ return;
897
+ }
898
+ await writeJsonFile(settingsPath, statusLineConfig);
899
+ debug("install.settings_local_created", {});
900
+ }
849
901
  async function installEntryDocWithTracking(targetDir, options, result) {
850
902
  const language = options.language ?? DEFAULT_LANGUAGE;
851
903
  const overwrite = !!(options.force || options.backup);
@@ -872,6 +924,8 @@ async function install(options) {
872
924
  await checkAndWarnExisting(options.targetDir, !!options.force, !!options.backup, result);
873
925
  await verifyTemplateDirectory();
874
926
  await installAllComponents(options.targetDir, options, result);
927
+ await installStatusline(options.targetDir, options, result);
928
+ await installSettingsLocal(options.targetDir, result);
875
929
  await installEntryDocWithTracking(options.targetDir, options, result);
876
930
  await updateInstallConfig(options.targetDir, options, result.installedComponents);
877
931
  result.success = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-customcode",
3
- "version": "0.16.4",
3
+ "version": "0.17.1",
4
4
  "description": "Batteries-included agent harness for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mgr-sauron
3
- description: Use when you need automated verification of R016 compliance, executing mandatory multi-round verification (5 manager rounds + 3 deep review rounds) before commits
3
+ description: Use when you need automated verification of R017 compliance, executing mandatory multi-round verification (5 manager rounds + 3 deep review rounds) before commits
4
4
  model: sonnet
5
5
  memory: project
6
6
  effort: high
@@ -15,26 +15,25 @@ tools:
15
15
  - Bash
16
16
  ---
17
17
 
18
- You are an automated verification specialist that executes the mandatory R016 verification process, acting as the "all-seeing eye" that ensures system integrity through comprehensive multi-round verification.
18
+ You are an automated verification specialist that executes the mandatory R017 verification process, acting as the "all-seeing eye" that ensures system integrity through comprehensive multi-round verification.
19
19
 
20
20
  ## Core Capabilities
21
21
 
22
22
  1. Execute mgr-supplier:audit automatically
23
- 2. Execute mgr-sync-checker:check automatically
24
- 3. Execute mgr-updater:docs automatically
25
- 4. Execute mgr-claude-code-bible:verify (official spec compliance)
26
- 5. Verify workflow alignment
27
- 6. Verify reference integrity (frontmatter, memory fields, skill refs)
28
- 7. Verify philosophy compliance (R006-R011)
29
- 8. Verify Claude-native compatibility
30
- 9. Auto-fix simple issues (count mismatches, missing fields)
31
- 10. Generate verification report
23
+ 2. Execute mgr-updater:docs automatically
24
+ 3. Execute mgr-claude-code-bible:verify (official spec compliance)
25
+ 4. Verify workflow alignment
26
+ 5. Verify reference integrity (frontmatter, memory fields, skill refs)
27
+ 6. Verify philosophy compliance (R006-R011)
28
+ 7. Verify Claude-native compatibility
29
+ 8. Auto-fix simple issues (count mismatches, missing fields)
30
+ 9. Generate verification report
32
31
 
33
32
  ## Commands
34
33
 
35
34
  | Command | Description |
36
35
  |---------|-------------|
37
- | `mgr-sauron:watch` | Full R016 verification (5+3 rounds) |
36
+ | `mgr-sauron:watch` | Full R017 verification (5+3 rounds) |
38
37
  | `mgr-sauron:quick` | Quick verification (single pass) |
39
38
  | `mgr-sauron:report` | Generate verification status report |
40
39
 
@@ -43,13 +42,12 @@ You are an automated verification specialist that executes the mandatory R016 ve
43
42
  ### Phase 1: Manager Verification (5 rounds)
44
43
 
45
44
  **Round 1-2: Basic Checks**
46
- - mgr-supplier:audit (all agents)
47
- - mgr-sync-checker:check
45
+ - mgr-supplier:audit (all agents, dependency validation)
46
+ - mgr-updater:docs (documentation sync check)
48
47
 
49
48
  **Round 3-4: Re-verify + Update**
50
49
  - Re-run mgr-supplier:audit
51
- - Re-run mgr-sync-checker:check
52
- - mgr-updater:docs (if changes detected)
50
+ - Re-run mgr-updater:docs (apply any detected changes)
53
51
 
54
52
  **Round 5: Final Count Verification**
55
53
  - Agent count: CLAUDE.md vs actual .md files
@@ -116,7 +114,7 @@ You are an automated verification specialist that executes the mandatory R016 ve
116
114
  [Round 1/5] mgr-supplier:audit
117
115
  - 34 agents checked
118
116
  - 3 issues found
119
- [Round 2/5] mgr-sync-checker:check
117
+ [Round 2/5] mgr-updater:docs
120
118
  - Documentation sync: OK
121
119
  ...
122
120
 
@@ -155,7 +153,6 @@ Run 'mgr-sauron:watch' for full verification
155
153
 
156
154
  Works with:
157
155
  - **mgr-supplier**: Dependency validation
158
- - **mgr-sync-checker**: Documentation sync
159
- - **mgr-updater**: Documentation updates
156
+ - **mgr-updater**: Documentation updates and sync
160
157
  - **mgr-claude-code-bible**: Official spec compliance
161
158
  - **secretary**: Orchestration coordination
@@ -6,6 +6,7 @@ memory: project
6
6
  effort: medium
7
7
  skills:
8
8
  - update-external
9
+ - update-docs
9
10
  tools:
10
11
  - Read
11
12
  - Write
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: sys-memory-keeper
3
- description: Use when you need to manage session memory persistence using claude-mem, save context before compaction, restore context on session start, or query past memories
3
+ description: Use when you need to manage session memory persistence using claude-mem, save context before compaction, restore context on session start, query past memories, or perform session-end dual-system auto-save
4
4
  model: sonnet
5
5
  memory: project
6
6
  effort: medium
@@ -41,3 +41,18 @@ Always include project name. Use task-based, temporal, or topic-based queries. A
41
41
  ## Config
42
42
 
43
43
  Provider: claude-mem | Collection: claude_memories | Archive: ~/.claude-mem/archives/
44
+
45
+ ## Session-End Auto-Save
46
+
47
+ When triggered by session-end signal from orchestrator:
48
+
49
+ 1. **Collect** session summary: completed tasks, key decisions, open items
50
+ 2. **Save to claude-mem** (if available): `mcp__claude-mem__save_memory` with project name, session date, and summary
51
+ 3. **Verify episodic-memory** (if available): `mcp__episodic-memory__search` to confirm session is indexed
52
+ 4. **Report** results to orchestrator: saved/skipped/failed per system
53
+
54
+ ### Failure Handling
55
+
56
+ - claude-mem unavailable → skip, report warning
57
+ - episodic-memory unavailable → skip, report warning
58
+ - Both unavailable → warn orchestrator, do not block session end
@@ -68,9 +68,13 @@
68
68
  {
69
69
  "type": "command",
70
70
  "command": "#!/bin/bash\ninput=$(cat)\nagent_type=$(echo \"$input\" | jq -r '.tool_input.subagent_type // \"unknown\"')\nmodel=$(echo \"$input\" | jq -r '.tool_input.model // \"inherit\"')\ndesc=$(echo \"$input\" | jq -r '.tool_input.description // \"\"' | head -c 40)\nresume=$(echo \"$input\" | jq -r '.tool_input.resume // empty')\nif [ -n \"$resume\" ]; then\n echo \"─── [Resume] ${agent_type}:${model} | ${desc} ───\" >&2\nelse\n echo \"─── [Spawn] ${agent_type}:${model} | ${desc} ───\" >&2\nfi\necho \"$input\""
71
+ },
72
+ {
73
+ "type": "command",
74
+ "command": "bash .claude/hooks/scripts/git-delegation-guard.sh"
71
75
  }
72
76
  ],
73
- "description": "HUD statusline - show subagent_type, model, and description on Task spawn"
77
+ "description": "HUD statusline + R010 git delegation guard on Task spawn"
74
78
  }
75
79
  ],
76
80
  "PostToolUse": [
@@ -33,7 +33,7 @@ classes:
33
33
  agents: [qa-planner, qa-writer, qa-engineer]
34
34
  description: "QA and testing"
35
35
  ManagerAgent:
36
- agents: [mgr-creator, mgr-updater, mgr-supplier, mgr-gitnerd, mgr-sync-checker, mgr-sauron, mgr-claude-code-bible]
36
+ agents: [mgr-creator, mgr-updater, mgr-supplier, mgr-gitnerd, mgr-sauron, mgr-claude-code-bible]
37
37
  description: "System management agents"
38
38
  SystemAgent:
39
39
  agents: [sys-memory-keeper, sys-naggy]
@@ -485,18 +485,6 @@ agents:
485
485
  keywords: [git, github, commit, branch, pull-request, conventional-commits, rebase, merge]
486
486
  file_patterns: [".git/*", ".github/*"]
487
487
 
488
- mgr-sync-checker:
489
- class: ManagerAgent
490
- description: "Use when you need to verify documentation and workflow synchronization, ensuring all docs, configs, and workflow definitions remain synchronized with the project structure"
491
- model: haiku
492
- memory: local
493
- effort: low
494
- skills: [update-docs]
495
- tools: [Read, Write, Edit, Grep, Glob, Bash]
496
- summary: "Documentation synchronization validator for project structure consistency"
497
- keywords: [synchronization, documentation, verification, consistency, agent-count, commands]
498
- file_patterns: ["CLAUDE.md", ".claude/agents/*.md", "commands/index.yaml"]
499
-
500
488
  mgr-sauron:
501
489
  class: ManagerAgent
502
490
  description: "Use when you need automated verification of R017 compliance, executing mandatory multi-round verification (5 manager rounds + 3 deep review rounds) before commits"
@@ -39,7 +39,6 @@
39
39
  "mgr-updater": ["update-external"],
40
40
  "mgr-supplier": ["audit-agents"],
41
41
  "mgr-gitnerd": [],
42
- "mgr-sync-checker": ["update-docs"],
43
42
  "mgr-sauron": ["sauron-watch"],
44
43
  "mgr-claude-code-bible": ["claude-code-bible"],
45
44
  "sys-memory-keeper": ["memory-management", "memory-save", "memory-recall"],
@@ -77,7 +76,7 @@
77
76
  "create-agent": ["mgr-creator"],
78
77
  "update-external": ["mgr-updater"],
79
78
  "audit-agents": ["mgr-supplier"],
80
- "update-docs": ["mgr-sync-checker"],
79
+ "update-docs": ["mgr-updater"],
81
80
  "sauron-watch": ["mgr-sauron"],
82
81
  "claude-code-bible": ["mgr-claude-code-bible"],
83
82
  "memory-management": ["sys-memory-keeper"],
@@ -39,7 +39,6 @@
39
39
  "mgr-updater": { "type": "Agent", "class": "ManagerAgent" },
40
40
  "mgr-supplier": { "type": "Agent", "class": "ManagerAgent" },
41
41
  "mgr-gitnerd": { "type": "Agent", "class": "ManagerAgent" },
42
- "mgr-sync-checker": { "type": "Agent", "class": "ManagerAgent" },
43
42
  "mgr-sauron": { "type": "Agent", "class": "ManagerAgent" },
44
43
  "mgr-claude-code-bible": { "type": "Agent", "class": "ManagerAgent" },
45
44
  "sys-memory-keeper": { "type": "Agent", "class": "SystemAgent" },
@@ -146,7 +145,6 @@
146
145
  { "source": "mgr-creator", "target": "create-agent", "relation": "requires" },
147
146
  { "source": "mgr-updater", "target": "update-external", "relation": "requires" },
148
147
  { "source": "mgr-supplier", "target": "audit-agents", "relation": "requires" },
149
- { "source": "mgr-sync-checker", "target": "update-docs", "relation": "requires" },
150
148
  { "source": "mgr-sauron", "target": "sauron-watch", "relation": "requires" },
151
149
  { "source": "mgr-claude-code-bible", "target": "claude-code-bible", "relation": "requires" },
152
150
  { "source": "sys-memory-keeper", "target": "memory-management", "relation": "requires" },
@@ -164,7 +162,6 @@
164
162
  { "source": "secretary-routing", "target": "mgr-updater", "relation": "routes_to" },
165
163
  { "source": "secretary-routing", "target": "mgr-supplier", "relation": "routes_to" },
166
164
  { "source": "secretary-routing", "target": "mgr-gitnerd", "relation": "routes_to" },
167
- { "source": "secretary-routing", "target": "mgr-sync-checker", "relation": "routes_to" },
168
165
  { "source": "secretary-routing", "target": "mgr-sauron", "relation": "routes_to" },
169
166
  { "source": "secretary-routing", "target": "mgr-claude-code-bible", "relation": "routes_to" },
170
167
  { "source": "secretary-routing", "target": "sys-memory-keeper", "relation": "routes_to" },
@@ -352,10 +349,6 @@
352
349
  "requires": [],
353
350
  "routed_by": ["secretary-routing"]
354
351
  },
355
- "mgr-sync-checker": {
356
- "requires": ["update-docs"],
357
- "routed_by": ["secretary-routing"]
358
- },
359
352
  "mgr-sauron": {
360
353
  "requires": ["sauron-watch"],
361
354
  "routed_by": ["secretary-routing"]
@@ -497,7 +490,7 @@
497
490
  "depends_on": []
498
491
  },
499
492
  "update-docs": {
500
- "required_by": ["mgr-sync-checker"],
493
+ "required_by": ["mgr-updater"],
501
494
  "depends_on": []
502
495
  },
503
496
  "sauron-watch": {
@@ -521,7 +514,7 @@
521
514
  "depends_on": ["R011"]
522
515
  },
523
516
  "secretary-routing": {
524
- "routes_to": ["mgr-creator", "mgr-updater", "mgr-supplier", "mgr-gitnerd", "mgr-sync-checker", "mgr-sauron", "mgr-claude-code-bible", "sys-memory-keeper", "sys-naggy"],
517
+ "routes_to": ["mgr-creator", "mgr-updater", "mgr-supplier", "mgr-gitnerd", "mgr-sauron", "mgr-claude-code-bible", "sys-memory-keeper", "sys-naggy"],
525
518
  "depends_on": []
526
519
  },
527
520
  "dev-lead-routing": {
@@ -8,7 +8,6 @@
8
8
  "mgr-updater",
9
9
  "mgr-supplier",
10
10
  "mgr-gitnerd",
11
- "mgr-sync-checker",
12
11
  "mgr-sauron",
13
12
  "mgr-claude-code-bible",
14
13
  "sys-memory-keeper",
@@ -70,7 +69,6 @@
70
69
  "mgr-updater": "secretary-routing",
71
70
  "mgr-supplier": "secretary-routing",
72
71
  "mgr-gitnerd": "secretary-routing",
73
- "mgr-sync-checker": "secretary-routing",
74
72
  "mgr-sauron": "secretary-routing",
75
73
  "mgr-claude-code-bible": "secretary-routing",
76
74
  "sys-memory-keeper": "secretary-routing",
@@ -448,7 +448,7 @@ skills:
448
448
  model_invocable: true
449
449
  summary: "Routes agent management tasks to appropriate manager agents"
450
450
  keywords: [routing, management, agent-creation, git, memory, verification]
451
- routes_to: [mgr-creator, mgr-updater, mgr-supplier, mgr-gitnerd, mgr-sync-checker, mgr-sauron, mgr-claude-code-bible, sys-memory-keeper, sys-naggy]
451
+ routes_to: [mgr-creator, mgr-updater, mgr-supplier, mgr-gitnerd, mgr-sauron, mgr-claude-code-bible, sys-memory-keeper, sys-naggy]
452
452
  rule_references: []
453
453
 
454
454
  snowflake-best-practices:
@@ -30,6 +30,32 @@ The main conversation is the **sole orchestrator**. It uses routing skills to de
30
30
  ╚══════════════════════════════════════════════════════════════════╝
31
31
  ```
32
32
 
33
+ ## Self-Check (Mandatory Before Delegating Tasks)
34
+
35
+ ```
36
+ ╔══════════════════════════════════════════════════════════════════╗
37
+ ║ BEFORE DELEGATING A TASK TO ANY AGENT, ASK YOURSELF: ║
38
+ ║ ║
39
+ ║ 1. Does the task prompt contain git commands? ║
40
+ ║ (commit, push, revert, merge, rebase, checkout, branch, ║
41
+ ║ reset, cherry-pick, tag) ║
42
+ ║ YES → The git part MUST go to mgr-gitnerd ║
43
+ ║ NO → Proceed ║
44
+ ║ ║
45
+ ║ 2. Am I bundling git operations with file editing? ║
46
+ ║ YES → STOP. Split into separate delegations: ║
47
+ ║ - File editing → appropriate specialist ║
48
+ ║ - Git operations → mgr-gitnerd ║
49
+ ║ NO → Good. Continue. ║
50
+ ║ ║
51
+ ║ 3. Is the target agent mgr-gitnerd for ALL git operations? ║
52
+ ║ YES → Good. Continue. ║
53
+ ║ NO → STOP. This is a VIOLATION. Re-route to mgr-gitnerd. ║
54
+ ║ ║
55
+ ║ If ANY answer is wrong → SPLIT THE TASK ║
56
+ ╚══════════════════════════════════════════════════════════════════╝
57
+ ```
58
+
33
59
  ## Architecture
34
60
 
35
61
  ```
@@ -72,6 +98,22 @@ Main Conversation (orchestrator)
72
98
 
73
99
  ✓ CORRECT: Always delegate, no matter how small
74
100
  Task(appropriate-agent) → create config file
101
+
102
+ ❌ WRONG: Bundling git operations with file editing in non-gitnerd agent
103
+ Main conversation → Task(general-purpose) → "git revert + edit file + git commit"
104
+ Main conversation → Task(lang-typescript-expert) → "fix bug and commit"
105
+
106
+ ✓ CORRECT: Separate file editing from git operations
107
+ Main conversation → Task(lang-typescript-expert) → "fix bug" (file edit only)
108
+ Main conversation → Task(mgr-gitnerd) → "git commit" (git operation only)
109
+
110
+ ❌ WRONG: Including git commands in non-gitnerd agent prompt for "convenience"
111
+ Task(general-purpose, prompt="revert the last commit, edit the file, then commit the fix")
112
+
113
+ ✓ CORRECT: Split into separate delegations
114
+ Task(mgr-gitnerd, prompt="revert the last commit")
115
+ Task(appropriate-expert, prompt="edit the file to fix the issue")
116
+ Task(mgr-gitnerd, prompt="commit the fix")
75
117
  ```
76
118
 
77
119
  ## Session Continuity
@@ -14,8 +14,8 @@ Every `git push` requires: `mgr-sauron:watch` → all pass → `git push`
14
14
 
15
15
  | Round | Actions |
16
16
  |-------|---------|
17
- | 1-2 | mgr-supplier:audit, mgr-sync-checker:check, fix issues |
18
- | 3-4 | Re-verify + mgr-updater:docs, fix remaining |
17
+ | 1-2 | mgr-supplier:audit, mgr-updater:docs (sync check), fix issues |
18
+ | 3-4 | Re-verify mgr-supplier:audit + re-run mgr-updater:docs, fix remaining |
19
19
  | 5 | Final: all counts match, frontmatter valid, skill refs exist, memory scopes valid, routing patterns updated |
20
20
 
21
21
  Also run: mgr-claude-code-bible:verify (official spec compliance)
@@ -2,26 +2,33 @@
2
2
 
3
3
  > **Priority**: SHOULD | **ID**: R012
4
4
 
5
- ## Format
5
+ ## Two-System Architecture
6
6
 
7
- ```
8
- ─── [Agent] {name} | [Progress] {n}/{total} | [Parallel] {count} ───
9
- ```
10
-
11
- ## When to Display
7
+ | Aspect | HUD Events | Statusline API |
8
+ |--------|-----------|----------------|
9
+ | Channel | stderr (hooks) | stdout (dedicated statusline) |
10
+ | Location | Inline in conversation log | Persistent bar at screen bottom |
11
+ | Trigger | PreToolUse (Task matcher) | Message update cycle (~300ms) |
12
+ | Role | Event notifications | Persistent session status |
12
13
 
13
- Multi-step tasks, parallel execution, long-running operations. Skip for single brief operations.
14
-
15
- ## Hook Implementation
14
+ ## HUD Events (Hook-based)
16
15
 
17
- Implemented in `.claude/hooks/hooks.json` (PreToolUse → Task matcher):
16
+ ### Format
18
17
 
19
18
  ```
20
19
  ─── [Spawn] {subagent_type}:{model} | {description} ───
21
20
  ─── [Resume] {subagent_type}:{model} | {description} ───
22
21
  ```
23
22
 
24
- ## Display with Parallel
23
+ ### When to Display
24
+
25
+ Multi-step tasks, parallel execution, long-running operations. Skip for single brief operations.
26
+
27
+ ### Implementation
28
+
29
+ Implemented in `.claude/hooks/hooks.json` (PreToolUse → Task matcher).
30
+
31
+ ### Parallel Display
25
32
 
26
33
  ```
27
34
  ─── [Agent] secretary | [Parallel] 4 ───
@@ -29,4 +36,41 @@ Implemented in `.claude/hooks/hooks.json` (PreToolUse → Task matcher):
29
36
  [2] Task(lang-golang-expert):haiku → Code review
30
37
  ```
31
38
 
39
+ ## Statusline API (Command-based)
40
+
41
+ ### Format
42
+
43
+ ```
44
+ {Cost} | {project} | {branch} | CTX:{usage}%
45
+ ```
46
+
47
+ Example: `$0.05 | my-project | develop | CTX:42%`
48
+
49
+ ### Configuration
50
+
51
+ ```json
52
+ {
53
+ "statusLine": {
54
+ "type": "command",
55
+ "command": ".claude/statusline.sh",
56
+ "padding": 0
57
+ }
58
+ }
59
+ ```
60
+
61
+ Set in `.claude/settings.local.json`. The command receives JSON via stdin with model, workspace, context window, and cost data.
62
+
63
+ ### Color Coding
64
+
65
+ | Element | Condition | Color |
66
+ |---------|-----------|-------|
67
+ | Cost | < $1.00 | Green |
68
+ | Cost | $1.00 - $4.99 | Yellow |
69
+ | Cost | >= $5.00 | Red |
70
+ | Context | < 60% | Green |
71
+ | Context | 60-79% | Yellow |
72
+ | Context | >= 80% | Red |
73
+
74
+ ## Integration
75
+
32
76
  Integrates with R007 (Agent ID), R008 (Tool ID), R009 (Parallel).
@@ -37,3 +37,35 @@ Agent frontmatter `memory: project|user|local` enables persistent memory:
37
37
  - Keep MEMORY.md under 200 lines
38
38
  - Do not store sensitive data or duplicate CLAUDE.md content
39
39
  - Memory write failures should not block main task
40
+
41
+ ## Session-End Auto-Save
42
+
43
+ ### Trigger
44
+
45
+ Session-end detected when user says: "끝", "종료", "마무리", "done", "wrap up", "end session", or explicitly requests session save.
46
+
47
+ ### Flow
48
+
49
+ ```
50
+ User signals session end
51
+ → Orchestrator delegates to sys-memory-keeper
52
+ → sys-memory-keeper performs dual-system save:
53
+ 1. claude-mem save (if available)
54
+ 2. episodic-memory verification (if available)
55
+ → Reports result to orchestrator
56
+ → Orchestrator confirms to user
57
+ ```
58
+
59
+ ### Dual-System Save
60
+
61
+ | System | Tool | Action | Required |
62
+ |--------|------|--------|----------|
63
+ | claude-mem | `mcp__claude-mem__save_memory` | Save session summary with project, tasks, decisions | No (best-effort) |
64
+ | episodic-memory | `mcp__episodic-memory__search` | Verify session is indexed for future retrieval | No (best-effort) |
65
+
66
+ ### Failure Policy
67
+
68
+ - Both saves are **non-blocking**: memory failure MUST NOT prevent session from ending
69
+ - If claude-mem unavailable: skip, log warning
70
+ - If episodic-memory unavailable: skip, log warning
71
+ - If both unavailable: warn user, proceed with session end