codeforge-dev 1.14.2 → 2.0.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 (106) hide show
  1. package/{.devcontainer/config/defaults → .codeforge/config}/ccstatusline-settings.json +44 -6
  2. package/{.devcontainer/config/defaults → .codeforge/config}/main-system-prompt.md +14 -6
  3. package/.codeforge/config/orchestrator-system-prompt.md +333 -0
  4. package/{.devcontainer/config/defaults → .codeforge/config}/settings.json +3 -1
  5. package/{.devcontainer/config → .codeforge}/file-manifest.json +15 -9
  6. package/{.devcontainer → .codeforge/scripts}/connect-external-terminal.sh +3 -1
  7. package/.devcontainer/.env.example +5 -5
  8. package/.devcontainer/.secrets.example +3 -0
  9. package/.devcontainer/CHANGELOG.md +242 -0
  10. package/.devcontainer/CLAUDE.md +129 -22
  11. package/.devcontainer/README.md +34 -19
  12. package/.devcontainer/devcontainer.json +28 -10
  13. package/.devcontainer/features/agent-browser/install.sh +2 -0
  14. package/.devcontainer/features/ast-grep/install.sh +2 -0
  15. package/.devcontainer/features/biome/install.sh +2 -0
  16. package/.devcontainer/features/ccburn/install.sh +2 -0
  17. package/.devcontainer/features/ccms/install.sh +2 -0
  18. package/.devcontainer/features/ccstatusline/README.md +7 -6
  19. package/.devcontainer/features/ccstatusline/install.sh +9 -4
  20. package/.devcontainer/features/ccusage/install.sh +2 -0
  21. package/.devcontainer/features/chromaterm/chromaterm.yml +2 -2
  22. package/.devcontainer/features/chromaterm/install.sh +2 -0
  23. package/.devcontainer/features/claude-code-native/README.md +47 -0
  24. package/.devcontainer/features/claude-code-native/devcontainer-feature.json +29 -0
  25. package/.devcontainer/features/claude-code-native/install.sh +131 -0
  26. package/.devcontainer/features/claude-monitor/install.sh +2 -0
  27. package/.devcontainer/features/claude-session-dashboard/README.md +2 -2
  28. package/.devcontainer/features/claude-session-dashboard/install.sh +2 -0
  29. package/.devcontainer/features/dprint/install.sh +2 -0
  30. package/.devcontainer/features/hadolint/install.sh +2 -0
  31. package/.devcontainer/features/kitty-terminfo/README.md +3 -1
  32. package/.devcontainer/features/kitty-terminfo/install.sh +2 -0
  33. package/.devcontainer/features/lsp-servers/install.sh +2 -0
  34. package/.devcontainer/features/mcp-qdrant/CHANGES.md +3 -3
  35. package/.devcontainer/features/mcp-qdrant/README.md +1 -0
  36. package/.devcontainer/features/mcp-qdrant/devcontainer-feature.json +1 -1
  37. package/.devcontainer/features/mcp-qdrant/install.sh +9 -2
  38. package/.devcontainer/features/mcp-qdrant/poststart-hook.sh +9 -2
  39. package/.devcontainer/features/notify-hook/devcontainer-feature.json +1 -1
  40. package/.devcontainer/features/notify-hook/install.sh +2 -0
  41. package/.devcontainer/features/ruff/install.sh +2 -0
  42. package/.devcontainer/features/shellcheck/install.sh +2 -0
  43. package/.devcontainer/features/shfmt/install.sh +2 -0
  44. package/.devcontainer/features/tmux/README.md +3 -3
  45. package/.devcontainer/features/tmux/install.sh +3 -1
  46. package/.devcontainer/features/tree-sitter/install.sh +2 -0
  47. package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +27 -11
  48. package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/README.md +23 -4
  49. package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/claude-guide.md +4 -4
  50. package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/documenter.md +254 -0
  51. package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/implementer.md +260 -0
  52. package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/investigator.md +255 -0
  53. package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/tester.md +304 -0
  54. package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/README.md +1 -1
  55. package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/scripts/advisory-test-runner.py +4 -2
  56. package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/scripts/block-dangerous.py +2 -2
  57. package/.devcontainer/plugins/devs-marketplace/plugins/git-workflow/.claude-plugin/plugin.json +7 -0
  58. package/.devcontainer/plugins/devs-marketplace/plugins/git-workflow/README.md +125 -0
  59. package/.devcontainer/plugins/devs-marketplace/plugins/git-workflow/skills/pr-review/SKILL.md +325 -0
  60. package/.devcontainer/plugins/devs-marketplace/plugins/git-workflow/skills/ship/SKILL.md +314 -0
  61. package/.devcontainer/plugins/devs-marketplace/plugins/prompt-snippets/.claude-plugin/plugin.json +5 -0
  62. package/.devcontainer/plugins/devs-marketplace/plugins/prompt-snippets/README.md +52 -0
  63. package/.devcontainer/plugins/devs-marketplace/plugins/prompt-snippets/skills/ps/SKILL.md +37 -0
  64. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected-bash.py +1 -1
  65. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py +1 -1
  66. package/.devcontainer/plugins/devs-marketplace/plugins/session-context/README.md +30 -14
  67. package/.devcontainer/plugins/devs-marketplace/plugins/session-context/hooks/hooks.json +13 -1
  68. package/.devcontainer/plugins/devs-marketplace/plugins/session-context/scripts/collect-session-edits.py +44 -0
  69. package/.devcontainer/plugins/devs-marketplace/plugins/session-context/scripts/commit-reminder.py +89 -10
  70. package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/.claude-plugin/plugin.json +1 -1
  71. package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/README.md +19 -11
  72. package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/scripts/skill-suggester.py +476 -282
  73. package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/worktree/SKILL.md +227 -0
  74. package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/worktree/references/manual-worktree-commands.md +238 -0
  75. package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/worktree/references/parallel-workflow-patterns.md +228 -0
  76. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/scripts/ticket-linker.py +2 -2
  77. package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/README.md +1 -1
  78. package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/guard-workspace-scope.py +3 -2
  79. package/.devcontainer/scripts/check-setup.sh +5 -3
  80. package/.devcontainer/scripts/preflight.sh +113 -0
  81. package/.devcontainer/scripts/setup-aliases.sh +13 -8
  82. package/.devcontainer/scripts/setup-auth.sh +46 -0
  83. package/.devcontainer/scripts/setup-config.sh +29 -10
  84. package/.devcontainer/scripts/setup-migrate-claude.sh +80 -0
  85. package/.devcontainer/scripts/setup-migrate-codeforge.sh +60 -0
  86. package/.devcontainer/scripts/setup-plugins.sh +3 -1
  87. package/.devcontainer/scripts/setup-projects.sh +3 -1
  88. package/.devcontainer/scripts/setup-terminal.sh +3 -1
  89. package/.devcontainer/scripts/setup-update-claude.sh +22 -27
  90. package/.devcontainer/scripts/setup.sh +57 -5
  91. package/LICENSE.txt +14 -0
  92. package/README.md +79 -5
  93. package/package.json +2 -1
  94. package/setup.js +392 -21
  95. package/.devcontainer/docs/configuration-reference.md +0 -93
  96. package/.devcontainer/docs/keybindings.md +0 -100
  97. package/.devcontainer/docs/optional-features.md +0 -64
  98. package/.devcontainer/docs/plugins.md +0 -176
  99. package/.devcontainer/docs/troubleshooting.md +0 -128
  100. package/.devcontainer/scripts/setup-symlink-claude.sh +0 -36
  101. /package/{.devcontainer/config/defaults → .codeforge/config}/keybindings.json +0 -0
  102. /package/{.devcontainer/config/defaults → .codeforge/config}/rules/session-search.md +0 -0
  103. /package/{.devcontainer/config/defaults → .codeforge/config}/rules/spec-workflow.md +0 -0
  104. /package/{.devcontainer/config/defaults → .codeforge/config}/rules/workspace-scope.md +0 -0
  105. /package/{.devcontainer/config/defaults → .codeforge/config}/writing-system-prompt.md +0 -0
  106. /package/{.devcontainer → .codeforge/scripts}/connect-external-terminal.ps1 +0 -0
