ai-devx 1.0.3 → 1.0.5
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/cli.js +80 -39
- package/package.json +1 -1
- package/src/commands/init.js +77 -41
- package/src/commands/shell.js +349 -0
- package/templates/.agent/rules/CLAUDE.md +273 -0
package/bin/cli.js
CHANGED
|
@@ -1,61 +1,102 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const { program } = require(
|
|
4
|
-
const chalk = require(
|
|
5
|
-
const pkg = require(
|
|
6
|
-
const initCommand = require(
|
|
7
|
-
const updateCommand = require(
|
|
8
|
-
const statusCommand = require(
|
|
3
|
+
const { program } = require("commander");
|
|
4
|
+
const chalk = require("chalk");
|
|
5
|
+
const pkg = require("../package.json");
|
|
6
|
+
const initCommand = require("../src/commands/init");
|
|
7
|
+
const updateCommand = require("../src/commands/update");
|
|
8
|
+
const statusCommand = require("../src/commands/status");
|
|
9
|
+
const shellCommand = require("../src/commands/shell");
|
|
9
10
|
|
|
10
|
-
console.log(
|
|
11
|
+
console.log(
|
|
12
|
+
chalk.cyan.bold(`
|
|
11
13
|
╔════════════════════════════════════╗
|
|
12
14
|
║ 🤖 AI-DEVX ${pkg.version.padEnd(8)} ║
|
|
13
15
|
║ AI Agent Templates & Workflows ║
|
|
14
16
|
╚════════════════════════════════════╝
|
|
15
|
-
`)
|
|
17
|
+
`),
|
|
18
|
+
);
|
|
16
19
|
|
|
17
20
|
program
|
|
18
|
-
.name(
|
|
19
|
-
.description(
|
|
20
|
-
.version(pkg.version,
|
|
21
|
+
.name("ai-devx")
|
|
22
|
+
.description("AI Agent templates with Skills, Agents, and Workflows")
|
|
23
|
+
.version(pkg.version, "-v, --version", "Display version number");
|
|
21
24
|
|
|
22
25
|
program
|
|
23
|
-
.command(
|
|
24
|
-
.description(
|
|
25
|
-
.option(
|
|
26
|
-
.option(
|
|
27
|
-
.option(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
.command("init")
|
|
27
|
+
.description("Install .agent folder into your project")
|
|
28
|
+
.option("-f, --force", "Overwrite existing .agent folder")
|
|
29
|
+
.option("-p, --path <path>", "Install in specific directory", process.cwd())
|
|
30
|
+
.option(
|
|
31
|
+
"-b, --branch <branch>",
|
|
32
|
+
"Use specific branch from repository",
|
|
33
|
+
"main",
|
|
34
|
+
)
|
|
35
|
+
.option("-q, --quiet", "Suppress output (for CI/CD)")
|
|
36
|
+
.option("--dry-run", "Preview actions without executing")
|
|
37
|
+
.option(
|
|
38
|
+
"-s, --source <url>",
|
|
39
|
+
"Custom template source (GitHub repo)",
|
|
40
|
+
"kmamtora/ai-devx",
|
|
41
|
+
)
|
|
42
|
+
.option(
|
|
43
|
+
"-a, --assistant <assistants>",
|
|
44
|
+
"Comma-separated list of assistants (claude,gemini,all)",
|
|
45
|
+
"all",
|
|
46
|
+
)
|
|
31
47
|
.action(initCommand);
|
|
32
48
|
|
|
33
49
|
program
|
|
34
|
-
.command(
|
|
35
|
-
.description(
|
|
36
|
-
.option(
|
|
37
|
-
.option(
|
|
38
|
-
.option(
|
|
50
|
+
.command("update")
|
|
51
|
+
.description("Update to the latest version of templates")
|
|
52
|
+
.option("-f, --force", "Force update even if up-to-date")
|
|
53
|
+
.option("--backup", "Create backup before updating")
|
|
54
|
+
.option("-q, --quiet", "Suppress output")
|
|
39
55
|
.action(updateCommand);
|
|
40
56
|
|
|
41
57
|
program
|
|
42
|
-
.command(
|
|
43
|
-
.description(
|
|
44
|
-
.option(
|
|
58
|
+
.command("status")
|
|
59
|
+
.description("Check installation status and version info")
|
|
60
|
+
.option("-p, --path <path>", "Check specific directory", process.cwd())
|
|
45
61
|
.action(statusCommand);
|
|
46
62
|
|
|
47
|
-
program
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
console.log(
|
|
56
|
-
console.log(chalk.bold(
|
|
57
|
-
console.log(
|
|
58
|
-
|
|
63
|
+
program
|
|
64
|
+
.command("shell [path]")
|
|
65
|
+
.description(
|
|
66
|
+
"Start interactive shell to browse skills, agents, and workflows",
|
|
67
|
+
)
|
|
68
|
+
.action(shellCommand);
|
|
69
|
+
|
|
70
|
+
program.on("--help", () => {
|
|
71
|
+
console.log("");
|
|
72
|
+
console.log(chalk.bold("Examples:"));
|
|
73
|
+
console.log(
|
|
74
|
+
" $ ai-devx init # Install in current directory",
|
|
75
|
+
);
|
|
76
|
+
console.log(
|
|
77
|
+
" $ ai-devx init --path ./my-project # Install in specific directory",
|
|
78
|
+
);
|
|
79
|
+
console.log(
|
|
80
|
+
" $ ai-devx init --force # Overwrite existing installation",
|
|
81
|
+
);
|
|
82
|
+
console.log(
|
|
83
|
+
" $ ai-devx init --assistant claude # Install with only Claude rules",
|
|
84
|
+
);
|
|
85
|
+
console.log(
|
|
86
|
+
" $ ai-devx init --assistant claude,gemini # Install with both assistants",
|
|
87
|
+
);
|
|
88
|
+
console.log(
|
|
89
|
+
" $ ai-devx shell # Start interactive shell",
|
|
90
|
+
);
|
|
91
|
+
console.log(" $ ai-devx update # Update templates");
|
|
92
|
+
console.log(
|
|
93
|
+
" $ ai-devx status # Check installation status",
|
|
94
|
+
);
|
|
95
|
+
console.log("");
|
|
96
|
+
console.log(chalk.bold("Quick Start:"));
|
|
97
|
+
console.log(" $ npx ai-devx init");
|
|
98
|
+
console.log(" $ npx ai-devx shell");
|
|
99
|
+
console.log("");
|
|
59
100
|
});
|
|
60
101
|
|
|
61
102
|
program.parse();
|
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -1,83 +1,119 @@
|
|
|
1
|
-
const path = require(
|
|
2
|
-
const fs = require(
|
|
3
|
-
const ora = require(
|
|
4
|
-
const logger = require(
|
|
5
|
-
const fileUtils = require(
|
|
6
|
-
const config = require(
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const fs = require("fs-extra");
|
|
3
|
+
const ora = require("ora");
|
|
4
|
+
const logger = require("../utils/logger");
|
|
5
|
+
const fileUtils = require("../utils/fileSystem");
|
|
6
|
+
const config = require("../config");
|
|
7
7
|
|
|
8
8
|
async function initCommand(options) {
|
|
9
|
-
const {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const {
|
|
10
|
+
force,
|
|
11
|
+
path: targetPath,
|
|
12
|
+
branch,
|
|
13
|
+
quiet,
|
|
14
|
+
dryRun,
|
|
15
|
+
source,
|
|
16
|
+
assistant,
|
|
17
|
+
} = options;
|
|
18
|
+
|
|
19
|
+
const spinner = quiet ? null : ora("Installing AI-DEVX templates...").start();
|
|
20
|
+
|
|
13
21
|
try {
|
|
14
22
|
const absolutePath = path.resolve(targetPath);
|
|
15
23
|
const agentPath = path.join(absolutePath, config.AGENT_FOLDER);
|
|
16
|
-
|
|
24
|
+
|
|
17
25
|
// Check if already installed
|
|
18
26
|
const isInstalled = await fileUtils.isInstalled(absolutePath);
|
|
19
|
-
|
|
27
|
+
|
|
20
28
|
if (isInstalled && !force && !dryRun) {
|
|
21
29
|
if (spinner) spinner.stop();
|
|
22
|
-
logger.warning(
|
|
23
|
-
logger.info(
|
|
30
|
+
logger.warning("AI-DEVX is already installed in this directory.");
|
|
31
|
+
logger.info(
|
|
32
|
+
'Use --force to overwrite or run "ai-devx update" to update.',
|
|
33
|
+
);
|
|
24
34
|
logger.blank();
|
|
25
|
-
logger.info(
|
|
35
|
+
logger.info("To keep .agent/ local without git tracking:");
|
|
26
36
|
logger.step('Add ".agent/" to .git/info/exclude (not .gitignore)');
|
|
27
37
|
return;
|
|
28
38
|
}
|
|
29
|
-
|
|
39
|
+
|
|
30
40
|
if (dryRun) {
|
|
31
41
|
if (spinner) spinner.stop();
|
|
32
|
-
logger.info(
|
|
42
|
+
logger.info("DRY RUN - Actions that would be taken:");
|
|
33
43
|
logger.step(`Install templates to: ${agentPath}`);
|
|
34
|
-
if (isInstalled) logger.step(
|
|
44
|
+
if (isInstalled) logger.step("Overwrite existing installation");
|
|
35
45
|
return;
|
|
36
46
|
}
|
|
37
|
-
|
|
47
|
+
|
|
38
48
|
// Determine source path
|
|
39
|
-
const sourcePath = path.join(__dirname,
|
|
40
|
-
|
|
49
|
+
const sourcePath = path.join(__dirname, "../../templates/.agent");
|
|
50
|
+
|
|
41
51
|
// Copy templates
|
|
42
|
-
if (spinner) spinner.text =
|
|
52
|
+
if (spinner) spinner.text = "Copying template files...";
|
|
43
53
|
await fileUtils.copyDir(sourcePath, agentPath, { force });
|
|
44
|
-
|
|
54
|
+
|
|
55
|
+
// Handle assistant selection
|
|
56
|
+
if (spinner) spinner.text = "Configuring assistants...";
|
|
57
|
+
const selectedAssistants =
|
|
58
|
+
assistant === "all"
|
|
59
|
+
? ["claude", "gemini"]
|
|
60
|
+
: assistant
|
|
61
|
+
.toLowerCase()
|
|
62
|
+
.split(",")
|
|
63
|
+
.map((a) => a.trim());
|
|
64
|
+
|
|
65
|
+
const rulesPath = path.join(agentPath, "rules");
|
|
66
|
+
const validAssistants = ["claude", "gemini"];
|
|
67
|
+
|
|
68
|
+
// Remove rules for unselected assistants
|
|
69
|
+
for (const ast of validAssistants) {
|
|
70
|
+
if (!selectedAssistants.includes(ast)) {
|
|
71
|
+
const ruleFile = path.join(rulesPath, `${ast.toUpperCase()}.md`);
|
|
72
|
+
try {
|
|
73
|
+
await fs.remove(ruleFile);
|
|
74
|
+
} catch (e) {
|
|
75
|
+
// File might not exist, ignore
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
45
80
|
// Write version file
|
|
46
|
-
const versionFile = path.join(agentPath,
|
|
47
|
-
await fs.writeFile(versionFile, config.version ||
|
|
48
|
-
|
|
81
|
+
const versionFile = path.join(agentPath, "VERSION");
|
|
82
|
+
await fs.writeFile(versionFile, config.version || "1.0.0");
|
|
83
|
+
|
|
49
84
|
// Write config file
|
|
50
|
-
const configFile = path.join(agentPath,
|
|
85
|
+
const configFile = path.join(agentPath, "config.json");
|
|
51
86
|
await fileUtils.writeJson(configFile, {
|
|
52
|
-
version:
|
|
87
|
+
version: "1.0.0",
|
|
53
88
|
installedAt: new Date().toISOString(),
|
|
54
|
-
source: source
|
|
89
|
+
source: source,
|
|
90
|
+
assistants: selectedAssistants,
|
|
55
91
|
});
|
|
56
|
-
|
|
57
|
-
if (spinner) spinner.succeed(
|
|
58
|
-
|
|
92
|
+
|
|
93
|
+
if (spinner) spinner.succeed("AI-DEVX templates installed successfully!");
|
|
94
|
+
|
|
59
95
|
if (!quiet) {
|
|
60
96
|
logger.blank();
|
|
61
97
|
logger.success(`Installed in: ${agentPath}`);
|
|
62
98
|
logger.blank();
|
|
63
|
-
logger.info(
|
|
99
|
+
logger.info("What's included:");
|
|
64
100
|
logger.step(`Agents: 9 specialist personas`);
|
|
65
101
|
logger.step(`Skills: Domain-specific knowledge modules`);
|
|
66
102
|
logger.step(`Workflows: Slash commands (/plan, /create, /debug, etc.)`);
|
|
67
103
|
logger.step(`Scripts: Validation and automation tools`);
|
|
104
|
+
logger.step(`Assistants: ${selectedAssistants.join(", ")}`);
|
|
68
105
|
logger.blank();
|
|
69
|
-
logger.info(
|
|
70
|
-
logger.step(
|
|
71
|
-
logger.step(
|
|
72
|
-
logger.step(
|
|
106
|
+
logger.info("Quick Start:");
|
|
107
|
+
logger.step("Type /plan to create a task breakdown");
|
|
108
|
+
logger.step("Type /create to build new features");
|
|
109
|
+
logger.step("Type /debug for systematic debugging");
|
|
73
110
|
logger.blank();
|
|
74
|
-
logger.warning(
|
|
111
|
+
logger.warning("Important: For Cursor/Windsurf compatibility");
|
|
75
112
|
logger.step('Add ".agent/" to .git/info/exclude (NOT .gitignore)');
|
|
76
|
-
logger.step(
|
|
113
|
+
logger.step("This keeps templates local while allowing AI indexing");
|
|
77
114
|
}
|
|
78
|
-
|
|
79
115
|
} catch (error) {
|
|
80
|
-
if (spinner) spinner.fail(
|
|
116
|
+
if (spinner) spinner.fail("Installation failed");
|
|
81
117
|
logger.error(error.message);
|
|
82
118
|
process.exit(1);
|
|
83
119
|
}
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const fs = require("fs-extra");
|
|
3
|
+
const chalk = require("chalk");
|
|
4
|
+
const readline = require("readline");
|
|
5
|
+
|
|
6
|
+
class InteractiveCLI {
|
|
7
|
+
constructor(agentPath) {
|
|
8
|
+
this.agentPath = agentPath;
|
|
9
|
+
this.workflows = [];
|
|
10
|
+
this.skills = [];
|
|
11
|
+
this.agents = [];
|
|
12
|
+
this.scripts = [];
|
|
13
|
+
this.rules = [];
|
|
14
|
+
this.shared = [];
|
|
15
|
+
this.workflowsPath = path.join(agentPath, "workflows");
|
|
16
|
+
this.skillsPath = path.join(agentPath, "skills");
|
|
17
|
+
this.agentsPath = path.join(agentPath, "agents");
|
|
18
|
+
this.scriptsPath = path.join(agentPath, "scripts");
|
|
19
|
+
this.rulesPath = path.join(agentPath, "rules");
|
|
20
|
+
this.sharedPath = path.join(agentPath, ".shared");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async loadResources() {
|
|
24
|
+
// Load workflows
|
|
25
|
+
if (await fs.pathExists(this.workflowsPath)) {
|
|
26
|
+
const files = await fs.readdir(this.workflowsPath);
|
|
27
|
+
this.workflows = files
|
|
28
|
+
.filter((f) => f.endsWith(".md"))
|
|
29
|
+
.map((f) => ({
|
|
30
|
+
name: `/${path.basename(f, ".md")}`,
|
|
31
|
+
file: f,
|
|
32
|
+
type: "workflow",
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Load skills
|
|
37
|
+
if (await fs.pathExists(this.skillsPath)) {
|
|
38
|
+
const entries = await fs.readdir(this.skillsPath, {
|
|
39
|
+
withFileTypes: true,
|
|
40
|
+
});
|
|
41
|
+
this.skills = entries
|
|
42
|
+
.filter((e) => e.isDirectory())
|
|
43
|
+
.map((e) => ({
|
|
44
|
+
name: e.name,
|
|
45
|
+
path: path.join(this.skillsPath, e.name),
|
|
46
|
+
type: "skill",
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Load agents
|
|
51
|
+
if (await fs.pathExists(this.agentsPath)) {
|
|
52
|
+
const files = await fs.readdir(this.agentsPath);
|
|
53
|
+
this.agents = files
|
|
54
|
+
.filter((f) => f.endsWith(".md"))
|
|
55
|
+
.map((f) => ({
|
|
56
|
+
name: `@${path.basename(f, ".md")}`,
|
|
57
|
+
file: f,
|
|
58
|
+
type: "agent",
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Load scripts
|
|
63
|
+
if (await fs.pathExists(this.scriptsPath)) {
|
|
64
|
+
const files = await fs.readdir(this.scriptsPath);
|
|
65
|
+
this.scripts = files
|
|
66
|
+
.filter((f) => f.endsWith(".py"))
|
|
67
|
+
.map((f) => ({
|
|
68
|
+
name: f,
|
|
69
|
+
file: f,
|
|
70
|
+
type: "script",
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Load rules
|
|
75
|
+
if (await fs.pathExists(this.rulesPath)) {
|
|
76
|
+
const files = await fs.readdir(this.rulesPath);
|
|
77
|
+
this.rules = files
|
|
78
|
+
.filter((f) => f.endsWith(".md"))
|
|
79
|
+
.map((f) => ({
|
|
80
|
+
name: path.basename(f, ".md"),
|
|
81
|
+
file: f,
|
|
82
|
+
type: "rule",
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Load shared
|
|
87
|
+
if (await fs.pathExists(this.sharedPath)) {
|
|
88
|
+
const entries = await fs.readdir(this.sharedPath, {
|
|
89
|
+
withFileTypes: true,
|
|
90
|
+
});
|
|
91
|
+
this.shared = entries
|
|
92
|
+
.filter((e) => e.isDirectory())
|
|
93
|
+
.map((e) => ({
|
|
94
|
+
name: e.name,
|
|
95
|
+
path: path.join(this.sharedPath, e.name),
|
|
96
|
+
type: "shared",
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
showHelp() {
|
|
102
|
+
console.log(chalk.bold("\n📚 Available Commands:\n"));
|
|
103
|
+
|
|
104
|
+
console.log(chalk.yellow.bold("Slash Commands (Workflows):"));
|
|
105
|
+
this.workflows.forEach((w) => {
|
|
106
|
+
console.log(` ${chalk.cyan(w.name)} - Workflow command`);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
console.log(chalk.yellow.bold("\nSkills:"));
|
|
110
|
+
this.skills.slice(0, 15).forEach((s) => {
|
|
111
|
+
console.log(` ${chalk.green(s.name)} - Domain knowledge module`);
|
|
112
|
+
});
|
|
113
|
+
if (this.skills.length > 15) {
|
|
114
|
+
console.log(` ${chalk.gray(`... and ${this.skills.length - 15} more`)}`);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
console.log(chalk.yellow.bold("\nAgents:"));
|
|
118
|
+
this.agents.slice(0, 10).forEach((a) => {
|
|
119
|
+
console.log(` ${chalk.magenta(a.name)} - Specialist agent`);
|
|
120
|
+
});
|
|
121
|
+
if (this.agents.length > 10) {
|
|
122
|
+
console.log(` ${chalk.gray(`... and ${this.agents.length - 10} more`)}`);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
console.log(chalk.yellow.bold("\nScripts:"));
|
|
126
|
+
this.scripts.slice(0, 8).forEach((s) => {
|
|
127
|
+
console.log(` ${chalk.blue(s.name)} - Automation script`);
|
|
128
|
+
});
|
|
129
|
+
if (this.scripts.length > 8) {
|
|
130
|
+
console.log(` ${chalk.gray(`... and ${this.scripts.length - 8} more`)}`);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
console.log(chalk.yellow.bold("\nRules:"));
|
|
134
|
+
this.rules.forEach((r) => {
|
|
135
|
+
console.log(` ${chalk.red(r.name)} - Assistant rules`);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
if (this.shared.length > 0) {
|
|
139
|
+
console.log(chalk.yellow.bold("\nShared Resources:"));
|
|
140
|
+
this.shared.forEach((s) => {
|
|
141
|
+
console.log(` ${chalk.gray(s.name)} - Shared utilities`);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
console.log(chalk.yellow.bold("\nOther Commands:"));
|
|
146
|
+
console.log(` ${chalk.cyan("/help")} - Show this menu`);
|
|
147
|
+
console.log(` ${chalk.cyan("/exit")} - Exit interactive mode`);
|
|
148
|
+
console.log(` ${chalk.cyan("clear")} - Clear screen`);
|
|
149
|
+
console.log();
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
async executeWorkflow(workflowName, args = "") {
|
|
153
|
+
const workflow = this.workflows.find((w) => w.name === workflowName);
|
|
154
|
+
if (!workflow) {
|
|
155
|
+
console.log(chalk.red(`❌ Workflow '${workflowName}' not found`));
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const workflowPath = path.join(this.workflowsPath, workflow.file);
|
|
160
|
+
try {
|
|
161
|
+
const content = await fs.readFile(workflowPath, "utf-8");
|
|
162
|
+
console.log(chalk.bold(`\n📄 Workflow: ${workflowName}\n`));
|
|
163
|
+
|
|
164
|
+
// Show first 50 lines or until first separator
|
|
165
|
+
const lines = content.split("\n");
|
|
166
|
+
const previewLines = [];
|
|
167
|
+
for (const line of lines) {
|
|
168
|
+
if (line.startsWith("---") && previewLines.length > 0) break;
|
|
169
|
+
previewLines.push(line);
|
|
170
|
+
if (previewLines.length >= 30) break;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
console.log(previewLines.join("\n"));
|
|
174
|
+
console.log(chalk.gray("\n... (truncated)"));
|
|
175
|
+
console.log(chalk.yellow(`\nFull file: ${workflowPath}\n`));
|
|
176
|
+
} catch (error) {
|
|
177
|
+
console.log(chalk.red(`❌ Error reading workflow: ${error.message}`));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
async executeSkill(skillName) {
|
|
182
|
+
const skill = this.skills.find((s) => s.name === skillName);
|
|
183
|
+
if (!skill) {
|
|
184
|
+
console.log(chalk.red(`❌ Skill '${skillName}' not found`));
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const skillMdPath = path.join(skill.path, "SKILL.md");
|
|
189
|
+
try {
|
|
190
|
+
if (await fs.pathExists(skillMdPath)) {
|
|
191
|
+
const content = await fs.readFile(skillMdPath, "utf-8");
|
|
192
|
+
console.log(chalk.bold(`\n📚 Skill: ${skillName}\n`));
|
|
193
|
+
|
|
194
|
+
const lines = content.split("\n").slice(0, 40);
|
|
195
|
+
console.log(lines.join("\n"));
|
|
196
|
+
console.log(chalk.gray("\n... (truncated)"));
|
|
197
|
+
console.log(chalk.yellow(`\nFull file: ${skillMdPath}\n`));
|
|
198
|
+
} else {
|
|
199
|
+
console.log(chalk.bold(`\n📚 Skill: ${skillName}\n`));
|
|
200
|
+
console.log(`Path: ${skill.path}`);
|
|
201
|
+
|
|
202
|
+
const files = await fs.readdir(skill.path);
|
|
203
|
+
console.log("\nContents:");
|
|
204
|
+
files.forEach((f) => console.log(` - ${f}`));
|
|
205
|
+
console.log();
|
|
206
|
+
}
|
|
207
|
+
} catch (error) {
|
|
208
|
+
console.log(chalk.red(`❌ Error reading skill: ${error.message}`));
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
async executeAgent(agentName) {
|
|
213
|
+
const agent = this.agents.find((a) => a.name === agentName);
|
|
214
|
+
if (!agent) {
|
|
215
|
+
console.log(chalk.red(`❌ Agent '${agentName}' not found`));
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const agentPath = path.join(this.agentsPath, agent.file);
|
|
220
|
+
try {
|
|
221
|
+
const content = await fs.readFile(agentPath, "utf-8");
|
|
222
|
+
console.log(chalk.bold(`\n🤖 Agent: ${agentName}\n`));
|
|
223
|
+
|
|
224
|
+
const lines = content.split("\n").slice(0, 40);
|
|
225
|
+
console.log(lines.join("\n"));
|
|
226
|
+
console.log(chalk.gray("\n... (truncated)"));
|
|
227
|
+
console.log(chalk.yellow(`\nFull file: ${agentPath}\n`));
|
|
228
|
+
} catch (error) {
|
|
229
|
+
console.log(chalk.red(`❌ Error reading agent: ${error.message}`));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
async executeRule(ruleName) {
|
|
234
|
+
const rule = this.rules.find((r) => r.name === ruleName);
|
|
235
|
+
if (!rule) {
|
|
236
|
+
console.log(chalk.red(`❌ Rule '${ruleName}' not found`));
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const rulePath = path.join(this.rulesPath, rule.file);
|
|
241
|
+
try {
|
|
242
|
+
const content = await fs.readFile(rulePath, "utf-8");
|
|
243
|
+
console.log(chalk.bold(`\n📜 Rule: ${ruleName}\n`));
|
|
244
|
+
|
|
245
|
+
const lines = content.split("\n").slice(0, 40);
|
|
246
|
+
console.log(lines.join("\n"));
|
|
247
|
+
console.log(chalk.gray("\n... (truncated)"));
|
|
248
|
+
console.log(chalk.yellow(`\nFull file: ${rulePath}\n`));
|
|
249
|
+
} catch (error) {
|
|
250
|
+
console.log(chalk.red(`❌ Error reading rule: ${error.message}`));
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
async start() {
|
|
255
|
+
await this.loadResources();
|
|
256
|
+
|
|
257
|
+
console.log(
|
|
258
|
+
chalk.cyan.bold(`
|
|
259
|
+
╔════════════════════════════════════════════════╗
|
|
260
|
+
║ 🤖 AI-DEVX Interactive Shell ║
|
|
261
|
+
║ Type / to see all commands and resources ║
|
|
262
|
+
║ Type /help for help or /exit to quit ║
|
|
263
|
+
╚════════════════════════════════════════════════╝
|
|
264
|
+
`),
|
|
265
|
+
);
|
|
266
|
+
|
|
267
|
+
const rl = readline.createInterface({
|
|
268
|
+
input: process.stdin,
|
|
269
|
+
output: process.stdout,
|
|
270
|
+
prompt: chalk.cyan("ai-devx> "),
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
rl.prompt();
|
|
274
|
+
|
|
275
|
+
rl.on("line", async (line) => {
|
|
276
|
+
const input = line.trim();
|
|
277
|
+
|
|
278
|
+
if (input === "/exit" || input === "exit" || input === "quit") {
|
|
279
|
+
console.log(chalk.yellow("👋 Goodbye!"));
|
|
280
|
+
rl.close();
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
if (input === "" || input === "/") {
|
|
285
|
+
this.showHelp();
|
|
286
|
+
} else if (input === "/help" || input === "help") {
|
|
287
|
+
console.log(chalk.bold("\n🎯 Quick Guide:\n"));
|
|
288
|
+
console.log("Type any of the following:");
|
|
289
|
+
console.log(
|
|
290
|
+
` ${chalk.cyan("/")} - Show all available commands and resources`,
|
|
291
|
+
);
|
|
292
|
+
console.log(
|
|
293
|
+
` ${chalk.cyan("/<workflow>")} - View workflow details (e.g., /plan)`,
|
|
294
|
+
);
|
|
295
|
+
console.log(
|
|
296
|
+
` ${chalk.cyan("@<agent>")} - View agent details (e.g., @orchestrator)`,
|
|
297
|
+
);
|
|
298
|
+
console.log(
|
|
299
|
+
` ${chalk.cyan("<skill-name>")} - View skill details (e.g., clean-code)`,
|
|
300
|
+
);
|
|
301
|
+
console.log(
|
|
302
|
+
` ${chalk.cyan("<rule-name>")} - View rule details (e.g., CLAUDE)`,
|
|
303
|
+
);
|
|
304
|
+
console.log(` ${chalk.cyan("clear")} - Clear the screen`);
|
|
305
|
+
console.log(` ${chalk.cyan("/exit")} - Exit interactive mode\n`);
|
|
306
|
+
} else if (input === "clear") {
|
|
307
|
+
console.clear();
|
|
308
|
+
} else if (input.startsWith("/")) {
|
|
309
|
+
// Workflow command
|
|
310
|
+
await this.executeWorkflow(input);
|
|
311
|
+
} else if (input.startsWith("@")) {
|
|
312
|
+
// Agent command
|
|
313
|
+
await this.executeAgent(input);
|
|
314
|
+
} else if (this.skills.find((s) => s.name === input)) {
|
|
315
|
+
// Skill command
|
|
316
|
+
await this.executeSkill(input);
|
|
317
|
+
} else if (this.rules.find((r) => r.name === input)) {
|
|
318
|
+
// Rule command
|
|
319
|
+
await this.executeRule(input);
|
|
320
|
+
} else {
|
|
321
|
+
console.log(chalk.yellow(`⚠️ Unknown command: ${input}`));
|
|
322
|
+
console.log(chalk.gray("Type / to see available commands\n"));
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
rl.prompt();
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
rl.on("close", () => {
|
|
329
|
+
console.log(chalk.yellow("\n👋 Goodbye!"));
|
|
330
|
+
process.exit(0);
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
async function shellCommand(targetPath) {
|
|
336
|
+
const cwd = targetPath || process.cwd();
|
|
337
|
+
const agentPath = path.join(path.resolve(cwd), ".agent");
|
|
338
|
+
|
|
339
|
+
if (!(await fs.pathExists(agentPath))) {
|
|
340
|
+
console.log(chalk.red(`❌ AI-DEVX not installed in ${cwd}`));
|
|
341
|
+
console.log(chalk.yellow("Run: npx ai-devx init"));
|
|
342
|
+
process.exit(1);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
const cli = new InteractiveCLI(agentPath);
|
|
346
|
+
await cli.start();
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
module.exports = shellCommand;
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# CLAUDE.md - Intelligence Core
|
|
6
|
+
|
|
7
|
+
> This file defines how Claude behaves in this workspace.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## CRITICAL: AGENT & SKILL PROTOCOL (START HERE)
|
|
12
|
+
|
|
13
|
+
> **MANDATORY:** You MUST read the appropriate agent file and its skills BEFORE performing any implementation. This is the highest priority rule.
|
|
14
|
+
|
|
15
|
+
### 1. Modular Skill Loading Protocol
|
|
16
|
+
|
|
17
|
+
Agent activated → Check frontmatter "skills:" → Read SKILL.md (INDEX) → Read specific sections.
|
|
18
|
+
|
|
19
|
+
- **Selective Reading:** DO NOT read ALL files in a skill folder. Read `SKILL.md` first, then only read sections matching the user's request.
|
|
20
|
+
- **Rule Priority:** P0 (CLAUDE.md) > P1 (Agent .md) > P2 (SKILL.md). All rules are binding.
|
|
21
|
+
|
|
22
|
+
### 2. Enforcement Protocol
|
|
23
|
+
|
|
24
|
+
1. **When agent is activated:**
|
|
25
|
+
- ✅ Activate: Read Rules → Check Frontmatter → Load SKILL.md → Apply All.
|
|
26
|
+
2. **Forbidden:** Never skip reading agent rules or skill instructions. "Read → Understand → Apply" is mandatory.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 📥 REQUEST CLASSIFIER (STEP 1)
|
|
31
|
+
|
|
32
|
+
**Before ANY action, classify the request:**
|
|
33
|
+
|
|
34
|
+
| Request Type | Trigger Keywords | Active Tiers | Result |
|
|
35
|
+
| ---------------- | ------------------------------------------ | ------------------------------ | --------------------------- |
|
|
36
|
+
| **QUESTION** | "what is", "how does", "explain" | TIER 0 only | Text Response |
|
|
37
|
+
| **SURVEY/INTEL** | "analyze", "list files", "overview" | TIER 0 + Explorer | Session Intel (No File) |
|
|
38
|
+
| **SIMPLE CODE** | "fix", "add", "change" (single file) | TIER 0 + TIER 1 (lite) | Inline Edit |
|
|
39
|
+
| **COMPLEX CODE** | "build", "create", "implement", "refactor" | TIER 0 + TIER 1 (full) + Agent | **{task-slug}.md Required** |
|
|
40
|
+
| **DESIGN/UI** | "design", "UI", "page", "dashboard" | TIER 0 + TIER 1 + Agent | **{task-slug}.md Required** |
|
|
41
|
+
| **SLASH CMD** | /create, /orchestrate, /debug | Command-specific flow | Variable |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 🤖 INTELLIGENT AGENT ROUTING (STEP 2 - AUTO)
|
|
46
|
+
|
|
47
|
+
**ALWAYS ACTIVE: Before responding to ANY request, automatically analyze and select the best agent(s).**
|
|
48
|
+
|
|
49
|
+
> 🔴 **MANDATORY:** You MUST follow the protocol defined in `@[skills/intelligent-routing]`.
|
|
50
|
+
|
|
51
|
+
### Auto-Selection Protocol
|
|
52
|
+
|
|
53
|
+
1. **Analyze (Silent)**: Detect domains (Frontend, Backend, Security, etc.) from user request.
|
|
54
|
+
2. **Select Agent(s)**: Choose the most appropriate specialist(s).
|
|
55
|
+
3. **Inform User**: Concisely state which expertise is being applied.
|
|
56
|
+
4. **Apply**: Generate response using the selected agent's persona and rules.
|
|
57
|
+
|
|
58
|
+
### Response Format (MANDATORY)
|
|
59
|
+
|
|
60
|
+
When auto-applying an agent, inform the user:
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
🤖 **Applying knowledge of `@[agent-name]`...**
|
|
64
|
+
|
|
65
|
+
[Continue with specialized response]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Rules:**
|
|
69
|
+
|
|
70
|
+
1. **Silent Analysis**: No verbose meta-commentary ("I am analyzing...").
|
|
71
|
+
2. **Respect Overrides**: If user mentions `@agent`, use it.
|
|
72
|
+
3. **Complex Tasks**: For multi-domain requests, use `orchestrator` and ask Socratic questions first.
|
|
73
|
+
|
|
74
|
+
### ⚠️ AGENT ROUTING CHECKLIST (MANDATORY BEFORE EVERY CODE/DESIGN RESPONSE)
|
|
75
|
+
|
|
76
|
+
**Before ANY code or design work, you MUST complete this mental checklist:**
|
|
77
|
+
|
|
78
|
+
| Step | Check | If Unchecked |
|
|
79
|
+
| ---- | -------------------------------------------------------- | -------------------------------------------- |
|
|
80
|
+
| 1 | Did I identify the correct agent for this domain? | → STOP. Analyze request domain first. |
|
|
81
|
+
| 2 | Did I READ the agent's `.md` file (or recall its rules)? | → STOP. Open `.agent/agents/{agent}.md` |
|
|
82
|
+
| 3 | Did I announce `🤖 Applying knowledge of @[agent]...`? | → STOP. Add announcement before response. |
|
|
83
|
+
| 4 | Did I load required skills from agent's frontmatter? | → STOP. Check `skills:` field and read them. |
|
|
84
|
+
|
|
85
|
+
**Failure Conditions:**
|
|
86
|
+
|
|
87
|
+
- ❌ Writing code without identifying an agent = **PROTOCOL VIOLATION**
|
|
88
|
+
- ❌ Skipping the announcement = **USER CANNOT VERIFY AGENT WAS USED**
|
|
89
|
+
- ❌ Ignoring agent-specific rules (e.g., Purple Ban) = **QUALITY FAILURE**
|
|
90
|
+
|
|
91
|
+
> 🔴 **Self-Check Trigger:** Every time you are about to write code or create UI, ask yourself:
|
|
92
|
+
> "Have I completed the Agent Routing Checklist?" If NO → Complete it first.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## TIER 0: UNIVERSAL RULES (Always Active)
|
|
97
|
+
|
|
98
|
+
### 🌐 Language Handling
|
|
99
|
+
|
|
100
|
+
When user's prompt is NOT in English:
|
|
101
|
+
|
|
102
|
+
1. **Internally translate** for better comprehension
|
|
103
|
+
2. **Respond in user's language** - match their communication
|
|
104
|
+
3. **Code comments/variables** remain in English
|
|
105
|
+
|
|
106
|
+
### 🧹 Clean Code (Global Mandatory)
|
|
107
|
+
|
|
108
|
+
**ALL code MUST follow `@[skills/clean-code]` rules. No exceptions.**
|
|
109
|
+
|
|
110
|
+
- **Code**: Concise, direct, no over-engineering. Self-documenting.
|
|
111
|
+
- **Testing**: Mandatory. Pyramid (Unit > Int > E2E) + AAA Pattern.
|
|
112
|
+
- **Performance**: Measure first. Adhere to 2025 standards (Core Web Vitals).
|
|
113
|
+
- **Infra/Safety**: 5-Phase Deployment. Verify secrets security.
|
|
114
|
+
|
|
115
|
+
### 📁 File Dependency Awareness
|
|
116
|
+
|
|
117
|
+
**Before modifying ANY file:**
|
|
118
|
+
|
|
119
|
+
1. Check `CODEBASE.md` → File Dependencies
|
|
120
|
+
2. Identify dependent files
|
|
121
|
+
3. Update ALL affected files together
|
|
122
|
+
|
|
123
|
+
### 🗺️ System Map Read
|
|
124
|
+
|
|
125
|
+
> 🔴 **MANDATORY:** Read `ARCHITECTURE.md` at session start to understand Agents, Skills, and Scripts.
|
|
126
|
+
|
|
127
|
+
**Path Awareness:**
|
|
128
|
+
|
|
129
|
+
- Agents: `.agent/` (Project)
|
|
130
|
+
- Skills: `.agent/skills/` (Project)
|
|
131
|
+
- Runtime Scripts: `.agent/skills/<skill>/scripts/`
|
|
132
|
+
|
|
133
|
+
### 🧠 Read → Understand → Apply
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
❌ WRONG: Read agent file → Start coding
|
|
137
|
+
✅ CORRECT: Read → Understand WHY → Apply PRINCIPLES → Code
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Before coding, answer:**
|
|
141
|
+
|
|
142
|
+
1. What is the GOAL of this agent/skill?
|
|
143
|
+
2. What PRINCIPLES must I apply?
|
|
144
|
+
3. How does this DIFFER from generic output?
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## TIER 1: CODE RULES (When Writing Code)
|
|
149
|
+
|
|
150
|
+
### 📱 Project Type Routing
|
|
151
|
+
|
|
152
|
+
| Project Type | Primary Agent | Skills |
|
|
153
|
+
| -------------------------------------- | --------------------- | ----------------------------- |
|
|
154
|
+
| **MOBILE** (iOS, Android, RN, Flutter) | `mobile-developer` | mobile-design |
|
|
155
|
+
| **WEB** (Next.js, React web) | `frontend-specialist` | frontend-design |
|
|
156
|
+
| **BACKEND** (API, server, DB) | `backend-specialist` | api-patterns, database-design |
|
|
157
|
+
|
|
158
|
+
> 🔴 **Mobile + frontend-specialist = WRONG.** Mobile = mobile-developer ONLY.
|
|
159
|
+
|
|
160
|
+
### 🛑 Socratic Gate
|
|
161
|
+
|
|
162
|
+
**For complex requests, STOP and ASK first:**
|
|
163
|
+
|
|
164
|
+
### 🛑 GLOBAL SOCRATIC GATE (TIER 0)
|
|
165
|
+
|
|
166
|
+
**MANDATORY: Every user request must pass through the Socratic Gate before ANY tool use or implementation.**
|
|
167
|
+
|
|
168
|
+
| Request Type | Strategy | Required Action |
|
|
169
|
+
| ----------------------- | -------------- | ----------------------------------------------------------------- |
|
|
170
|
+
| **New Feature / Build** | Deep Discovery | ASK minimum 3 strategic questions |
|
|
171
|
+
| **Code Edit / Bug Fix** | Context Check | Confirm understanding + ask impact questions |
|
|
172
|
+
| **Vague / Simple** | Clarification | Ask Purpose, Users, and Scope |
|
|
173
|
+
| **Full Orchestration** | Gatekeeper | **STOP** subagents until user confirms plan details |
|
|
174
|
+
| **Direct "Proceed"** | Validation | **STOP** → Even if answers are given, ask 2 "Edge Case" questions |
|
|
175
|
+
|
|
176
|
+
**Protocol:**
|
|
177
|
+
|
|
178
|
+
1. **Never Assume:** If even 1% is unclear, ASK.
|
|
179
|
+
2. **Handle Spec-heavy Requests:** When user gives a list (Answers 1, 2, 3...), do NOT skip the gate. Instead, ask about **Trade-offs** or **Edge Cases** (e.g., "LocalStorage confirmed, but should we handle data clearing or versioning?") before starting.
|
|
180
|
+
3. **Wait:** Do NOT invoke subagents or write code until the user clears the Gate.
|
|
181
|
+
4. **Reference:** Full protocol in `@[skills/brainstorming]`.
|
|
182
|
+
|
|
183
|
+
### 🏁 Final Checklist Protocol
|
|
184
|
+
|
|
185
|
+
**Trigger:** When the user says "final checks", "run all tests", "verify everything", or similar phrases.
|
|
186
|
+
|
|
187
|
+
| Task Stage | Command | Purpose |
|
|
188
|
+
| ---------------- | -------------------------------------------------- | ------------------------------ |
|
|
189
|
+
| **Manual Audit** | `python .agent/scripts/checklist.py .` | Priority-based project audit |
|
|
190
|
+
| **Pre-Deploy** | `python .agent/scripts/checklist.py . --url <URL>` | Full Suite + Performance + E2E |
|
|
191
|
+
|
|
192
|
+
**Priority Execution Order:**
|
|
193
|
+
|
|
194
|
+
1. **Security** → 2. **Lint** → 3. **Schema** → 4. **Tests** → 5. **UX** → 6. **Seo** → 7. **Lighthouse/E2E**
|
|
195
|
+
|
|
196
|
+
**Rules:**
|
|
197
|
+
|
|
198
|
+
- **Completion:** A task is NOT finished until `checklist.py` returns success.
|
|
199
|
+
- **Reporting:** If it fails, fix the **Critical** blockers first (Security/Lint).
|
|
200
|
+
|
|
201
|
+
**Available Scripts (12 total):**
|
|
202
|
+
|
|
203
|
+
| Script | Skill | When to Use |
|
|
204
|
+
| -------------------------- | --------------------- | ------------------- |
|
|
205
|
+
| `security_scan.py` | vulnerability-scanner | Always on deploy |
|
|
206
|
+
| `dependency_analyzer.py` | vulnerability-scanner | Weekly / Deploy |
|
|
207
|
+
| `lint_runner.py` | lint-and-validate | Every code change |
|
|
208
|
+
| `test_runner.py` | testing-patterns | After logic change |
|
|
209
|
+
| `schema_validator.py` | database-design | After DB change |
|
|
210
|
+
| `ux_audit.py` | frontend-design | After UI change |
|
|
211
|
+
| `accessibility_checker.py` | frontend-design | After UI change |
|
|
212
|
+
| `seo_checker.py` | seo-fundamentals | After page change |
|
|
213
|
+
| `bundle_analyzer.py` | performance-profiling | Before deploy |
|
|
214
|
+
| `mobile_audit.py` | mobile-design | After mobile change |
|
|
215
|
+
| `lighthouse_audit.py` | performance-profiling | Before deploy |
|
|
216
|
+
| `playwright_runner.py` | webapp-testing | Before deploy |
|
|
217
|
+
|
|
218
|
+
> 🔴 **Agents & Skills can invoke ANY script** via `python .agent/skills/<skill>/scripts/<script>.py`
|
|
219
|
+
|
|
220
|
+
### 🎭 Claude Mode Mapping
|
|
221
|
+
|
|
222
|
+
| Mode | Agent | Behavior |
|
|
223
|
+
| -------- | ----------------- | -------------------------------------------- |
|
|
224
|
+
| **plan** | `project-planner` | 4-phase methodology. NO CODE before Phase 4. |
|
|
225
|
+
| **ask** | - | Focus on understanding. Ask questions. |
|
|
226
|
+
| **edit** | `orchestrator` | Execute. Check `{task-slug}.md` first. |
|
|
227
|
+
|
|
228
|
+
**Plan Mode (4-Phase):**
|
|
229
|
+
|
|
230
|
+
1. ANALYSIS → Research, questions
|
|
231
|
+
2. PLANNING → `{task-slug}.md`, task breakdown
|
|
232
|
+
3. SOLUTIONING → Architecture, design (NO CODE!)
|
|
233
|
+
4. IMPLEMENTATION → Code + tests
|
|
234
|
+
|
|
235
|
+
> 🔴 **Edit mode:** If multi-file or structural change → Offer to create `{task-slug}.md`. For single-file fixes → Proceed directly.
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## TIER 2: DESIGN RULES (Reference)
|
|
240
|
+
|
|
241
|
+
> **Design rules are in the specialist agents, NOT here.**
|
|
242
|
+
|
|
243
|
+
| Task | Read |
|
|
244
|
+
| ------------ | ------------------------------- |
|
|
245
|
+
| Web UI/UX | `.agent/frontend-specialist.md` |
|
|
246
|
+
| Mobile UI/UX | `.agent/mobile-developer.md` |
|
|
247
|
+
|
|
248
|
+
**These agents contain:**
|
|
249
|
+
|
|
250
|
+
- Purple Ban (no violet/purple colors)
|
|
251
|
+
- Template Ban (no standard layouts)
|
|
252
|
+
- Anti-cliché rules
|
|
253
|
+
- Deep Design Thinking protocol
|
|
254
|
+
|
|
255
|
+
> 🔴 **For design work:** Open and READ the agent file. Rules are there.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## 📁 QUICK REFERENCE
|
|
260
|
+
|
|
261
|
+
### Agents & Skills
|
|
262
|
+
|
|
263
|
+
- **Masters**: `orchestrator`, `project-planner`, `security-auditor` (Cyber/Audit), `backend-specialist` (API/DB), `frontend-specialist` (UI/UX), `mobile-developer`, `debugger`, `game-developer`
|
|
264
|
+
- **Key Skills**: `clean-code`, `brainstorming`, `app-builder`, `frontend-design`, `mobile-design`, `plan-writing`, `behavioral-modes`
|
|
265
|
+
|
|
266
|
+
### Key Scripts
|
|
267
|
+
|
|
268
|
+
- **Verify**: `.agent/scripts/verify_all.py`, `.agent/scripts/checklist.py`
|
|
269
|
+
- **Scanners**: `security_scan.py`, `dependency_analyzer.py`
|
|
270
|
+
- **Audits**: `ux_audit.py`, `mobile_audit.py`, `lighthouse_audit.py`, `seo_checker.py`
|
|
271
|
+
- **Test**: `playwright_runner.py`, `test_runner.py`
|
|
272
|
+
|
|
273
|
+
---
|