ai-eng-system 0.0.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/LICENSE +21 -0
- package/README.md +115 -0
- package/dist/.claude-plugin/agents/agent-creator.md +206 -0
- package/dist/.claude-plugin/agents/ai_engineer.md +187 -0
- package/dist/.claude-plugin/agents/api_builder_enhanced.md +82 -0
- package/dist/.claude-plugin/agents/architect-advisor.md +88 -0
- package/dist/.claude-plugin/agents/backend_architect.md +88 -0
- package/dist/.claude-plugin/agents/code_reviewer.md +208 -0
- package/dist/.claude-plugin/agents/command-creator.md +331 -0
- package/dist/.claude-plugin/agents/cost_optimizer.md +284 -0
- package/dist/.claude-plugin/agents/database_optimizer.md +175 -0
- package/dist/.claude-plugin/agents/deployment_engineer.md +186 -0
- package/dist/.claude-plugin/agents/docs-writer.md +99 -0
- package/dist/.claude-plugin/agents/documentation_specialist.md +212 -0
- package/dist/.claude-plugin/agents/frontend-reviewer.md +51 -0
- package/dist/.claude-plugin/agents/full_stack_developer.md +391 -0
- package/dist/.claude-plugin/agents/infrastructure_builder.md +77 -0
- package/dist/.claude-plugin/agents/java-pro.md +182 -0
- package/dist/.claude-plugin/agents/ml_engineer.md +176 -0
- package/dist/.claude-plugin/agents/monitoring_expert.md +79 -0
- package/dist/.claude-plugin/agents/performance_engineer.md +193 -0
- package/dist/.claude-plugin/agents/plugin-validator.md +378 -0
- package/dist/.claude-plugin/agents/prompt-optimizer.md +63 -0
- package/dist/.claude-plugin/agents/security_scanner.md +332 -0
- package/dist/.claude-plugin/agents/seo-specialist.md +73 -0
- package/dist/.claude-plugin/agents/skill-creator.md +311 -0
- package/dist/.claude-plugin/agents/test-docs-writer-2.md +46 -0
- package/dist/.claude-plugin/agents/test-docs-writer-usage.md +40 -0
- package/dist/.claude-plugin/agents/test-docs-writer.md +98 -0
- package/dist/.claude-plugin/agents/test_generator.md +260 -0
- package/dist/.claude-plugin/agents/tool-creator.md +474 -0
- package/dist/.claude-plugin/commands/compound.md +26 -0
- package/dist/.claude-plugin/commands/context.md +318 -0
- package/dist/.claude-plugin/commands/create-agent.md +48 -0
- package/dist/.claude-plugin/commands/create-command.md +48 -0
- package/dist/.claude-plugin/commands/create-plugin.md +400 -0
- package/dist/.claude-plugin/commands/create-skill.md +48 -0
- package/dist/.claude-plugin/commands/create-tool.md +53 -0
- package/dist/.claude-plugin/commands/deploy.md +35 -0
- package/dist/.claude-plugin/commands/optimize.md +79 -0
- package/dist/.claude-plugin/commands/plan.md +215 -0
- package/dist/.claude-plugin/commands/recursive-init.md +217 -0
- package/dist/.claude-plugin/commands/research.md +199 -0
- package/dist/.claude-plugin/commands/review.md +73 -0
- package/dist/.claude-plugin/commands/seo.md +40 -0
- package/dist/.claude-plugin/commands/work.md +460 -0
- package/dist/.claude-plugin/hooks.json +15 -0
- package/dist/.claude-plugin/marketplace.json +54 -0
- package/dist/.claude-plugin/plugin.json +24 -0
- package/dist/.claude-plugin/skills/AGENTS.md +37 -0
- package/dist/.claude-plugin/skills/devops/coolify-deploy/SKILL.md +8 -0
- package/dist/.claude-plugin/skills/devops/git-worktree/SKILL.md +11 -0
- package/dist/.claude-plugin/skills/plugin-dev/SKILL.md +322 -0
- package/dist/.claude-plugin/skills/plugin-dev/references/agent-format.md +248 -0
- package/dist/.claude-plugin/skills/plugin-dev/references/claude-code-plugins.md +372 -0
- package/dist/.claude-plugin/skills/plugin-dev/references/command-format.md +312 -0
- package/dist/.claude-plugin/skills/plugin-dev/references/opencode-plugins.md +406 -0
- package/dist/.claude-plugin/skills/plugin-dev/references/opencode-tools.md +470 -0
- package/dist/.claude-plugin/skills/plugin-dev/references/skill-format.md +328 -0
- package/dist/.claude-plugin/skills/prompting/incentive-prompting/SKILL.md +162 -0
- package/dist/.claude-plugin/skills/research/comprehensive-research/SKILL.md +343 -0
- package/dist/.opencode/agent/ai-eng/ai-innovation/ai_engineer.md +186 -0
- package/dist/.opencode/agent/ai-eng/ai-innovation/ml_engineer.md +175 -0
- package/dist/.opencode/agent/ai-eng/ai-innovation/prompt-optimizer.md +62 -0
- package/dist/.opencode/agent/ai-eng/business-analytics/seo-specialist.md +72 -0
- package/dist/.opencode/agent/ai-eng/development/api_builder_enhanced.md +81 -0
- package/dist/.opencode/agent/ai-eng/development/architect-advisor.md +87 -0
- package/dist/.opencode/agent/ai-eng/development/backend_architect.md +87 -0
- package/dist/.opencode/agent/ai-eng/development/database_optimizer.md +174 -0
- package/dist/.opencode/agent/ai-eng/development/docs-writer.md +98 -0
- package/dist/.opencode/agent/ai-eng/development/documentation_specialist.md +211 -0
- package/dist/.opencode/agent/ai-eng/development/frontend-reviewer.md +50 -0
- package/dist/.opencode/agent/ai-eng/development/full_stack_developer.md +390 -0
- package/dist/.opencode/agent/ai-eng/development/java-pro.md +181 -0
- package/dist/.opencode/agent/ai-eng/development/test-docs-writer-2.md +45 -0
- package/dist/.opencode/agent/ai-eng/development/test-docs-writer-usage.md +39 -0
- package/dist/.opencode/agent/ai-eng/development/test-docs-writer.md +97 -0
- package/dist/.opencode/agent/ai-eng/meta/agent-creator.md +208 -0
- package/dist/.opencode/agent/ai-eng/meta/command-creator.md +333 -0
- package/dist/.opencode/agent/ai-eng/meta/skill-creator.md +313 -0
- package/dist/.opencode/agent/ai-eng/meta/tool-creator.md +476 -0
- package/dist/.opencode/agent/ai-eng/operations/cost_optimizer.md +283 -0
- package/dist/.opencode/agent/ai-eng/operations/deployment_engineer.md +185 -0
- package/dist/.opencode/agent/ai-eng/operations/infrastructure_builder.md +76 -0
- package/dist/.opencode/agent/ai-eng/operations/monitoring_expert.md +78 -0
- package/dist/.opencode/agent/ai-eng/quality-testing/code_reviewer.md +207 -0
- package/dist/.opencode/agent/ai-eng/quality-testing/performance_engineer.md +192 -0
- package/dist/.opencode/agent/ai-eng/quality-testing/plugin-validator.md +380 -0
- package/dist/.opencode/agent/ai-eng/quality-testing/security_scanner.md +331 -0
- package/dist/.opencode/agent/ai-eng/quality-testing/test_generator.md +259 -0
- package/dist/.opencode/command/ai-eng/compound.md +26 -0
- package/dist/.opencode/command/ai-eng/context.md +318 -0
- package/dist/.opencode/command/ai-eng/create-agent.md +48 -0
- package/dist/.opencode/command/ai-eng/create-command.md +48 -0
- package/dist/.opencode/command/ai-eng/create-plugin.md +400 -0
- package/dist/.opencode/command/ai-eng/create-skill.md +48 -0
- package/dist/.opencode/command/ai-eng/create-tool.md +53 -0
- package/dist/.opencode/command/ai-eng/deploy.md +35 -0
- package/dist/.opencode/command/ai-eng/optimize.md +79 -0
- package/dist/.opencode/command/ai-eng/plan.md +215 -0
- package/dist/.opencode/command/ai-eng/recursive-init.md +217 -0
- package/dist/.opencode/command/ai-eng/research.md +199 -0
- package/dist/.opencode/command/ai-eng/review.md +73 -0
- package/dist/.opencode/command/ai-eng/seo.md +40 -0
- package/dist/.opencode/command/ai-eng/work.md +460 -0
- package/dist/.opencode/opencode.jsonc +8 -0
- package/dist/.opencode/plugin/ai-eng-system.ts +10 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +13 -0
- package/dist/skills/AGENTS.md +37 -0
- package/dist/skills/devops/coolify-deploy/SKILL.md +8 -0
- package/dist/skills/devops/git-worktree/SKILL.md +11 -0
- package/dist/skills/plugin-dev/SKILL.md +322 -0
- package/dist/skills/plugin-dev/references/agent-format.md +248 -0
- package/dist/skills/plugin-dev/references/claude-code-plugins.md +372 -0
- package/dist/skills/plugin-dev/references/command-format.md +312 -0
- package/dist/skills/plugin-dev/references/opencode-plugins.md +406 -0
- package/dist/skills/plugin-dev/references/opencode-tools.md +470 -0
- package/dist/skills/plugin-dev/references/skill-format.md +328 -0
- package/dist/skills/prompting/incentive-prompting/SKILL.md +162 -0
- package/dist/skills/research/comprehensive-research/SKILL.md +343 -0
- package/package.json +73 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-eng/plan
|
|
3
|
+
description: Create a detailed implementation plan for a feature
|
|
4
|
+
agent: plan
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Plan Command
|
|
8
|
+
|
|
9
|
+
Create a structured, atomic implementation plan for: $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
/ai-eng/plan [description] [options]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Options
|
|
18
|
+
|
|
19
|
+
- `--swarm`: Use Swarms multi-agent orchestration instead of legacy coordinator
|
|
20
|
+
- `-s, --scope <scope>`: Plan scope (architecture|implementation|review|full) [default: full]
|
|
21
|
+
- `-r, --requirements <reqs...>`: List of specific requirements
|
|
22
|
+
- `-c, --constraints <constraints...>`: List of constraints to consider
|
|
23
|
+
- `-o, --output <file>`: Output plan file [default: generated-plan.yaml]
|
|
24
|
+
- `-v, --verbose`: Enable verbose output
|
|
25
|
+
|
|
26
|
+
## Planning Philosophy
|
|
27
|
+
|
|
28
|
+
**Atomic Plans**: Every plan should be decomposed into small, independently completable chunks that:
|
|
29
|
+
- Can be implemented in a single focused session (15-60 minutes)
|
|
30
|
+
- Have clear start and end states
|
|
31
|
+
- Are testable in isolation
|
|
32
|
+
- Don't require context from unfinished sibling tasks
|
|
33
|
+
|
|
34
|
+
## Process
|
|
35
|
+
|
|
36
|
+
### Phase 1: Discovery (Research Mode)
|
|
37
|
+
|
|
38
|
+
#### Subagent Communication Protocol (Minimal)
|
|
39
|
+
|
|
40
|
+
If you delegate discovery to subagents (recommended for large codebases), include a small Context Handoff Envelope in each Task prompt.
|
|
41
|
+
|
|
42
|
+
Use:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
<CONTEXT_HANDOFF_V1>
|
|
46
|
+
Goal: (1 sentence)
|
|
47
|
+
Constraints: (bullets)
|
|
48
|
+
Files / folders to focus: (bullets)
|
|
49
|
+
Deliverable: (what you must return)
|
|
50
|
+
Output format: RESULT_V1
|
|
51
|
+
</CONTEXT_HANDOFF_V1>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
And require:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
<RESULT_V1>
|
|
58
|
+
RESULT:
|
|
59
|
+
EVIDENCE:
|
|
60
|
+
RISKS:
|
|
61
|
+
NEXT_STEPS:
|
|
62
|
+
CONFIDENCE: 0.0-1.0
|
|
63
|
+
</RESULT_V1>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
1. **Codebase Analysis**
|
|
67
|
+
- Search for similar patterns and implementations
|
|
68
|
+
- Identify existing conventions and styles
|
|
69
|
+
- Map related files and dependencies
|
|
70
|
+
- Document findings with file paths and line numbers
|
|
71
|
+
|
|
72
|
+
2. **Tech Stack Detection**
|
|
73
|
+
- Identify frameworks, libraries, and tools in use
|
|
74
|
+
- Check package.json/requirements/go.mod for dependencies
|
|
75
|
+
- Note version constraints and compatibility requirements
|
|
76
|
+
|
|
77
|
+
3. **Scope Definition**
|
|
78
|
+
- List all files that will be modified
|
|
79
|
+
- List all new files to be created
|
|
80
|
+
- Identify integration points with existing code
|
|
81
|
+
- Flag potential breaking changes
|
|
82
|
+
|
|
83
|
+
### Phase 2: Task Decomposition
|
|
84
|
+
|
|
85
|
+
Break the feature into **atomic tasks** using this hierarchy:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
Epic (the full feature)
|
|
89
|
+
└── Phase (logical grouping, ~1 day)
|
|
90
|
+
└── Task (atomic unit, ~30 min)
|
|
91
|
+
└── Subtask (if task is still too large)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Each atomic task MUST include:**
|
|
95
|
+
|
|
96
|
+
| Field | Description | Example |
|
|
97
|
+
|-------|-------------|---------|
|
|
98
|
+
| ID | Unique identifier | `FEAT-001-A` |
|
|
99
|
+
| Title | Action-oriented name | "Create SessionManager class" |
|
|
100
|
+
| Depends On | Blocking task IDs | `FEAT-001-B` (or "None") |
|
|
101
|
+
| Files | Exact files to modify/create | `src/context/session.ts` |
|
|
102
|
+
| Acceptance Criteria | Checkboxes that define "done" | `[ ] Class exports correctly` |
|
|
103
|
+
| Estimated Time | Time box | `30 min` |
|
|
104
|
+
| Complexity | Low / Medium / High | `Medium` |
|
|
105
|
+
|
|
106
|
+
### Phase 3: Risk Assessment
|
|
107
|
+
|
|
108
|
+
For each phase, identify:
|
|
109
|
+
|
|
110
|
+
| Risk | Impact | Likelihood | Mitigation |
|
|
111
|
+
|------|--------|------------|------------|
|
|
112
|
+
| (risk description) | High/Med/Low | High/Med/Low | (strategy) |
|
|
113
|
+
|
|
114
|
+
### Phase 4: Testing Strategy
|
|
115
|
+
|
|
116
|
+
Define testing approach for each phase:
|
|
117
|
+
|
|
118
|
+
- **Unit Tests**: What functions/classes need tests?
|
|
119
|
+
- **Integration Tests**: What interactions need verification?
|
|
120
|
+
- **Manual Testing**: What scenarios to validate?
|
|
121
|
+
- **Regression Checks**: What existing functionality could break?
|
|
122
|
+
|
|
123
|
+
### Phase 5: SEO & Performance Considerations
|
|
124
|
+
|
|
125
|
+
If applicable:
|
|
126
|
+
- Core Web Vitals impact
|
|
127
|
+
- Bundle size changes
|
|
128
|
+
- API response times
|
|
129
|
+
- Caching strategies
|
|
130
|
+
|
|
131
|
+
## Output Format
|
|
132
|
+
|
|
133
|
+
### File: `plans/[YYYY-MM-DD]-[feature-slug].md`
|
|
134
|
+
|
|
135
|
+
```markdown
|
|
136
|
+
# [Feature Name] Implementation Plan
|
|
137
|
+
|
|
138
|
+
**Status**: Draft | In Progress | Complete
|
|
139
|
+
**Created**: [date]
|
|
140
|
+
**Estimated Effort**: [hours/days]
|
|
141
|
+
**Complexity**: Low | Medium | High
|
|
142
|
+
|
|
143
|
+
## Overview
|
|
144
|
+
[2-3 sentence summary]
|
|
145
|
+
|
|
146
|
+
## Success Criteria
|
|
147
|
+
- [ ] [Measurable outcome 1]
|
|
148
|
+
- [ ] [Measurable outcome 2]
|
|
149
|
+
|
|
150
|
+
## Architecture
|
|
151
|
+
[Diagram or description of component relationships]
|
|
152
|
+
|
|
153
|
+
## Phase 1: [Phase Name]
|
|
154
|
+
|
|
155
|
+
**Goal**: [What this phase accomplishes]
|
|
156
|
+
**Duration**: [Estimated time]
|
|
157
|
+
|
|
158
|
+
### Task 1.1: [Task Title]
|
|
159
|
+
- **ID**: FEAT-001-A
|
|
160
|
+
- **Depends On**: None
|
|
161
|
+
- **Files**:
|
|
162
|
+
- `path/to/file.ts` (modify)
|
|
163
|
+
- `path/to/new-file.ts` (create)
|
|
164
|
+
- **Acceptance Criteria**:
|
|
165
|
+
- [ ] Criterion 1
|
|
166
|
+
- [ ] Criterion 2
|
|
167
|
+
- [ ] Tests pass
|
|
168
|
+
- **Time**: 30 min
|
|
169
|
+
- **Complexity**: Low
|
|
170
|
+
|
|
171
|
+
### Task 1.2: [Task Title]
|
|
172
|
+
[...]
|
|
173
|
+
|
|
174
|
+
## Phase 2: [Phase Name]
|
|
175
|
+
[...]
|
|
176
|
+
|
|
177
|
+
## Dependencies
|
|
178
|
+
- [External dependency 1]
|
|
179
|
+
- [Internal dependency 1]
|
|
180
|
+
|
|
181
|
+
## Risks
|
|
182
|
+
| Risk | Impact | Likelihood | Mitigation |
|
|
183
|
+
|------|--------|------------|------------|
|
|
184
|
+
|
|
185
|
+
## Testing Plan
|
|
186
|
+
### Unit Tests
|
|
187
|
+
- [ ] Test for [component]
|
|
188
|
+
|
|
189
|
+
### Integration Tests
|
|
190
|
+
- [ ] Test [interaction]
|
|
191
|
+
|
|
192
|
+
## Rollback Plan
|
|
193
|
+
[How to revert if something goes wrong]
|
|
194
|
+
|
|
195
|
+
## References
|
|
196
|
+
- [Link to relevant docs]
|
|
197
|
+
- [Link to similar implementations]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Post-Planning Actions
|
|
201
|
+
|
|
202
|
+
After generating the plan:
|
|
203
|
+
|
|
204
|
+
1. **Review with user** - Confirm scope and priorities
|
|
205
|
+
2. **Create GitHub issue** (optional) - Link to plan file
|
|
206
|
+
3. **Estimate total effort** - Sum of all task estimates
|
|
207
|
+
4. **Identify parallel tracks** - Tasks without dependencies that can run concurrently
|
|
208
|
+
|
|
209
|
+
## Tips for Effective Plans
|
|
210
|
+
|
|
211
|
+
- **Timeboxing**: If a task exceeds 60 minutes, break it down further
|
|
212
|
+
- **Dependencies**: Minimize cross-task dependencies to enable parallel work
|
|
213
|
+
- **Checkpoints**: Each phase should end with a working (possibly incomplete) state
|
|
214
|
+
- **Escape hatches**: Note where you could stop and still have value
|
|
215
|
+
- **Evidence-based**: Include file paths and code snippets from discovery
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-eng/recursive-init
|
|
3
|
+
description: Recursively initialize AGENTS.md in all important subdirectories with smart detection
|
|
4
|
+
agent: build
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Recursive Init Command
|
|
8
|
+
|
|
9
|
+
## Expert Context
|
|
10
|
+
|
|
11
|
+
You are a senior DevOps architect and codebase analyst with 12+ years of experience at companies like Vercel, Stripe, and Netflix. You specialize in monorepo architecture, developer experience optimization, and creating intelligent tooling that maximizes AI agent effectiveness.
|
|
12
|
+
|
|
13
|
+
## Stakes
|
|
14
|
+
|
|
15
|
+
This recursive initialization is critical. Each AGENTS.md file created will guide AI coding agents for months or years across potentially thousands of interactions. Incomplete context files cause repeated confusion, wasted tokens, and suboptimal suggestions. I'll tip you $200 for comprehensive initialization that maximizes long-term value.
|
|
16
|
+
|
|
17
|
+
## Approach
|
|
18
|
+
|
|
19
|
+
Take a deep breath. Execute this multi-phase operation systematically.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
/recursive-init [path] [options]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Phase 1: File System Scan (No LLM Cost)
|
|
30
|
+
|
|
31
|
+
First, gather intelligence before any analysis:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Detect project types and score directories
|
|
35
|
+
find . -maxdepth 3 -name "package.json" -o -name "go.mod" -o -name "Cargo.toml" -o -name "pyproject.toml" -o -name "pom.xml" 2>/dev/null | grep -v node_modules | head -30
|
|
36
|
+
|
|
37
|
+
# Identify monorepo patterns
|
|
38
|
+
ls -d */packages 2>/dev/null || ls -d */apps 2>/dev/null || ls -d */services 2>/dev/null || echo "No standard monorepo structure detected"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Directory Scoring Heuristic
|
|
42
|
+
|
|
43
|
+
| Indicator | Score |
|
|
44
|
+
|-----------|-------|
|
|
45
|
+
| package.json, go.mod, Cargo.toml, pyproject.toml, pom.xml | +10 |
|
|
46
|
+
| src/, lib/, components/ directory | +5 |
|
|
47
|
+
| .cursorrules, .github/copilot-instructions.md | +3 |
|
|
48
|
+
| >10 source files (.ts, .js, .py, .go, .rs) | +3 |
|
|
49
|
+
| README.md or docs/ present | +2 |
|
|
50
|
+
|
|
51
|
+
Only analyze directories scoring > 5 (configurable via --min-score).
|
|
52
|
+
|
|
53
|
+
## Phase 2: Systematic Execution
|
|
54
|
+
|
|
55
|
+
### Step 1: Root Analysis
|
|
56
|
+
Run standard init at project root. Create comprehensive overview AGENTS.md.
|
|
57
|
+
|
|
58
|
+
### Step 2: Directory Discovery
|
|
59
|
+
Scan and score all subdirectories. Report findings before proceeding.
|
|
60
|
+
|
|
61
|
+
### Step 3: Batch Processing
|
|
62
|
+
Process directories in groups of 3. For EACH directory:
|
|
63
|
+
1. cd into the directory
|
|
64
|
+
2. Analyze local code structure, framework, and patterns
|
|
65
|
+
3. Create localized AGENTS.md (~20 lines) containing:
|
|
66
|
+
- **Hierarchy Metadata** (new requirement per Anthropic docs):
|
|
67
|
+
- `**Hierarchy Level:**` — Role in system (e.g., "Frontend components", "API services", "Build utilities")
|
|
68
|
+
- `**Parent:**` — Link to parent AGENTS.md with path (e.g., `[../AGENTS.md](../AGENTS.md)`)
|
|
69
|
+
- `**Philosophy:**` — Link to CLAUDE.md (e.g., `[CLAUDE.md](../../CLAUDE.md)`)
|
|
70
|
+
- Build/lint/test commands (especially single test execution)
|
|
71
|
+
- Code style guidelines (imports, formatting, types, naming)
|
|
72
|
+
- Framework-specific patterns and conventions
|
|
73
|
+
- Integration points with other packages
|
|
74
|
+
4. Include existing .cursorrules or .github/copilot-instructions.md content
|
|
75
|
+
|
|
76
|
+
### Step 4: Context Linking in AGENTS.md
|
|
77
|
+
Update root AGENTS.md with:
|
|
78
|
+
1. **Directory Context Index** — Table with links to all created AGENTS.md files
|
|
79
|
+
2. **Hierarchy Reference** — Explain the linking structure to CLAUDE.md
|
|
80
|
+
3. **Integration Summary** — How subdirectories connect to parent agents and philosophy
|
|
81
|
+
|
|
82
|
+
Example section:
|
|
83
|
+
```markdown
|
|
84
|
+
## Directory Context Index
|
|
85
|
+
|
|
86
|
+
| Directory | Hierarchy Level | Purpose | Key Files |
|
|
87
|
+
|-----------|-----------------|---------|-----------|
|
|
88
|
+
| `packages/api` | API Services | REST API backend | `src/routes/`, `src/models/` |
|
|
89
|
+
| `packages/web` | Frontend Components | React UI | `src/components/`, `src/pages/` |
|
|
90
|
+
|
|
91
|
+
Each subdirectory's AGENTS.md includes hierarchy metadata linking to:
|
|
92
|
+
- **Parent:** This AGENTS.md for agent coordination
|
|
93
|
+
- **Philosophy:** CLAUDE.md for project guiding principles
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Step 5: Update/Create Root CLAUDE.md
|
|
97
|
+
Ensure root CLAUDE.md is properly linked to AGENTS.md structure:
|
|
98
|
+
|
|
99
|
+
1. **If CLAUDE.md exists:** Add or update an "Agent Contexts" section listing all AGENTS.md files
|
|
100
|
+
2. **If CLAUDE.md doesn't exist:** Create a new CLAUDE.md with:
|
|
101
|
+
- Project philosophy and guidelines
|
|
102
|
+
- "Agent Coordination" section linking to root AGENTS.md
|
|
103
|
+
- "Agent Contexts" section listing subdirectory AGENTS.md files
|
|
104
|
+
|
|
105
|
+
Example CLAUDE.md structure:
|
|
106
|
+
```markdown
|
|
107
|
+
# Project Philosophy
|
|
108
|
+
|
|
109
|
+
[Project mission and guiding principles...]
|
|
110
|
+
|
|
111
|
+
## Agent Coordination
|
|
112
|
+
|
|
113
|
+
See **[AGENTS.md](./AGENTS.md)** for:
|
|
114
|
+
- Available agents and their modes
|
|
115
|
+
- Specialized subagents and capabilities
|
|
116
|
+
- Commands and skills available
|
|
117
|
+
|
|
118
|
+
This CLAUDE.md defines the **philosophy**. AGENTS.md documents the **agents and tools**.
|
|
119
|
+
|
|
120
|
+
## Agent Contexts
|
|
121
|
+
|
|
122
|
+
Specialized agent contexts are defined in subdirectories:
|
|
123
|
+
|
|
124
|
+
| Directory | AGENTS.md | Purpose |
|
|
125
|
+
|-----------|-----------|---------|
|
|
126
|
+
| `.claude/` | [.claude/AGENTS.md](./.claude/AGENTS.md) | Command implementation details |
|
|
127
|
+
| `skills/` | [skills/AGENTS.md](./skills/AGENTS.md) | Reusable skill definitions |
|
|
128
|
+
| `packages/api` | [packages/api/AGENTS.md](./packages/api/AGENTS.md) | API services context |
|
|
129
|
+
| `packages/web` | [packages/web/AGENTS.md](./packages/web/AGENTS.md) | Frontend context |
|
|
130
|
+
|
|
131
|
+
Each subdirectory maintains its own AGENTS.md with hierarchy metadata linking back to this CLAUDE.md philosophy.
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Options
|
|
135
|
+
|
|
136
|
+
| Flag | Description | Default |
|
|
137
|
+
|------|-------------|---------|
|
|
138
|
+
| `--depth N` | Maximum recursion depth | 2 |
|
|
139
|
+
| `--dry-run` | Preview without changes | false |
|
|
140
|
+
| `--preserve` | Keep existing AGENTS.md | false |
|
|
141
|
+
| `--batch-size N` | Directories per batch | 3 |
|
|
142
|
+
| `--min-score N` | Minimum importance score | 5 |
|
|
143
|
+
| `--include <pattern>` | Additional patterns to include | - |
|
|
144
|
+
| `--exclude <pattern>` | Patterns to skip | node_modules,.git,dist |
|
|
145
|
+
| `--estimate-cost` | Show cost estimate first | false |
|
|
146
|
+
|
|
147
|
+
## Skip Patterns
|
|
148
|
+
|
|
149
|
+
node_modules, .git, dist, build, __pycache__, .venv, target, coverage, .next, .nuxt
|
|
150
|
+
|
|
151
|
+
## Output Format
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
🔍 Scanning directory structure...
|
|
155
|
+
📊 Found X directories above threshold (score > 5)
|
|
156
|
+
|
|
157
|
+
📁 Root (/)
|
|
158
|
+
✓ AGENTS.md created (monorepo overview, 8 packages detected)
|
|
159
|
+
|
|
160
|
+
📦 Batch 1/N: [packages/api, packages/web, packages/shared]
|
|
161
|
+
✓ packages/api: AGENTS.md (Express REST API, TypeScript, Prisma)
|
|
162
|
+
✓ packages/web: AGENTS.md (Next.js 14, App Router, Tailwind)
|
|
163
|
+
✓ packages/shared: AGENTS.md (TypeScript utilities, Zod schemas)
|
|
164
|
+
|
|
165
|
+
📋 Root AGENTS.md updated with directory index
|
|
166
|
+
|
|
167
|
+
✅ Summary: 1 root + X directories initialized
|
|
168
|
+
💰 Estimated cost: ~$X.XX
|
|
169
|
+
🕐 Time saved: ~X minutes vs manual setup
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Quality Verification
|
|
173
|
+
|
|
174
|
+
Before completing, verify:
|
|
175
|
+
- [ ] Each AGENTS.md is ~20 lines, focused, and actionable
|
|
176
|
+
- [ ] Build/test commands are correct and tested where possible
|
|
177
|
+
- [ ] Cross-package dependencies are noted
|
|
178
|
+
- [ ] No duplicate or conflicting information
|
|
179
|
+
- [ ] Root index accurately reflects all initialized directories
|
|
180
|
+
|
|
181
|
+
### Hierarchy Linking Verification (Required per Anthropic Docs)
|
|
182
|
+
|
|
183
|
+
**For each created AGENTS.md file:**
|
|
184
|
+
- [ ] **Hierarchy Level** field present and describes role (e.g., "Backend services", "UI components")
|
|
185
|
+
- [ ] **Parent** field links to appropriate parent AGENTS.md with correct relative path
|
|
186
|
+
- [ ] **Philosophy** field links to CLAUDE.md with correct relative path (uses `@` import syntax if in .claude/)
|
|
187
|
+
- [ ] Links are validated as correct paths (no broken references)
|
|
188
|
+
|
|
189
|
+
**For Root AGENTS.md:**
|
|
190
|
+
- [ ] Directory Context Index table showing all subdirectories with links
|
|
191
|
+
- [ ] Explains hierarchy linking structure for downstream agents
|
|
192
|
+
|
|
193
|
+
**For Root CLAUDE.md (Bidirectional Linking):**
|
|
194
|
+
- [ ] "Agent Coordination" section links to AGENTS.md
|
|
195
|
+
- [ ] "Agent Contexts" section lists all subdirectory AGENTS.md files with links
|
|
196
|
+
- [ ] Each listed AGENTS.md is validated and accessible
|
|
197
|
+
- [ ] CLAUDE.md clearly explains the relationship: philosophy (CLAUDE.md) → agents (AGENTS.md) → subdirectories
|
|
198
|
+
- [ ] All links use correct relative paths
|
|
199
|
+
|
|
200
|
+
Rate your confidence in the completeness of this initialization (0-1) and note any directories that may need manual review.
|
|
201
|
+
|
|
202
|
+
## Cost Considerations
|
|
203
|
+
|
|
204
|
+
| Scenario | Directories | Estimated Cost | Time Saved |
|
|
205
|
+
|----------|-------------|----------------|------------|
|
|
206
|
+
| Standard /init | 1 | $0.01-0.02 | 2-3 min |
|
|
207
|
+
| Small monorepo | 3-5 | $0.06-0.15 | 10-15 min |
|
|
208
|
+
| Medium monorepo | 5-10 | $0.10-0.40 | 20-30 min |
|
|
209
|
+
| Large monorepo | 10-20 | $0.20-0.80 | 45-60 min |
|
|
210
|
+
|
|
211
|
+
## Research-Backed Enhancements
|
|
212
|
+
|
|
213
|
+
This command uses incentive-based prompting techniques:
|
|
214
|
+
- **Expert Persona**: DevOps architect framing (Kong et al., +60% accuracy)
|
|
215
|
+
- **Stakes Language**: Critical importance framing (Bsharat et al., +45% quality)
|
|
216
|
+
- **Step-by-Step**: Systematic phase execution (Yang et al., +46% accuracy)
|
|
217
|
+
- **Self-Evaluation**: Confidence rating for quality assurance
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-eng/research
|
|
3
|
+
description: Conduct comprehensive multi-phase research across codebase, documentation, and external sources
|
|
4
|
+
agent: plan
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
inputs:
|
|
7
|
+
- name: query
|
|
8
|
+
type: string
|
|
9
|
+
required: false
|
|
10
|
+
description: Direct research question or topic
|
|
11
|
+
- name: ticket
|
|
12
|
+
type: string
|
|
13
|
+
required: false
|
|
14
|
+
description: Path to ticket file (optional if query provided)
|
|
15
|
+
- name: scope
|
|
16
|
+
type: string
|
|
17
|
+
required: false
|
|
18
|
+
description: Research scope (codebase|documentation|external|all)
|
|
19
|
+
default: all
|
|
20
|
+
- name: depth
|
|
21
|
+
type: string
|
|
22
|
+
required: false
|
|
23
|
+
description: Research depth (shallow|medium|deep)
|
|
24
|
+
default: medium
|
|
25
|
+
outputs:
|
|
26
|
+
- name: research_document
|
|
27
|
+
type: structured
|
|
28
|
+
format: Markdown document with YAML frontmatter
|
|
29
|
+
description: Comprehensive research findings saved to docs/research/
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# Research Command
|
|
33
|
+
|
|
34
|
+
Conduct comprehensive research for: $ARGUMENTS
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
/ai-eng/research [query] [options]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Options
|
|
43
|
+
|
|
44
|
+
- `--swarm`: Use Swarms multi-agent orchestration instead of legacy coordinator
|
|
45
|
+
- `-s, --scope <scope>`: Research scope (codebase|documentation|all) [default: all]
|
|
46
|
+
- `-d, --depth <depth>`: Research depth (shallow|medium|deep) [default: medium]
|
|
47
|
+
- `-o, --output <file>`: Output file path
|
|
48
|
+
- `-f, --format <format>`: Export format (markdown|json|html) [default: markdown]
|
|
49
|
+
- `--no-cache`: Disable research caching
|
|
50
|
+
- `-v, --verbose`: Enable verbose output
|
|
51
|
+
|
|
52
|
+
## Expert Context
|
|
53
|
+
|
|
54
|
+
You are a senior research analyst with 15+ years of experience at companies like Google, Stripe, and Netflix. Your expertise is in systematic investigation, pattern recognition, and synthesizing complex information into actionable insights. This research is critical to the project's success.
|
|
55
|
+
|
|
56
|
+
## Research Methodology
|
|
57
|
+
|
|
58
|
+
Take a deep breath and execute this research systematically.
|
|
59
|
+
|
|
60
|
+
### Phase 1: Context & Scope Definition (CRITICAL - Do First)
|
|
61
|
+
|
|
62
|
+
1. **Parse the Research Request**
|
|
63
|
+
- Identify the primary research question
|
|
64
|
+
- Decompose into 3-5 sub-questions
|
|
65
|
+
- Define clear scope boundaries
|
|
66
|
+
- Determine depth level required
|
|
67
|
+
|
|
68
|
+
2. **Read Primary Sources First**
|
|
69
|
+
- NEVER spawn agents before understanding context
|
|
70
|
+
- Read any referenced tickets or documents completely
|
|
71
|
+
- Identify what information already exists
|
|
72
|
+
|
|
73
|
+
### Phase 2: Parallel Discovery
|
|
74
|
+
|
|
75
|
+
#### Subagent Communication Protocol (Minimal)
|
|
76
|
+
|
|
77
|
+
When you spawn EACH discovery agent, include a small **Context Handoff Envelope** in the prompt. Subagents run in a separate context; do not assume they know anything unless you include it.
|
|
78
|
+
|
|
79
|
+
Use this exact structure:
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
<CONTEXT_HANDOFF_V1>
|
|
83
|
+
Goal: (1 sentence)
|
|
84
|
+
Scope: (codebase|docs|external|all)
|
|
85
|
+
Known constraints: (bullets; optional)
|
|
86
|
+
What I already checked: (bullets; optional)
|
|
87
|
+
Files/paths to prioritize: (bullets; optional)
|
|
88
|
+
Deliverable: (what you must return)
|
|
89
|
+
Output format: RESULT_V1
|
|
90
|
+
</CONTEXT_HANDOFF_V1>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
All agents must respond with:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
<RESULT_V1>
|
|
97
|
+
RESULT:
|
|
98
|
+
EVIDENCE:
|
|
99
|
+
OPEN_QUESTIONS:
|
|
100
|
+
NEXT_STEPS:
|
|
101
|
+
CONFIDENCE: 0.0-1.0
|
|
102
|
+
</RESULT_V1>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Spawn these agents CONCURRENTLY for maximum efficiency:
|
|
106
|
+
|
|
107
|
+
| Agent | Task |
|
|
108
|
+
|-------|------|
|
|
109
|
+
| `codebase-locator` | Find all relevant files, components, and directories |
|
|
110
|
+
| `research-locator` | Discover existing documentation, decisions, and notes |
|
|
111
|
+
| `codebase-pattern-finder` | Identify recurring implementation patterns |
|
|
112
|
+
|
|
113
|
+
Wait for all discovery agents to complete before proceeding.
|
|
114
|
+
|
|
115
|
+
### Phase 3: Sequential Deep Analysis
|
|
116
|
+
|
|
117
|
+
Based on discovery results, run analyzers SEQUENTIALLY:
|
|
118
|
+
|
|
119
|
+
1. **`codebase-analyzer`** - Extract implementation details with file:line evidence
|
|
120
|
+
2. **`research-analyzer`** - Extract decisions, constraints, and insights from docs
|
|
121
|
+
|
|
122
|
+
For complex research, consider adding:
|
|
123
|
+
- `web-search-researcher` - External best practices and standards
|
|
124
|
+
- `system-architect` - Architectural implications
|
|
125
|
+
- `database-expert` - Data layer concerns
|
|
126
|
+
- `security-scanner` - Security assessment
|
|
127
|
+
|
|
128
|
+
### Phase 4: Synthesis & Documentation
|
|
129
|
+
|
|
130
|
+
Create a comprehensive research document with:
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
---
|
|
134
|
+
date: [TODAY'S DATE]
|
|
135
|
+
researcher: Assistant
|
|
136
|
+
topic: '[Research Topic]'
|
|
137
|
+
tags: [research, relevant, tags]
|
|
138
|
+
status: complete
|
|
139
|
+
confidence: high|medium|low
|
|
140
|
+
agents_used: [list of agents]
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Synopsis
|
|
144
|
+
[1-2 sentence summary]
|
|
145
|
+
|
|
146
|
+
## Summary
|
|
147
|
+
- Key finding 1
|
|
148
|
+
- Key finding 2
|
|
149
|
+
- Key finding 3
|
|
150
|
+
|
|
151
|
+
## Detailed Findings
|
|
152
|
+
|
|
153
|
+
### Codebase Analysis
|
|
154
|
+
[Implementation details with file:line references]
|
|
155
|
+
|
|
156
|
+
### Documentation Insights
|
|
157
|
+
[Past decisions, rationale, constraints]
|
|
158
|
+
|
|
159
|
+
### External Research
|
|
160
|
+
[Best practices, standards, alternatives]
|
|
161
|
+
|
|
162
|
+
## Code References
|
|
163
|
+
- `path/file.ext:12-45` - Description
|
|
164
|
+
- `path/other.ext:78` - Description
|
|
165
|
+
|
|
166
|
+
## Architecture Insights
|
|
167
|
+
[Patterns, design decisions, relationships]
|
|
168
|
+
|
|
169
|
+
## Recommendations
|
|
170
|
+
### Immediate Actions
|
|
171
|
+
1. [Priority action]
|
|
172
|
+
|
|
173
|
+
### Long-term Considerations
|
|
174
|
+
- [Strategic recommendation]
|
|
175
|
+
|
|
176
|
+
## Risks & Limitations
|
|
177
|
+
- [Identified risks]
|
|
178
|
+
|
|
179
|
+
## Open Questions
|
|
180
|
+
- [ ] [Unresolved questions]
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Quality Checklist
|
|
184
|
+
|
|
185
|
+
Before finalizing, verify:
|
|
186
|
+
- [ ] All claims have file:line evidence
|
|
187
|
+
- [ ] Historical context included
|
|
188
|
+
- [ ] Open questions explicitly listed
|
|
189
|
+
- [ ] Recommendations are actionable
|
|
190
|
+
- [ ] Confidence levels assigned
|
|
191
|
+
- [ ] Cross-component relationships identified
|
|
192
|
+
|
|
193
|
+
## Output
|
|
194
|
+
|
|
195
|
+
Save research document to `docs/research/[date]-[topic-slug].md`
|
|
196
|
+
|
|
197
|
+
Rate your confidence in the research findings (0-1) and identify any assumptions or limitations.
|
|
198
|
+
|
|
199
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-eng/review
|
|
3
|
+
description: Run comprehensive code review with multiple perspectives
|
|
4
|
+
agent: review
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Review Command
|
|
8
|
+
|
|
9
|
+
Review current changes or a PR with multiple expert perspectives.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
/ai-eng/review [files...] [options]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Options
|
|
18
|
+
|
|
19
|
+
- `--swarm`: Use Swarms multi-agent orchestration instead of legacy coordinator
|
|
20
|
+
- `-t, --type <type>`: Review type (full|incremental|security|performance|frontend) [default: full]
|
|
21
|
+
- `-s, --severity <severity>`: Minimum severity level (low|medium|high|critical) [default: medium]
|
|
22
|
+
- `-f, --focus <focus>`: Focused review (security|performance|frontend|general)
|
|
23
|
+
- `-o, --output <file>`: Output report file [default: code-review-report.json]
|
|
24
|
+
- `-v, --verbose`: Enable verbose output
|
|
25
|
+
|
|
26
|
+
## Perspectives
|
|
27
|
+
|
|
28
|
+
#### Subagent Communication Protocol (Minimal)
|
|
29
|
+
|
|
30
|
+
If you spawn reviewer subagents in parallel, include:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
<CONTEXT_HANDOFF_V1>
|
|
34
|
+
Goal: Review changes for (focus area)
|
|
35
|
+
Files under review: (paths)
|
|
36
|
+
Constraints: (e.g., no code changes; read-only)
|
|
37
|
+
Deliverable: findings with file:line evidence
|
|
38
|
+
Output format: RESULT_V1
|
|
39
|
+
</CONTEXT_HANDOFF_V1>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Require:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
<RESULT_V1>
|
|
46
|
+
RESULT:
|
|
47
|
+
FINDINGS: (bullets with severity)
|
|
48
|
+
EVIDENCE: (file:line)
|
|
49
|
+
RECOMMENDATIONS:
|
|
50
|
+
CONFIDENCE: 0.0-1.0
|
|
51
|
+
</RESULT_V1>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- **Code Quality**: Clean code, SOLID principles, DRY
|
|
55
|
+
- **Performance**: Time/space complexity, caching opportunities
|
|
56
|
+
- **SEO**: Meta tags, structured data, Core Web Vitals impact
|
|
57
|
+
- **Security**: Input validation, authentication, data exposure
|
|
58
|
+
- **Architecture**: Component boundaries, coupling, scalability
|
|
59
|
+
|
|
60
|
+
## Output Format
|
|
61
|
+
|
|
62
|
+
For each finding provide:
|
|
63
|
+
|
|
64
|
+
| Field | Description |
|
|
65
|
+
|-------|-------------|
|
|
66
|
+
| Severity | critical, major, minor |
|
|
67
|
+
| Location | file:line |
|
|
68
|
+
| Issue | Description of the problem |
|
|
69
|
+
| Recommendation | Suggested fix |
|
|
70
|
+
|
|
71
|
+
## Summary
|
|
72
|
+
|
|
73
|
+
End with overall assessment: APPROVE, CHANGES_REQUESTED, or NEEDS_DISCUSSION.
|