@@ -5,7 +5,8 @@
5
5
  {
6
6
  "id": "d904cca6-ade8-41c1-a4f5-ddea30607a5e",
7
7
  "type": "model",
8
- "backgroundColor": "bgMagenta"
8
+ "backgroundColor": "bgMagenta",
9
+ "rawValue": true
9
10
  },
10
11
  {
11
12
  "id": "1",
@@ -19,31 +20,68 @@
19
20
  "backgroundColor": "bgRed",
20
21
  "rawValue": true
21
22
  },
23
+ {
24
+ "id": "lbl-tokens-input",
25
+ "type": "custom-text",
26
+ "customText": "In",
27
+ "backgroundColor": "bgBlue",
28
+ "color": "brightWhite",
29
+ "bold": true,
30
+ "merge": "no-padding"
31
+ },
22
32
  {
23
33
  "id": "5",
24
34
  "type": "tokens-input",
25
- "color": "magenta",
26
- "rawValue": true,
35
+ "backgroundColor": "bgBlue",
36
+ "color": "brightWhite",
37
+ "rawValue": true
38
+ },
39
+ {
40
+ "id": "lbl-tokens-output",
41
+ "type": "custom-text",
42
+ "customText": "Ou",
43
+ "backgroundColor": "bgMagenta",
44
+ "color": "brightWhite",
45
+ "bold": true,
27
46
  "merge": "no-padding"
28
47
  },
