oh-my-customcode 0.3.2 → 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 (97) hide show
  1. package/README.md +14 -67
  2. package/dist/cli/index.js +8 -68
  3. package/dist/index.js +23 -14
  4. package/package.json +6 -1
  5. package/templates/.claude/agents/arch-documenter.md +3 -0
  6. package/templates/.claude/agents/arch-speckit-agent.md +3 -0
  7. package/templates/.claude/agents/be-express-expert.md +3 -0
  8. package/templates/.claude/agents/be-fastapi-expert.md +4 -0
  9. package/templates/.claude/agents/be-go-backend-expert.md +4 -0
  10. package/templates/.claude/agents/be-nestjs-expert.md +3 -0
  11. package/templates/.claude/agents/be-springboot-expert.md +4 -0
  12. package/templates/.claude/agents/db-supabase-expert.md +2 -0
  13. package/templates/.claude/agents/fe-svelte-agent.md +3 -0
  14. package/templates/.claude/agents/fe-vercel-agent.md +6 -0
  15. package/templates/.claude/agents/fe-vuejs-agent.md +3 -0
  16. package/templates/.claude/agents/infra-aws-expert.md +4 -0
  17. package/templates/.claude/agents/infra-docker-expert.md +4 -0
  18. package/templates/.claude/agents/lang-golang-expert.md +4 -0
  19. package/templates/.claude/agents/lang-java21-expert.md +3 -0
  20. package/templates/.claude/agents/lang-kotlin-expert.md +4 -0
  21. package/templates/.claude/agents/lang-python-expert.md +4 -0
  22. package/templates/.claude/agents/lang-rust-expert.md +4 -0
  23. package/templates/.claude/agents/lang-typescript-expert.md +4 -0
  24. package/templates/.claude/agents/mgr-claude-code-bible.md +246 -0
  25. package/templates/.claude/agents/mgr-creator.md +6 -0
  26. package/templates/.claude/agents/mgr-gitnerd.md +4 -1
  27. package/templates/.claude/agents/mgr-sauron.md +34 -25
  28. package/templates/.claude/agents/mgr-supplier.md +4 -0
  29. package/templates/.claude/agents/mgr-sync-checker.md +4 -0
  30. package/templates/.claude/agents/mgr-updater.md +4 -0
  31. package/templates/.claude/agents/qa-engineer.md +3 -0
  32. package/templates/.claude/agents/qa-planner.md +3 -0
  33. package/templates/.claude/agents/qa-writer.md +3 -0
  34. package/templates/.claude/agents/sys-memory-keeper.md +14 -8
  35. package/templates/.claude/agents/sys-naggy.md +3 -0
  36. package/templates/.claude/agents/tool-bun-expert.md +3 -0
  37. package/templates/.claude/agents/tool-npm-expert.md +6 -0
  38. package/templates/.claude/agents/tool-optimizer.md +6 -0
  39. package/templates/.claude/hooks/hooks.json +3 -37
  40. package/templates/.claude/install-hooks.sh +1 -1
  41. package/templates/.claude/rules/MUST-agent-design.md +37 -0
  42. package/templates/.claude/rules/MUST-orchestrator-coordination.md +61 -0
  43. package/templates/.claude/rules/MUST-parallel-execution.md +85 -14
  44. package/templates/.claude/rules/MUST-sync-verification.md +13 -0
  45. package/templates/.claude/rules/MUST-tool-identification.md +23 -0
  46. package/templates/.claude/rules/SHOULD-hud-statusline.md +26 -10
  47. package/templates/.claude/rules/SHOULD-memory-integration.md +96 -78
  48. package/templates/.claude/rules/index.yaml +1 -9
  49. package/templates/.claude/skills/aws-best-practices/SKILL.md +1 -0
  50. package/templates/.claude/skills/claude-code-bible/SKILL.md +180 -0
  51. package/templates/.claude/skills/claude-code-bible/scripts/fetch-docs.js +244 -0
  52. package/templates/.claude/skills/docker-best-practices/SKILL.md +1 -0
  53. package/templates/.claude/skills/fastapi-best-practices/SKILL.md +1 -0
  54. package/templates/.claude/skills/go-backend-best-practices/SKILL.md +1 -0
  55. package/templates/.claude/skills/go-best-practices/CLAUDE.md +9 -0
  56. package/templates/.claude/skills/go-best-practices/SKILL.md +1 -0
  57. package/templates/.claude/skills/help/SKILL.md +1 -1
  58. package/templates/.claude/skills/intent-detection/SKILL.md +1 -0
  59. package/templates/.claude/skills/intent-detection/patterns/agent-triggers.yaml +8 -8
  60. package/templates/.claude/skills/kotlin-best-practices/SKILL.md +1 -0
  61. package/templates/.claude/skills/lists/SKILL.md +2 -2
  62. package/templates/.claude/skills/memory-management/SKILL.md +8 -7
  63. package/templates/.claude/skills/memory-recall/SKILL.md +5 -5
  64. package/templates/.claude/skills/memory-save/SKILL.md +4 -4
  65. package/templates/.claude/skills/python-best-practices/SKILL.md +1 -0
  66. package/templates/.claude/skills/react-best-practices/SKILL.md +1 -0
  67. package/templates/.claude/skills/result-aggregation/SKILL.md +1 -0
  68. package/templates/.claude/skills/rust-best-practices/SKILL.md +1 -0
  69. package/templates/.claude/skills/springboot-best-practices/SKILL.md +1 -0
  70. package/templates/.claude/skills/status/SKILL.md +2 -2
  71. package/templates/.claude/skills/supabase-postgres-best-practices/SKILL.md +1 -0
  72. package/templates/.claude/skills/typescript-best-practices/SKILL.md +1 -0
  73. package/templates/.claude/skills/web-design-guidelines/SKILL.md +1 -0
  74. package/templates/.claude/skills/writing-clearly-and-concisely/SKILL.md +64 -0
  75. package/templates/CLAUDE.md.en +40 -13
  76. package/templates/CLAUDE.md.ko +40 -13
  77. package/templates/guides/elements-of-style/elements-of-style.html +2609 -0
  78. package/templates/guides/index.yaml +1 -1
  79. package/templates/index.yaml +1 -1
  80. package/templates/manifest.json +5 -11
  81. package/templates/.claude/agents/tutor-go.md +0 -125
  82. package/templates/.claude/hooks/hud/index.yaml +0 -27
  83. package/templates/.claude/hooks/hud/update-status.sh +0 -32
  84. package/templates/.claude/hooks/index.yaml +0 -46
  85. package/templates/.claude/hooks/memory-persistence/pre-compact.sh +0 -37
  86. package/templates/.claude/hooks/memory-persistence/session-end.sh +0 -64
  87. package/templates/.claude/hooks/memory-persistence/session-start.sh +0 -41
  88. package/templates/.claude/hooks/strategic-compact/suggest-compact.sh +0 -50
  89. package/templates/.claude/rules/SHOULD-pipeline-mode.md +0 -165
  90. package/templates/.claude/skills/pipeline-execution/SKILL.md +0 -188
  91. package/templates/.claude/skills/pipeline-list/SKILL.md +0 -74
  92. package/templates/.claude/skills/pipeline-run/SKILL.md +0 -143
  93. package/templates/examples/code-review.yaml +0 -66
  94. package/templates/pipelines/examples/code-review.yaml +0 -66
  95. package/templates/pipelines/index.yaml +0 -18
  96. package/templates/pipelines/templates/pipeline-template.yaml +0 -50
  97. package/templates/templates/pipeline-template.yaml +0 -50
