start-vibing 1.1.1
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/README.md +149 -0
- package/dist/cli.js +199 -0
- package/package.json +42 -0
- package/template/.claude/CLAUDE.md +168 -0
- package/template/.claude/README.md +208 -0
- package/template/.claude/agents/analyzer.md +139 -0
- package/template/.claude/agents/commit-manager.md +231 -0
- package/template/.claude/agents/documenter.md +160 -0
- package/template/.claude/agents/domain-updater.md +200 -0
- package/template/.claude/agents/final-validator.md +182 -0
- package/template/.claude/agents/orchestrator.md +136 -0
- package/template/.claude/agents/quality-checker.md +264 -0
- package/template/.claude/agents/research.md +262 -0
- package/template/.claude/agents/security-auditor.md +199 -0
- package/template/.claude/agents/tester.md +572 -0
- package/template/.claude/agents/ui-ux-reviewer.md +180 -0
- package/template/.claude/commands/feature.md +102 -0
- package/template/.claude/commands/fix.md +80 -0
- package/template/.claude/commands/research.md +107 -0
- package/template/.claude/commands/validate.md +72 -0
- package/template/.claude/config/README.md +30 -0
- package/template/.claude/config/domain-mapping.json +26 -0
- package/template/.claude/config/project-config.json +53 -0
- package/template/.claude/config/quality-gates.json +46 -0
- package/template/.claude/config/security-rules.json +45 -0
- package/template/.claude/config/testing-config.json +168 -0
- package/template/.claude/hooks/SETUP.md +181 -0
- package/template/.claude/hooks/post-tool-use.py +155 -0
- package/template/.claude/hooks/pre-tool-use.py +159 -0
- package/template/.claude/hooks/security-check.js +202 -0
- package/template/.claude/hooks/stop-validation.py +155 -0
- package/template/.claude/hooks/user-prompt-submit.py +277 -0
- package/template/.claude/hooks/validate-commit.py +200 -0
- package/template/.claude/hooks/workflow-manager.py +350 -0
- package/template/.claude/settings.json +269 -0
- package/template/.claude/skills/codebase-knowledge/SKILL.md +145 -0
- package/template/.claude/skills/codebase-knowledge/TEMPLATE.md +35 -0
- package/template/.claude/skills/codebase-knowledge/domains/claude-system.md +321 -0
- package/template/.claude/skills/docs-tracker/SKILL.md +239 -0
- package/template/.claude/skills/final-check/SKILL.md +284 -0
- package/template/.claude/skills/quality-gate/SKILL.md +278 -0
- package/template/.claude/skills/research-cache/SKILL.md +207 -0
- package/template/.claude/skills/security-scan/SKILL.md +206 -0
- package/template/.claude/skills/test-coverage/SKILL.md +441 -0
- package/template/.claude/skills/ui-ux-audit/SKILL.md +254 -0
- package/template/.claude/workflow-state.schema.json +200 -0
- package/template/CLAUDE.md +96 -0
package/README.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# start-vibing
|
|
2
|
+
|
|
3
|
+
> Setup Claude Code agents, skills, and hooks in your project with a single command.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Using npx
|
|
9
|
+
npx start-vibing
|
|
10
|
+
|
|
11
|
+
# Using bunx (faster)
|
|
12
|
+
bunx start-vibing
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## What It Does
|
|
16
|
+
|
|
17
|
+
Sets up a complete Claude Code development workflow in your project:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
.claude/
|
|
21
|
+
├── agents/ # 11 specialized AI agents
|
|
22
|
+
│ ├── orchestrator.md # Coordinates workflow
|
|
23
|
+
│ ├── analyzer.md # Analyzes change impact
|
|
24
|
+
│ ├── research.md # Researches best practices
|
|
25
|
+
│ ├── tester.md # Creates tests (Playwright + Vitest)
|
|
26
|
+
│ ├── security-auditor.md # Security audit (VETO power)
|
|
27
|
+
│ ├── quality-checker.md # Quality gates
|
|
28
|
+
│ └── ...
|
|
29
|
+
├── skills/ # 8 skill systems
|
|
30
|
+
│ ├── test-coverage/ # E2E testing templates
|
|
31
|
+
│ ├── security-scan/ # OWASP validation
|
|
32
|
+
│ ├── codebase-knowledge/ # Domain mapping
|
|
33
|
+
│ └── ...
|
|
34
|
+
├── hooks/ # Workflow enforcement
|
|
35
|
+
│ ├── pre-tool-use.py # Blocks unapproved edits
|
|
36
|
+
│ ├── post-tool-use.py # Tracks modifications
|
|
37
|
+
│ ├── stop-validation.py # Blocks incomplete work
|
|
38
|
+
│ └── workflow-manager.py # CLI for state tracking
|
|
39
|
+
└── config/ # Project configuration
|
|
40
|
+
├── project-config.json
|
|
41
|
+
├── quality-gates.json
|
|
42
|
+
└── ...
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
### 11 Specialized Agents
|
|
48
|
+
|
|
49
|
+
| Agent | Purpose | VETO |
|
|
50
|
+
| ---------------- | --------------------------- | ---- |
|
|
51
|
+
| orchestrator | Coordinates entire workflow | No |
|
|
52
|
+
| analyzer | Analyzes change impact | No |
|
|
53
|
+
| research | Best practices research | No |
|
|
54
|
+
| documenter | Documentation updates | No |
|
|
55
|
+
| tester | Unit + E2E tests | No |
|
|
56
|
+
| security-auditor | Security audit | Yes |
|
|
57
|
+
| ui-ux-reviewer | UI/UX review | No |
|
|
58
|
+
| quality-checker | Quality gates | No |
|
|
59
|
+
| final-validator | Final validation | Yes |
|
|
60
|
+
| domain-updater | Domain knowledge | No |
|
|
61
|
+
| commit-manager | Git commits | No |
|
|
62
|
+
|
|
63
|
+
### Smart Copy Behavior
|
|
64
|
+
|
|
65
|
+
When you run `start-vibing` in an existing project:
|
|
66
|
+
|
|
67
|
+
- **ALWAYS overwrites:** Agent files, hooks, settings.json
|
|
68
|
+
- **PRESERVES:** Your custom domains, cached research
|
|
69
|
+
- **MERGES:** New skills with existing ones
|
|
70
|
+
|
|
71
|
+
Use `--force` to overwrite everything.
|
|
72
|
+
|
|
73
|
+
### Workflow Enforcement
|
|
74
|
+
|
|
75
|
+
Hooks enforce the workflow:
|
|
76
|
+
|
|
77
|
+
1. **pre-tool-use.py** - Blocks file edits without approved task
|
|
78
|
+
2. **post-tool-use.py** - Auto-tracks all modifications
|
|
79
|
+
3. **stop-validation.py** - Blocks incomplete workflows
|
|
80
|
+
|
|
81
|
+
## Usage
|
|
82
|
+
|
|
83
|
+
### First Setup
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
cd your-project
|
|
87
|
+
npx start-vibing
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Update to Latest
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
npx start-vibing --force
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### After Setup
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# 1. Configure your project
|
|
100
|
+
edit .claude/config/project-config.json
|
|
101
|
+
|
|
102
|
+
# 2. Start a task
|
|
103
|
+
python .claude/hooks/workflow-manager.py start-task --type feature --description "Add feature X"
|
|
104
|
+
|
|
105
|
+
# 3. Work with Claude Code
|
|
106
|
+
# The agents will guide you through the workflow
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Configuration
|
|
110
|
+
|
|
111
|
+
After setup, edit `.claude/config/project-config.json`:
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"stack": {
|
|
116
|
+
"runtime": "bun",
|
|
117
|
+
"language": "typescript",
|
|
118
|
+
"database": "mongodb"
|
|
119
|
+
},
|
|
120
|
+
"commands": {
|
|
121
|
+
"typecheck": "bun run typecheck",
|
|
122
|
+
"lint": "bun run lint",
|
|
123
|
+
"test": "bun run test",
|
|
124
|
+
"build": "bun run build"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Options
|
|
130
|
+
|
|
131
|
+
| Flag | Description |
|
|
132
|
+
| ----------- | ------------------------------ |
|
|
133
|
+
| `--force` | Overwrite all files |
|
|
134
|
+
| `--help` | Show help message |
|
|
135
|
+
| `--version` | Show version |
|
|
136
|
+
|
|
137
|
+
## Requirements
|
|
138
|
+
|
|
139
|
+
- Node.js >= 18 or Bun
|
|
140
|
+
- Python 3.x (for hooks)
|
|
141
|
+
|
|
142
|
+
## License
|
|
143
|
+
|
|
144
|
+
MIT
|
|
145
|
+
|
|
146
|
+
## Links
|
|
147
|
+
|
|
148
|
+
- [Claude Code Documentation](https://docs.claude.dev)
|
|
149
|
+
- [Report Issues](https://github.com/joaov/start-vibing/issues)
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/copy.ts
|
|
4
|
+
import { existsSync, mkdirSync, readdirSync, statSync, copyFileSync } from "fs";
|
|
5
|
+
import { join, dirname } from "path";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
var __filename2 = fileURLToPath(import.meta.url);
|
|
8
|
+
var __dirname2 = dirname(__filename2);
|
|
9
|
+
var ALWAYS_OVERWRITE = [
|
|
10
|
+
"agents/",
|
|
11
|
+
"hooks/",
|
|
12
|
+
"settings.json",
|
|
13
|
+
"CLAUDE.md",
|
|
14
|
+
"commands/"
|
|
15
|
+
];
|
|
16
|
+
var NEVER_OVERWRITE = [
|
|
17
|
+
"skills/codebase-knowledge/domains/",
|
|
18
|
+
"skills/research-cache/cache/",
|
|
19
|
+
"config/project-config.json",
|
|
20
|
+
"workflow-state.json"
|
|
21
|
+
];
|
|
22
|
+
function matchesPattern(filePath, patterns) {
|
|
23
|
+
const normalized = filePath.replace(/\\/g, "/");
|
|
24
|
+
return patterns.some((pattern) => {
|
|
25
|
+
if (pattern.endsWith("/")) {
|
|
26
|
+
return normalized.includes(pattern) || normalized.startsWith(pattern);
|
|
27
|
+
}
|
|
28
|
+
return normalized.endsWith(pattern) || normalized.includes(pattern);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function copyRecursive(src, dest, options, result, basePath = "") {
|
|
32
|
+
const stats = statSync(src);
|
|
33
|
+
if (stats.isDirectory()) {
|
|
34
|
+
if (!existsSync(dest)) {
|
|
35
|
+
mkdirSync(dest, { recursive: true });
|
|
36
|
+
}
|
|
37
|
+
const entries = readdirSync(src);
|
|
38
|
+
for (const entry of entries) {
|
|
39
|
+
const srcPath = join(src, entry);
|
|
40
|
+
const destPath = join(dest, entry);
|
|
41
|
+
const relativePath = join(basePath, entry);
|
|
42
|
+
copyRecursive(srcPath, destPath, options, result, relativePath);
|
|
43
|
+
}
|
|
44
|
+
} else {
|
|
45
|
+
const relativePath = basePath;
|
|
46
|
+
if (!options.force && matchesPattern(relativePath, NEVER_OVERWRITE)) {
|
|
47
|
+
if (existsSync(dest)) {
|
|
48
|
+
result.preserved++;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const shouldOverwrite = options.force || matchesPattern(relativePath, ALWAYS_OVERWRITE);
|
|
53
|
+
if (existsSync(dest) && !shouldOverwrite) {
|
|
54
|
+
result.preserved++;
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const destDir = dirname(dest);
|
|
58
|
+
if (!existsSync(destDir)) {
|
|
59
|
+
mkdirSync(destDir, { recursive: true });
|
|
60
|
+
}
|
|
61
|
+
copyFileSync(src, dest);
|
|
62
|
+
const normalizedPath = relativePath.replace(/\\/g, "/");
|
|
63
|
+
if (normalizedPath.startsWith("agents/") || normalizedPath.includes("/agents/")) {
|
|
64
|
+
result.agents++;
|
|
65
|
+
} else if (normalizedPath.startsWith("skills/") || normalizedPath.includes("/skills/")) {
|
|
66
|
+
result.skills++;
|
|
67
|
+
} else if (normalizedPath.startsWith("hooks/") || normalizedPath.includes("/hooks/")) {
|
|
68
|
+
result.hooks++;
|
|
69
|
+
} else if (normalizedPath.startsWith("config/") || normalizedPath.includes("/config/")) {
|
|
70
|
+
result.config++;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async function copyClaudeSetup(targetDir, options = {}) {
|
|
75
|
+
const possiblePaths = [
|
|
76
|
+
join(__dirname2, "..", "template"),
|
|
77
|
+
join(__dirname2, "..", "..", "template"),
|
|
78
|
+
join(__dirname2, "template")
|
|
79
|
+
];
|
|
80
|
+
let templateDir = "";
|
|
81
|
+
for (const path of possiblePaths) {
|
|
82
|
+
if (existsSync(path)) {
|
|
83
|
+
templateDir = path;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (!templateDir) {
|
|
88
|
+
throw new Error(`Template directory not found. Tried: ${possiblePaths.join(", ")}`);
|
|
89
|
+
}
|
|
90
|
+
console.log(` Using template from: ${templateDir}`);
|
|
91
|
+
console.log(` Target directory: ${targetDir}\n`);
|
|
92
|
+
const destDir = join(targetDir, ".claude");
|
|
93
|
+
const result = {
|
|
94
|
+
agents: 0,
|
|
95
|
+
skills: 0,
|
|
96
|
+
hooks: 0,
|
|
97
|
+
config: 0,
|
|
98
|
+
preserved: 0
|
|
99
|
+
};
|
|
100
|
+
const claudeTemplate = join(templateDir, ".claude");
|
|
101
|
+
if (existsSync(claudeTemplate)) {
|
|
102
|
+
copyRecursive(claudeTemplate, destDir, options, result);
|
|
103
|
+
}
|
|
104
|
+
const claudeMdTemplate = join(templateDir, "CLAUDE.md");
|
|
105
|
+
const claudeMdDest = join(targetDir, "CLAUDE.md");
|
|
106
|
+
if (existsSync(claudeMdTemplate)) {
|
|
107
|
+
if (!existsSync(claudeMdDest) || options.force) {
|
|
108
|
+
copyFileSync(claudeMdTemplate, claudeMdDest);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return result;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// src/cli.ts
|
|
115
|
+
import { existsSync as existsSync2 } from "fs";
|
|
116
|
+
import { join as join2 } from "path";
|
|
117
|
+
var VERSION = "1.0.0";
|
|
118
|
+
var BANNER = `
|
|
119
|
+
_____ _ _ __ __ _ _ _
|
|
120
|
+
/ ____| | | | \\ \\ / /(_)| | (_)
|
|
121
|
+
| (___ | |_ __ _ _ __| |_ \\ \\_/ / _ | |__ _ _ __ __ _
|
|
122
|
+
\\___ \\| __|/ _\` | '__| __| \\ / | || '_ \\ | || '_ \\ / _\` |
|
|
123
|
+
____) | |_| (_| | | | |_ | | | || |_) || || | | || (_| |
|
|
124
|
+
|_____/ \\__|\\__,_|_| \\__| |_| |_||_.__/ |_||_| |_| \\__, |
|
|
125
|
+
__/ |
|
|
126
|
+
|___/
|
|
127
|
+
`;
|
|
128
|
+
var HELP = `
|
|
129
|
+
${BANNER}
|
|
130
|
+
Setup Claude Code agents, skills, and hooks in your project.
|
|
131
|
+
|
|
132
|
+
Usage:
|
|
133
|
+
npx start-vibing [options]
|
|
134
|
+
bunx start-vibing [options]
|
|
135
|
+
|
|
136
|
+
Options:
|
|
137
|
+
--force Overwrite all files (including custom domains)
|
|
138
|
+
--help, -h Show this help message
|
|
139
|
+
--version, -v Show version
|
|
140
|
+
|
|
141
|
+
What it does:
|
|
142
|
+
1. Creates .claude/ folder in current directory
|
|
143
|
+
2. Copies 11 specialized agents for development workflow
|
|
144
|
+
3. Copies 8 skills with templates and rules
|
|
145
|
+
4. Sets up hooks for workflow enforcement
|
|
146
|
+
5. Preserves your existing domains and custom skills
|
|
147
|
+
|
|
148
|
+
Smart Copy Behavior:
|
|
149
|
+
- ALWAYS overwrites: agents/*.md, hooks/*.py, settings.json
|
|
150
|
+
- PRESERVES: skills/*/domains/*.md (your custom domains)
|
|
151
|
+
- MERGES: Adds new skills, keeps your customizations
|
|
152
|
+
|
|
153
|
+
After setup:
|
|
154
|
+
1. Configure your project in .claude/config/project-config.json
|
|
155
|
+
2. Start with: python .claude/hooks/workflow-manager.py start-task --type feature --description "..."
|
|
156
|
+
|
|
157
|
+
Documentation:
|
|
158
|
+
https://github.com/joaov/start-vibing
|
|
159
|
+
`;
|
|
160
|
+
async function main() {
|
|
161
|
+
const args = process.argv.slice(2);
|
|
162
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
163
|
+
console.log(HELP);
|
|
164
|
+
process.exit(0);
|
|
165
|
+
}
|
|
166
|
+
if (args.includes("--version") || args.includes("-v")) {
|
|
167
|
+
console.log(`start-vibing v${VERSION}`);
|
|
168
|
+
process.exit(0);
|
|
169
|
+
}
|
|
170
|
+
const force = args.includes("--force");
|
|
171
|
+
const targetDir = process.cwd();
|
|
172
|
+
console.log(BANNER);
|
|
173
|
+
console.log(" Setting up Claude Code workflow...\n");
|
|
174
|
+
const claudeDir = join2(targetDir, ".claude");
|
|
175
|
+
if (existsSync2(claudeDir) && !force) {
|
|
176
|
+
console.log(" Found existing .claude/ folder.");
|
|
177
|
+
console.log(" Will preserve your custom domains and merge with new files.\n");
|
|
178
|
+
}
|
|
179
|
+
try {
|
|
180
|
+
const result = await copyClaudeSetup(targetDir, { force });
|
|
181
|
+
console.log("\n Setup complete!\n");
|
|
182
|
+
console.log(" Files created/updated:");
|
|
183
|
+
console.log(` - Agents: ${result.agents} files`);
|
|
184
|
+
console.log(` - Skills: ${result.skills} files`);
|
|
185
|
+
console.log(` - Hooks: ${result.hooks} files`);
|
|
186
|
+
console.log(` - Config: ${result.config} files`);
|
|
187
|
+
if (result.preserved > 0) {
|
|
188
|
+
console.log(`\n Preserved ${result.preserved} custom file(s) (domains, etc.)`);
|
|
189
|
+
}
|
|
190
|
+
console.log("\n Next steps:");
|
|
191
|
+
console.log(" 1. Edit .claude/config/project-config.json with your stack");
|
|
192
|
+
console.log(' 2. Run: python .claude/hooks/workflow-manager.py start-task --type feature --description "..."');
|
|
193
|
+
console.log(" 3. Follow the agent workflow for your development\n");
|
|
194
|
+
} catch (error) {
|
|
195
|
+
console.error("\n Error during setup:", error);
|
|
196
|
+
process.exit(1);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
main();
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "start-vibing",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "Setup Claude Code agents, skills, and hooks in your project. Smart copy that preserves your custom domains and configurations.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"start-vibing": "./dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"template"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "bun build ./src/cli.ts --outdir ./dist --target node",
|
|
15
|
+
"dev": "bun run ./src/cli.ts",
|
|
16
|
+
"prepublishOnly": "bun run build"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"claude",
|
|
20
|
+
"claude-code",
|
|
21
|
+
"ai",
|
|
22
|
+
"agents",
|
|
23
|
+
"skills",
|
|
24
|
+
"hooks",
|
|
25
|
+
"automation",
|
|
26
|
+
"workflow",
|
|
27
|
+
"cli"
|
|
28
|
+
],
|
|
29
|
+
"author": "joaov",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/joaov/start-vibing"
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=18.0.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^20.0.0",
|
|
40
|
+
"typescript": "^5.0.0"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Claude Development System - Agent Context
|
|
2
|
+
|
|
3
|
+
This file provides context for all agents. For user-facing rules, see `/CLAUDE.md`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## System Architecture
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
.claude/
|
|
11
|
+
├── agents/ # 11 specialized agents (READ before acting)
|
|
12
|
+
├── skills/ # 8 skill systems with cache
|
|
13
|
+
├── config/ # Project-specific configuration
|
|
14
|
+
├── commands/ # Slash commands
|
|
15
|
+
└── hooks/ # Security hooks
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Configuration Files
|
|
21
|
+
|
|
22
|
+
Project-specific settings are in `.claude/config/`:
|
|
23
|
+
|
|
24
|
+
| File | Purpose |
|
|
25
|
+
| ---------------------- | ------------------------------------ |
|
|
26
|
+
| `project-config.json` | Stack, structure, commands |
|
|
27
|
+
| `domain-mapping.json` | File patterns to domains |
|
|
28
|
+
| `quality-gates.json` | Quality check commands |
|
|
29
|
+
| `testing-config.json` | Test framework and conventions |
|
|
30
|
+
| `security-rules.json` | Security audit rules |
|
|
31
|
+
|
|
32
|
+
**RULE:** Agents MUST read config files before acting. Do NOT hardcode project specifics.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Agent → Skill Mapping
|
|
37
|
+
|
|
38
|
+
| Agent | Primary Skill | Secondary |
|
|
39
|
+
| ---------------- | ------------------ | -------------------------------- |
|
|
40
|
+
| analyzer | codebase-knowledge | - |
|
|
41
|
+
| research | research-cache | codebase-knowledge |
|
|
42
|
+
| documenter | docs-tracker | codebase-knowledge |
|
|
43
|
+
| tester | test-coverage | - |
|
|
44
|
+
| ui-ux-reviewer | ui-ux-audit | - |
|
|
45
|
+
| security-auditor | security-scan | - |
|
|
46
|
+
| quality-checker | quality-gate | - |
|
|
47
|
+
| final-validator | final-check | ALL |
|
|
48
|
+
| commit-manager | workflow-state | docs-tracker, codebase-knowledge |
|
|
49
|
+
| domain-updater | codebase-knowledge | docs-tracker |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Execution Protocol
|
|
54
|
+
|
|
55
|
+
### Before ANY implementation:
|
|
56
|
+
|
|
57
|
+
1. **Start task** via `workflow-manager.py start-task --type [feature|fix|refactor] --description "..."`
|
|
58
|
+
2. **Read config** from `.claude/config/` for project specifics
|
|
59
|
+
3. Read relevant skill SKILL.md file
|
|
60
|
+
4. Check skill cache for existing data
|
|
61
|
+
5. Research if needed (web search)
|
|
62
|
+
6. **Approve files** via `workflow-manager.py approve-files --files "path/to/file.ts"`
|
|
63
|
+
|
|
64
|
+
### After implementation:
|
|
65
|
+
|
|
66
|
+
1. Update skill cache with changes
|
|
67
|
+
2. Run quality gates + record results
|
|
68
|
+
3. Security audit (if auth/data involved)
|
|
69
|
+
4. Final validation
|
|
70
|
+
5. **Mark workflow ready** via `workflow-manager.py final-validation --result approved --ready-to-commit true`
|
|
71
|
+
6. **Update domains** via domain-updater agent (BEFORE commit, keeps git clean)
|
|
72
|
+
7. **Commit + complete task** via commit-manager agent (FINAL step, runs complete-task)
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Workflow State Tracking
|
|
77
|
+
|
|
78
|
+
Location: `.claude/workflow-state.json`
|
|
79
|
+
|
|
80
|
+
### CLI Commands (MANDATORY)
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# 1. Start task (MUST be first)
|
|
84
|
+
python .claude/hooks/workflow-manager.py start-task --type feature --description "..."
|
|
85
|
+
|
|
86
|
+
# 2. After analyzer approves, register files
|
|
87
|
+
python .claude/hooks/workflow-manager.py approve-files --files "src/*.ts"
|
|
88
|
+
|
|
89
|
+
# 3. After each agent
|
|
90
|
+
python .claude/hooks/workflow-manager.py agent-executed --agent [name] --result approved
|
|
91
|
+
|
|
92
|
+
# 4. After quality gates
|
|
93
|
+
python .claude/hooks/workflow-manager.py quality-gate --gate [typecheck|lint|build] --passed true
|
|
94
|
+
|
|
95
|
+
# 5. Final validation
|
|
96
|
+
python .claude/hooks/workflow-manager.py final-validation --result approved --ready-to-commit true
|
|
97
|
+
|
|
98
|
+
# 6. After commit
|
|
99
|
+
python .claude/hooks/workflow-manager.py complete-task --commit-hash [hash]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Hooks Enforcement
|
|
103
|
+
|
|
104
|
+
- **PreToolUse**: Blocks file edits if task not started or file not approved
|
|
105
|
+
- **PostToolUse**: Auto-tracks all file modifications
|
|
106
|
+
- **Stop**: Blocks session end if workflow incomplete
|
|
107
|
+
- **Husky**: Blocks commit if validation failed
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## VETO Power Agents
|
|
112
|
+
|
|
113
|
+
These agents CAN and MUST stop the flow if rules are violated:
|
|
114
|
+
|
|
115
|
+
| Agent | Blocks When |
|
|
116
|
+
| -------------------- | -------------------------------------------------- |
|
|
117
|
+
| **security-auditor** | User ID from request, sensitive data, no validation |
|
|
118
|
+
| **final-validator** | Any rule violated, tests failing, docs missing |
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Quality Requirements
|
|
123
|
+
|
|
124
|
+
All implementations MUST:
|
|
125
|
+
|
|
126
|
+
- [ ] Pass typecheck (command from config)
|
|
127
|
+
- [ ] Pass lint (command from config)
|
|
128
|
+
- [ ] Pass unit tests (command from config)
|
|
129
|
+
- [ ] Pass E2E tests (command from config)
|
|
130
|
+
- [ ] Pass build (command from config)
|
|
131
|
+
- [ ] Have E2E tests with real auth
|
|
132
|
+
- [ ] Have documentation in `docs/`
|
|
133
|
+
- [ ] Be security audited
|
|
134
|
+
- [ ] Be committed with conventional commits
|
|
135
|
+
- [ ] Have domains updated with session learnings
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Domain Updater Agent
|
|
140
|
+
|
|
141
|
+
The **domain-updater** runs BEFORE commit-manager to ensure git stays clean.
|
|
142
|
+
|
|
143
|
+
### Purpose
|
|
144
|
+
|
|
145
|
+
- Document **problems encountered** during the session
|
|
146
|
+
- Record **solutions** applied to fix issues
|
|
147
|
+
- Add **prevention tips** for future sessions
|
|
148
|
+
- Update **attention points** with new learnings
|
|
149
|
+
- Keep domain knowledge **current and accurate**
|
|
150
|
+
|
|
151
|
+
### Trigger
|
|
152
|
+
|
|
153
|
+
Runs automatically:
|
|
154
|
+
1. After final-validator approves in any workflow
|
|
155
|
+
2. BEFORE commit-manager (so changes are included in commit)
|
|
156
|
+
3. Stop hook blocks session end until domain-updater executes (if files were modified)
|
|
157
|
+
|
|
158
|
+
### Workflow Order
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
final-validator → domain-updater → commit-manager → complete-task
|
|
162
|
+
↑ ↑
|
|
163
|
+
(updates domains) (commits all + archives)
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Configuration
|
|
167
|
+
|
|
168
|
+
Reads domain patterns from `.claude/config/domain-mapping.json`
|