29
48
  {
30
49
  "id": "ac094d46-3673-4d41-84e3-dc8c5bcf639f",
31
50
  "type": "tokens-output",
32
51
  "backgroundColor": "bgMagenta",
33
- "rawValue": true,
52
+ "color": "brightWhite",
53
+ "rawValue": true
54
+ },
55
+ {
56
+ "id": "lbl-tokens-cached",
57
+ "type": "custom-text",
58
+ "customText": "Ca",
59
+ "backgroundColor": "bgYellow",
60
+ "color": "black",
61
+ "bold": true,
34
62
  "merge": "no-padding"
35
63
  },
36
64
  {
37
65
  "id": "2ad12147-05fd-45fb-8336-53ba2e7df56c",
38
66
  "type": "tokens-cached",
39
- "backgroundColor": "bgBrightRed",
40
- "rawValue": true,
67
+ "backgroundColor": "bgYellow",
68
+ "color": "black",
69
+ "rawValue": true
70
+ },
71
+ {
72
+ "id": "lbl-tokens-total",
73
+ "type": "custom-text",
74
+ "customText": "Tt",
75
+ "backgroundColor": "bgGreen",
76
+ "color": "black",
77
+ "bold": true,
41
78
  "merge": "no-padding"
42
79
  },
43
80
  {
44
81
  "id": "9bacbdb4-2e01-45de-a0c0-ee6ec30fa3c2",
45
82
  "type": "tokens-total",
46
83
  "backgroundColor": "bgGreen",
84
+ "color": "black",
47
85
  "rawValue": true
48
86
  }
49
87
  ],
@@ -338,22 +338,30 @@ When blocked, do not use destructive actions as a shortcut. Investigate before d
338
338
  <git_worktrees>
339
339
  Git worktrees allow checking out multiple branches simultaneously, each in its own directory.
340
340
 
341
- Layout convention:
342
- - Worktrees go in a `.worktrees/` directory as a sibling to the main repo checkout, within the same container directory (e.g., `projects/.worktrees/feature-name`)
343
- - The main repo has a `.git` directory; worktrees have a `.git` file containing `gitdir:` pointing to the main repo's worktree metadata
341
+ Creating worktrees (recommended — use Claude Code native tools):
342
+ - **In-session:** Use `EnterWorktree` tool with a descriptive name. Creates worktree at `<repo>/.claude/worktrees/<name>/` with branch `worktree-<name>`. Auto-cleaned if no changes.
343
+ - **New session:** `claude --worktree <name>` starts Claude in its own worktree. Combine with `--tmux` for background work.
344
344
 
345
- Creating worktrees:
345
+ Creating worktrees (manual):
346
346
  ```bash
347
- # Always create inside .worktrees/
347
+ # Legacy convention detected by setup-projects.sh
348
348
  mkdir -p /workspaces/projects/.worktrees
349
- git worktree add /workspaces/projects/.worktrees/<branch-name> <branch>
349
+ git worktree add /workspaces/projects/.worktrees/<branch-name> -b <branch>
350
350
  ```
351
351
 
352
+ Environment files:
353
+ - Place a `.worktreeinclude` file at the project root listing `.gitignore`-excluded files to copy into new worktrees (e.g., `.env`, `.env.local`)
354
+ - Uses `.gitignore` pattern syntax; only files matching both `.worktreeinclude` and `.gitignore` are copied
355
+
352
356
  Managing worktrees:
353
357
  - `git worktree list` — show all active worktrees
354
358
  - `git worktree remove <path>` — remove a worktree (confirm with user first — destructive)
355
359
  - `git worktree prune` — clean up stale worktree references (confirm with user first — destructive)
356
360
 
361
+ Path conventions:
362
+ - **Native (recommended):** `<repo>/.claude/worktrees/<name>/` — used by `--worktree` flag and `EnterWorktree`
363
+ - **Legacy:** `.worktrees/` as sibling to the main repo — used for manual `git worktree add` and Project Manager integration
364
+
357
365
  Project detection:
358
366
  - Worktrees in `.worktrees/` are auto-detected by `setup-projects.sh` and tagged with both `"git"` and `"worktree"` in Project Manager
359
367
  - Each worktree is an independent working directory — workspace-scope-guard treats them as separate project directories
@@ -0,0 +1,333 @@
1
+ <identity>
2
+ You are Alira, operating in orchestrator mode.
3
+ </identity>
4
+
5
+ <rule_precedence>
6
+ 1. Safety and tool constraints
7
+ 2. Explicit user instructions in the current turn
8
+ 3. <planning_and_execution>
9
+ 4. <orchestrator_constraints> / <action_safety>
10
+ 5. <assumption_surfacing>
11
+ 6. <delegation_model>
12
+ 7. <professional_objectivity>
13
+ 8. <response_guidelines>
14
+
15
+ If rules conflict, follow the highest-priority rule and explicitly note the conflict. Never silently violate a higher-priority rule.
16
+ </rule_precedence>
17
+
18
+ <response_guidelines>
19
+ Structure:
20
+ - Begin with substantive content; no preamble
21
+ - Use headers and bullets for multi-part responses
22
+ - Front-load key information; details follow
23
+ - Paragraphs: 3-5 sentences max
24
+ - Numbered steps for procedures (5-9 steps max)
25
+
26
+ Formatting:
27
+ - Bold key terms and action items
28
+ - Tables for comparisons
29
+ - Code blocks for technical content
30
+ - Consistent structure across similar responses
31
+ - Reference code locations as `file_path:line_number` for easy navigation
32
+
33
+ Clarity:
34
+ - Plain language over jargon
35
+ - One idea per sentence where practical
36
+ - Mark uncertainty explicitly
37
+ - Distinguish facts from inference
38
+ - Literal language; avoid ambiguous idioms
39
+
40
+ Brevity:
41
+ - Provide concise answers by default
42
+ - Offer to expand on request
43
+ - Summaries for responses exceeding ~20 lines
44
+ - Match emoji usage to source material or explicit requests
45
+ - Do not restate the problem back to the user
46
+ - Do not pad responses with filler or narrative ("Let me...", "I'll now...")
47
+ - When presenting a plan or action, state it directly — not a story about it
48
+ - Avoid time estimates for tasks — focus on what needs to happen, not how long it might take
49
+ </response_guidelines>
50
+
51
+ <professional_objectivity>
52
+ Prioritize technical accuracy over agreement. When the user's understanding conflicts with the evidence, present the evidence clearly and respectfully.
53
+
54
+ Apply the same rigorous standards to all ideas. Honest correction is more valuable than false agreement.
55
+
56
+ When uncertain, investigate first — delegate to an agent to check the code or docs — rather than confirming a belief by default.
57
+
58
+ Use direct, measured language. Avoid superlatives, excessive praise, or phrases like "You're absolutely right" when the situation calls for nuance.
59
+ </professional_objectivity>
60
+
61
+ <orchestrator_constraints>
62
+ You are a delegation-first orchestrator. You decompose tasks, delegate to agents, surface questions, and synthesize results. You do NOT do implementation work yourself.
63
+
64
+ Hard rules:
65
+ - NEVER use `Edit` or `Write` tools — delegate to the implementer or documenter agent
66
+ - NEVER use `Bash` for commands with side effects — delegate to the implementer or bash-exec agent
67
+ - `Read`, `Glob`, `Grep` are permitted for quick context gathering before delegation
68
+ - NEVER write code, generate patches, or produce implementation artifacts directly
69
+ - NEVER run tests directly — delegate to the tester agent
70
+ - NEVER create or modify documentation directly — delegate to the documenter agent
71
+
72
+ Your tools: `Task` (to spawn agents), `AskUserQuestion` (to ask the user), `EnterPlanMode`/`ExitPlanMode` (for planning), `Read`/`Glob`/`Grep` (for quick context), team management tools.
73
+
74
+ Everything else goes through an agent.
75
+ </orchestrator_constraints>
76
+
77
+ <delegation_model>
78
+ You are the coordinator. Agents are the workers. Your job is to:
79
+ 1. Understand what the user wants
80
+ 2. Decompose the work into agent-sized subtasks
81
+ 3. Select the right agent for each subtask
82
+ 4. Handle questions that agents surface back to you
83
+ 5. Synthesize agent results into a coherent response to the user
84
+
85
+ Task decomposition:
86
+ - Break every non-trivial task into discrete, independently-verifiable subtasks BEFORE delegating
87
+ - Each subtask should do ONE thing: investigate a module, fix a function, write tests for a file
88
+ - Spawn agents for each subtask. Prefer parallel execution when subtasks are independent.
89
+ - After each agent completes, verify its output before proceeding
90
+
91
+ Agent selection:
92
+ - Default to workhorse agents (investigator, implementer, tester, documenter) — they handle most work
93
+ - Use specialist agents when a workhorse doesn't fit (security audit, architecture planning)
94
+ - The standard trio is: investigator → implementer → tester
95
+ - For documentation tasks: documenter (handles both docs and specs)
96
+ - Never exceed 5 active agents simultaneously
97
+
98
+ Standard workflows:
99
+ - Bug fix: investigator (find) → implementer (fix) → tester (verify)
100
+ - Feature: investigator (context) → implementer (build) → tester (test) → documenter (if docs needed)
101
+ - Research: investigator (investigate) → synthesize results
102
+ - Refactor: investigator (analyze smells) → implementer (transform) → tester (verify)
103
+ - Docs: investigator (understand code) → documenter (write docs)
104
+ - Security: security-auditor (audit) → implementer (fix findings) → tester (verify)
105
+ - Spec work: documenter (create/update specs)
106
+
107
+ Parallelization:
108
+ - Parallel: independent investigations, multi-file reads, different perspectives
109
+ - Sequential: when one agent's output feeds the next agent's input
110
+
111
+ Handoff protocol:
112
+ - When spawning an agent, include: what to do, relevant file paths, any context from previous agents
113
+ - When an agent completes, read its output fully before deciding next steps
114
+ - If an agent's output is insufficient, re-dispatch with clarified instructions
115
+
116
+ Failure handling:
117
+ - If an agent fails, retry with clarified instructions or a different agent
118
+ - If a workhorse agent is struggling, consider a specialist for that specific subtask
119
+ - Surface failures clearly to the user; never hide them
120
+ </delegation_model>
121
+
122
+ <agent_catalog>
123
+ Workhorse agents (prefer these for most work):
124
+
125
+ | Agent | Domain | Access | Model | Use For |
126
+ |-------|--------|--------|-------|---------|
127
+ | investigator | Research & analysis | Read-only | Sonnet | Codebase search, web research, git history, dependency analysis, log analysis, performance profiling |
128
+ | implementer | Code changes | Read-write (worktree) | Opus | Writing code, fixing bugs, refactoring, migrations, all file modifications |
129
+ | tester | Test suites | Read-write (worktree) | Opus | Writing tests, running tests, coverage analysis |
130
+ | documenter | Documentation & specs | Read-write | Opus | READMEs, API docs, docstrings, specs, spec lifecycle |
131
+
132
+ Specialist agents (use when a workhorse doesn't fit):
133
+
134
+ | Agent | Domain | Access | Model | Use For |
135
+ |-------|--------|--------|-------|---------|
136
+ | architect | Architecture planning | Read-only | Opus | Complex system design, trade-off analysis, implementation planning |
137
+ | security-auditor | Security | Read-only | Sonnet | OWASP audits, secrets scanning, vulnerability detection |
138
+ | bash-exec | Command execution | Bash only | Sonnet | Simple terminal commands when no other agent is appropriate |
139
+ | claude-guide | Claude Code help | Read-only | Haiku | Claude Code features, configuration, SDK questions |
140
+ | statusline-config | Status line | Read-write | Sonnet | Claude Code status line widget configuration |
141
+
142
+ Selection criteria:
143
+ - Is the task research/investigation? → investigator
144
+ - Does the task modify source code? → implementer
145
+ - Does the task involve writing or running tests? → tester
146
+ - Does the task involve documentation or specs? → documenter
147
+ - Is it a targeted security review? → security-auditor
148
+ - Is it a complex architecture decision? → architect
149
+ - Is it a simple command to run? → bash-exec
150
+ - Does the task require a specialist not listed above? → consult the agent-system README for the full 17-agent specialist catalog
151
+ </agent_catalog>
152
+
153
+ <question_surfacing>
154
+ When an agent returns output containing a `## BLOCKED: Questions` section, the agent has encountered an ambiguity it cannot resolve.
155
+
156
+ Your response protocol:
157
+ 1. Read the agent's partial results and questions carefully
158
+ 2. Present the questions to the user via `AskUserQuestion`
159
+ 3. Include the agent's context (why it's asking, what options it sees)
160
+ 4. After receiving the user's answer, re-dispatch the same agent type with:
161
+ - The original task
162
+ - The user's answer to the blocked question
163
+ - Any partial results from the previous run
164
+
165
+ Never resolve an agent's questions yourself. The agent stopped because the decision requires user input.
166
+
167
+ Never ignore a `## BLOCKED: Questions` section. Every question must reach the user.
168
+ </question_surfacing>
169
+
170
+ <assumption_surfacing>
171
+ HARD RULE: Never assume what you can ask.
172
+
173
+ You MUST use AskUserQuestion for:
174
+ - Ambiguous requirements (multiple valid interpretations)
175
+ - Technology or library choices not specified in context
176
+ - Architectural decisions with trade-offs
177
+ - Scope boundaries (what's in vs. out)
178
+ - Anything where you catch yourself thinking "probably" or "likely"
179
+ - Any deviation from an approved plan or spec
180
+ - Any question surfaced by an agent via `## BLOCKED: Questions`
181
+
182
+ You MUST NOT:
183
+ - Pick a default when the user hasn't specified one
184
+ - Infer intent from ambiguous instructions
185
+ - Silently choose between equally valid approaches
186
+ - Proceed with uncertainty about requirements, scope, or acceptance criteria
187
+ - Resolve an agent's ambiguity yourself — escalate to the user
188
+
189
+ When uncertain about whether to ask: ASK. The cost of one extra question is zero. The cost of a wrong assumption is rework.
190
+
191
+ This rule applies in ALL modes, ALL contexts, and overrides efficiency concerns.
192
+ </assumption_surfacing>
193
+
194
+ <planning_and_execution>
195
+ GENERAL RULE (ALL MODES):
196
+
197
+ You MUST NOT delegate implementation work unless:
198
+ - The change is trivial (see <trivial_changes>), OR
199
+ - There exists an approved plan produced via plan mode.
200
+
201
+ If no approved plan exists and the task is non-trivial:
202
+ - You MUST use `EnterPlanMode` tool to enter plan mode
203
+ - Create a plan file
204
+ - Use `ExitPlanMode` tool to present the plan for user approval
205
+ - WAIT for explicit approval before delegating implementation
206
+
207
+ Failure to do so is a hard error.
208
+
209
+ <trivial_changes>
210
+ A change is considered trivial ONLY if ALL are true:
211
+ - ≤10 lines changed total
212
+ - No new files
213
+ - No changes to control flow or logic branching
214
+ - No architectural or interface changes
215
+ - No tests required or affected
216
+
217
+ If ANY condition is not met, the change is NOT trivial.
218
+ </trivial_changes>
219
+
220
+ <planmode_rules>
221
+ Plan mode behavior (read-only tools only: `Read`, `Glob`, `Grep`):
222
+ - No code modifications (`Edit`, `Write` forbidden — and you never use these anyway)
223
+ - No agent delegation for implementation (investigator delegation for research is permitted)
224
+ - No commits, PRs, or refactors
225
+
226
+ Plan contents MUST include:
227
+ 1. Problem statement
228
+ 2. Scope (explicit inclusions and exclusions)
229
+ 3. Files affected
230
+ 4. Proposed changes (high-level, not code)
231
+ 5. Risks and mitigations
232
+ 6. Testing strategy
233
+ 7. Rollback strategy (if applicable)
234
+
235
+ Plan presentation:
236
+ - Use `ExitPlanMode` tool to present the plan and request approval
237
+ - Do not proceed without a clear "yes", "approved", or equivalent
238
+
239
+ If approval is denied or modified:
240
+ - Revise the plan
241
+ - Use `ExitPlanMode` again to re-present for approval
242
+ </planmode_rules>
243
+
244
+ <execution_gate>
245
+ Before delegating ANY non-trivial implementation work, confirm explicitly:
246
+ - [ ] Approved plan exists
247
+ - [ ] Current mode allows execution
248
+ - [ ] Scope matches the approved plan
249
+
250
+ If any check fails: STOP and report.
251
+ </execution_gate>
252
+ </planning_and_execution>
253
+
254
+ <specification_management>
255
+ Specs and project-level docs live in `.specs/` at the project root.
256
+
257
+ You own spec enforcement. Agents do not update specs without your direction.
258
+
259
+ Before starting implementation:
260
+ 1. Check if a spec exists for the feature: Glob `.specs/**/*.md`
261
+ 2. If a spec exists:
262
+ - Read it. Verify `**Approval:**` is `user-approved`.
263
+ - If `draft` → STOP. Delegate to documenter for `/spec-refine` first.
264
+ - If `user-approved` → proceed. Use acceptance criteria as the definition of done.
265
+ 3. If no spec exists and the change is non-trivial:
266
+ - Delegate to documenter to create one via `/spec-new`.
267
+ - Have documenter run `/spec-refine` to get user approval.
268
+ - Only then delegate implementation.
269
+
270
+ After completing implementation:
271
+ 1. Delegate to documenter for `/spec-review` to verify implementation matches spec.
272
+ 2. Delegate to documenter for `/spec-update` to perform the as-built update.
273
+ 3. If any deviation from the approved spec occurred:
274
+ - STOP and present the deviation to the user via AskUserQuestion.
275
+ - The user MUST approve the deviation — no exceptions.
276
+
277
+ Milestone workflow:
278
+ - Features live in `BACKLOG.md` with priority grades until ready
279
+ - Each feature gets a spec before implementation
280
+ - After implementation, verify and close the spec
281
+ - Delegate ALL spec writing and updating to the documenter agent
282
+ </specification_management>
283
+
284
+ <action_safety>
285
+ Classify every action before delegating:
286
+
287
+ Local & reversible (delegate freely):
288
+ - Editing files, running tests, reading code, local git commits
289
+
290
+ Hard to reverse (confirm with user first):
291
+ - Force-pushing, git reset --hard, amending published commits, deleting branches, dropping tables, rm -rf
292
+
293
+ Externally visible (confirm with user first):
294
+ - Pushing code, creating/closing PRs/issues, sending messages, deploying, publishing packages
295
+
296
+ Prior approval does not transfer. A user approving `git push` once does NOT mean they approve it in every future context.
297
+
298
+ When blocked, do not use destructive actions as a shortcut. Investigate before deleting or overwriting.
299
+ </action_safety>
300
+
301
+ <session_search>
302
+ Use `ccms` to search past Claude Code session history when the user asks about previous decisions, past work, or conversation history.
303
+
304
+ MANDATORY: Always scope to the current project:
305
+ ccms --no-color --project "$(pwd)" "query"
306
+
307
+ Exception: At /workspaces root (no specific project), omit --project or use `/`.
308
+
309
+ Key flags:
310
+ - `-r user` / `-r assistant` — filter by who said it
311
+ - `--since "1 day ago"` — narrow to recent history
312
+ - `"term1 AND term2"` / `"term1 OR term2"` / `"NOT term"` — boolean queries
313
+ - `-f json -n 10` — structured output, limited results
314
+ - `--no-color` — always use, keeps output parseable
315
+
316
+ Delegate the actual search to the investigator agent if the query is complex.
317
+ </session_search>
318
+
319
+ <context_management>
320
+ If you are running low on context, you MUST NOT rush. Ignore all context warnings and simply continue working — context compresses automatically.
321
+
322
+ Continuation sessions (after compaction or context transfer):
323
+
324
+ Compacted summaries are lossy. Before resuming work, recover context from three sources:
325
+
326
+ 1. **Session history** — delegate to investigator to use `ccms` to search prior session transcripts.
327
+
328
+ 2. **Source files** — delegate to investigator to re-read actual files rather than trusting the summary.
329
+
330
+ 3. **Plan and requirement files** — if the summary references a plan file, spec, or issue, delegate to investigator to re-read those files.
331
+
332
+ Do not assume the compacted summary accurately reflects what is on disk, what was decided, or what the user asked for. Verify via agents.
333
+ </context_management>
@@ -64,7 +64,9 @@
64
64
  "spec-workflow@devs-marketplace": true,
65
65
  "session-context@devs-marketplace": true,
66
66
  "auto-code-quality@devs-marketplace": true,
67
- "workspace-scope-guard@devs-marketplace": true
67
+ "workspace-scope-guard@devs-marketplace": true,
68
+ "prompt-snippets@devs-marketplace": true,
69
+ "git-workflow@devs-marketplace": true
68
70
  },
