wormclaude 1.0.11 → 1.0.13
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/dist/cli.js +12 -1
- package/dist/extensions.js +137 -0
- package/dist/skills.js +17 -9
- package/dist/theme.js +1 -1
- package/dist/tools.js +21 -10
- package/extensions/code-review/README.md +22 -0
- package/extensions/code-review/commands/review/best-practices.toml +15 -0
- package/extensions/code-review/commands/review/performance.toml +14 -0
- package/extensions/code-review/commands/review/security.toml +16 -0
- package/extensions/code-review/wormclaude-extension.json +6 -0
- package/extensions/conductor/README.md +250 -0
- package/extensions/conductor/commands/conductor/implement.toml +15 -0
- package/extensions/conductor/commands/conductor/newTrack.toml +16 -0
- package/extensions/conductor/commands/conductor/revert.toml +14 -0
- package/extensions/conductor/commands/conductor/setup.toml +16 -0
- package/extensions/conductor/commands/conductor/status.toml +15 -0
- package/extensions/conductor/templates/.wormclaudeignore +37 -0
- package/extensions/conductor/templates/code_styleguides/go.md +48 -0
- package/extensions/conductor/templates/code_styleguides/html-css.md +49 -0
- package/extensions/conductor/templates/code_styleguides/javascript.md +51 -0
- package/extensions/conductor/templates/code_styleguides/python.md +37 -0
- package/extensions/conductor/templates/code_styleguides/typescript.md +43 -0
- package/extensions/conductor/templates/general.md +23 -0
- package/extensions/conductor/templates/plan.md +18 -0
- package/extensions/conductor/templates/product-guidelines.md +25 -0
- package/extensions/conductor/templates/product.md +21 -0
- package/extensions/conductor/templates/tech-stack.md +25 -0
- package/extensions/conductor/templates/workflow.md +138 -0
- package/extensions/conductor/wormclaude-extension.json +6 -0
- package/extensions/git-helper/README.md +16 -0
- package/extensions/git-helper/commands/git/branch-cleanup.toml +13 -0
- package/extensions/git-helper/commands/git/smart-commit.toml +13 -0
- package/extensions/git-helper/wormclaude-extension.json +6 -0
- package/extensions/greet/README.md +76 -0
- package/extensions/greet/commands/greet.toml +4 -0
- package/extensions/greet/wormclaude-extension.json +6 -0
- package/extensions/registry.json +52 -0
- package/extensions/test-generator/README.md +22 -0
- package/extensions/test-generator/commands/test/coverage.toml +12 -0
- package/extensions/test-generator/commands/test/integration.toml +13 -0
- package/extensions/test-generator/commands/test/unit.toml +13 -0
- package/extensions/test-generator/wormclaude-extension.json +6 -0
- package/package.json +3 -2
- package/skills/security-audit/{prompt.md → SKILL.md} +8 -0
- package/skills/security-audit/skill.json +0 -8
package/dist/cli.js
CHANGED
|
@@ -12,6 +12,7 @@ import { t, cmdDesc, setLang, saveLang, loadLang, getLang } from './i18n.js';
|
|
|
12
12
|
import { linkify } from './links.js';
|
|
13
13
|
import { recordLearned } from './learn.js';
|
|
14
14
|
import { loadSkills, getSkills, getSkill, buildSkillPrompt } from './skills.js';
|
|
15
|
+
import { loadExtensions, getExtCommands, getExtCommand, buildExtCommandPrompt } from './extensions.js';
|
|
15
16
|
import { COMMANDS, runSlashCommand } from './commands.js';
|
|
16
17
|
import { tasks } from './tasks.js';
|
|
17
18
|
import { connectMcpServers } from './mcp.js';
|
|
@@ -61,6 +62,7 @@ setToolConfig(config); // Agent/alt-agent araçları aynı config'i kullanır
|
|
|
61
62
|
const MAX_TURNS = Number(process.env.WORMCLAUDE_MAX_TURNS) || 50; // tur limiti
|
|
62
63
|
setLang(loadLang() ?? 'tr'); // kayıtlı dili yükle (yoksa tr)
|
|
63
64
|
loadSkills(); // .wormclaude/skills/*.md yükle
|
|
65
|
+
loadExtensions(); // extensions/<ad>/ (gömülü + kullanıcı + proje) yükle
|
|
64
66
|
// Kalıcı hafıza: açılışta .wormclaude/memory.md + WORMCLAUDE.md'yi context'e yükle
|
|
65
67
|
const _memCtx = loadMemoryContext();
|
|
66
68
|
const _envContext = () => {
|
|
@@ -411,10 +413,11 @@ function App() {
|
|
|
411
413
|
abortRef.current?.abort();
|
|
412
414
|
}
|
|
413
415
|
});
|
|
414
|
-
// Slash menüsü filtresi (yerleşik komutlar + skill'ler)
|
|
416
|
+
// Slash menüsü filtresi (yerleşik komutlar + skill'ler + extension komutları)
|
|
415
417
|
const allCommands = () => [
|
|
416
418
|
...COMMANDS,
|
|
417
419
|
...getSkills().map((s) => ({ name: '/' + s.name, desc: s.description })),
|
|
420
|
+
...getExtCommands().map((c) => ({ name: '/' + c.name, desc: c.description })),
|
|
418
421
|
];
|
|
419
422
|
const cmdFilter = (inp) => {
|
|
420
423
|
const tok = inp.split(' ')[0];
|
|
@@ -724,6 +727,14 @@ function App() {
|
|
|
724
727
|
}
|
|
725
728
|
return;
|
|
726
729
|
}
|
|
730
|
+
// Extension komutu mu? (/ns:cmd veya /cmd — yerleşik komut/skill değilse)
|
|
731
|
+
const extCmd = (!builtin && !skill) ? getExtCommand(tok.slice(1)) : undefined;
|
|
732
|
+
if (extCmd) {
|
|
733
|
+
const extArgs = v.slice(tok.length).trim();
|
|
734
|
+
const prompt = buildExtCommandPrompt(extCmd, extArgs);
|
|
735
|
+
runAgent(prompt, `/${extCmd.name}${extArgs ? ' ' + extArgs : ''}`);
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
727
738
|
const ctx = {
|
|
728
739
|
config,
|
|
729
740
|
getHistory: () => historyRef.current,
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// Extension sistemi — wormclaude-extension.json (manifest) + commands/**/*.toml + context dosyası.
|
|
2
|
+
// Namespaced slash komutları (/conductor:setup, /git:smart-commit) + excludeTools desteği.
|
|
3
|
+
//
|
|
4
|
+
// extensions/<ad>/
|
|
5
|
+
// wormclaude-extension.json { name, version, contextFileName?, excludeTools? }
|
|
6
|
+
// commands/<ns>/<cmd>.toml → /<ns>:<cmd> (description = "...", prompt = """...""")
|
|
7
|
+
// commands/<cmd>.toml → /<cmd> (namespace yoksa)
|
|
8
|
+
// <contextFileName> (opsiyonel; aktifken context'e yüklenebilir)
|
|
9
|
+
// templates/ ... (opsiyonel; komutlar Read ile kullanır)
|
|
10
|
+
import * as fs from 'node:fs';
|
|
11
|
+
import * as os from 'node:os';
|
|
12
|
+
import * as path from 'node:path';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
14
|
+
let EXTENSIONS = [];
|
|
15
|
+
// Pakete gömülü extensions (npm ile gelir) + kullanıcı + proje dizinleri.
|
|
16
|
+
const BUNDLED_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'extensions');
|
|
17
|
+
const USER_DIR = path.join(os.homedir(), '.wormclaude', 'extensions');
|
|
18
|
+
const PROJECT_DIR = path.join(process.cwd(), '.wormclaude', 'extensions');
|
|
19
|
+
// Minimal TOML: yalnızca `description = "..."` ve `prompt = """..."""` (veya tek satır) okur.
|
|
20
|
+
function parseToml(raw) {
|
|
21
|
+
let description = '';
|
|
22
|
+
let prompt = '';
|
|
23
|
+
const dm = raw.match(/^\s*description\s*=\s*(?:"([^"]*)"|'([^']*)')/m);
|
|
24
|
+
if (dm)
|
|
25
|
+
description = (dm[1] ?? dm[2] ?? '').trim();
|
|
26
|
+
const pMulti = raw.match(/prompt\s*=\s*"""([\s\S]*?)"""/);
|
|
27
|
+
if (pMulti) {
|
|
28
|
+
prompt = pMulti[1].replace(/^\r?\n/, '').replace(/\s+$/, '');
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const pSingle = raw.match(/^\s*prompt\s*=\s*"([\s\S]*?)"\s*$/m);
|
|
32
|
+
if (pSingle)
|
|
33
|
+
prompt = pSingle[1];
|
|
34
|
+
}
|
|
35
|
+
return { description, prompt };
|
|
36
|
+
}
|
|
37
|
+
function walkCommands(commandsDir, extName, extDir, ns, out) {
|
|
38
|
+
let entries = [];
|
|
39
|
+
try {
|
|
40
|
+
entries = fs.readdirSync(commandsDir, { withFileTypes: true });
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
for (const e of entries) {
|
|
46
|
+
const full = path.join(commandsDir, e.name);
|
|
47
|
+
if (e.isDirectory()) {
|
|
48
|
+
walkCommands(full, extName, extDir, ns ? `${ns}:${e.name}` : e.name, out);
|
|
49
|
+
}
|
|
50
|
+
else if (e.name.endsWith('.toml')) {
|
|
51
|
+
let raw = '';
|
|
52
|
+
try {
|
|
53
|
+
raw = fs.readFileSync(full, 'utf8');
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const { description, prompt } = parseToml(raw);
|
|
59
|
+
if (!prompt)
|
|
60
|
+
continue;
|
|
61
|
+
const base = e.name.replace(/\.toml$/, '');
|
|
62
|
+
const name = ns ? `${ns}:${base}` : base;
|
|
63
|
+
out.push({ name, description: description || name, prompt, ext: extName, dir: extDir });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function scanExtDir(dir) {
|
|
68
|
+
let entries = [];
|
|
69
|
+
try {
|
|
70
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
for (const e of entries) {
|
|
76
|
+
if (!e.isDirectory())
|
|
77
|
+
continue;
|
|
78
|
+
const extDir = path.join(dir, e.name);
|
|
79
|
+
let manifest = {};
|
|
80
|
+
try {
|
|
81
|
+
manifest = JSON.parse(fs.readFileSync(path.join(extDir, 'wormclaude-extension.json'), 'utf8'));
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
const name = String(manifest.name || e.name).trim();
|
|
87
|
+
const commands = [];
|
|
88
|
+
walkCommands(path.join(extDir, 'commands'), name, extDir, '', commands);
|
|
89
|
+
const ctxName = manifest.contextFileName;
|
|
90
|
+
let contextFile;
|
|
91
|
+
if (ctxName && fs.existsSync(path.join(extDir, ctxName)))
|
|
92
|
+
contextFile = path.join(extDir, ctxName);
|
|
93
|
+
const ext = {
|
|
94
|
+
name,
|
|
95
|
+
version: String(manifest.version || '0.0.0'),
|
|
96
|
+
dir: extDir,
|
|
97
|
+
contextFile,
|
|
98
|
+
excludeTools: Array.isArray(manifest.excludeTools) ? manifest.excludeTools.map(String) : [],
|
|
99
|
+
commands,
|
|
100
|
+
};
|
|
101
|
+
// Proje > kullanıcı > gömülü: aynı ada sahip extension override edilir.
|
|
102
|
+
const i = EXTENSIONS.findIndex((x) => x.name === name);
|
|
103
|
+
if (i >= 0)
|
|
104
|
+
EXTENSIONS[i] = ext;
|
|
105
|
+
else
|
|
106
|
+
EXTENSIONS.push(ext);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export function loadExtensions() {
|
|
110
|
+
EXTENSIONS = [];
|
|
111
|
+
scanExtDir(BUNDLED_DIR); // gömülü
|
|
112
|
+
scanExtDir(USER_DIR); // kullanıcı geneli
|
|
113
|
+
scanExtDir(PROJECT_DIR); // proje (en yüksek öncelik)
|
|
114
|
+
return EXTENSIONS;
|
|
115
|
+
}
|
|
116
|
+
export function getExtensions() { return EXTENSIONS; }
|
|
117
|
+
export function getExtCommands() { return EXTENSIONS.flatMap((x) => x.commands); }
|
|
118
|
+
export function getExtCommand(name) {
|
|
119
|
+
return getExtCommands().find((c) => c.name === name);
|
|
120
|
+
}
|
|
121
|
+
export function getExcludedTools() {
|
|
122
|
+
return [...new Set(EXTENSIONS.flatMap((x) => x.excludeTools))];
|
|
123
|
+
}
|
|
124
|
+
// Komut prompt'unu kök dizin referansı + kullanıcı argümanı ile birleştirir.
|
|
125
|
+
// {{args}} placeholder'ı varsa onunla değişir; yoksa argüman sona eklenir.
|
|
126
|
+
export function buildExtCommandPrompt(cmd, args) {
|
|
127
|
+
let p = cmd.prompt;
|
|
128
|
+
if (p.includes('{{args}}')) {
|
|
129
|
+
p = p.replace(/\{\{args\}\}/g, args || '');
|
|
130
|
+
}
|
|
131
|
+
else if (args && args.trim()) {
|
|
132
|
+
p += `\n\n## User input\n\n${args.trim()}`;
|
|
133
|
+
}
|
|
134
|
+
return (`Extension base directory: ${cmd.dir}\n` +
|
|
135
|
+
`(You may Read files here — templates/, context, assets — as needed to complete this command.)\n\n` +
|
|
136
|
+
p);
|
|
137
|
+
}
|
package/dist/skills.js
CHANGED
|
@@ -66,23 +66,31 @@ function scanSkillDir(dir) {
|
|
|
66
66
|
for (const e of entries) {
|
|
67
67
|
const full = path.join(dir, e.name);
|
|
68
68
|
if (e.isDirectory()) {
|
|
69
|
-
// Klasör skill'i:
|
|
69
|
+
// Klasör skill'i: SKILL.md (frontmatter + gövde) tercih edilir.
|
|
70
|
+
// skill.json yalnızca geriye-uyumluluk için fallback meta sağlar.
|
|
71
|
+
const raw = readFirst(full, ['SKILL.md', 'skill.md', 'prompt.md']);
|
|
70
72
|
let manifest = {};
|
|
71
73
|
try {
|
|
72
74
|
manifest = JSON.parse(fs.readFileSync(path.join(full, 'skill.json'), 'utf8'));
|
|
73
75
|
}
|
|
74
76
|
catch { }
|
|
75
|
-
const body =
|
|
76
|
-
|
|
77
|
+
const { fm, body } = parseFrontmatter(raw);
|
|
78
|
+
const rawName = fm.name || manifest.name || e.name;
|
|
79
|
+
if (!body.trim() && !rawName)
|
|
77
80
|
continue; // skill değil
|
|
78
|
-
const name = (
|
|
81
|
+
const name = String(rawName).trim().replace(/[^a-zA-Z0-9_-]/g, '-');
|
|
82
|
+
const ctx = (fm.context || manifest.context) === 'fork' ? 'fork' : 'inline';
|
|
83
|
+
const autoInvoke = fm.autoInvoke !== undefined ? fm.autoInvoke === 'true' : !!manifest.autoInvoke;
|
|
84
|
+
const tools = fm.tools
|
|
85
|
+
? fm.tools.split(',').map((s) => s.trim())
|
|
86
|
+
: Array.isArray(manifest.tools) ? manifest.tools : undefined;
|
|
79
87
|
pushSkill({
|
|
80
88
|
name,
|
|
81
|
-
description: manifest.description || body.split('\n').find((l) => l.trim())?.slice(0, 80) || name,
|
|
82
|
-
whenToUse: manifest.whenToUse,
|
|
83
|
-
context:
|
|
84
|
-
autoInvoke
|
|
85
|
-
tools
|
|
89
|
+
description: fm.description || manifest.description || body.split('\n').find((l) => l.trim())?.slice(0, 80) || name,
|
|
90
|
+
whenToUse: fm.whenToUse || manifest.whenToUse,
|
|
91
|
+
context: ctx,
|
|
92
|
+
autoInvoke,
|
|
93
|
+
tools,
|
|
86
94
|
body: body.trim(),
|
|
87
95
|
dir: full,
|
|
88
96
|
});
|
package/dist/theme.js
CHANGED
package/dist/tools.js
CHANGED
|
@@ -10,7 +10,8 @@ import { loadConfig } from './api.js';
|
|
|
10
10
|
import { runAgentLoop } from './agent.js';
|
|
11
11
|
import { tasks } from './tasks.js';
|
|
12
12
|
import { getMcpToolSchemas, callMcpTool } from './mcp.js';
|
|
13
|
-
import {
|
|
13
|
+
import { getSkills, getSkill, buildSkillPrompt } from './skills.js';
|
|
14
|
+
import { getExcludedTools } from './extensions.js';
|
|
14
15
|
import * as computer from './computer.js';
|
|
15
16
|
// Agent/alt-agent araçlarının backend'e ulaşması için config. cli.tsx başlangıçta
|
|
16
17
|
// setToolConfig ile aynı (mutable) config nesnesini verir → /config değişiklikleri görülür.
|
|
@@ -480,23 +481,26 @@ export const toolSchemas = [
|
|
|
480
481
|
},
|
|
481
482
|
},
|
|
482
483
|
];
|
|
483
|
-
//
|
|
484
|
+
// TÜM skill'leri model'e tek bir 'Skill' aracı olarak sunar (Claude Code tarzı).
|
|
485
|
+
// Mevcut skiller araç açıklamasına enjekte edilir; model gerektiğinde kendisi çağırır.
|
|
484
486
|
function skillToolSchema() {
|
|
485
|
-
const
|
|
486
|
-
if (!
|
|
487
|
+
const all = getSkills();
|
|
488
|
+
if (!all.length)
|
|
487
489
|
return null;
|
|
488
|
-
const list =
|
|
490
|
+
const list = all.map((s) => `- ${s.name}: ${s.description}${s.whenToUse ? ` (when: ${s.whenToUse})` : ''}`).join('\n');
|
|
489
491
|
return {
|
|
490
492
|
type: 'function',
|
|
491
493
|
function: {
|
|
492
494
|
name: 'Skill',
|
|
493
|
-
description: '
|
|
494
|
-
'
|
|
495
|
+
description: 'Load a specialized skill (expert instructions + resources) when the user task matches one of the available skills below. ' +
|
|
496
|
+
'When a skill is relevant, call this IMMEDIATELY as your first action — do not just mention it in text. ' +
|
|
497
|
+
'Inline skills load their guidance straight into this conversation; fork skills run as a focused sub-agent and return a result. ' +
|
|
498
|
+
'Only use skills from this list:\n' + list,
|
|
495
499
|
parameters: {
|
|
496
500
|
type: 'object',
|
|
497
501
|
properties: {
|
|
498
|
-
name: { type: 'string', enum:
|
|
499
|
-
args: { type: 'string', description: 'Optional context/arguments for the skill' },
|
|
502
|
+
name: { type: 'string', enum: all.map((s) => s.name), description: 'The skill to load, from the available list' },
|
|
503
|
+
args: { type: 'string', description: 'Optional extra context/arguments for the skill' },
|
|
500
504
|
},
|
|
501
505
|
required: ['name'],
|
|
502
506
|
},
|
|
@@ -513,7 +517,9 @@ const computerToolSchemas = [
|
|
|
513
517
|
];
|
|
514
518
|
export function allToolSchemas() {
|
|
515
519
|
const sk = skillToolSchema();
|
|
516
|
-
|
|
520
|
+
const all = [...toolSchemas, ...computerToolSchemas, ...getMcpToolSchemas(), ...(sk ? [sk] : [])];
|
|
521
|
+
const excluded = new Set(getExcludedTools());
|
|
522
|
+
return excluded.size ? all.filter((t) => !excluded.has(t.function.name)) : all;
|
|
517
523
|
}
|
|
518
524
|
const TOOL_META = {
|
|
519
525
|
Read: { readOnly: true, concurrencySafe: true },
|
|
@@ -1159,6 +1165,11 @@ export async function executeTool(name, args) {
|
|
|
1159
1165
|
if (!sk)
|
|
1160
1166
|
return { ok: false, output: `Unknown skill: ${args.name}` };
|
|
1161
1167
|
const prompt = buildSkillPrompt(sk, String(args.args || ''));
|
|
1168
|
+
// inline skill (varsayılan): rehberi doğrudan ana konuşmaya yükle (Claude Code tarzı)
|
|
1169
|
+
if (sk.context !== 'fork') {
|
|
1170
|
+
return { ok: true, output: prompt };
|
|
1171
|
+
}
|
|
1172
|
+
// fork skill: odaklı alt-agent olarak çalıştır, yalnızca sonucu döndür
|
|
1162
1173
|
let tools = subAgentTools();
|
|
1163
1174
|
if (sk.tools && sk.tools.length)
|
|
1164
1175
|
tools = tools.filter((t) => sk.tools.includes(t.function.name));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Code Review Extension
|
|
2
|
+
|
|
3
|
+
Automated code review assistant. Each command reviews the current uncommitted diff by default, or a path you name.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
- `/review:security` - Security-focused review (injection, XSS, access control, secrets, SSRF, deps…)
|
|
8
|
+
- `/review:performance` - Performance review (complexity, N+1 queries, I/O, memory, re-renders…)
|
|
9
|
+
- `/review:best-practices` - Code quality review (readability, structure, error handling, tests, docs)
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
wormclaude extensions install --from-registry code-review
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or use `/browse-extensions` in the CLI and select this extension.
|
|
18
|
+
|
|
19
|
+
## Notes
|
|
20
|
+
|
|
21
|
+
- Reviews are read-only by default — they report findings with `file:line` evidence and concrete fixes; they don't change code unless you ask.
|
|
22
|
+
- If the project has `code_styleguides/`, `/review:best-practices` holds the code to those guides.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
description = "Review the current changes or a path for code quality and best practices"
|
|
2
|
+
prompt = """
|
|
3
|
+
Review for code quality and adherence to best practices. Default scope: the uncommitted diff (`git diff HEAD`); otherwise the path the user names. If `code_styleguides/` exists, hold the code to it.
|
|
4
|
+
|
|
5
|
+
Check, with file:line evidence:
|
|
6
|
+
- Readability & naming: clear intent, consistent style, no dead/commented-out code.
|
|
7
|
+
- Structure: DRY, single-responsibility, sensible module boundaries, low coupling.
|
|
8
|
+
- Error handling: errors checked (not swallowed), meaningful messages, no bare catches.
|
|
9
|
+
- Types & contracts: types/annotations present and honest; no `any`-style escape hatches.
|
|
10
|
+
- Tests: meaningful coverage for new logic and edge/failure cases.
|
|
11
|
+
- Docs: public functions/types documented per project convention.
|
|
12
|
+
- Conventions: matches the surrounding code and the project's style guides.
|
|
13
|
+
|
|
14
|
+
For each issue: location, why it matters, and a concrete suggestion. Distinguish must-fix from nice-to-have. Be constructive and specific. Read/analyze only unless asked to change code.
|
|
15
|
+
"""
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
description = "Performance-focused review of the current changes or a given path"
|
|
2
|
+
prompt = """
|
|
3
|
+
Perform a performance review. Default scope: the uncommitted diff (`git diff HEAD`); otherwise the path the user names.
|
|
4
|
+
|
|
5
|
+
Look for, with file:line evidence:
|
|
6
|
+
- Algorithmic complexity: needless O(n^2)+ loops, repeated work that could be cached/memoized.
|
|
7
|
+
- Database: N+1 queries, missing indexes, SELECT *, unbounded result sets, queries in loops.
|
|
8
|
+
- I/O & network: synchronous/blocking calls on hot paths, missing batching, chatty requests.
|
|
9
|
+
- Memory: leaks, large allocations, retaining references, loading whole files when streaming would do.
|
|
10
|
+
- Frontend: unnecessary re-renders, large bundles, unoptimized images, layout thrashing.
|
|
11
|
+
- Concurrency: lock contention, blocking the event loop.
|
|
12
|
+
|
|
13
|
+
For each issue: location, why it's slow, the realistic impact, and a concrete fix (with a code sketch where useful). Prioritize by expected impact. Do not micro-optimize where it doesn't matter — call that out too. Read/analyze only unless asked to change code.
|
|
14
|
+
"""
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
description = "Security-focused review of the current changes or a given path"
|
|
2
|
+
prompt = """
|
|
3
|
+
Perform a security review. Default scope: the uncommitted diff (`git diff HEAD`); if the repo is clean or the user names a path, review that path instead.
|
|
4
|
+
|
|
5
|
+
Look for, and prove each finding with file:line:
|
|
6
|
+
- Injection: SQL, command, SSTI, LDAP/NoSQL.
|
|
7
|
+
- XSS / missing output encoding; dangerous innerHTML/render.
|
|
8
|
+
- Broken access control: IDOR, missing authz, security-by-obscurity.
|
|
9
|
+
- Auth/session: weak tokens, broken JWT verification, plaintext/weak password storage.
|
|
10
|
+
- Secrets committed in code or config.
|
|
11
|
+
- Path traversal, unsafe file ops, unsafe deserialization.
|
|
12
|
+
- SSRF, open redirect, CORS misconfiguration.
|
|
13
|
+
- Vulnerable/outdated dependencies.
|
|
14
|
+
|
|
15
|
+
For each finding give: location, class, severity (Critical/High/Medium/Low), real-world impact, and a concrete secure fix. Be precise — back every claim with code. End with a short prioritized summary. This is read/analyze only; do not change code unless asked.
|
|
16
|
+
"""
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# Conductor Extension for wormclaude CLI
|
|
2
|
+
|
|
3
|
+
The Conductor extension enables Context-Driven Development (CDD) - a structured approach to software development that emphasizes clear specifications, systematic planning, and rigorous execution tracking.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Conductor provides a spec-driven workflow that guides you through:
|
|
8
|
+
1. **Context** - Understanding the problem and requirements
|
|
9
|
+
2. **Spec & Plan** - Creating detailed specifications and implementation plans
|
|
10
|
+
3. **Implement** - Following the plan with strict adherence to workflow
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
wormclaude extensions install ./path/to/conductor
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Or copy this example to your extensions directory:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
cp -r packages/cli/src/commands/extensions/examples/conductor ~/.wormclaude/extensions/
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
### `/conductor:setup`
|
|
27
|
+
Initialize a new project with Conductor workflow files.
|
|
28
|
+
|
|
29
|
+
**Usage:**
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
/conductor:setup
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**What it creates:**
|
|
36
|
+
- `plan.md` - Project plan with phases and tasks
|
|
37
|
+
- `tech-stack.md` - Technology decisions and architecture
|
|
38
|
+
- `product.md` - Product specification and requirements
|
|
39
|
+
- `product-guidelines.md` - Design and development guidelines
|
|
40
|
+
- `workflow.md` - Development workflow and processes
|
|
41
|
+
- `code_styleguides/` - Language-specific style guides
|
|
42
|
+
- `.wormclaudeignore` - Files to exclude from wormclaude context
|
|
43
|
+
|
|
44
|
+
### `/conductor:newTrack`
|
|
45
|
+
Create a new development track (feature/bug fix) with planning.
|
|
46
|
+
|
|
47
|
+
**Usage:**
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
/conductor:newTrack
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**What it does:**
|
|
54
|
+
- Analyzes current project state
|
|
55
|
+
- Creates detailed implementation plan
|
|
56
|
+
- Sets up tracking structure
|
|
57
|
+
- Guides through specification process
|
|
58
|
+
|
|
59
|
+
### `/conductor:implement`
|
|
60
|
+
Work on the current track following Conductor workflow.
|
|
61
|
+
|
|
62
|
+
**Usage:**
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
/conductor:implement
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**What it does:**
|
|
69
|
+
- Enforces Test-Driven Development (TDD)
|
|
70
|
+
- Tracks task progress in `plan.md`
|
|
71
|
+
- Manages git commits with detailed notes
|
|
72
|
+
- Handles phase completion and checkpointing
|
|
73
|
+
- Ensures quality gates are met
|
|
74
|
+
|
|
75
|
+
### `/conductor:status`
|
|
76
|
+
Show current project status and progress.
|
|
77
|
+
|
|
78
|
+
**Usage:**
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
/conductor:status
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**What it shows:**
|
|
85
|
+
- Current phase and tasks
|
|
86
|
+
- Completed work with commit references
|
|
87
|
+
- Quality metrics and coverage
|
|
88
|
+
- Next steps and recommendations
|
|
89
|
+
|
|
90
|
+
### `/conductor:revert`
|
|
91
|
+
Revert changes using git-aware rollback.
|
|
92
|
+
|
|
93
|
+
**Usage:**
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
/conductor:revert
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**What it does:**
|
|
100
|
+
- Safely reverts to previous checkpoints
|
|
101
|
+
- Handles track, phase, or task-level rollbacks
|
|
102
|
+
- Preserves git history and notes
|
|
103
|
+
- Updates plan.md accordingly
|
|
104
|
+
|
|
105
|
+
## Workflow Overview
|
|
106
|
+
|
|
107
|
+
### 1. Project Setup
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Initialize new project with Conductor
|
|
111
|
+
/conductor:setup
|
|
112
|
+
|
|
113
|
+
# Review and customize generated files
|
|
114
|
+
# - Edit product.md with your requirements
|
|
115
|
+
# - Update tech-stack.md with your technology choices
|
|
116
|
+
# - Customize workflow.md for your team
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 2. Development Cycle
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Start new feature/track
|
|
123
|
+
/conductor:newTrack
|
|
124
|
+
|
|
125
|
+
# Work on implementation
|
|
126
|
+
/conductor:implement
|
|
127
|
+
|
|
128
|
+
# Check progress
|
|
129
|
+
/conductor:status
|
|
130
|
+
|
|
131
|
+
# Revert if needed
|
|
132
|
+
/conductor:revert
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### 3. Quality Gates
|
|
136
|
+
Every task must pass:
|
|
137
|
+
- ✅ All tests pass
|
|
138
|
+
- ✅ Code coverage >80%
|
|
139
|
+
- ✅ Follows style guidelines
|
|
140
|
+
- ✅ Documentation updated
|
|
141
|
+
- ✅ Security review (if applicable)
|
|
142
|
+
|
|
143
|
+
## Key Features
|
|
144
|
+
|
|
145
|
+
### Test-Driven Development
|
|
146
|
+
- Enforces Red-Green-Refactor cycle
|
|
147
|
+
- Requires failing tests before implementation
|
|
148
|
+
- Tracks coverage metrics
|
|
149
|
+
- Integrates with project test frameworks
|
|
150
|
+
|
|
151
|
+
### Git Integration
|
|
152
|
+
- Automatic commit tracking
|
|
153
|
+
- Detailed git notes for audit trail
|
|
154
|
+
- Phase checkpointing
|
|
155
|
+
- Safe rollback capabilities
|
|
156
|
+
|
|
157
|
+
### Progress Tracking
|
|
158
|
+
- Task status in `plan.md`
|
|
159
|
+
- Commit SHA tracking
|
|
160
|
+
- Phase completion markers
|
|
161
|
+
- Quality gate verification
|
|
162
|
+
|
|
163
|
+
### Template System
|
|
164
|
+
- Project templates for common setups
|
|
165
|
+
- Code style guides for multiple languages
|
|
166
|
+
- Workflow templates adaptable to any tech stack
|
|
167
|
+
- Product specification templates
|
|
168
|
+
|
|
169
|
+
## File Structure
|
|
170
|
+
|
|
171
|
+
After setup, your project will have:
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
project/
|
|
175
|
+
├── plan.md # Main project plan
|
|
176
|
+
├── tech-stack.md # Technology decisions
|
|
177
|
+
├── product.md # Product specification
|
|
178
|
+
├── product-guidelines.md # Design guidelines
|
|
179
|
+
├── workflow.md # Development workflow
|
|
180
|
+
├── .wormclaudeignore # wormclaude exclusions
|
|
181
|
+
└── code_styleguides/ # Style guides
|
|
182
|
+
├── general.md
|
|
183
|
+
├── javascript.md
|
|
184
|
+
├── typescript.md
|
|
185
|
+
├── python.md
|
|
186
|
+
└── go.md
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Best Practices
|
|
190
|
+
|
|
191
|
+
### Planning
|
|
192
|
+
- Keep tasks small and specific
|
|
193
|
+
- Write clear acceptance criteria
|
|
194
|
+
- Update tech-stack.md before implementation
|
|
195
|
+
- Review product.md regularly
|
|
196
|
+
|
|
197
|
+
### Implementation
|
|
198
|
+
- Follow TDD strictly (Red-Green-Refactor)
|
|
199
|
+
- Commit frequently with descriptive messages
|
|
200
|
+
- Update plan.md as you complete tasks
|
|
201
|
+
- Run quality checks before marking tasks complete
|
|
202
|
+
|
|
203
|
+
### Team Collaboration
|
|
204
|
+
- Use consistent commit message format
|
|
205
|
+
- Review and update workflow.md together
|
|
206
|
+
- Share code style guidelines
|
|
207
|
+
- Conduct regular retrospectives
|
|
208
|
+
|
|
209
|
+
## Customization
|
|
210
|
+
|
|
211
|
+
### Adapting Templates
|
|
212
|
+
The templates in `templates/` can be customized:
|
|
213
|
+
- Modify `workflow.md` for your team's process
|
|
214
|
+
- Update style guides for your coding standards
|
|
215
|
+
- Customize `product.md` template for your domain
|
|
216
|
+
- Add new templates as needed
|
|
217
|
+
|
|
218
|
+
### Project-Specific Setup
|
|
219
|
+
- Update `.wormclaudeignore` for your project structure
|
|
220
|
+
- Modify quality gates in workflow.md
|
|
221
|
+
- Adapt testing requirements
|
|
222
|
+
- Customize deployment processes
|
|
223
|
+
|
|
224
|
+
## Troubleshooting
|
|
225
|
+
|
|
226
|
+
### Common Issues
|
|
227
|
+
|
|
228
|
+
**Q: Tests are failing during implementation**
|
|
229
|
+
A: This is expected in TDD. Write failing tests first (Red), then implement to make them pass (Green), then refactor.
|
|
230
|
+
|
|
231
|
+
**Q: Can't find previous checkpoint**
|
|
232
|
+
A: Use `/conductor:status` to see available checkpoints, or check git notes with `git notes list`.
|
|
233
|
+
|
|
234
|
+
**Q: Quality gates are too strict**
|
|
235
|
+
A: Customize the quality requirements in `workflow.md` to match your project needs.
|
|
236
|
+
|
|
237
|
+
**Q: Extension commands not working**
|
|
238
|
+
A: Ensure the extension is properly installed with `wormclaude extensions list`.
|
|
239
|
+
|
|
240
|
+
## Contributing
|
|
241
|
+
|
|
242
|
+
To improve the Conductor extension:
|
|
243
|
+
1. Fork the repository
|
|
244
|
+
2. Make your changes
|
|
245
|
+
3. Test with real projects
|
|
246
|
+
4. Submit a pull request
|
|
247
|
+
|
|
248
|
+
## License
|
|
249
|
+
|
|
250
|
+
This extension follows the same license as wormclaude CLI.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
description = "Work the current track: TDD, task tracking, quality gates, and commits"
|
|
2
|
+
prompt = """
|
|
3
|
+
Implement the next available task on the current Conductor track, following the workflow in `workflow.md`.
|
|
4
|
+
|
|
5
|
+
For the next `[ ]` task in `plan.md` (in order):
|
|
6
|
+
1. Mark it `[~]` (in progress) in `plan.md`.
|
|
7
|
+
2. Mirror the task's steps into TodoWrite so progress is visible.
|
|
8
|
+
3. If the project has tests (or the task warrants them), write the failing test FIRST and confirm it fails for the right reason.
|
|
9
|
+
4. Implement the minimum code to satisfy the task and make the test pass. Follow the project's conventions and `code_styleguides/`. Read a file before you Edit it.
|
|
10
|
+
5. Verify: run the project's build, lint, type-check, and tests (find the real commands from README/manifest — never assume). Do a quick functional check.
|
|
11
|
+
6. If the implementation deviated from `tech-stack.md`, update it with a dated note.
|
|
12
|
+
7. When the task passes the quality gates in `workflow.md`, mark it `[x]` in `plan.md`. If the user asked to commit, stage the related changes and commit with a clear conventional message.
|
|
13
|
+
|
|
14
|
+
Then stop and report what you completed and what the next task is. Do NOT silently work the whole plan at once — one task per invocation unless the user says otherwise.
|
|
15
|
+
"""
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
description = "Start a new development track (feature/bug fix) with a planned set of phases and tasks"
|
|
2
|
+
prompt = """
|
|
3
|
+
Start a new Conductor development track for the work described by the user.
|
|
4
|
+
|
|
5
|
+
Steps:
|
|
6
|
+
1. Read `product.md`, `tech-stack.md`, and `plan.md` if they exist (run `/conductor:setup` first if they do not).
|
|
7
|
+
2. Clarify the goal: restate the feature/fix in one or two sentences. Ask one sharp question ONLY if a critical detail is missing; otherwise proceed with reasonable assumptions and note them.
|
|
8
|
+
3. Break the work into phases, and each phase into small, specific, testable tasks with clear acceptance criteria.
|
|
9
|
+
4. Append the new track to `plan.md` using checkboxes:
|
|
10
|
+
- `[ ]` not started, `[~]` in progress, `[x]` done.
|
|
11
|
+
- Group tasks under phase headings.
|
|
12
|
+
5. If the approach changes the tech stack, update `tech-stack.md` with a dated note BEFORE implementing.
|
|
13
|
+
6. Summarize the track and tell the user to run `/conductor:implement` to begin.
|
|
14
|
+
|
|
15
|
+
Use the Write/Edit tools to update plan.md. Keep tasks small enough to finish and verify individually.
|
|
16
|
+
"""
|