adi_dev_workflow 1.1.0 → 1.2.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.
- package/bin/index.js +8 -8
- package/frameworks/agents/qa-staff-engineer.md +311 -0
- package/frameworks/agents/qa-validation-expert.md +458 -0
- package/frameworks/agents/tech-review-conformance.md +200 -0
- package/frameworks/commands/generate-prompt.md +33 -100
- package/frameworks/commands/ministack/README.md +2 -0
- package/frameworks/commands/ministack/code-review.md +2 -0
- package/frameworks/commands/ministack/generate-intent.md +2 -0
- package/frameworks/commands/ministack/generate-scope.md +2 -0
- package/frameworks/commands/ministack/generate-tasks.md +2 -0
- package/frameworks/commands/ministack/generate-tech-direction.md +2 -0
- package/frameworks/commands/ministack/run-ministack-tasks.md +3 -0
- package/frameworks/commands/ministack/run-ministack-withlinear.md +2 -0
- package/frameworks/commands/ministack/status.md +2 -0
- package/frameworks/commands/sdd/code-review.md +2 -0
- package/frameworks/commands/sdd/generate-prd.md +2 -0
- package/frameworks/commands/sdd/generate-task-plan.md +2 -0
- package/frameworks/commands/sdd/generate-tech-direction.md +2 -0
- package/frameworks/commands/sdd/generate-tech-spec.md +2 -0
- package/frameworks/commands/sdd/generate-tests.md +2 -0
- package/frameworks/commands/sdd/run_tasks.md +3 -0
- package/frameworks/commands/sdd/run_tasks_withlinear.md +2 -0
- package/frameworks/commands/sdd/status.md +2 -0
- package/frameworks/commands/sdd/validate-sdd.md +2 -0
- package/frameworks/commands/sync-tasks-to-linear.md +2 -0
- package/frameworks/commands/taskcard/generate-taskcard.md +106 -33
- package/frameworks/commands/taskcard/run-taskcard.md +2 -0
- package/frameworks/config/ai-framework-config.yaml +112 -0
- package/frameworks/skills/ministack-intent-expert/SKILL.md +15 -1
- package/frameworks/skills/ministack-scope-expert/SKILL.md +17 -1
- package/frameworks/skills/sdd-prd-expert/SKILL.md +14 -0
- package/frameworks/skills/sdd-task-plan-expert/SKILL.md +14 -0
- package/frameworks/skills/taskcard-expert/SKILL.md +30 -11
- package/frameworks/templates/prompt_template.md +207 -0
- package/package.json +28 -28
- package/src/cli.js +121 -121
- package/src/installer.js +155 -136
- package/src/transformer.js +86 -86
- package/frameworks/skills/ministack-tasks-expert/SKILL.md +0 -192
- package/frameworks/skills/ministack-tasks-expert/templates/task_plan_template.md +0 -78
- package/frameworks/skills/ministack-tasks-expert/templates/task_template.md +0 -103
- package/frameworks/skills/ministack-tech-direction-expert/SKILL.md +0 -218
- package/frameworks/skills/ministack-tech-direction-expert/evals/evals.json +0 -1
- package/frameworks/skills/ministack-tech-direction-expert/templates/tech_direction-template.md +0 -17
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/benchmark.json +0 -99
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/benchmark.md +0 -64
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-1-happy-path/eval_metadata.json +0 -12
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-1-happy-path/with_skill/grading.json +0 -32
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-1-happy-path/with_skill/outputs/response.md +0 -134
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-1-happy-path/with_skill/outputs/transcript.md +0 -68
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-1-happy-path/with_skill/timing.json +0 -5
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-1-happy-path/without_skill/grading.json +0 -32
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-1-happy-path/without_skill/outputs/response.md +0 -525
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-1-happy-path/without_skill/outputs/transcript.md +0 -30
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-1-happy-path/without_skill/timing.json +0 -5
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-2-spec-simples/eval_metadata.json +0 -12
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-2-spec-simples/with_skill/grading.json +0 -32
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-2-spec-simples/with_skill/outputs/response.md +0 -1126
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-2-spec-simples/with_skill/outputs/transcript.md +0 -131
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-2-spec-simples/with_skill/timing.json +0 -5
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-2-spec-simples/without_skill/grading.json +0 -32
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-2-spec-simples/without_skill/outputs/response.md +0 -452
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-2-spec-simples/without_skill/outputs/transcript.md +0 -78
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-2-spec-simples/without_skill/timing.json +0 -5
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-3-sem-user-stories/eval_metadata.json +0 -12
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-3-sem-user-stories/with_skill/grading.json +0 -32
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-3-sem-user-stories/with_skill/outputs/response.md +0 -101
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-3-sem-user-stories/with_skill/outputs/transcript.md +0 -133
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-3-sem-user-stories/with_skill/timing.json +0 -5
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-3-sem-user-stories/without_skill/grading.json +0 -32
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-3-sem-user-stories/without_skill/outputs/response.md +0 -248
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-3-sem-user-stories/without_skill/outputs/transcript.md +0 -49
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/eval-3-sem-user-stories/without_skill/timing.json +0 -5
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-1/review.html +0 -1325
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/benchmark.json +0 -94
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/benchmark.md +0 -67
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-1-happy-path/eval_metadata.json +0 -12
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-1-happy-path/with_skill/grading.json +0 -32
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-1-happy-path/with_skill/outputs/response.md +0 -117
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-1-happy-path/with_skill/outputs/transcript.md +0 -91
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-1-happy-path/with_skill/timing.json +0 -1
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-1-happy-path/without_skill/grading.json +0 -32
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-1-happy-path/without_skill/outputs/response.md +0 -694
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-1-happy-path/without_skill/outputs/transcript.md +0 -45
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-1-happy-path/without_skill/timing.json +0 -1
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-2-spec-simples/eval_metadata.json +0 -12
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-2-spec-simples/with_skill/grading.json +0 -32
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-2-spec-simples/with_skill/outputs/response.md +0 -1087
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-2-spec-simples/with_skill/outputs/transcript.md +0 -124
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-2-spec-simples/with_skill/timing.json +0 -1
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-2-spec-simples/without_skill/grading.json +0 -32
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-2-spec-simples/without_skill/outputs/response.md +0 -458
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-2-spec-simples/without_skill/outputs/transcript.md +0 -84
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-2-spec-simples/without_skill/timing.json +0 -1
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-3-sem-user-stories/eval_metadata.json +0 -12
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-3-sem-user-stories/with_skill/grading.json +0 -32
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-3-sem-user-stories/with_skill/outputs/response.md +0 -70
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-3-sem-user-stories/with_skill/outputs/transcript.md +0 -148
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-3-sem-user-stories/with_skill/timing.json +0 -1
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-3-sem-user-stories/without_skill/grading.json +0 -32
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-3-sem-user-stories/without_skill/outputs/response.md +0 -249
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-3-sem-user-stories/without_skill/outputs/transcript.md +0 -80
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/eval-3-sem-user-stories/without_skill/timing.json +0 -1
- package/frameworks/skills/sdd-task-plan-expert-workspace/iteration-2/review.html +0 -1325
- package/frameworks/skills/sdd-tech-direction-expert/SKILL.md +0 -223
- package/frameworks/skills/sdd-tech-direction-expert/evals/evals.json +0 -1
- package/frameworks/skills/sdd-tech-direction-expert/templates/tech_direction-template.md +0 -23
- package/frameworks/skills/sdd-tech-spec-expert/SKILL.md +0 -304
- package/frameworks/skills/sdd-tech-spec-expert/evals/evals.json +0 -199
- package/frameworks/skills/sdd-tech-spec-expert/templates/spec_tech_template.md +0 -290
- package/frameworks/skills/sdd-tech-spec-expert/templates/tech_direction-template.md +0 -23
package/src/installer.js
CHANGED
|
@@ -1,136 +1,155 @@
|
|
|
1
|
-
import { readdir, readFile, writeFile, mkdir, stat } from 'node:fs/promises';
|
|
2
|
-
import { join, dirname } from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import { transformContent } from './transformer.js';
|
|
5
|
-
|
|
6
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
const FRAMEWORKS_DIR = join(__dirname, '..', 'frameworks');
|
|
8
|
-
|
|
9
|
-
const FRAMEWORK_MAP = {
|
|
10
|
-
sdd: {
|
|
11
|
-
commands: 'sdd',
|
|
12
|
-
skills: ['sdd-prd-expert', 'sdd-spec-tech-expert', 'sdd-task-plan-expert', 'sdd-qa-expert'],
|
|
13
|
-
},
|
|
14
|
-
ministack: {
|
|
15
|
-
commands: 'ministack',
|
|
16
|
-
skills: ['ministack-intent-expert', 'ministack-scope-expert', 'ministack-expert', 'ministack-qa-expert'],
|
|
17
|
-
},
|
|
18
|
-
taskcard: {
|
|
19
|
-
commands: 'taskcard',
|
|
20
|
-
skills: ['taskcard-expert', 'taskcard-qa-expert'],
|
|
21
|
-
},
|
|
22
|
-
shared: {
|
|
23
|
-
commands: null, // root-level commands
|
|
24
|
-
skills: [],
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const IDE_DIRS = {
|
|
29
|
-
claude: '.claude',
|
|
30
|
-
cursor: '.cursor',
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Copy a directory recursively, applying transformation.
|
|
35
|
-
*/
|
|
36
|
-
async function copyDir(src, dest, target) {
|
|
37
|
-
await mkdir(dest, { recursive: true });
|
|
38
|
-
const entries = await readdir(src, { withFileTypes: true });
|
|
39
|
-
|
|
40
|
-
for (const entry of entries) {
|
|
41
|
-
const srcPath = join(src, entry.name);
|
|
42
|
-
const destPath = join(dest, entry.name);
|
|
43
|
-
|
|
44
|
-
if (entry.isDirectory()) {
|
|
45
|
-
await copyDir(srcPath, destPath, target);
|
|
46
|
-
} else if (entry.name.endsWith('.md')) {
|
|
47
|
-
const content = await readFile(srcPath, 'utf-8');
|
|
48
|
-
const transformed = transformContent(content, target);
|
|
49
|
-
await writeFile(destPath, transformed, 'utf-8');
|
|
50
|
-
} else {
|
|
51
|
-
const content = await readFile(srcPath);
|
|
52
|
-
await writeFile(destPath, content);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Check if a path exists.
|
|
59
|
-
*/
|
|
60
|
-
async function exists(path) {
|
|
61
|
-
try {
|
|
62
|
-
await stat(path);
|
|
63
|
-
return true;
|
|
64
|
-
} catch {
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Install selected frameworks to the target directory.
|
|
71
|
-
*
|
|
72
|
-
* @param {Object} options
|
|
73
|
-
* @param {string} options.cwd - Current working directory
|
|
74
|
-
* @param {'claude'|'cursor'} options.target - Target IDE
|
|
75
|
-
* @param {string[]} options.frameworks - Frameworks to install ('sdd', 'ministack', 'taskcard', 'shared')
|
|
76
|
-
* @returns {Object} Summary of installed items
|
|
77
|
-
*/
|
|
78
|
-
export async function install({ cwd, target, frameworks }) {
|
|
79
|
-
const ideDir = join(cwd, IDE_DIRS[target]);
|
|
80
|
-
const commandsDir = join(ideDir, 'commands');
|
|
81
|
-
const skillsDir = join(ideDir, 'skills');
|
|
82
|
-
const templatesDir = join(ideDir, 'templates');
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
await copyDir(
|
|
119
|
-
const
|
|
120
|
-
summary.
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
//
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
1
|
+
import { readdir, readFile, writeFile, mkdir, stat } from 'node:fs/promises';
|
|
2
|
+
import { join, dirname } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { transformContent } from './transformer.js';
|
|
5
|
+
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const FRAMEWORKS_DIR = join(__dirname, '..', 'frameworks');
|
|
8
|
+
|
|
9
|
+
const FRAMEWORK_MAP = {
|
|
10
|
+
sdd: {
|
|
11
|
+
commands: 'sdd',
|
|
12
|
+
skills: ['sdd-prd-expert', 'sdd-spec-tech-expert', 'sdd-task-plan-expert', 'sdd-qa-expert'],
|
|
13
|
+
},
|
|
14
|
+
ministack: {
|
|
15
|
+
commands: 'ministack',
|
|
16
|
+
skills: ['ministack-intent-expert', 'ministack-scope-expert', 'ministack-expert', 'ministack-qa-expert'],
|
|
17
|
+
},
|
|
18
|
+
taskcard: {
|
|
19
|
+
commands: 'taskcard',
|
|
20
|
+
skills: ['taskcard-expert', 'taskcard-qa-expert'],
|
|
21
|
+
},
|
|
22
|
+
shared: {
|
|
23
|
+
commands: null, // root-level commands
|
|
24
|
+
skills: [],
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const IDE_DIRS = {
|
|
29
|
+
claude: '.claude',
|
|
30
|
+
cursor: '.cursor',
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Copy a directory recursively, applying transformation.
|
|
35
|
+
*/
|
|
36
|
+
async function copyDir(src, dest, target) {
|
|
37
|
+
await mkdir(dest, { recursive: true });
|
|
38
|
+
const entries = await readdir(src, { withFileTypes: true });
|
|
39
|
+
|
|
40
|
+
for (const entry of entries) {
|
|
41
|
+
const srcPath = join(src, entry.name);
|
|
42
|
+
const destPath = join(dest, entry.name);
|
|
43
|
+
|
|
44
|
+
if (entry.isDirectory()) {
|
|
45
|
+
await copyDir(srcPath, destPath, target);
|
|
46
|
+
} else if (entry.name.endsWith('.md')) {
|
|
47
|
+
const content = await readFile(srcPath, 'utf-8');
|
|
48
|
+
const transformed = transformContent(content, target);
|
|
49
|
+
await writeFile(destPath, transformed, 'utf-8');
|
|
50
|
+
} else {
|
|
51
|
+
const content = await readFile(srcPath);
|
|
52
|
+
await writeFile(destPath, content);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a path exists.
|
|
59
|
+
*/
|
|
60
|
+
async function exists(path) {
|
|
61
|
+
try {
|
|
62
|
+
await stat(path);
|
|
63
|
+
return true;
|
|
64
|
+
} catch {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Install selected frameworks to the target directory.
|
|
71
|
+
*
|
|
72
|
+
* @param {Object} options
|
|
73
|
+
* @param {string} options.cwd - Current working directory
|
|
74
|
+
* @param {'claude'|'cursor'} options.target - Target IDE
|
|
75
|
+
* @param {string[]} options.frameworks - Frameworks to install ('sdd', 'ministack', 'taskcard', 'shared')
|
|
76
|
+
* @returns {Object} Summary of installed items
|
|
77
|
+
*/
|
|
78
|
+
export async function install({ cwd, target, frameworks }) {
|
|
79
|
+
const ideDir = join(cwd, IDE_DIRS[target]);
|
|
80
|
+
const commandsDir = join(ideDir, 'commands');
|
|
81
|
+
const skillsDir = join(ideDir, 'skills');
|
|
82
|
+
const templatesDir = join(ideDir, 'templates');
|
|
83
|
+
const agentsDir = join(ideDir, 'agents');
|
|
84
|
+
|
|
85
|
+
const summary = { commands: 0, skills: 0, templates: 0, agents: 0, config: 0 };
|
|
86
|
+
|
|
87
|
+
for (const fw of frameworks) {
|
|
88
|
+
const config = FRAMEWORK_MAP[fw];
|
|
89
|
+
if (!config) continue;
|
|
90
|
+
|
|
91
|
+
// Copy commands
|
|
92
|
+
if (fw === 'shared') {
|
|
93
|
+
// Root-level commands (generate-prompt.md, sync-tasks-to-linear.md)
|
|
94
|
+
await mkdir(commandsDir, { recursive: true });
|
|
95
|
+
const srcCmds = join(FRAMEWORKS_DIR, 'commands');
|
|
96
|
+
const entries = await readdir(srcCmds, { withFileTypes: true });
|
|
97
|
+
|
|
98
|
+
for (const entry of entries) {
|
|
99
|
+
if (entry.isFile() && entry.name.endsWith('.md')) {
|
|
100
|
+
const content = await readFile(join(srcCmds, entry.name), 'utf-8');
|
|
101
|
+
const transformed = transformContent(content, target);
|
|
102
|
+
await writeFile(join(commandsDir, entry.name), transformed, 'utf-8');
|
|
103
|
+
summary.commands++;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Shared templates
|
|
108
|
+
const srcTemplates = join(FRAMEWORKS_DIR, 'templates');
|
|
109
|
+
if (await exists(srcTemplates)) {
|
|
110
|
+
await copyDir(srcTemplates, templatesDir, target);
|
|
111
|
+
const tplEntries = await readdir(srcTemplates);
|
|
112
|
+
summary.templates += tplEntries.filter((f) => f.endsWith('.md')).length;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Shared agents
|
|
116
|
+
const srcAgents = join(FRAMEWORKS_DIR, 'agents');
|
|
117
|
+
if (await exists(srcAgents)) {
|
|
118
|
+
await copyDir(srcAgents, agentsDir, target);
|
|
119
|
+
const agentEntries = await readdir(srcAgents);
|
|
120
|
+
summary.agents += agentEntries.filter((f) => f.endsWith('.md')).length;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Config file
|
|
124
|
+
const srcConfig = join(FRAMEWORKS_DIR, 'config', 'ai-framework-config.yaml');
|
|
125
|
+
if (await exists(srcConfig)) {
|
|
126
|
+
const configDestDir = join(ideDir, 'config');
|
|
127
|
+
await mkdir(configDestDir, { recursive: true });
|
|
128
|
+
const content = await readFile(srcConfig);
|
|
129
|
+
await writeFile(join(configDestDir, 'ai-framework-config.yaml'), content);
|
|
130
|
+
summary.config = 1;
|
|
131
|
+
}
|
|
132
|
+
} else {
|
|
133
|
+
// Framework-specific commands
|
|
134
|
+
if (config.commands) {
|
|
135
|
+
const srcCmdDir = join(FRAMEWORKS_DIR, 'commands', config.commands);
|
|
136
|
+
const destCmdDir = join(commandsDir, config.commands);
|
|
137
|
+
await copyDir(srcCmdDir, destCmdDir, target);
|
|
138
|
+
const entries = await readdir(srcCmdDir);
|
|
139
|
+
summary.commands += entries.filter((f) => f.endsWith('.md')).length;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Framework-specific skills
|
|
143
|
+
for (const skillName of config.skills) {
|
|
144
|
+
const srcSkillDir = join(FRAMEWORKS_DIR, 'skills', skillName);
|
|
145
|
+
const destSkillDir = join(skillsDir, skillName);
|
|
146
|
+
if (await exists(srcSkillDir)) {
|
|
147
|
+
await copyDir(srcSkillDir, destSkillDir, target);
|
|
148
|
+
summary.skills++;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return summary;
|
|
155
|
+
}
|
package/src/transformer.js
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
const REPLACEMENTS = [
|
|
2
|
-
// Remove Claude Code specific tool instructions
|
|
3
|
-
{
|
|
4
|
-
pattern: /- \*\*Claude Code\*\*: use a ferramenta `AskUserQuestion`[^\n]*/g,
|
|
5
|
-
replacement: '',
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
pattern: /\*\*Claude Code\*\*: use a ferramenta `AskUserQuestion`[^\n]*/g,
|
|
9
|
-
replacement: '',
|
|
10
|
-
},
|
|
11
|
-
// Replace AskUserQuestion references with generic
|
|
12
|
-
{
|
|
13
|
-
pattern: /`AskUserQuestion`/g,
|
|
14
|
-
replacement: 'perguntas interativas ao usuario',
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
pattern: /AskUserQuestion/g,
|
|
18
|
-
replacement: 'pergunte ao usuario',
|
|
19
|
-
},
|
|
20
|
-
// Replace directory references
|
|
21
|
-
{
|
|
22
|
-
pattern: /\.claude\/rules\//g,
|
|
23
|
-
replacement: '.cursor/rules/',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
pattern: /\.claude\/templates\//g,
|
|
27
|
-
replacement: '.cursor/templates/',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
pattern: /\.claude\/skills\//g,
|
|
31
|
-
replacement: '.cursor/skills/',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
pattern: /\.claude\/commands\//g,
|
|
35
|
-
replacement: '.cursor/commands/',
|
|
36
|
-
},
|
|
37
|
-
// Replace .claude/agents/ references
|
|
38
|
-
{
|
|
39
|
-
pattern: /\.claude\/agents\//g,
|
|
40
|
-
replacement: '.cursor/agents/',
|
|
41
|
-
},
|
|
42
|
-
// Replace all remaining .claude/ references
|
|
43
|
-
{
|
|
44
|
-
pattern: /`\.claude\//g,
|
|
45
|
-
replacement: '`.cursor/',
|
|
46
|
-
},
|
|
47
|
-
// Replace tool/IDE name references
|
|
48
|
-
{
|
|
49
|
-
pattern: /no Claude Code/g,
|
|
50
|
-
replacement: 'no Cursor',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
pattern: /do Claude Code/g,
|
|
54
|
-
replacement: 'do Cursor',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
pattern: /Claude Code Review Agent/g,
|
|
58
|
-
replacement: 'Code Review Agent',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
pattern: /\(Claude Code\)/g,
|
|
62
|
-
replacement: '(Cursor)',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
pattern: /Claude Code/g,
|
|
66
|
-
replacement: 'Cursor',
|
|
67
|
-
},
|
|
68
|
-
];
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Transform file content from Claude Code format to Cursor format.
|
|
72
|
-
* Returns unchanged content if target is 'claude'.
|
|
73
|
-
*/
|
|
74
|
-
export function transformContent(content, target) {
|
|
75
|
-
if (target === 'claude') return content;
|
|
76
|
-
|
|
77
|
-
let result = content;
|
|
78
|
-
for (const { pattern, replacement } of REPLACEMENTS) {
|
|
79
|
-
result = result.replace(pattern, replacement);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Clean up empty lines left by removed lines
|
|
83
|
-
result = result.replace(/\n{3,}/g, '\n\n');
|
|
84
|
-
|
|
85
|
-
return result;
|
|
86
|
-
}
|
|
1
|
+
const REPLACEMENTS = [
|
|
2
|
+
// Remove Claude Code specific tool instructions
|
|
3
|
+
{
|
|
4
|
+
pattern: /- \*\*Claude Code\*\*: use a ferramenta `AskUserQuestion`[^\n]*/g,
|
|
5
|
+
replacement: '',
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
pattern: /\*\*Claude Code\*\*: use a ferramenta `AskUserQuestion`[^\n]*/g,
|
|
9
|
+
replacement: '',
|
|
10
|
+
},
|
|
11
|
+
// Replace AskUserQuestion references with generic
|
|
12
|
+
{
|
|
13
|
+
pattern: /`AskUserQuestion`/g,
|
|
14
|
+
replacement: 'perguntas interativas ao usuario',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
pattern: /AskUserQuestion/g,
|
|
18
|
+
replacement: 'pergunte ao usuario',
|
|
19
|
+
},
|
|
20
|
+
// Replace directory references
|
|
21
|
+
{
|
|
22
|
+
pattern: /\.claude\/rules\//g,
|
|
23
|
+
replacement: '.cursor/rules/',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
pattern: /\.claude\/templates\//g,
|
|
27
|
+
replacement: '.cursor/templates/',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
pattern: /\.claude\/skills\//g,
|
|
31
|
+
replacement: '.cursor/skills/',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
pattern: /\.claude\/commands\//g,
|
|
35
|
+
replacement: '.cursor/commands/',
|
|
36
|
+
},
|
|
37
|
+
// Replace .claude/agents/ references
|
|
38
|
+
{
|
|
39
|
+
pattern: /\.claude\/agents\//g,
|
|
40
|
+
replacement: '.cursor/agents/',
|
|
41
|
+
},
|
|
42
|
+
// Replace all remaining .claude/ references
|
|
43
|
+
{
|
|
44
|
+
pattern: /`\.claude\//g,
|
|
45
|
+
replacement: '`.cursor/',
|
|
46
|
+
},
|
|
47
|
+
// Replace tool/IDE name references
|
|
48
|
+
{
|
|
49
|
+
pattern: /no Claude Code/g,
|
|
50
|
+
replacement: 'no Cursor',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
pattern: /do Claude Code/g,
|
|
54
|
+
replacement: 'do Cursor',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
pattern: /Claude Code Review Agent/g,
|
|
58
|
+
replacement: 'Code Review Agent',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
pattern: /\(Claude Code\)/g,
|
|
62
|
+
replacement: '(Cursor)',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
pattern: /Claude Code/g,
|
|
66
|
+
replacement: 'Cursor',
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Transform file content from Claude Code format to Cursor format.
|
|
72
|
+
* Returns unchanged content if target is 'claude'.
|
|
73
|
+
*/
|
|
74
|
+
export function transformContent(content, target) {
|
|
75
|
+
if (target === 'claude') return content;
|
|
76
|
+
|
|
77
|
+
let result = content;
|
|
78
|
+
for (const { pattern, replacement } of REPLACEMENTS) {
|
|
79
|
+
result = result.replace(pattern, replacement);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Clean up empty lines left by removed lines
|
|
83
|
+
result = result.replace(/\n{3,}/g, '\n\n');
|
|
84
|
+
|
|
85
|
+
return result;
|
|
86
|
+
}
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ministack-tasks-expert
|
|
3
|
-
description: Especialista em geracao de TASKS do framework miniStack. Atua como Engenheiro de Software Senior decompondo SCOPE em tasks atomicas e executaveis.
|
|
4
|
-
argument-hint: [INTENT aprovada + SCOPE aprovado]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Voce e um **Engenheiro de Software Senior** que decompoe SCOPE aprovado em tasks atomicas e executaveis.
|
|
8
|
-
|
|
9
|
-
Voce domina completamente o framework miniStack e seu foco e **EXCLUSIVAMENTE** na geracao de TASKS — definindo COMO EXECUTAR a implementacao em unidades atomicas de trabalho.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Framework miniStack — Especialista TASKS
|
|
14
|
-
|
|
15
|
-
## Visao Geral
|
|
16
|
-
|
|
17
|
-
**miniStack** e um framework estruturado para decomposicao e execucao de features de forma colaborativa, baseado em documentacao clara com **3 etapas principais**: INTENT, SCOPE e TASKS.
|
|
18
|
-
|
|
19
|
-
### Fluxo Completo
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
Descricao da Feature
|
|
23
|
-
|
|
|
24
|
-
/generate-intent (ministack-intent-expert)
|
|
25
|
-
| (INTENT aprovada)
|
|
26
|
-
/generate-scope (ministack-scope-expert)
|
|
27
|
-
| (SCOPE aprovado)
|
|
28
|
-
/generate-tasks <-- voce esta aqui (ministack-tasks-expert)
|
|
29
|
-
| (TASKS aprovadas)
|
|
30
|
-
/run-ministack-tasks (comando orquestrador)
|
|
31
|
-
|
|
|
32
|
-
Feature Implementada
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
O TASKS Expert responde: **COMO decompor o SCOPE em unidades atomicas de trabalho?**
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Principio Fundamental
|
|
40
|
-
|
|
41
|
-
As TASKS transformam o SCOPE aprovado em **unidades atomicas de trabalho** executaveis por humanos ou agentes de IA.
|
|
42
|
-
|
|
43
|
-
## Regras Obrigatorias
|
|
44
|
-
|
|
45
|
-
- **NUNCA** deduzir escopo ou inventar informacoes — na DUVIDA, PERGUNTE AO USUARIO
|
|
46
|
-
- **SEMPRE** salvar os arquivos fisicos antes de pedir aprovacao
|
|
47
|
-
- **NUNCA** iniciar automaticamente a proxima etapa
|
|
48
|
-
- **Claude Code**: use a ferramenta `AskUserQuestion` para esclarecer duvidas com o usuario
|
|
49
|
-
|
|
50
|
-
## Criterios de Qualidade
|
|
51
|
-
|
|
52
|
-
| Atributo | Descricao |
|
|
53
|
-
|----------|-----------|
|
|
54
|
-
| Atomica | Executavel sem novas decisoes |
|
|
55
|
-
| Independente | Minimize dependencias |
|
|
56
|
-
| Pequena | Se > 3 subtarefas, quebre em tasks |
|
|
57
|
-
| Clara | Suficiente para LLM executar |
|
|
58
|
-
| Verificavel | Criterio claro de conclusao |
|
|
59
|
-
| Ordenada | Ordem e dependencias definidas |
|
|
60
|
-
|
|
61
|
-
## Processo (3 Fases)
|
|
62
|
-
|
|
63
|
-
### Fase 1: Analise e Validacao
|
|
64
|
-
|
|
65
|
-
**ANTES de gerar as tasks**, analise Intent e Scope:
|
|
66
|
-
|
|
67
|
-
- Intent esta claro sobre o objetivo?
|
|
68
|
-
- Scope delimita claramente o que entra e sai?
|
|
69
|
-
- Ha ambiguidades que precisam esclarecimento?
|
|
70
|
-
- Detectou dependencias ocultas?
|
|
71
|
-
- Algo parece inviavel ou conflitante?
|
|
72
|
-
|
|
73
|
-
Se houver duvidas, pergunte ao usuario antes de prosseguir.
|
|
74
|
-
|
|
75
|
-
### Fase 2: Geracao das Tasks
|
|
76
|
-
|
|
77
|
-
Para cada task, preencha o template individual (`task_template.md`) com:
|
|
78
|
-
- **ID**: T1, T2, T3... (unico)
|
|
79
|
-
- **Nome**: Descricao curta
|
|
80
|
-
- **Objetivo**: O que sera entregue
|
|
81
|
-
- **Arquivos**: Criados/modificados (economiza tokens e scans)
|
|
82
|
-
- **Dependencias**: Quais tasks antes
|
|
83
|
-
- **Criterio de Conclusao**: Como validar
|
|
84
|
-
- **Detalhes de Implementacao**: Subtasks com checklist
|
|
85
|
-
- **Testes**: Secao controlada pelo comando orquestrador (ver nota abaixo)
|
|
86
|
-
|
|
87
|
-
Alem disso, preencha o `task_plan_template.md` com:
|
|
88
|
-
- **Macro-Fases**: agrupamento logico das tasks
|
|
89
|
-
- **Lista de Tasks**: tabela com links para cada arquivo individual
|
|
90
|
-
- **Grafo de Dependencias**: ordem de execucao e paralelismo
|
|
91
|
-
- **Visao consolidada de arquivos**: todos os arquivos impactados
|
|
92
|
-
|
|
93
|
-
> **IMPORTANTE**: A secao de **Testes** de cada task e controlada pelo comando orquestrador
|
|
94
|
-
> (`/ministack:generate-tasks`) que delega ao agente QA especializado (`qa-staff-engineer`).
|
|
95
|
-
> Voce NAO deve delegar diretamente ao agente QA — apenas deixe a secao de Testes vazia
|
|
96
|
-
> com o marcador `[PENDENTE — sera preenchida pelo agente QA]`.
|
|
97
|
-
|
|
98
|
-
### Fase 3: Salvar Arquivos (OBRIGATORIO)
|
|
99
|
-
|
|
100
|
-
1. Identificar nome da feature a partir da INTENT/SCOPE
|
|
101
|
-
2. **Remover todos os comentarios `<!-- LLM-ONLY: ... -->`** do conteudo antes de salvar — sao instrucoes internas do template e NAO devem aparecer nos arquivos gerados
|
|
102
|
-
3. **Salvar os arquivos fisicos**:
|
|
103
|
-
- Task Plan: `docs/[nome-feature]/vN/task_plan.md`
|
|
104
|
-
- Cada task individual: `docs/[nome-feature]/vN/tasks/T1.md`, `T2.md`, ...
|
|
105
|
-
4. Confirmar que todos os arquivos foram criados
|
|
106
|
-
|
|
107
|
-
## Templates
|
|
108
|
-
|
|
109
|
-
- **Task Plan (indice)**: [task_plan_template.md](templates/task_plan_template.md)
|
|
110
|
-
- **Task Individual**: [task_template.md](templates/task_template.md)
|
|
111
|
-
|
|
112
|
-
## Estrutura de Saida
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
docs/
|
|
116
|
-
<nome-feature>/
|
|
117
|
-
vN/
|
|
118
|
-
intent.md # INTENT aprovada (ministack-intent-expert)
|
|
119
|
-
scope.md # SCOPE aprovado (ministack-scope-expert)
|
|
120
|
-
task_plan.md # Indice e coordenacao (voce gera este arquivo)
|
|
121
|
-
tasks/
|
|
122
|
-
T1.md # Task individual (voce gera cada arquivo)
|
|
123
|
-
T2.md
|
|
124
|
-
T3.md
|
|
125
|
-
...
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Saida Esperada
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
Arquivos salvos em: docs/[nome-feature]/vN/
|
|
132
|
-
- task_plan.md (indice com [N] tasks)
|
|
133
|
-
- tasks/T1.md ... tasks/T[N].md
|
|
134
|
-
|
|
135
|
-
Tarefas Geradas
|
|
136
|
-
Total: [N] tasks
|
|
137
|
-
Sequencia: T1 -> T2 -> T3 (paralelo: T4, T5) -> T6
|
|
138
|
-
|
|
139
|
-
Aprova essas tasks para execucao? (sim/nao)
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
**IMPORTANTE:**
|
|
143
|
-
- NAO inicie `/run-ministack-tasks` automaticamente
|
|
144
|
-
- NAO sugira executar o proximo comando
|
|
145
|
-
- Apenas aguarde a confirmacao do usuario e encerre
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## Guardrails Inviolaveis
|
|
150
|
-
|
|
151
|
-
1. **Aprovacao obrigatoria** — nunca avance sem confirmacao do usuario
|
|
152
|
-
2. **Sem invencao** — se faltar informacao, PERGUNTE ao usuario
|
|
153
|
-
3. **Escopo fechado** — cada documento deve ser auto-suficiente
|
|
154
|
-
4. **Template completo** — todas as secoes devem ser preenchidas
|
|
155
|
-
5. **Arquivos fisicos** — SEMPRE salvar antes de apresentar ao usuario
|
|
156
|
-
6. **AskUserQuestion** — no Claude Code, use esta ferramenta para esclarecer duvidas
|
|
157
|
-
7. **Testes via orquestrador** — NAO delegue testes diretamente, o comando orquestrador faz isso
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## Convencoes
|
|
162
|
-
|
|
163
|
-
### Nomenclatura
|
|
164
|
-
|
|
165
|
-
| Elemento | Convencao | Exemplo |
|
|
166
|
-
|----------|-----------|---------|
|
|
167
|
-
| Nome da feature | kebab-case | `auth-oauth2`, `user-profile` |
|
|
168
|
-
| ID de task | T + numero | `T1`, `T2`, `T3` |
|
|
169
|
-
| Diretorio | `docs/<nome>/vN/` | `docs/auth/v1/` |
|
|
170
|
-
| Arquivo task plan | `task_plan.md` | `docs/auth/v1/task_plan.md` |
|
|
171
|
-
| Arquivo task individual | `T[N].md` | `docs/auth/v1/tasks/T1.md` |
|
|
172
|
-
|
|
173
|
-
### Estrutura de Diretorios
|
|
174
|
-
|
|
175
|
-
```
|
|
176
|
-
docs/
|
|
177
|
-
<nome-feature>/
|
|
178
|
-
vN/
|
|
179
|
-
intent.md # INTENT aprovada (ministack-intent-expert)
|
|
180
|
-
scope.md # SCOPE aprovado (ministack-scope-expert)
|
|
181
|
-
task_plan.md # Indice e coordenacao (voce gera este arquivo)
|
|
182
|
-
tasks/
|
|
183
|
-
T1.md # Task individual (voce gera cada arquivo)
|
|
184
|
-
T2.md
|
|
185
|
-
...
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
## Entrada
|
|
191
|
-
|
|
192
|
-
$ARGUMENTS
|