@@ -1,4 +1,4 @@
1
- # Baekgom Agents - Guides Index
1
+ # Guides Index
2
2
 
3
3
  guides:
4
4
  # Internal
@@ -1,4 +1,4 @@
1
- # Baekgom Agents - Pipeline Registry
1
+ # Pipeline Registry
2
2
 
3
3
  description: Registry of available pipelines for sequential workflows
4
4
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "version": "0.2.0",
3
- "lastUpdated": "2026-02-05T08:54:15.660Z",
3
+ "lastUpdated": "2026-02-06T06:06:08.847Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "rules",
7
7
  "path": ".claude/rules",
8
8
  "description": "Agent behavior rules and guidelines",
9
- "files": 19
9
+ "files": 18
10
10
  },
11
11
  {
12
12
  "name": "agents",
@@ -18,7 +18,7 @@
18
18
  "name": "skills",
19
19
  "path": ".claude/skills",
20
20
  "description": "Reusable skill modules (includes slash commands)",
21
- "files": 42
21
+ "files": 41
22
22
  },
23
23
  {
24
24
  "name": "guides",
@@ -26,17 +26,11 @@
26
26
  "description": "Reference documentation",
27
27
  "files": 13
28
28
  },
29
- {
30
- "name": "pipelines",
31
- "path": "pipelines",
32
- "description": "Workflow pipeline definitions",
33
- "files": 3
34
- },
35
29
  {
36
30
  "name": "hooks",
37
31
  "path": ".claude/hooks",
38
32
  "description": "Lifecycle hook scripts",
39
- "files": 8
33
+ "files": 1
40
34
  },
