coder-config 0.48.1-beta → 0.48.2-beta

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.
package/lib/constants.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Constants and tool path configurations
3
3
  */
4
4
 
5
- const VERSION = '0.48.1-beta';
5
+ const VERSION = '0.48.2-beta';
6
6
 
7
7
  // Tool-specific path configurations
8
8
  const TOOL_PATHS = {
@@ -1015,22 +1015,32 @@ ${projectContents.join('\n\n---\n\n')}
1015
1015
  Output markdown suitable for injecting into an AI assistant's context. Keep it concise (under 500 words). Do not include code blocks or examples - just descriptions and guidelines.`;
1016
1016
 
1017
1017
  try {
1018
- const binaryPath = findAIBinary(toolId);
1019
- const args = tool.buildArgs(prompt, options);
1020
-
1021
1018
  console.log(`Generating context with ${tool.name}...`);
1022
1019
 
1020
+ if (toolId === 'claude') {
1021
+ const { query } = require('@anthropic-ai/claude-agent-sdk');
1022
+ let result = '';
1023
+ for await (const msg of query({
1024
+ prompt,
1025
+ options: { cwd: allProjects[0], maxTurns: 1 }
1026
+ })) {
1027
+ if (msg.type === 'result' && msg.subtype === 'success') result = msg.result;
1028
+ }
1029
+ return result.trim();
1030
+ }
1031
+
1032
+ const { execFileSync } = require('child_process');
1033
+ const binaryPath = findAIBinary(toolId);
1034
+ const args = tool.buildArgs(prompt, options);
1023
1035
  const result = execFileSync(binaryPath, args, {
1024
1036
  cwd: allProjects[0],
1025
1037
  encoding: 'utf8',
1026
- timeout: 120000, // 2 minute timeout (some models are slower)
1027
- maxBuffer: 1024 * 1024 * 5, // 5MB buffer for larger prompts
1038
+ timeout: 120000,
1039
+ maxBuffer: 1024 * 1024 * 5,
1028
1040
  });
1029
-
1030
1041
  return result.trim();
1031
1042
  } catch (error) {
1032
1043
  console.error(`${tool.name} generation failed:`, error.message);
1033
- // Fall back to simple generation
1034
1044
  return generateRulesFromRepos(projects);
1035
1045
  }
1036
1046
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coder-config",
3
- "version": "0.48.1-beta",
3
+ "version": "0.48.2-beta",
4
4
  "description": "Configuration manager for AI coding tools - Claude Code, Gemini CLI, Codex CLI, Antigravity. Manage MCPs, rules, permissions, memory, and workstreams.",
5
5
  "author": "regression.io",
6
6
  "main": "config-loader.js",
@@ -42,6 +42,7 @@
42
42
  ],
43
43
  "license": "MIT",
44
44
  "dependencies": {
45
+ "@anthropic-ai/claude-agent-sdk": "^0.2.47",
45
46
  "@iarna/toml": "^3.0.0",
46
47
  "chalk": "^4.1.2",
47
48
  "js-yaml": "^4.1.1",
@@ -71,6 +72,7 @@
71
72
  "shared/**",
72
73
  "scripts/**",
73
74
  "hooks/**",
75
+ "skills/**",
74
76
  "shell/**",
75
77
  "README.md"
76
78
  ],
@@ -0,0 +1,38 @@
1
+ # Ralph Loop — Autonomous Development Skill
2
+
3
+ You are operating inside a **Ralph Loop** — an autonomous, iterative development workflow managed by coder-config.
4
+
5
+ ## Your Context
6
+
7
+ The `<ralph-loop-context>` block injected into your session contains:
8
+ - **Phase**: clarify | plan | execute
9
+ - **Task**: what you are building
10
+ - **Iteration**: current / max
11
+ - **Clarifications** and **Implementation Plan** (when available)
12
+ - **State file path**: where to write progress
13
+
14
+ ## Phase Behaviour
15
+
16
+ ### clarify
17
+ - Ask focused questions to fully understand requirements
18
+ - Write Q&A to the clarifications file noted in your context
19
+ - When requirements are clear, advance phase to `plan` by updating state.json
20
+
21
+ ### plan
22
+ - Review clarified requirements
23
+ - Write a detailed, step-by-step implementation plan to plan.md
24
+ - Break work into small, verifiable steps
25
+ - Do NOT start implementing — wait for approval (phase will be set to `execute` externally)
26
+
27
+ ### execute
28
+ - Follow the plan step by step
29
+ - After each change: run tests, lint, build — verify before moving on
30
+ - When ALL acceptance criteria are met and verified, output the exact completion promise string from your context (default: `DONE`)
31
+
32
+ ## Loop Continuation
33
+
34
+ The loop continues automatically after each of your responses until:
35
+ 1. You output the completion promise string, OR
36
+ 2. The iteration limit is reached
37
+
38
+ Do not add caveats like "let me know if you need changes" — just execute and verify.