coder-config 0.41.29 → 0.41.31
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 +1 -1
- package/lib/workstreams.js +46 -0
- package/package.json +1 -1
- package/ui/dist/assets/{index-BFGwXUTF.js → index-Hb0G88jh.js} +149 -149
- package/ui/dist/index.html +1 -1
- package/ui/routes/workstreams.js +13 -3
- package/ui/server.cjs +4 -1
package/lib/constants.js
CHANGED
package/lib/workstreams.js
CHANGED
|
@@ -628,6 +628,51 @@ function workstreamCheckPath(installDir, targetPath, silent = false) {
|
|
|
628
628
|
return isWithin;
|
|
629
629
|
}
|
|
630
630
|
|
|
631
|
+
/**
|
|
632
|
+
* Generate rules/context from project repositories using Claude Code
|
|
633
|
+
* Runs `claude -p` to analyze repos and generate smart context
|
|
634
|
+
*/
|
|
635
|
+
async function generateRulesWithClaude(projects) {
|
|
636
|
+
if (!projects || projects.length === 0) {
|
|
637
|
+
return '';
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
const { execFileSync } = require('child_process');
|
|
641
|
+
|
|
642
|
+
const projectPaths = projects.map(p =>
|
|
643
|
+
path.resolve(p.replace(/^~/, process.env.HOME || ''))
|
|
644
|
+
);
|
|
645
|
+
|
|
646
|
+
const projectList = projectPaths.map(p => `- ${p}`).join('\n');
|
|
647
|
+
|
|
648
|
+
const prompt = `Analyze these project repositories and generate concise workstream context rules for an AI coding assistant. Focus on:
|
|
649
|
+
1. What each project does (brief description)
|
|
650
|
+
2. Key technologies and frameworks used
|
|
651
|
+
3. How the projects relate to each other (if multiple)
|
|
652
|
+
4. Any important conventions or patterns to follow
|
|
653
|
+
|
|
654
|
+
Projects:
|
|
655
|
+
${projectList}
|
|
656
|
+
|
|
657
|
+
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.`;
|
|
658
|
+
|
|
659
|
+
try {
|
|
660
|
+
// Run claude -p with the prompt using execFileSync (safer than exec)
|
|
661
|
+
const result = execFileSync('claude', ['-p', prompt], {
|
|
662
|
+
cwd: projectPaths[0],
|
|
663
|
+
encoding: 'utf8',
|
|
664
|
+
timeout: 60000, // 60 second timeout
|
|
665
|
+
maxBuffer: 1024 * 1024, // 1MB buffer
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
return result.trim();
|
|
669
|
+
} catch (error) {
|
|
670
|
+
console.error('Claude generation failed:', error.message);
|
|
671
|
+
// Fall back to simple generation
|
|
672
|
+
return generateRulesFromRepos(projects);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
631
676
|
/**
|
|
632
677
|
* Generate rules/context from project repositories
|
|
633
678
|
* Reads README.md, package.json, CLAUDE.md, etc. to create a summary
|
|
@@ -853,4 +898,5 @@ module.exports = {
|
|
|
853
898
|
workstreamDeactivate,
|
|
854
899
|
workstreamCheckPath,
|
|
855
900
|
generateRulesFromRepos,
|
|
901
|
+
generateRulesWithClaude,
|
|
856
902
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coder-config",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.31",
|
|
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",
|