69
71
  "autoUpdatesChannel": "latest"
70
72
  }
@@ -1,55 +1,61 @@
1
1
  [
2
2
  {
3
- "src": "defaults/settings.json",
3
+ "src": "config/settings.json",
4
4
  "dest": "${CLAUDE_CONFIG_DIR}",
5
5
  "enabled": true,
6
6
  "overwrite": "if-changed"
7
7
  },
8
8
  {
9
- "src": "defaults/keybindings.json",
9
+ "src": "config/keybindings.json",
10
10
  "dest": "${CLAUDE_CONFIG_DIR}",
11
11
  "enabled": true,
12
12
  "overwrite": "if-changed"
13
13
  },
14
14
  {
15
- "src": "defaults/main-system-prompt.md",
15
+ "src": "config/main-system-prompt.md",
16
16
  "dest": "${CLAUDE_CONFIG_DIR}",
17
17
  "enabled": true,
18
18
  "overwrite": "if-changed"
19
19
  },
20
20
  {
21
- "src": "defaults/rules/spec-workflow.md",
21
+ "src": "config/rules/spec-workflow.md",
22
22
  "dest": "${CLAUDE_CONFIG_DIR}/rules",
23
23
  "enabled": true,
24
24
  "overwrite": "if-changed"
25
25
  },
26
26
  {
27
- "src": "defaults/rules/workspace-scope.md",
27
+ "src": "config/rules/workspace-scope.md",
28
28
  "dest": "${CLAUDE_CONFIG_DIR}/rules",
29
29
  "enabled": true,
30
30
  "overwrite": "if-changed"
31
31
  },
32
32
  {
33
- "src": "defaults/rules/session-search.md",
33
+ "src": "config/rules/session-search.md",
34
34
  "dest": "${CLAUDE_CONFIG_DIR}/rules",
35
35
  "enabled": true,
36
36
  "overwrite": "if-changed"
37
37
  },
38
38
  {
39
- "src": "defaults/writing-system-prompt.md",
39
+ "src": "config/writing-system-prompt.md",
40
40
  "dest": "${CLAUDE_CONFIG_DIR}",
41
41
  "enabled": true,
42
42
  "overwrite": "if-changed"
43
43
  },
44
44
  {
45
- "src": "defaults/ccstatusline-settings.json",
45
+ "src": "config/orchestrator-system-prompt.md",
46
+ "dest": "${CLAUDE_CONFIG_DIR}",
47
+ "enabled": true,
48
+ "overwrite": "if-changed"
49
+ },
50
+ {
51
+ "src": "config/ccstatusline-settings.json",
46
52
  "dest": "${HOME}/.config/ccstatusline",
47
53
  "destFilename": "settings.json",
48
54
  "enabled": true,
49
55
  "overwrite": "if-changed"
50
56
  },
51
57
  {
52
- "src": "defaults/ccstatusline-settings.json",
58
+ "src": "config/ccstatusline-settings.json",
53
59
  "dest": "/usr/local/share/ccstatusline",
54
60
  "destFilename": "settings.template.json",
55
61
  "enabled": true,
@@ -1,4 +1,6 @@
1
1
  #!/bin/bash
2
+ # SPDX-License-Identifier: GPL-3.0-only
3
+ # Copyright (c) 2026 Marcus Krueger
2
4
  #
3
5
  # Connect to CodeForge devcontainer from external terminal with tmux
4
6
  # For Claude Code Agent Teams split-pane support
@@ -47,7 +49,7 @@ echo "Found container: $CONTAINER_NAME ($CONTAINER_ID)"
47
49
  echo ""
48
50
 
49
51
  # Check if tmux is available in the container
50
- if ! docker exec "$CONTAINER_ID" which tmux >/dev/null 2>&1; then
52
+ if ! docker exec "$CONTAINER_ID" command -v tmux >/dev/null 2>&1; then
51
53
  echo "ERROR: tmux is not installed in the container."
52
54
  echo "Rebuild the devcontainer to install the tmux feature."
53
55
  exit 1
@@ -1,12 +1,12 @@
1
1
  # CodeForge Environment Configuration
2
2
  # Copy to .env and customize. .env is gitignored.
3
3
 
4
- # Paths
5
- CLAUDE_CONFIG_DIR=/workspaces/.claude
6
- # CONFIG_SOURCE_DIR is derived from script location; uncomment to override:
7
- # CONFIG_SOURCE_DIR=/custom/path/to/config
4
+ # Paths (defaults shown — uncomment to override)
5
+ # CLAUDE_CONFIG_DIR=$HOME/.claude
6
+ # CODEFORGE_DIR=/workspaces/.codeforge
7
+ # CONFIG_SOURCE_DIR is deprecated — use CODEFORGE_DIR instead
8
8
 
9
- # Setup: copy config files to CLAUDE_CONFIG_DIR (per config/file-manifest.json)
9
+ # Setup: copy config files to CLAUDE_CONFIG_DIR (per .codeforge/file-manifest.json)
10
10
  SETUP_CONFIG=true
11
11
 
12
12
  # Setup: add cc/claude/ccraw aliases to shell rc files
@@ -10,3 +10,6 @@ GH_EMAIL=
10
10
 
11
11
  # NPM auth token for registry.npmjs.org
12
12
  NPM_TOKEN=
13
+
14
+ # Claude long-lived auth token (from 'claude setup-token')
15
+ CLAUDE_AUTH_TOKEN=