Skip to content

Commit cdfa245

Browse files
feat: add multi-agent orchestration skills from subagent-orchestrator
- Add 8 agent skills: pm-agent, frontend-agent, backend-agent, mobile-agent, qa-agent, debug-agent, workflow-guide, orchestrator - Add 5 workflows: coordinate, debug, orchestrate, plan, review - Add shared resources: api-contracts, reasoning-templates, skill-routing, context management guides - Add dashboard scripts for real-time agent monitoring - Add Serena memory coordination support - Update .gitignore with Antigravity/Serena rules - Translate all Korean documentation to English Amp-Thread-ID: https://ampcode.com/threads/T-019c0918-5b9d-753a-ac3e-317b748ce4e7 Co-authored-by: Amp <amp@ampcode.com>
1 parent 1d218c8 commit cdfa245

File tree

87 files changed

+10461
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+10461
-0
lines changed

.agent/mcp.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"mcpServers": {
3+
"serena": {
4+
"command": "uvx",
5+
"args": [
6+
"--from",
7+
"git+https://github.com/oraios/serena",
8+
"serena",
9+
"start-mcp-server",
10+
"--context",
11+
"antigravity",
12+
"--project",
13+
"."
14+
],
15+
"env": {
16+
"SERENA_LOG_LEVEL": "info"
17+
}
18+
}
19+
}
20+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# API Contracts
2+
3+
This directory contains API contracts created by PM Agent and referenced by backend/frontend/mobile agents.
4+
5+
## Usage
6+
7+
### PM Agent (Author)
8+
Create API contracts here during planning phase:
9+
```
10+
write_memory("api-contracts/{domain}.md", contract content)
11+
```
12+
13+
Or create files directly in this directory if Serena is not available.
14+
15+
### Backend Agent (Implementer)
16+
Read contracts and implement exactly as specified:
17+
```
18+
read_memory("api-contracts/{domain}.md")
19+
```
20+
21+
### Frontend / Mobile Agent (Consumer)
22+
Read contracts and integrate API client exactly as specified:
23+
```
24+
read_memory("api-contracts/{domain}.md")
25+
```
26+
27+
## Contract Format
28+
29+
```markdown
30+
# {Domain} API Contract
31+
32+
## POST /api/{resource}
33+
- **Auth**: Required (JWT Bearer)
34+
- **Request Body**:
35+
```json
36+
{ "field": "type", "field2": "type" }
37+
```
38+
- **Response 200**:
39+
```json
40+
{ "id": "uuid", "field": "value", "created_at": "ISO8601" }
41+
```
42+
- **Response 401**: `{ "detail": "Not authenticated" }`
43+
- **Response 422**: `{ "detail": [{ "field": "error message" }] }`
44+
```
45+
46+
## Rules
47+
1. PM Agent must create during planning
48+
2. Backend Agent must not implement differently from contract
49+
3. Frontend/Mobile Agent defines types based on contract
50+
4. If changes needed, request re-planning from PM Agent
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# {Domain} API Contract
2+
3+
> Generated by PM Agent | Session: {session-id} | Date: {YYYY-MM-DD}
4+
5+
## Base URL
6+
`/api/{domain}`
7+
8+
## Authentication
9+
All endpoints require JWT Bearer token unless marked as `Public`.
10+
11+
---
12+
13+
## Endpoints
14+
15+
### POST /api/{domain}
16+
- **Description**: Create a new {resource}
17+
- **Auth**: Required
18+
- **Request Body**:
19+
```json
20+
{
21+
"field1": "string (required)",
22+
"field2": "number (optional, default: 0)"
23+
}
24+
```
25+
- **Response 201**:
26+
```json
27+
{
28+
"id": "uuid",
29+
"field1": "string",
30+
"field2": 0,
31+
"created_at": "2024-01-01T00:00:00Z"
32+
}
33+
```
34+
- **Errors**: 401, 422
35+
36+
### GET /api/{domain}
37+
- **Description**: List {resources} (paginated)
38+
- **Auth**: Required
39+
- **Query Params**: `page` (default: 1), `size` (default: 20)
40+
- **Response 200**:
41+
```json
42+
{
43+
"items": [...],
44+
"total": 100,
45+
"page": 1,
46+
"size": 20
47+
}
48+
```
49+
50+
### GET /api/{domain}/{id}
51+
- **Description**: Get single {resource}
52+
- **Auth**: Required
53+
- **Response 200**: Single resource object
54+
- **Errors**: 401, 404
55+
56+
### PATCH /api/{domain}/{id}
57+
- **Description**: Update {resource}
58+
- **Auth**: Required (owner only)
59+
- **Request Body**: Partial update fields
60+
- **Response 200**: Updated resource object
61+
- **Errors**: 401, 403, 404, 422
62+
63+
### DELETE /api/{domain}/{id}
64+
- **Description**: Delete {resource}
65+
- **Auth**: Required (owner only)
66+
- **Response 204**: No content
67+
- **Errors**: 401, 403, 404
68+
69+
---
70+
71+
## Data Models
72+
73+
### {Resource}
74+
| Field | Type | Required | Description |
75+
|-------|------|----------|-------------|
76+
| id | UUID | auto | Primary key |
77+
| field1 | string | yes | Description |
78+
| field2 | number | no | Default: 0 |
79+
| user_id | UUID | auto | Owner (FK to users) |
80+
| created_at | datetime | auto | ISO 8601 |
81+
| updated_at | datetime | auto | ISO 8601 |
82+
83+
---
84+
85+
## Notes
86+
- Pagination: offset-based (page/size)
87+
- Sorting: `?sort=created_at&order=desc` (optional)
88+
- Filtering: `?field1=value` (optional)
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Clarification Protocol
2+
3+
When requirements are ambiguous, "assuming and proceeding" usually leads to the wrong direction.
4+
Follow this protocol to secure clear requirements before execution.
5+
6+
---
7+
8+
## Required Confirmation Items
9+
10+
If any of the items below are unclear, **do not assume** — explicitly document them.
11+
12+
### Common to All Agents
13+
| Item | Confirmation Question | Default (when assuming) |
14+
|------|----------------------|------------------------|
15+
| Target Users | Who will use this service? | General web users |
16+
| Core Features | What are the 3 must-have features? | Infer from task description |
17+
| Tech Stack | Are there specific framework constraints? | Project default stack |
18+
| Authentication | Is login required? | Include JWT auth |
19+
| Scope | Is this MVP or full feature? | MVP |
20+
21+
### Backend Agent Additional Confirmations
22+
| Item | Confirmation Question | Default |
23+
|------|----------------------|---------|
24+
| DB Choice | PostgreSQL? MongoDB? SQLite? | PostgreSQL |
25+
| API Style | REST? GraphQL? | REST |
26+
| Auth Method | JWT? Session? OAuth? | JWT (access + refresh) |
27+
| File Upload | Required? Size limit? | Not required |
28+
29+
### Frontend Agent Additional Confirmations
30+
| Item | Confirmation Question | Default |
31+
|------|----------------------|---------|
32+
| SSR/CSR | Server-side rendering needed? | Next.js App Router (SSR) |
33+
| Dark Mode | Support required? | Supported |
34+
| i18n | Multi-language support? | Not required |
35+
| Existing Design System | UI library to use? | shadcn/ui |
36+
37+
### Mobile Agent Additional Confirmations
38+
| Item | Confirmation Question | Default |
39+
|------|----------------------|---------|
40+
| Platform | iOS only? Android only? Both? | Both |
41+
| Offline | Offline support needed? | Not required |
42+
| Push Notifications | Required? | Not required |
43+
| Minimum OS | iOS/Android minimum version? | iOS 14+, Android API 24+ |
44+
45+
---
46+
47+
## Response by Ambiguity Level
48+
49+
### Level 1: Slightly Ambiguous (Core is clear, details missing)
50+
Example: "Create a TODO app"
51+
52+
**Response**: Apply defaults and record assumptions in result
53+
```
54+
⚠️ Assumptions:
55+
- JWT authentication included
56+
- PostgreSQL database
57+
- REST API
58+
- MVP scope (CRUD only)
59+
```
60+
61+
### Level 2: Considerably Ambiguous (Core features unclear)
62+
Example: "Create a user management system"
63+
64+
**Response**: Narrow down to 3 core features and proceed
65+
```
66+
⚠️ Interpreted scope (3 core features):
67+
1. User registration + login (JWT)
68+
2. Profile management (view/edit)
69+
3. Admin user list (admin role only)
70+
71+
NOT included (would need separate task):
72+
- Role-based access control (beyond admin/user)
73+
- Social login (OAuth)
74+
- Email verification
75+
```
76+
77+
### Level 3: Highly Ambiguous (Direction itself unclear)
78+
Example: "Make a good app", "Improve this"
79+
80+
**Response**: Do not proceed, record clarification request in result
81+
```
82+
❌ Cannot proceed: Requirements too ambiguous
83+
84+
Questions needed:
85+
1. What is the app's primary purpose?
86+
2. Who are the target users?
87+
3. What are the 3 must-have features?
88+
4. Are there existing designs or wireframes?
89+
90+
Status: blocked (awaiting clarification)
91+
```
92+
93+
---
94+
95+
## PM Agent Exclusive: Requirements Specification Framework
96+
97+
When PM Agent receives an ambiguous request, use this framework to clarify:
98+
99+
```
100+
=== Requirements Specification ===
101+
102+
Original Request: "{user's original text}"
103+
104+
1. Core Goal: {define in one sentence}
105+
2. User Stories:
106+
- "As a {user}, I want to {action} so that {benefit}"
107+
- (minimum 3)
108+
3. Feature Scope:
109+
- Must-have: {list}
110+
- Nice-to-have: {list}
111+
- Out-of-scope: {list}
112+
4. Technical Constraints:
113+
- {existing code / stack / compatibility}
114+
5. Success Criteria:
115+
- {measurable conditions}
116+
```
117+
118+
---
119+
120+
## Application in Subagent Mode
121+
122+
CLI subagents cannot ask questions directly to users.
123+
Therefore:
124+
125+
1. **Level 1**: Apply defaults + record assumptions → proceed
126+
2. **Level 2**: Narrow and interpret scope + document → proceed
127+
3. **Level 3**: `Status: blocked` + question list → do not proceed
128+
129+
When Orchestrator receives a Level 3 result, it forwards the questions to the user,
130+
and after receiving answers, re-runs the agent.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Common Code Quality Checklist
2+
3+
Apply these checks to ALL code before submitting, regardless of domain.
4+
5+
## Code Quality
6+
- [ ] No hardcoded secrets (API keys, passwords, tokens)
7+
- [ ] No `TODO`/`FIXME` left unresolved
8+
- [ ] Meaningful variable and function names
9+
- [ ] Functions < 50 lines, files < 500 lines
10+
- [ ] Cyclomatic complexity < 10 per function
11+
- [ ] No deeply nested code (< 4 levels)
12+
13+
## Error Handling
14+
- [ ] All async operations have try/catch or error boundaries
15+
- [ ] User-facing error messages are clear and actionable
16+
- [ ] No silent failures (errors logged or surfaced)
17+
18+
## Security
19+
- [ ] No user input directly in SQL/shell/HTML
20+
- [ ] Authentication checked on protected endpoints
21+
- [ ] Sensitive data not in logs or error messages
22+
23+
## Testing
24+
- [ ] Unit tests for new business logic
25+
- [ ] Edge cases covered (empty, null, boundary values)
26+
- [ ] Tests actually assert meaningful behavior
27+
28+
## Git Hygiene
29+
- [ ] Commit message describes the "why", not the "what"
30+
- [ ] No unrelated changes bundled
31+
- [ ] No generated files or secrets committed

0 commit comments

Comments
 (0)