41
35
  {
42
36
  "name": "contexts",
@@ -45,5 +39,5 @@
45
39
  "files": 5
46
40
  }
47
41
  ],
48
- "source": "https://github.com/baekenough/baekgom-agents"
42
+ "source": "https://github.com/baekenough/oh-my-customcode"
49
43
  }
@@ -1,125 +0,0 @@
1
- ---
2
- name: tutor-go
3
- description: Use when you need to teach Go language and data structures/algorithms through the learn-go curriculum, generating chapter content, exercises, and providing learning feedback
4
- model: sonnet
5
- tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Grep
10
- - Glob
11
- - Bash
12
- ---
13
-
14
- You are a Go language and data structures/algorithms tutor for the learn-go curriculum, teaching through structured lessons with exercises.
15
-
16
- ## Target Curriculum
17
-
18
- ```
19
- ~/workspace/projects/learn-go/
20
- ├── part1-go-basics/ (Ch01-10)
21
- ├── part2-algorithms/ (Ch11-25)
22
- └── part3-backend/ (Ch26-35)
23
- ```
24
-
25
- ## Core Capabilities
26
-
27
- 1. Generate chapter content (README.md with theory)
28
- 2. Create runnable examples (examples/*.go)
29
- 3. Create exercises with test cases (exercises/*.go, *_test.go)
30
- 4. Review and provide feedback on solutions
31
- 5. Track learning progress
32
- 6. Answer questions about Go and algorithms
33
-
34
- ## Commands
35
-
36
- | Command | Description |
37
- |---------|-------------|
38
- | `tutor:start <chapter>` | Generate chapter content and exercises |
39
- | `tutor:review` | Review current exercise solution |
40
- | `tutor:hint` | Get a hint for current exercise |
41
- | `tutor:solution` | Show solution (after attempt) |
42
- | `tutor:ask <question>` | Ask about Go or algorithms |
43
- | `tutor:progress` | Show learning progress |
44
- | `tutor:next` | Move to next chapter |
45
-
46
- ## Teaching Principles
47
-
48
- 1. **Theory first, then practice** - Explain concepts before coding
49
- 2. **Python comparison** - Reference Python for familiar concepts
50
- 3. **Incremental difficulty** - Start with scaffolded exercises
51
- 4. **Test-driven** - All exercises have test cases
52
- 5. **Korean comments** - Theory AND code comments in Korean, only identifiers in English
53
-
54
- ## Language Policy
55
-
56
- | 항목 | 언어 | 예시 |
57
- |------|------|------|
58
- | README.md | 한국어 | 이론 설명, 개념 정리 |
59
- | 코드 주석 | 한국어 | `// 사용자 이름을 출력한다` |
60
- | 변수/함수명 | 영어 | `userName`, `PrintGreeting` |
61
- | 문자열 리터럴 | 영어 | `"Hello, World!"` |
62
-
63
- ## Chapter Content Structure
64
-
65
- ```
66
- chXX-topic/
67
- ├── README.md # Theory explanation (Korean)
68
- │ ├── Concept overview
69
- │ ├── Key points
70
- │ ├── Python comparison (where applicable)
71
- │ └── Common mistakes
72
- ├── examples/
73
- │ └── main.go # Runnable examples with comments
74
- └── exercises/
75
- ├── ex01.go # Exercise file
76
- ├── ex01_test.go # Test cases
77
- └── solution/
78
- └── ex01.go # Reference solution
79
- ```
80
-
81
- ## Exercise Styles by Part
82
-
83
- | Part | Style |
84
- |------|-------|
85
- | Part 1 (Ch01-05) | Fill-in-the-blank, heavy scaffolding |
86
- | Part 1 (Ch06-10) | Partial scaffolding |
87
- | Part 2 (Ch11-18) | Problem + tests, minimal scaffold |
88
- | Part 2 (Ch19-25) | Full implementation (Baekjoon style) |
89
- | Part 3 | Project-based, guided |
90
-
91
- ## Workflow
92
-
93
- ```
94
- User: tutor:start ch01
95
-
96
-
97
- ┌─────────────────────────┐
98
- │ 1. Create chapter folder │
99
- │ 2. Write README.md │
100
- │ 3. Create examples/ │
101
- │ 4. Create exercises/ │
102
- │ 5. Report completion │
103
- └─────────────────────────┘
104
-
105
-
106
- User: (works on exercises)
107
-
108
-
109
- User: tutor:review
110
-
111
-
112
- ┌─────────────────────────┐
113
- │ 1. Run go test │
114
- │ 2. Review code quality │
115
- │ 3. Provide feedback │
116
- └─────────────────────────┘
117
- ```
118
-
119
- ## Skills Referenced
120
-
121
- - go-best-practices: Core Go guidelines for idiomatic code
122
-
123
- ## Guides Referenced
124
-
125
- - golang: Go reference documentation and best practices
@@ -1,27 +0,0 @@
1
- # HUD Statusline Hooks
2
- # Provides real-time status display during agent operations
3
-
4
- name: hud-statusline
5
- description: Real-time status display during operations
6
- rule: R012 (SHOULD-hud-statusline)
7
-
8
- scripts:
9
- - name: update-status
10
- path: ./update-status.sh
11
- description: Update HUD statusline with agent/progress/parallel info
12
- usage: update-status.sh <agent> [progress] [parallel_count]
13
-
14
- triggers:
15
- - PreToolUse (Task)
16
- - PostToolUse (Task)
17
- - Agent activation
18
- - Parallel spawn/complete
19
-
20
- components:
21
- agent: Current agent name
22
- progress: Task progress (n/total)
23
- parallel: Parallel instance count
24
-
25
- installation:
26
- step1: "chmod +x ~/.claude/hooks/hud/update-status.sh"
27
- step2: "Hook is called automatically or manually via script"
@@ -1,32 +0,0 @@
1
- #!/bin/bash
2
- # HUD Statusline Hook - Update status display
3
- #
4
- # Displays real-time status information during agent operations.
5
- # Output via stderr to avoid polluting tool output.
6
- #
7
- # Usage: update-status.sh <agent> [progress] [parallel_count]
8
- #
9
- # Examples:
10
- # update-status.sh "creator" "1/3"
11
- # update-status.sh "secretary" "0/4" "4"
12
- # update-status.sh "golang-expert"
13
-
14
- AGENT="${1:-claude}"
15
- PROGRESS="${2:-}"
16
- PARALLEL="${3:-0}"
17
-
18
- # Build status line
19
- STATUS="[Agent] $AGENT"
20
-
21
- # Add progress if provided
22
- if [ -n "$PROGRESS" ]; then
23
- STATUS="$STATUS | [Progress] $PROGRESS"
24
- fi
25
-
26
- # Add parallel count if > 0
27
- if [ "$PARALLEL" -gt 0 ] 2>/dev/null; then
28
- STATUS="$STATUS | [Parallel] $PARALLEL"
29
- fi
30
-
31
- # Output to stderr to avoid polluting tool output
32
- echo "─── $STATUS ───" >&2
@@ -1,46 +0,0 @@
1
- # Claude Code Hooks Configuration
2
- # Source: https://github.com/affaan-m/everything-claude-code
3
-
4
- hooks:
5
- PreToolUse:
6
- - dev-server-tmux-guard
7
- - long-running-tmux-reminder
8
- - git-push-review-pause
9
- - md-file-creation-block
10
- - strategic-compact-suggester
11
- - hud-statusline (Task)
12
-
13
- PreCompact:
14
- - memory-persistence/pre-compact
15
-
16
- SessionStart:
17
- - memory-persistence/session-start
18
-
19
- PostToolUse:
20
- - pr-creation-logger
21
- - prettier-auto-format (js/ts)
22
- - typescript-checker
23
- - console-log-warner
24
- - gofmt-auto-format (go)
25
- - ruff-format-and-lint (python)
26
- - ty-type-check (python)
27
-
28
- Stop:
29
- - console-log-final-audit
30
- - memory-persistence/session-end
31
-
32
- scripts:
33
- memory-persistence:
34
- - pre-compact.sh
35
- - session-start.sh
36
- - session-end.sh
37
- strategic-compact:
38
- - suggest-compact.sh
39
- hud:
40
- - update-status.sh
41
-
42
- installation:
43
- step1: "Copy hooks.json content to ~/.claude/settings.json"
44
- step2: "Copy scripts to ~/.claude/hooks/"
45
- step3: "chmod +x ~/.claude/hooks/**/*.sh"
46
- step4: "Create ~/.claude/sessions/ and ~/.claude/skills/learned/"
@@ -1,37 +0,0 @@
1
- #!/bin/bash
2
- # PreCompact Hook - Save state before context compaction
3
- #
4
- # Runs before Claude compacts context. Logs the event and marks
5
- # active session files so you know when compaction occurred.
6
- #
7
- # Hook config (in ~/.claude/settings.json):
8
- # {
9
- # "hooks": {
10
- # "PreCompact": [{
11
- # "matcher": "*",
12
- # "hooks": [{
13
- # "type": "command",
14
- # "command": "~/.claude/hooks/memory-persistence/pre-compact.sh"
15
- # }]
16
- # }]
17
- # }
18
- # }
19
-
20
- SESSIONS_DIR="${HOME}/.claude/sessions"
21
- LOG_FILE="${SESSIONS_DIR}/compaction-log.txt"
22
-
23
- mkdir -p "$SESSIONS_DIR"
24
-
25
- # Log the compaction event
26
- echo "[$(date '+%Y-%m-%d %H:%M:%S')] Context compaction triggered" >> "$LOG_FILE"
27
-
28
- # Find and mark active session file
29
- ACTIVE_SESSION=$(find "$SESSIONS_DIR" -name "*.tmp" -mmin -60 2>/dev/null | head -1)
30
- if [ -n "$ACTIVE_SESSION" ] && [ -f "$ACTIVE_SESSION" ]; then
31
- echo "" >> "$ACTIVE_SESSION"
32
- echo "---" >> "$ACTIVE_SESSION"
33
- echo "**[COMPACTION]** Context compacted at $(date '+%H:%M')" >> "$ACTIVE_SESSION"
34
- echo "---" >> "$ACTIVE_SESSION"
35
- fi
36
-
37
- echo "[PreCompact] State preserved before compaction" >&2
@@ -1,64 +0,0 @@
1
- #!/bin/bash
2
- # Stop Hook (Session End) - Persist learnings when session ends
3
- #
4
- # Runs when Claude session ends. Creates/updates session log file
5
- # with timestamp for continuity tracking.
6
- #
7
- # Hook config (in ~/.claude/settings.json):
8
- # {
9
- # "hooks": {
10
- # "Stop": [{
11
- # "matcher": "*",
12
- # "hooks": [{
13
- # "type": "command",
14
- # "command": "~/.claude/hooks/memory-persistence/session-end.sh"
15
- # }]
16
- # }]
17
- # }
18
- # }
19
-
20
- SESSIONS_DIR="${HOME}/.claude/sessions"
21
- TODAY=$(date '+%Y-%m-%d')
22
- SESSION_FILE="${SESSIONS_DIR}/${TODAY}-session.tmp"
23
-
24
- mkdir -p "$SESSIONS_DIR"
25
-
26
- # If session file exists for today, update the end time
27
- if [ -f "$SESSION_FILE" ]; then
28
- # Update Last Updated timestamp (macOS and Linux compatible)
29
- if [[ "$OSTYPE" == "darwin"* ]]; then
30
- sed -i '' "s/\*\*Last Updated:\*\*.*/\*\*Last Updated:\*\* $(date '+%H:%M')/" "$SESSION_FILE" 2>/dev/null
31
- else
32
- sed -i "s/\*\*Last Updated:\*\*.*/\*\*Last Updated:\*\* $(date '+%H:%M')/" "$SESSION_FILE" 2>/dev/null
33
- fi
34
- echo "[SessionEnd] Updated session file: $SESSION_FILE" >&2
35
- else
36
- # Create new session file with template
37
- cat > "$SESSION_FILE" << EOF
38
- # Session: $(date '+%Y-%m-%d')
39
- **Date:** $TODAY
40
- **Started:** $(date '+%H:%M')
41
- **Last Updated:** $(date '+%H:%M')
42
-
43
- ---
44
-
45
- ## Current State
46
-
47
- [Session context goes here]
48
-
49
- ### Completed
50
- - [ ]
51
-
52
- ### In Progress
53
- - [ ]
54
-
55
- ### Notes for Next Session
56
- -
57
-
58
- ### Context to Load
59
- \`\`\`
60
- [relevant files]
61
- \`\`\`
62
- EOF
63
- echo "[SessionEnd] Created session file: $SESSION_FILE" >&2
64
- fi
@@ -1,41 +0,0 @@
1
- #!/bin/bash
2
- # SessionStart Hook - Load previous context on new session
3
- #
4
- # Runs when a new Claude session starts. Checks for recent session
5
- # files and learned skills to provide continuity hints.
6
- #
7
- # Hook config (in ~/.claude/settings.json):
8
- # {
9
- # "hooks": {
10
- # "SessionStart": [{
11
- # "matcher": "*",
12
- # "hooks": [{
13
- # "type": "command",
14
- # "command": "~/.claude/hooks/memory-persistence/session-start.sh"
15
- # }]
16
- # }]
17
- # }
18
- # }
19
-
20
- SESSIONS_DIR="${HOME}/.claude/sessions"
21
- SKILLS_DIR="${HOME}/.claude/skills/learned"
22
-
23
- # Check for recent session files (last 7 days)
24
- if [ -d "$SESSIONS_DIR" ]; then
25
- RECENT_SESSIONS=$(find "$SESSIONS_DIR" -name "*.tmp" -mtime -7 2>/dev/null | wc -l | tr -d ' ')
26
- if [ "$RECENT_SESSIONS" -gt 0 ]; then
27
- echo "[SessionStart] Found $RECENT_SESSIONS recent session(s)" >&2
28
- LATEST=$(find "$SESSIONS_DIR" -name "*.tmp" -mtime -7 2>/dev/null | sort -r | head -1)
29
- if [ -n "$LATEST" ]; then
30
- echo "[SessionStart] Latest: $LATEST" >&2
31
- fi
32
- fi
33
- fi
34
-
35
- # Check for learned skills
36
- if [ -d "$SKILLS_DIR" ]; then
37
- SKILLS_COUNT=$(find "$SKILLS_DIR" -name "*.md" 2>/dev/null | wc -l | tr -d ' ')
38
- if [ "$SKILLS_COUNT" -gt 0 ]; then
39
- echo "[SessionStart] $SKILLS_COUNT learned skill(s) available" >&2
40
- fi
41
- fi
@@ -1,50 +0,0 @@
1
- #!/bin/bash
2
- # Strategic Compact Suggester - Suggest manual compaction at logical intervals
3
- #
4
- # Tracks tool usage and suggests compaction at strategic points.
5
- # Manual compaction preserves context through logical phases.
6
- #
7
- # Best times to compact:
8
- # - After completing an exploration phase, before starting execution
9
- # - After reaching a milestone (feature complete, tests passing)
10
- # - When context feels cluttered but before it auto-compacts
11
- #
12
- # Hook config (in ~/.claude/settings.json):
13
- # {
14
- # "hooks": {
15
- # "PreToolUse": [{
16
- # "matcher": "tool == \"Edit\" || tool == \"Write\"",
17
- # "hooks": [{
18
- # "type": "command",
19
- # "command": "~/.claude/hooks/strategic-compact/suggest-compact.sh"
20
- # }]
21
- # }]
22
- # }
23
- # }
24
-
25
- COUNTER_FILE="/tmp/claude-tool-count-$$"
26
- THRESHOLD=${COMPACT_THRESHOLD:-50}
27
-
28
- # Initialize or increment counter
29
- if [ -f "$COUNTER_FILE" ]; then
30
- COUNT=$(cat "$COUNTER_FILE")
31
- COUNT=$((COUNT + 1))
32
- else
33
- COUNT=1
34
- fi
35
- echo "$COUNT" > "$COUNTER_FILE"
36
-
37
- # Suggest compaction at threshold
38
- if [ "$COUNT" -eq "$THRESHOLD" ]; then
39
- echo "[StrategicCompact] Reached $THRESHOLD tool calls" >&2
40
- echo "[StrategicCompact] Consider running /compact if at a logical breakpoint" >&2
41
- echo "[StrategicCompact] Good times: after exploration, before implementation" >&2
42
- fi
43
-
44
- # Reminder every 25 calls after threshold
45
- if [ "$COUNT" -gt "$THRESHOLD" ] && [ $(((COUNT - THRESHOLD) % 25)) -eq 0 ]; then
46
- echo "[StrategicCompact] $COUNT tool calls - /compact reminder" >&2
47
- fi
48
-
49
- # Pass through input
50
- cat
@@ -1,165 +0,0 @@
1
- # [SHOULD] Pipeline Mode Rules
2
-
3
- > **Priority**: SHOULD - Recommended for sequential workflows
4
- > **ID**: R014
5
-
6
- ## Purpose
7
-
8
- Enable declarative, sequential multi-step workflows with variable passing between steps.
9
-
10
- ## Pipeline Definition Format
11
-
12
- ```yaml
13
- name: pipeline-name
14
- description: What this pipeline does
15
-
16
- inputs:
17
- - name: input_name
18
- required: true
19
- description: Input description
20
-
21
- steps:
22
- - id: step_1
23
- agent: agent-name
24
- action: action_name
25
- input: { key: "${input_name}" }
26
- output: result_variable
27
-
28
- - id: step_2
29
- agent: another-agent
30
- action: action_name
31
- input: { data: "${result_variable}" }
32
- output: final_result
33
- ```
34
-
35
- ## Variable Syntax
36
-
37
- - `${variable}`: Reference input or previous step output
38
- - `${step_id.field}`: Reference specific field from step output
39
- - `${inputs.name}`: Explicit input reference
40
-
41
- ## Execution Rules
42
-
43
- ### Sequential by Default
44
-
45
- Steps execute in order. Each step waits for previous step completion.
46
-
47
- ```
48
- Step 1 → complete → Step 2 → complete → Step 3
49
- ```
50
-
51
- ### Output Passing
52
-
53
- Output from step N is available to step N+1 and beyond.
54
-
55
- ```yaml
56
- steps:
57
- - id: analyze
58
- output: analysis # Creates ${analysis}
59
-
60
- - id: review
61
- input: { data: "${analysis}" } # Uses ${analysis}
62
- ```
63
-
64
- ### Error Handling
65
-
66
- ```yaml
67
- error_handling:
68
- default: stop # stop | continue | retry
69
-
70
- steps:
71
- - id: risky_step
72
- on_error: continue # Override for this step
73
- retry:
74
- max_attempts: 3
75
- delay: 1000
76
- ```
77
-
78
- ## Pipeline Commands
79
-
80
- | Command | Description |
81
- |---------|-------------|
82
- | `pipeline:run <name>` | Execute a pipeline |
83
- | `pipeline:list` | List available pipelines |
84
- | `pipeline:status` | Show running pipeline status |
85
-
86
- ## Pipeline Locations
87
-
88
- ```
89
- pipelines/
90
- ├── index.yaml # Pipeline registry
91
- ├── templates/ # Pipeline templates
92
- │ └── pipeline-template.yaml
93
- └── examples/ # Example pipelines
94
- └── code-review.yaml
95
- ```
96
-
97
- ## Example Pipeline
98
-
99
- ### code-review.yaml
100
-
101
- ```yaml
102
- name: code-review
103
- description: Full code review workflow
104
-
105
- inputs:
106
- - name: file_path
107
- required: true
108
-
109
- steps:
110
- - id: detect_language
111
- agent: secretary
112
- action: detect_language
113
- input: { file: "${file_path}" }
114
- output: language
115
-
116
- - id: analyze
117
- agent: "${language}-expert"
118
- action: analyze
119
- input: { file: "${file_path}" }
120
- output: analysis
121
-
122
- - id: security_check
123
- agent: qa-lead
124
- action: security_review
125
- input: { findings: "${analysis}" }
126
- output: security
127
-
128
- - id: report
129
- agent: arch-documenter
130
- action: summarize
131
- input:
132
- analysis: "${analysis}"
133
- security: "${security}"
134
- output: report
135
- ```
136
-
137
- ## Execution Output
138
-
139
- ```
140
- [Pipeline] code-review
141
- ├── [1/4] detect_language: ✓ Go detected
142
- ├── [2/4] analyze: ✓ 5 issues found
143
- ├── [3/4] security_check: ✓ No vulnerabilities
144
- └── [4/4] report: ✓ Summary generated
145
-
146
- [Complete] Pipeline finished successfully
147
- Output: ${report}
148
- ```
149
-
150
- ## Secretary Integration
151
-
152
- Secretary can:
153
- 1. Load and validate pipeline definitions
154
- 2. Execute pipelines step-by-step
155
- 3. Pass variables between steps
156
- 4. Report progress and results
157
- 5. Handle errors according to policy
158
-
159
- ## Benefits
160
-
161
- 1. **Reproducibility**: Same workflow, consistent results
162
- 2. **Composability**: Build complex workflows from simple steps
163
- 3. **Visibility**: Clear step-by-step progress
164
- 4. **Error Recovery**: Defined error handling per step
165
- 5. **Reusability**: Save and reuse common workflows