create-vasvibe 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/package.json +1 -1
- package/src/index.mjs +53 -9
- package/src/prompts.mjs +26 -0
- package/src/scaffold.mjs +10 -2
- package/src/upgrade.mjs +121 -0
- package/template/.claude/agents/analyst.md +16 -2
- package/template/.claude/agents/developer.md +15 -1
- package/template/.claude/agents/devops.md +14 -0
- package/template/.claude/agents/document.md +14 -0
- package/template/.claude/agents/fixer.md +15 -1
- package/template/.claude/agents/initiator.md +16 -0
- package/template/.claude/agents/orchestrator.md +52 -15
- package/template/.claude/agents/pm.md +14 -2
- package/template/.claude/agents/qa.md +16 -2
- package/template/.claude/agents/sysarch.md +42 -93
- package/template/.claude/agents/tester.md +16 -2
- package/template/.claude/settings.local.json +21 -0
- package/template/.opencode/agents/analyst.md +14 -1
- package/template/.opencode/agents/developer.md +14 -1
- package/template/.opencode/agents/devops.md +13 -0
- package/template/.opencode/agents/document.md +13 -0
- package/template/.opencode/agents/fixer.md +14 -1
- package/template/.opencode/agents/initiator.md +15 -0
- package/template/.opencode/agents/orchestrator.md +51 -15
- package/template/.opencode/agents/pm.md +13 -2
- package/template/.opencode/agents/qa.md +15 -2
- package/template/.opencode/agents/sysarch.md +41 -93
- package/template/.opencode/agents/tester.md +15 -2
- package/template/agent/workflows/_shared/state-management.md +85 -3
- package/template/agent/workflows/_shared/work-depth.md +46 -0
- package/template/agent/workflows/analyst.md +11 -2
- package/template/agent/workflows/developer.md +10 -1
- package/template/agent/workflows/devops.md +9 -0
- package/template/agent/workflows/document.md +9 -0
- package/template/agent/workflows/fixer.md +10 -1
- package/template/agent/workflows/initiator.md +11 -0
- package/template/agent/workflows/orchestrator.md +47 -15
- package/template/agent/workflows/pm.md +9 -2
- package/template/agent/workflows/qa.md +11 -2
- package/template/agent/workflows/sysarch.md +37 -93
- package/template/agent/workflows/tester.md +11 -2
- package/template/project_overview_example.md +15 -1
- package/template/schemas/changelog.template.md +34 -0
- package/template/schemas/dev_log.template.md +15 -21
- package/template/schemas/specification.template.md +35 -5
package/package.json
CHANGED
package/src/index.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { runPrompts } from './prompts.mjs';
|
|
|
7
7
|
import { scaffold } from './scaffold.mjs';
|
|
8
8
|
import { initRepo } from './git.mjs';
|
|
9
9
|
import { log, pathExists, isDirEmpty, isValidProjectName } from './utils.mjs';
|
|
10
|
+
import { isVasvibeProject, runUpgrade } from './upgrade.mjs';
|
|
10
11
|
import pc from 'picocolors';
|
|
11
12
|
|
|
12
13
|
const HELP = `
|
|
@@ -14,29 +15,33 @@ ${pc.bold('create-vasvibe')} — scaffold a project with VasVibe agents preconfi
|
|
|
14
15
|
|
|
15
16
|
${pc.bold('Usage:')}
|
|
16
17
|
npx create-vasvibe <project-name> [options]
|
|
18
|
+
npx create-vasvibe upgrade [path] Upgrade agent files in an existing project
|
|
17
19
|
|
|
18
20
|
${pc.bold('Options:')}
|
|
19
21
|
-y, --yes Skip prompts and use defaults
|
|
20
|
-
-u, --update Update an existing project (overwrites template files, keeps user files)
|
|
21
22
|
--no-git Do not initialize a git repository
|
|
22
23
|
--no-opencode Exclude .opencode/ (commands, skills)
|
|
23
24
|
--no-claude Exclude .claude/ and .agents/
|
|
24
25
|
--no-github Exclude .github/prompts/
|
|
25
26
|
--no-workflows Exclude agent/workflows/
|
|
27
|
+
--depth=<level> Set default work depth: fast | standard | deep (default: standard)
|
|
28
|
+
--dry-run (upgrade only) Show what would change without writing files
|
|
26
29
|
-h, --help Show this help
|
|
27
30
|
-v, --version Print version
|
|
28
31
|
|
|
29
32
|
${pc.bold('Examples:')}
|
|
30
33
|
npx create-vasvibe my-app
|
|
31
|
-
npx create-vasvibe my-app --yes
|
|
32
34
|
npx create-vasvibe my-app --yes --no-claude --no-github
|
|
35
|
+
npx create-vasvibe my-app --depth=fast Scaffold with fast work depth (prototype mode)
|
|
36
|
+
npx create-vasvibe upgrade Upgrade current directory
|
|
37
|
+
npx create-vasvibe upgrade ./my-app Upgrade specific project
|
|
38
|
+
npx create-vasvibe upgrade --dry-run Preview upgrade without writing
|
|
33
39
|
`;
|
|
34
40
|
|
|
35
41
|
function parseArgs(argv) {
|
|
36
42
|
const args = argv.slice(2);
|
|
37
43
|
const flags = {
|
|
38
44
|
yes: false,
|
|
39
|
-
update: false,
|
|
40
45
|
git: true,
|
|
41
46
|
opencode: true,
|
|
42
47
|
claude: true,
|
|
@@ -44,6 +49,8 @@ function parseArgs(argv) {
|
|
|
44
49
|
workflows: true,
|
|
45
50
|
help: false,
|
|
46
51
|
version: false,
|
|
52
|
+
dryRun: false,
|
|
53
|
+
depth: null,
|
|
47
54
|
};
|
|
48
55
|
const positional = [];
|
|
49
56
|
|
|
@@ -53,9 +60,8 @@ function parseArgs(argv) {
|
|
|
53
60
|
case '--yes':
|
|
54
61
|
flags.yes = true;
|
|
55
62
|
break;
|
|
56
|
-
case '-
|
|
57
|
-
|
|
58
|
-
flags.update = true;
|
|
63
|
+
case '--dry-run':
|
|
64
|
+
flags.dryRun = true;
|
|
59
65
|
break;
|
|
60
66
|
case '--no-git':
|
|
61
67
|
flags.git = false;
|
|
@@ -81,6 +87,15 @@ function parseArgs(argv) {
|
|
|
81
87
|
flags.version = true;
|
|
82
88
|
break;
|
|
83
89
|
default:
|
|
90
|
+
if (a.startsWith('--depth=')) {
|
|
91
|
+
const val = a.slice('--depth='.length);
|
|
92
|
+
if (!['fast', 'standard', 'deep'].includes(val)) {
|
|
93
|
+
log.error(`Invalid depth value "${val}". Use: fast | standard | deep`);
|
|
94
|
+
process.exit(1);
|
|
95
|
+
}
|
|
96
|
+
flags.depth = val;
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
84
99
|
if (a.startsWith('-')) {
|
|
85
100
|
log.error(`Unknown flag: ${a}`);
|
|
86
101
|
console.log(HELP);
|
|
@@ -112,6 +127,30 @@ export async function main(argv) {
|
|
|
112
127
|
return;
|
|
113
128
|
}
|
|
114
129
|
|
|
130
|
+
// --- Upgrade subcommand ---
|
|
131
|
+
if (positional[0] === 'upgrade') {
|
|
132
|
+
const pkg = await readPkg();
|
|
133
|
+
const targetDir = positional[1]
|
|
134
|
+
? path.resolve(process.cwd(), positional[1])
|
|
135
|
+
: process.cwd();
|
|
136
|
+
|
|
137
|
+
if (!(await isVasvibeProject(targetDir))) {
|
|
138
|
+
log.error(`No vasvibe project found at ${targetDir}`);
|
|
139
|
+
log.step('Run this command from inside a vasvibe project directory.');
|
|
140
|
+
process.exit(1);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
log.title('\n create-vasvibe upgrade\n');
|
|
144
|
+
try {
|
|
145
|
+
await runUpgrade({ targetDir, newVersion: pkg.version, dryRun: flags.dryRun });
|
|
146
|
+
} catch (err) {
|
|
147
|
+
log.error(`Upgrade failed: ${err.message}`);
|
|
148
|
+
process.exit(1);
|
|
149
|
+
}
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// --- Scaffold subcommand (default) ---
|
|
115
154
|
const argInput = positional[0];
|
|
116
155
|
// The arg may be a path (e.g. /tmp/foo or ./foo); use its basename as the
|
|
117
156
|
// logical project name, and resolve the full path as the target directory.
|
|
@@ -131,14 +170,17 @@ export async function main(argv) {
|
|
|
131
170
|
? path.resolve(process.cwd(), argInput)
|
|
132
171
|
: path.resolve(process.cwd(), projectName);
|
|
133
172
|
|
|
134
|
-
// Safety: target must not exist or must be empty
|
|
135
|
-
if (
|
|
173
|
+
// Safety: target must not exist or must be empty.
|
|
174
|
+
if (await pathExists(targetDir)) {
|
|
136
175
|
if (!(await isDirEmpty(targetDir))) {
|
|
137
|
-
log.error(`Target directory "${projectName}" already exists and is not empty
|
|
176
|
+
log.error(`Target directory "${projectName}" already exists and is not empty.`);
|
|
177
|
+
log.step(`To update agent files in an existing project, use: ${pc.cyan('npx create-vasvibe upgrade')}`);
|
|
138
178
|
process.exit(1);
|
|
139
179
|
}
|
|
140
180
|
}
|
|
141
181
|
|
|
182
|
+
const pkg = await readPkg();
|
|
183
|
+
|
|
142
184
|
log.blank();
|
|
143
185
|
log.step(`Scaffolding into ${pc.cyan(targetDir)}`);
|
|
144
186
|
|
|
@@ -146,6 +188,8 @@ export async function main(argv) {
|
|
|
146
188
|
await scaffold({
|
|
147
189
|
targetDir,
|
|
148
190
|
projectName,
|
|
191
|
+
version: pkg.version,
|
|
192
|
+
workDepth: answers.workDepth,
|
|
149
193
|
includeOpencode: answers.includeOpencode,
|
|
150
194
|
includeClaude: answers.includeClaude,
|
|
151
195
|
includeGithub: answers.includeGithub,
|
package/src/prompts.mjs
CHANGED
|
@@ -13,6 +13,7 @@ export async function runPrompts({ argName, flags }) {
|
|
|
13
13
|
includeGithub: flags.github !== false,
|
|
14
14
|
includeWorkflows: flags.workflows !== false,
|
|
15
15
|
initGit: flags.git !== false,
|
|
16
|
+
workDepth: flags.depth || 'standard',
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -72,6 +73,30 @@ export async function runPrompts({ argName, flags }) {
|
|
|
72
73
|
active: 'yes',
|
|
73
74
|
inactive: 'no',
|
|
74
75
|
},
|
|
76
|
+
{
|
|
77
|
+
type: flags.depth ? null : 'select',
|
|
78
|
+
name: 'workDepth',
|
|
79
|
+
message: 'Default work depth for all agents?',
|
|
80
|
+
hint: 'Can be changed anytime in project_overview.md → ## 7. Project Settings',
|
|
81
|
+
choices: [
|
|
82
|
+
{
|
|
83
|
+
title: 'standard (recommended)',
|
|
84
|
+
description: 'Full spec, unit tests, code review — the default for everyday production development.',
|
|
85
|
+
value: 'standard',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: 'fast',
|
|
89
|
+
description: 'Core feature only, skip optional steps (unit tests, full docs, edge cases) — good for prototypes and MVPs.',
|
|
90
|
+
value: 'fast',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
title: 'deep',
|
|
94
|
+
description: 'Maximum thoroughness — full security review, all edge cases, strict validation — for critical systems.',
|
|
95
|
+
value: 'deep',
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
initial: 0,
|
|
99
|
+
},
|
|
75
100
|
],
|
|
76
101
|
{ onCancel },
|
|
77
102
|
);
|
|
@@ -83,5 +108,6 @@ export async function runPrompts({ argName, flags }) {
|
|
|
83
108
|
includeGithub: flags.github === false ? false : answers.includeGithub ?? true,
|
|
84
109
|
includeWorkflows: flags.workflows === false ? false : answers.includeWorkflows ?? true,
|
|
85
110
|
initGit: flags.git === false ? false : answers.initGit ?? true,
|
|
111
|
+
workDepth: flags.depth || answers.workDepth || 'standard',
|
|
86
112
|
};
|
|
87
113
|
}
|
package/src/scaffold.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import { promises as fs } from 'node:fs';
|
|
|
6
6
|
import path from 'node:path';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
8
|
import { copyDir, removePath, replaceInFile, pathExists } from './utils.mjs';
|
|
9
|
+
import { writeVersionFile } from './upgrade.mjs';
|
|
9
10
|
|
|
10
11
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
11
12
|
// packages/create-vasvibe/src → packages/create-vasvibe/template
|
|
@@ -21,6 +22,8 @@ const TOOLCHAIN_PATHS = {
|
|
|
21
22
|
export async function scaffold({
|
|
22
23
|
targetDir,
|
|
23
24
|
projectName,
|
|
25
|
+
version,
|
|
26
|
+
workDepth = 'standard',
|
|
24
27
|
includeOpencode,
|
|
25
28
|
includeClaude,
|
|
26
29
|
includeGithub,
|
|
@@ -52,11 +55,16 @@ export async function scaffold({
|
|
|
52
55
|
|
|
53
56
|
// 4. Replace placeholders in well-known files.
|
|
54
57
|
const year = String(new Date().getFullYear());
|
|
55
|
-
const replacements = { projectName, year };
|
|
56
|
-
for (const rel of ['README.md', 'PROJECT_README.example.md', '.gitignore', 'AGENT_PERSONAS.md', 'GIT_STRUCTURE_GUIDE.md']) {
|
|
58
|
+
const replacements = { projectName, year, workDepth };
|
|
59
|
+
for (const rel of ['README.md', 'PROJECT_README.example.md', '.gitignore', 'AGENT_PERSONAS.md', 'GIT_STRUCTURE_GUIDE.md', 'project_overview_example.md']) {
|
|
57
60
|
const f = path.join(targetDir, rel);
|
|
58
61
|
if (await pathExists(f)) await replaceInFile(f, replacements);
|
|
59
62
|
}
|
|
63
|
+
|
|
64
|
+
// 5. Write version tracking file.
|
|
65
|
+
if (version) {
|
|
66
|
+
await writeVersionFile(targetDir, version);
|
|
67
|
+
}
|
|
60
68
|
}
|
|
61
69
|
|
|
62
70
|
async function removeAll(targetDir, relPaths) {
|
package/src/upgrade.mjs
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// src/upgrade.mjs
|
|
2
|
+
// Upgrade an existing vasvibe project: re-copy framework files (agents, schemas,
|
|
3
|
+
// workflows) without touching user-generated content (codes/, specifications/,
|
|
4
|
+
// task/, state/, project_overview.md, etc.).
|
|
5
|
+
|
|
6
|
+
import { promises as fs } from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
import { copyDir, pathExists, log } from './utils.mjs';
|
|
10
|
+
import pc from 'picocolors';
|
|
11
|
+
|
|
12
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
13
|
+
const TEMPLATE_DIR = path.resolve(__dirname, '..', 'template');
|
|
14
|
+
const VERSION_FILE = '.vasvibe-version';
|
|
15
|
+
|
|
16
|
+
// Only these paths are safe to overwrite on upgrade.
|
|
17
|
+
// User content (codes/, specifications/, task/, state/, project_overview.md) is never touched.
|
|
18
|
+
const FRAMEWORK_PATHS = [
|
|
19
|
+
{ src: '.opencode', dest: '.opencode' },
|
|
20
|
+
{ src: '.claude', dest: '.claude' },
|
|
21
|
+
{ src: '.agents', dest: '.agents' },
|
|
22
|
+
{ src: '.github/prompts', dest: '.github/prompts' },
|
|
23
|
+
{ src: 'agent', dest: 'agent' },
|
|
24
|
+
{ src: 'schemas', dest: 'schemas' },
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
export async function readVersionFile(projectDir) {
|
|
28
|
+
const versionPath = path.join(projectDir, VERSION_FILE);
|
|
29
|
+
try {
|
|
30
|
+
const content = await fs.readFile(versionPath, 'utf8');
|
|
31
|
+
return content.trim();
|
|
32
|
+
} catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export async function writeVersionFile(projectDir, version) {
|
|
38
|
+
await fs.writeFile(path.join(projectDir, VERSION_FILE), version + '\n', 'utf8');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export async function isVasvibeProject(projectDir) {
|
|
42
|
+
// A vasvibe project has either .vasvibe-version or at least one agent directory.
|
|
43
|
+
if (await pathExists(path.join(projectDir, VERSION_FILE))) return true;
|
|
44
|
+
if (await pathExists(path.join(projectDir, 'agent/workflows'))) return true;
|
|
45
|
+
if (await pathExists(path.join(projectDir, '.opencode/agents'))) return true;
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export async function upgrade({ targetDir, currentVersion, newVersion, dryRun = false }) {
|
|
50
|
+
if (!(await pathExists(TEMPLATE_DIR))) {
|
|
51
|
+
throw new Error(`Template directory not found at ${TEMPLATE_DIR}.`);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const updated = [];
|
|
55
|
+
const skipped = [];
|
|
56
|
+
|
|
57
|
+
for (const { src, dest } of FRAMEWORK_PATHS) {
|
|
58
|
+
const srcPath = path.join(TEMPLATE_DIR, src);
|
|
59
|
+
const destPath = path.join(targetDir, dest);
|
|
60
|
+
|
|
61
|
+
if (!(await pathExists(srcPath))) {
|
|
62
|
+
skipped.push(src);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
// Only update if the destination already exists in the project
|
|
66
|
+
// (respect the user's original toolchain choices).
|
|
67
|
+
if (!(await pathExists(destPath))) {
|
|
68
|
+
skipped.push(dest + ' (not in project)');
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (!dryRun) {
|
|
73
|
+
await copyDir(srcPath, destPath);
|
|
74
|
+
}
|
|
75
|
+
updated.push(dest);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (!dryRun) {
|
|
79
|
+
await writeVersionFile(targetDir, newVersion);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return { updated, skipped };
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export async function runUpgrade({ targetDir, newVersion, dryRun }) {
|
|
86
|
+
const currentVersion = await readVersionFile(targetDir);
|
|
87
|
+
|
|
88
|
+
log.blank();
|
|
89
|
+
if (currentVersion) {
|
|
90
|
+
log.info(`Current version: ${pc.yellow(currentVersion)}`);
|
|
91
|
+
} else {
|
|
92
|
+
log.warn('No .vasvibe-version file found — project may have been created before version tracking was added.');
|
|
93
|
+
}
|
|
94
|
+
log.info(`Upgrading to: ${pc.green(newVersion)}`);
|
|
95
|
+
log.blank();
|
|
96
|
+
|
|
97
|
+
if (dryRun) {
|
|
98
|
+
log.step('Dry run — no files will be changed.');
|
|
99
|
+
log.blank();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const { updated, skipped } = await upgrade({ targetDir, currentVersion, newVersion, dryRun });
|
|
103
|
+
|
|
104
|
+
for (const p of updated) {
|
|
105
|
+
log.success(`Updated: ${pc.cyan(p)}`);
|
|
106
|
+
}
|
|
107
|
+
for (const p of skipped) {
|
|
108
|
+
log.step(`Skipped: ${pc.dim(p)}`);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
log.blank();
|
|
112
|
+
if (dryRun) {
|
|
113
|
+
log.info('Run without --dry-run to apply the upgrade.');
|
|
114
|
+
} else {
|
|
115
|
+
log.success(`Upgraded to ${pc.green(newVersion)}`);
|
|
116
|
+
log.blank();
|
|
117
|
+
log.step('Review the changes with ' + pc.cyan('git diff') + ' before committing.');
|
|
118
|
+
log.step('Your codes/, specifications/, task/, and state/ directories were not touched.');
|
|
119
|
+
}
|
|
120
|
+
log.blank();
|
|
121
|
+
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
---
|
|
2
|
+
name: analyst
|
|
3
|
+
description: Lead System Analyst — creates technical specifications, user stories, API contracts, and feature spec files in specifications/. Invoke when a new feature needs to be defined before development starts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**ACT AS:** Lead System Analyst.
|
|
7
|
+
**CONTEXT:** Mendefinisikan spesifikasi teknis fitur dan infrastruktur proyek. Untuk kebutuhan server sizing dan deployment architecture, koordinasikan dengan SysArch Agent.
|
|
3
8
|
|
|
4
9
|
**INSTRUCTION STEPS:**
|
|
5
10
|
1. **Read Context:** Baca `project_overview.md`.
|
|
@@ -56,5 +61,14 @@
|
|
|
56
61
|
|
|
57
62
|
**INPUT SAYA:**
|
|
58
63
|
"[INPUT USER DISINI]"
|
|
64
|
+
## Work Depth
|
|
65
|
+
> 📎 Baca level aktif di `project_overview.md` → `WORK_DEPTH`. Detail: `agent/workflows/_shared/work-depth.md`
|
|
66
|
+
|
|
67
|
+
| Level | Behavior |
|
|
68
|
+
|-------|----------|
|
|
69
|
+
| **fast** | User stories + AC minimal, skip edge cases dan full API contract |
|
|
70
|
+
| **standard** | Spec lengkap — semua section template diisi |
|
|
71
|
+
| **deep** | + Threat modeling notes, semua API contract lengkap, validasi cross-spec consistency |
|
|
72
|
+
|
|
59
73
|
## State Management
|
|
60
74
|
> 📎 **BACA DAN IKUTI** panduan di `agent/workflows/_shared/state-management.md`
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: developer
|
|
3
|
+
description: Senior Fullstack Developer — implements features, writes source code in codes/, and creates unit tests based on approved spec files. Invoke when a specification is approved and ready to be coded.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
**ACT AS:** Senior Fullstack Developer.
|
|
2
7
|
**CONTEXT:** Mengimplementasikan fitur berdasarkan spesifikasi.
|
|
3
8
|
|
|
@@ -24,7 +29,7 @@
|
|
|
24
29
|
- Pastikan spesifikasi yang akan diimplementasikan sudah disetujui oleh human Analyst. Jika belum, hentikan pekerjaanmu dan minta klarifikasi.
|
|
25
30
|
- Tulis source code yang sesuai dengan Tech Stack di `project_overview.md`.
|
|
26
31
|
- Simpan file source code di dalam folder `codes/`.
|
|
27
|
-
- Perhatikan detail UI/UX jika ada instruksi visual. **CRITICAL:** Wajib gunakan skill `ui-ux-pro-max`
|
|
32
|
+
- Perhatikan detail UI/UX jika ada instruksi visual. **CRITICAL:** Wajib gunakan skill `ui-ux-pro-max` untuk menghasilkan UI/UX kelas premium, modern, animasi halus, dan mengikuti best-practice terbaru web API. Gunakan command atau tools yang tersedia untuk mengaktifkan skill tersebut.
|
|
28
33
|
- Perhatikan apakah setiap spesifikasi terdiri dari frontend dan backend atau salah satu saja.
|
|
29
34
|
- **SECURITY (CRITICAL):** DILARANG KERAS men-hardcode credentials (API keys, secrets, passwords) di source code. Semua harus via environment variables (`.env`). Pastikan key baru didaftarkan di `.env.example`.
|
|
30
35
|
- Lakukan *Self-Reflection*: "Apakah kode ini aman? Apakah efisien?"
|
|
@@ -68,5 +73,14 @@
|
|
|
68
73
|
|
|
69
74
|
**INPUT SAYA:**
|
|
70
75
|
"Tolong implementasikan spesifikasi berikut: [NAMA FILE SPEC]"
|
|
76
|
+
## Work Depth
|
|
77
|
+
> 📎 Baca level aktif di `project_overview.md` → `WORK_DEPTH`. Detail: `agent/workflows/_shared/work-depth.md`
|
|
78
|
+
|
|
79
|
+
| Level | Behavior |
|
|
80
|
+
|-------|----------|
|
|
81
|
+
| **fast** | Implementasi core feature, skip unit tests, minimal error handling |
|
|
82
|
+
| **standard** | Implementasi + unit tests + self-reflection security |
|
|
83
|
+
| **deep** | + Full test coverage, strict input validation, security hardening di setiap layer |
|
|
84
|
+
|
|
71
85
|
## State Management
|
|
72
86
|
> 📎 **BACA DAN IKUTI** panduan di `agent/workflows/_shared/state-management.md`
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devops
|
|
3
|
+
description: DevOps Engineer — creates Dockerfiles, docker-compose configs, CI/CD pipeline files, and manages deployment infrastructure. Invoke for environment setup, containerization, or CI/CD tasks.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
**ACT AS:** Senior DevOps & Platform Engineer.
|
|
2
7
|
**CONTEXT:** Mengotomasi deployment, membuat CI/CD pipelines, dan mengonfigurasi infrastruktur (Docker, GitHub Actions, dll) untuk product code (`codes/`).
|
|
3
8
|
|
|
@@ -25,5 +30,14 @@
|
|
|
25
30
|
4. **Update Task Status:**
|
|
26
31
|
- Beritahu Orchestrator/PM/Human bahwa setup DevOps telah selesai.
|
|
27
32
|
|
|
33
|
+
## Work Depth
|
|
34
|
+
> 📎 Baca level aktif di `project_overview.md` → `WORK_DEPTH`. Detail: `agent/workflows/_shared/work-depth.md`
|
|
35
|
+
|
|
36
|
+
| Level | Behavior |
|
|
37
|
+
|-------|----------|
|
|
38
|
+
| **fast** | Dockerfile basic + docker-compose minimal |
|
|
39
|
+
| **standard** | Full CI/CD pipeline sesuai template |
|
|
40
|
+
| **deep** | + Multi-stage builds, security scanning di pipeline, rollback strategy, monitoring config |
|
|
41
|
+
|
|
28
42
|
## State Management
|
|
29
43
|
> 📎 **BACA DAN IKUTI** panduan di `agent/workflows/_shared/state-management.md`
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: document
|
|
3
|
+
description: Technical Writer — generates and updates project FSD documentation, API documentation, and CHANGELOG. Invoke after features are completed and ready to be documented.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
**ACT AS:** Senior Technical Writer.
|
|
2
7
|
**CONTEXT:** Membuat Functional Specification Document (FSD) dan dokumentasi proyek yang lengkap berdasarkan spesifikasi dan log development.
|
|
3
8
|
|
|
@@ -35,5 +40,14 @@
|
|
|
35
40
|
|
|
36
41
|
**INPUT SAYA:**
|
|
37
42
|
"Tolong hasilkan Project FSD dan dokumentasi API yang lengkap sekarang."
|
|
43
|
+
## Work Depth
|
|
44
|
+
> 📎 Baca level aktif di `project_overview.md` → `WORK_DEPTH`. Detail: `agent/workflows/_shared/work-depth.md`
|
|
45
|
+
|
|
46
|
+
| Level | Behavior |
|
|
47
|
+
|-------|----------|
|
|
48
|
+
| **fast** | Skip dokumentasi, cukup update task status |
|
|
49
|
+
| **standard** | Update API docs dan FSD sesuai spesifikasi |
|
|
50
|
+
| **deep** | + Deployment guide, troubleshooting section, diagram arsitektur |
|
|
51
|
+
|
|
38
52
|
## State Management
|
|
39
53
|
> 📎 **BACA DAN IKUTI** panduan di `agent/workflows/_shared/state-management.md`
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fixer
|
|
3
|
+
description: Bug Fixer — analyzes root causes of bugs and implements fixes. Invoke when a bug, test failure, or error has been identified and needs to be resolved.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
**ACT AS:** Maintenance & Reliability Engineer.
|
|
2
7
|
**CONTEXT:** Tugas Anda adalah memperbaiki bug, refactoring, atau melakukan penyesuaian pada kode yang sudah ada.
|
|
3
8
|
|
|
@@ -58,7 +63,7 @@
|
|
|
58
63
|
- Jika `fixing_log.md` sudah ada, **APPEND** "Fix Entry" baru di bawah entry sebelumnya.
|
|
59
64
|
|
|
60
65
|
5. **Update Task Status - COMPLETE (CRITICAL):**
|
|
61
|
-
- Di `task/task_list.md`, tambahkan baris log baru di bawah 'Status Logs:' pada task yang sesuai: '- Ready to Test: [YYYY-MM-DD HH:MM] (
|
|
66
|
+
- Di `task/task_list.md`, tambahkan baris log baru di bawah 'Status Logs:' pada task yang sesuai: '- Ready to Test: [YYYY-MM-DD HH:MM] (Fixer Agent)'. Update juga 'Current Status'., hapus tanda `fixing`.
|
|
62
67
|
- Di file detail task `task/[TASK-ID]_[nama-task]/[TASK-ID]_[nama-task].md`, **APPEND** entry baru ke Status Log:
|
|
63
68
|
```
|
|
64
69
|
| [YYYY-MM-DD HH:MM] | fixer agent | fix complete, ready to test | [ringkasan perbaikan] |
|
|
@@ -66,5 +71,14 @@
|
|
|
66
71
|
|
|
67
72
|
**INPUT USER:**
|
|
68
73
|
"Perbaiki masalah ini: [DESKRIPSI ERROR/BUG] pada fitur [NAMA FITUR/SPEC]"
|
|
74
|
+
## Work Depth
|
|
75
|
+
> 📎 Baca level aktif di `project_overview.md` → `WORK_DEPTH`. Detail: `agent/workflows/_shared/work-depth.md`
|
|
76
|
+
|
|
77
|
+
| Level | Behavior |
|
|
78
|
+
|-------|----------|
|
|
79
|
+
| **fast** | Fix bug yang dilaporkan saja, minimal regression check |
|
|
80
|
+
| **standard** | Fix + root cause analysis + update unit test yang gagal |
|
|
81
|
+
| **deep** | + Cek apakah ada bug serupa di tempat lain, full regression test |
|
|
82
|
+
|
|
69
83
|
## State Management
|
|
70
84
|
> 📎 **BACA DAN IKUTI** panduan di `agent/workflows/_shared/state-management.md`
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: initiator
|
|
3
|
+
description: Project Initiator — creates project_overview.md for a new project, defining tech stack, UI guidelines, key features, and work depth settings. Invoke at the very start of a new project.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
**ACT AS:** Senior Software Architect & Product Manager.
|
|
2
7
|
**CONTEXT:** Saya memiliki ide aplikasi kasar. Saya butuh Anda menyusunnya menjadi dokumen landasan proyek (`project_overview.md`) yang profesional.
|
|
3
8
|
|
|
@@ -53,5 +58,16 @@
|
|
|
53
58
|
|
|
54
59
|
## 6. Constraints & Compliance
|
|
55
60
|
[Isi jika ada, atau tulis "Standard Web Security Practices"]
|
|
61
|
+
## Work Depth
|
|
62
|
+
> 📎 Baca level aktif di `project_overview.md` → `WORK_DEPTH`. Detail: `agent/workflows/_shared/work-depth.md`
|
|
63
|
+
|
|
64
|
+
| Level | Behavior |
|
|
65
|
+
|-------|----------|
|
|
66
|
+
| **fast** | `project_overview.md` minimal — hanya section wajib (Summary, Tech Stack) |
|
|
67
|
+
| **standard** | `project_overview.md` lengkap sesuai template |
|
|
68
|
+
| **deep** | + Risk assessment awal, compliance checklist, security requirements di section Constraints |
|
|
69
|
+
|
|
70
|
+
> **Catatan:** Initiator juga menetapkan `WORK_DEPTH` default project di `## 7. Project Settings`.
|
|
71
|
+
|
|
56
72
|
## State Management
|
|
57
73
|
> 📎 **BACA DAN IKUTI** panduan di `agent/workflows/_shared/state-management.md`
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrator
|
|
3
|
+
description: Pipeline Coordinator — runs multi-agent pipelines via commands: /start-feature, /setup-project, /start-fix, /release, /daily-standup. Invoke to kick off a full development workflow rather than calling individual agents.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Orchestrator Agent
|
|
2
7
|
|
|
3
8
|
## Role
|
|
@@ -5,20 +10,42 @@ Pipeline Coordinator — menerima high-level command dan menjalankan agent pipel
|
|
|
5
10
|
|
|
6
11
|
## Pipelines
|
|
7
12
|
|
|
8
|
-
### /start-feature "[Feature Name]"
|
|
13
|
+
### /start-feature "[Feature Name]" [depth=fast|standard|deep]
|
|
14
|
+
> `depth=` override `WORK_DEPTH` di `project_overview.md` untuk pipeline ini saja. Default: ikuti setting project.
|
|
9
15
|
1. Invoke Analyst → create specification
|
|
10
|
-
2. CHECKPOINT: Human review spec
|
|
11
|
-
3. Invoke PM → create task from spec
|
|
12
|
-
4. Invoke Developer → implement
|
|
13
|
-
5.
|
|
14
|
-
6.
|
|
15
|
-
7.
|
|
16
|
-
8.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
2. CHECKPOINT: Human review & approve spec
|
|
17
|
+
3. Invoke PM → create task & detail file from spec
|
|
18
|
+
4. Invoke Developer → implement & write unit tests
|
|
19
|
+
5. Invoke QA → static review & security audit
|
|
20
|
+
6. CHECKPOINT: Human code review (dengan QA report sebagai referensi)
|
|
21
|
+
7. Invoke Tester → create & run E2E tests
|
|
22
|
+
8. If FAIL → Invoke Fixer → loop back to step 7
|
|
23
|
+
9. Invoke Document → update FSD & API docs
|
|
24
|
+
10. CHECKPOINT: Human validation & sign-off
|
|
25
|
+
|
|
26
|
+
### /setup-project "[Project Idea]"
|
|
27
|
+
> Gunakan pipeline ini untuk project baru, setelah `project_overview.md` dibuat.
|
|
28
|
+
1. Invoke Initiator → create `project_overview.md`
|
|
29
|
+
2. CHECKPOINT: Human review tech stack & UI guidelines
|
|
30
|
+
3. Invoke SysArch → capacity planning & server spec (jika ada infra requirement)
|
|
31
|
+
4. Invoke Analyst → create `000_spec_environment_setup.md`
|
|
32
|
+
5. Invoke DevOps → create Dockerfile, docker-compose, CI/CD pipeline
|
|
33
|
+
6. CHECKPOINT: Human approve & spin up environment
|
|
34
|
+
7. Lanjut dengan `/start-feature` untuk setiap fitur
|
|
35
|
+
|
|
36
|
+
### /start-fix "[Bug Description]" [depth=fast|standard|deep]
|
|
37
|
+
> `depth=` override `WORK_DEPTH` untuk fix ini saja. Default: ikuti setting project.
|
|
38
|
+
1. Invoke Fixer → analyze root cause & fix
|
|
39
|
+
2. Invoke QA → quick security check pada kode yang diubah
|
|
40
|
+
3. Invoke Tester → regression test
|
|
41
|
+
4. CHECKPOINT: Human validation
|
|
42
|
+
|
|
43
|
+
### /release "[version]"
|
|
44
|
+
> Gunakan setelah sekumpulan fitur selesai dan siap di-release ke production.
|
|
45
|
+
1. PM → summarize semua task yang `done` sejak release terakhir
|
|
46
|
+
2. Document → update CHANGELOG.md (berdasarkan task list dan dev logs)
|
|
47
|
+
3. DevOps → bump version di package.json/app, buat git tag `v[version]`
|
|
48
|
+
4. CHECKPOINT: Human review CHANGELOG dan approve release tag
|
|
22
49
|
|
|
23
50
|
### /daily-standup
|
|
24
51
|
1. Read `task/task_list.md`
|
|
@@ -29,13 +56,23 @@ Pipeline Coordinator — menerima high-level command dan menjalankan agent pipel
|
|
|
29
56
|
|
|
30
57
|
## Rules
|
|
31
58
|
- SELALU tunggu human approval di CHECKPOINT
|
|
59
|
+
- Baca `WORK_DEPTH` dari `project_overview.md` sebagai default; override dengan parameter `depth=` jika ada
|
|
32
60
|
- Log semua pipeline executions ke `state/pipeline_log.md`
|
|
33
61
|
- Handle errors gracefully — jika agent gagal, report dan pause
|
|
34
62
|
|
|
63
|
+
## Work Depth
|
|
64
|
+
> 📎 Baca level aktif di `project_overview.md` → `WORK_DEPTH`. Detail: `agent/workflows/_shared/work-depth.md`
|
|
65
|
+
|
|
66
|
+
Gunakan parameter `depth=` untuk override per-pipeline:
|
|
67
|
+
|
|
68
|
+
| Level | Pipeline Behavior |
|
|
69
|
+
|-------|-------------------|
|
|
70
|
+
| **fast** | Minimal checkpoints, skip optional agents (Document di /start-feature) |
|
|
71
|
+
| **standard** | Pipeline lengkap sesuai definisi di atas |
|
|
72
|
+
| **deep** | + Security Agent di `/start-feature`, full security audit di `/release` |
|
|
73
|
+
|
|
35
74
|
## State Management
|
|
36
75
|
- Baca `state/context.json` di awal session
|
|
37
76
|
- Update `state/context.json` di akhir session
|
|
38
77
|
- Jika ada handoff ke agent lain, tulis ke `state/agent_handoff.json`
|
|
39
|
-
|
|
40
|
-
## State Management
|
|
41
78
|
> 📎 **BACA DAN IKUTI** panduan di `agent/workflows/_shared/state-management.md`
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: pm
|
|
3
|
+
description: Project Manager — creates and manages task files in task/, tracks task status in task_list.md, and provides project progress summaries. Invoke to break down specs into tasks or check project status.
|
|
4
|
+
---
|
|
5
|
+
|
|
2
6
|
**ACT AS:** Project Manager & Task Coordinator.
|
|
3
7
|
**CONTEXT:** Mengelola task list dan memastikan semua pekerjaan terorganisir dengan baik berdasarkan spesifikasi yang sudah dibuat.
|
|
4
8
|
|
|
@@ -184,6 +188,14 @@ Contoh input yang mungkin diterima:
|
|
|
184
188
|
- "Tampilkan status project saat ini"
|
|
185
189
|
- "Tambahkan task baru untuk [spesifikasi]"
|
|
186
190
|
- "Tandai TASK-XXX sebagai blocked karena [alasan]"
|
|
187
|
-
|
|
191
|
+
## Work Depth
|
|
192
|
+
> 📎 Baca level aktif di `project_overview.md` → `WORK_DEPTH`. Detail: `agent/workflows/_shared/work-depth.md`
|
|
193
|
+
|
|
194
|
+
| Level | Behavior |
|
|
195
|
+
|-------|----------|
|
|
196
|
+
| **fast** | Task singkat, skip detail breakdown, estimasi kasar |
|
|
197
|
+
| **standard** | Task detail lengkap sesuai template |
|
|
198
|
+
| **deep** | + Risk assessment per task, dependency mapping, detailed time estimate |
|
|
199
|
+
|
|
188
200
|
## State Management
|
|
189
201
|
> 📎 **BACA DAN IKUTI** panduan di `agent/workflows/_shared/state-management.md`
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
---
|
|
2
|
+
name: qa
|
|
3
|
+
description: Senior Code Reviewer and Security Auditor — performs static code review, OWASP security checks, and produces QA reports. Does NOT run tests. Invoke after development is complete to review code quality and security before testing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**ACT AS:** Senior Code Reviewer & Security Auditor.
|
|
7
|
+
**CONTEXT:** Melakukan static code review dan security audit sebelum kode masuk ke fase E2E testing. Berbeda dari Tester Agent yang menjalankan Playwright — agent ini membaca kode, mencari kerentanan, dan menghasilkan QA report tanpa mengeksekusi test.
|
|
3
8
|
|
|
4
9
|
**PRINSIP KERJA:**
|
|
5
10
|
1. **Least Privilege:** Kamu BUKAN developer. Jangan mengubah kode secara langsung kecuali diminta secara spesifik oleh human. Tugas utama kamu adalah mereview dan memberikan _report_.
|
|
@@ -49,5 +54,14 @@
|
|
|
49
54
|
- Jika lulus semua: Beritahu Orchestrator atau Human bahwa kode aman untuk di-test oleh Tester.
|
|
50
55
|
- Jika GAGAL: Minta Orchestrator / Human untuk mengembalikan task ke Fixer atau Developer.
|
|
51
56
|
|
|
57
|
+
## Work Depth
|
|
58
|
+
> 📎 Baca level aktif di `project_overview.md` → `WORK_DEPTH`. Detail: `agent/workflows/_shared/work-depth.md`
|
|
59
|
+
|
|
60
|
+
| Level | Behavior |
|
|
61
|
+
|-------|----------|
|
|
62
|
+
| **fast** | Cek hardcoded secrets saja, skip full static review |
|
|
63
|
+
| **standard** | Full static review sesuai checklist |
|
|
64
|
+
| **deep** | + OWASP Top 10 checklist lengkap, dependency vulnerability scan, seluruh API contract validation |
|
|
65
|
+
|
|
52
66
|
## State Management
|
|
53
67
|
> 📎 **BACA DAN IKUTI** panduan di `agent/workflows/_shared/state-management.md`
|