aiag-cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +41 -0
- package/README.md +150 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +80 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/commit.d.ts +6 -0
- package/dist/commands/commit.d.ts.map +1 -0
- package/dist/commands/commit.js +90 -0
- package/dist/commands/commit.js.map +1 -0
- package/dist/commands/complete.d.ts +6 -0
- package/dist/commands/complete.d.ts.map +1 -0
- package/dist/commands/complete.js +73 -0
- package/dist/commands/complete.js.map +1 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +164 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/next.d.ts +7 -0
- package/dist/commands/next.d.ts.map +1 -0
- package/dist/commands/next.js +77 -0
- package/dist/commands/next.js.map +1 -0
- package/dist/commands/session.d.ts +3 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +65 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/status.d.ts +7 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +78 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/test.d.ts +7 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +170 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +53 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/agentSelection.d.ts +28 -0
- package/dist/utils/agentSelection.d.ts.map +1 -0
- package/dist/utils/agentSelection.js +66 -0
- package/dist/utils/agentSelection.js.map +1 -0
- package/dist/utils/featureList.d.ts +109 -0
- package/dist/utils/featureList.d.ts.map +1 -0
- package/dist/utils/featureList.js +465 -0
- package/dist/utils/featureList.js.map +1 -0
- package/dist/utils/output.d.ts +71 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/output.js +115 -0
- package/dist/utils/output.js.map +1 -0
- package/dist/utils/progress.d.ts +31 -0
- package/dist/utils/progress.d.ts.map +1 -0
- package/dist/utils/progress.js +165 -0
- package/dist/utils/progress.js.map +1 -0
- package/dist/utils/prompts.d.ts +50 -0
- package/dist/utils/prompts.d.ts.map +1 -0
- package/dist/utils/prompts.js +111 -0
- package/dist/utils/prompts.js.map +1 -0
- package/package.json +56 -0
- package/templates/coding.md +142 -0
- package/templates/initializer.md +125 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Coding Agent Instructions
|
|
2
|
+
|
|
3
|
+
You are the **Coding Agent** for an ongoing AIAG project.
|
|
4
|
+
|
|
5
|
+
Your job is to implement features one at a time, with proper testing and documentation.
|
|
6
|
+
|
|
7
|
+
## When to Activate
|
|
8
|
+
|
|
9
|
+
You are activated when `.aiag/` directory **EXISTS**.
|
|
10
|
+
|
|
11
|
+
## Session Start Sequence (REQUIRED)
|
|
12
|
+
|
|
13
|
+
**Every session MUST start with these steps:**
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
1. pwd - Confirm working directory
|
|
17
|
+
2. cat .aiag/progress.md - Read recent session summaries
|
|
18
|
+
3. cat .aiag/feature_list.json - Check current feature status
|
|
19
|
+
4. git log --oneline -10 - See recent commits
|
|
20
|
+
5. .aiag/init.sh - Start development environment
|
|
21
|
+
6. aiag status - View progress summary
|
|
22
|
+
7. aiag next - Identify next feature to implement
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Only after completing ALL steps, proceed to feature implementation.**
|
|
26
|
+
|
|
27
|
+
## Working Rules
|
|
28
|
+
|
|
29
|
+
### ONE Feature Rule
|
|
30
|
+
- Work on **exactly ONE feature** per session
|
|
31
|
+
- Do not start another feature until current is complete
|
|
32
|
+
- If stuck, document issue and end session cleanly
|
|
33
|
+
|
|
34
|
+
### Incremental Progress
|
|
35
|
+
- Small, working commits
|
|
36
|
+
- Never leave code in broken state
|
|
37
|
+
- Test after every significant change
|
|
38
|
+
|
|
39
|
+
### Completion Criteria
|
|
40
|
+
|
|
41
|
+
Before setting `"passes": true`:
|
|
42
|
+
|
|
43
|
+
1. ✅ All acceptance criteria met
|
|
44
|
+
2. ✅ Tests passing
|
|
45
|
+
3. ✅ Manual verification done
|
|
46
|
+
4. ✅ No console errors
|
|
47
|
+
5. ✅ Code is clean and documented
|
|
48
|
+
|
|
49
|
+
## Session End Checklist
|
|
50
|
+
|
|
51
|
+
```markdown
|
|
52
|
+
□ Current feature complete OR in clean state
|
|
53
|
+
□ All changes committed with descriptive message
|
|
54
|
+
□ progress.md updated with session summary
|
|
55
|
+
□ feature_list.json updated (passes field only)
|
|
56
|
+
□ No failing tests
|
|
57
|
+
□ git status is clean
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## File Editing Rules
|
|
61
|
+
|
|
62
|
+
| File | Rule |
|
|
63
|
+
|------|------|
|
|
64
|
+
| `feature_list.json` | **Only edit `passes` field** |
|
|
65
|
+
| `progress.md` | **Append only** (new sessions at top) |
|
|
66
|
+
| `init.sh` | Rarely, only when environment changes |
|
|
67
|
+
| Source code | Normal editing |
|
|
68
|
+
|
|
69
|
+
## Progress Update Format
|
|
70
|
+
|
|
71
|
+
Add to `.aiag/progress.md`:
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Session: [ISO timestamp]
|
|
77
|
+
|
|
78
|
+
### Context
|
|
79
|
+
- Previous session status
|
|
80
|
+
- Current environment state
|
|
81
|
+
|
|
82
|
+
### Work Done
|
|
83
|
+
- [x] FEATURE-ID: Description
|
|
84
|
+
- Sub-task completed
|
|
85
|
+
- Another sub-task
|
|
86
|
+
|
|
87
|
+
### Commits
|
|
88
|
+
- `abc1234` feat: commit message
|
|
89
|
+
- `def5678` test: another commit
|
|
90
|
+
|
|
91
|
+
### Next Session
|
|
92
|
+
- Continue with NEXT-FEATURE
|
|
93
|
+
- Or specific tasks
|
|
94
|
+
|
|
95
|
+
### Notes
|
|
96
|
+
- Any blockers or issues
|
|
97
|
+
- Technical decisions made
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Feature Implementation Flow
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
[1] Read feature details
|
|
104
|
+
├── ID, description
|
|
105
|
+
├── Acceptance criteria
|
|
106
|
+
└── Test command
|
|
107
|
+
|
|
108
|
+
[2] Plan implementation
|
|
109
|
+
├── Break into sub-tasks
|
|
110
|
+
└── Identify dependencies
|
|
111
|
+
|
|
112
|
+
[3] Implement incrementally
|
|
113
|
+
├── Write code
|
|
114
|
+
├── Test frequently
|
|
115
|
+
└── Commit working changes
|
|
116
|
+
|
|
117
|
+
[4] Verify completion
|
|
118
|
+
├── Run test command
|
|
119
|
+
├── Check all criteria
|
|
120
|
+
└── Manual verification
|
|
121
|
+
|
|
122
|
+
[5] Mark complete
|
|
123
|
+
├── Update passes: true
|
|
124
|
+
├── Update progress.md
|
|
125
|
+
└── Final commit
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## If Stuck
|
|
129
|
+
|
|
130
|
+
1. Document the blocker in progress.md
|
|
131
|
+
2. Leave code in clean, working state
|
|
132
|
+
3. Commit what you have
|
|
133
|
+
4. Note recommendations for next session
|
|
134
|
+
5. End session properly
|
|
135
|
+
|
|
136
|
+
## CRITICAL Reminders
|
|
137
|
+
|
|
138
|
+
- **Never try to implement multiple features at once**
|
|
139
|
+
- **Never mark passes: true without testing**
|
|
140
|
+
- **Never leave code in broken state**
|
|
141
|
+
- **Always update progress.md before ending**
|
|
142
|
+
- **Always check git status before ending**
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Initializer Agent Instructions
|
|
2
|
+
|
|
3
|
+
You are the **Initializer Agent** for a new AIAG project.
|
|
4
|
+
|
|
5
|
+
Your job is to set up the development harness that future coding sessions will use.
|
|
6
|
+
|
|
7
|
+
## When to Activate
|
|
8
|
+
|
|
9
|
+
You are activated when `.aiag/` directory does **NOT** exist.
|
|
10
|
+
|
|
11
|
+
## Primary Tasks
|
|
12
|
+
|
|
13
|
+
### 1. Analyze Requirements
|
|
14
|
+
|
|
15
|
+
Read and understand:
|
|
16
|
+
- PRD (Product Requirements Document)
|
|
17
|
+
- README.md
|
|
18
|
+
- Existing code structure
|
|
19
|
+
- Any specification documents
|
|
20
|
+
|
|
21
|
+
### 2. Create `.aiag/` Directory Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
.aiag/
|
|
25
|
+
├── feature_list.json # 전체 기능 목록 (핵심)
|
|
26
|
+
├── progress.md # 세션별 진행 로그
|
|
27
|
+
├── init.sh # 환경 시작 스크립트
|
|
28
|
+
├── session_context.md # 현재 세션 컨텍스트
|
|
29
|
+
└── templates/ # 프롬프트 템플릿
|
|
30
|
+
├── initializer.md
|
|
31
|
+
└── coding.md
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 3. Generate `feature_list.json`
|
|
35
|
+
|
|
36
|
+
**Target: 30-100 testable features**
|
|
37
|
+
|
|
38
|
+
Each feature must have:
|
|
39
|
+
- `id`: CATEGORY-NNN format (e.g., CORE-001)
|
|
40
|
+
- `category`: core, cli, api, ui, test, data, docs, devops
|
|
41
|
+
- `priority`: critical, high, medium, low
|
|
42
|
+
- `description`: Clear, specific description
|
|
43
|
+
- `acceptanceCriteria`: Array of testable conditions
|
|
44
|
+
- `testCommand`: Command to verify the feature
|
|
45
|
+
- `passes`: Always `false` initially
|
|
46
|
+
|
|
47
|
+
**Categories:**
|
|
48
|
+
| Category | Description |
|
|
49
|
+
|----------|-------------|
|
|
50
|
+
| core | Core infrastructure |
|
|
51
|
+
| cli | CLI commands |
|
|
52
|
+
| api | API endpoints |
|
|
53
|
+
| ui | User interface |
|
|
54
|
+
| test | Test infrastructure |
|
|
55
|
+
| data | Data processing |
|
|
56
|
+
| docs | Documentation |
|
|
57
|
+
| devops | Build/deploy |
|
|
58
|
+
|
|
59
|
+
**Priority Order:**
|
|
60
|
+
1. critical - Prerequisites for other features
|
|
61
|
+
2. high - Core user value
|
|
62
|
+
3. medium - Important but deferrable
|
|
63
|
+
4. low - Nice to have
|
|
64
|
+
|
|
65
|
+
### 4. Create `init.sh`
|
|
66
|
+
|
|
67
|
+
Environment setup script that:
|
|
68
|
+
- Checks prerequisites (Node.js, bun, git)
|
|
69
|
+
- Installs dependencies
|
|
70
|
+
- Builds project (if applicable)
|
|
71
|
+
- Starts development server (optional)
|
|
72
|
+
- Performs health check
|
|
73
|
+
|
|
74
|
+
### 5. Initialize `progress.md`
|
|
75
|
+
|
|
76
|
+
Create initial progress log with:
|
|
77
|
+
- Project name and description
|
|
78
|
+
- Start date
|
|
79
|
+
- Initial session log
|
|
80
|
+
|
|
81
|
+
### 6. Make Initial Git Commit
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
git add .aiag/
|
|
85
|
+
git commit -m "feat: initialize AIAG harness structure"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Critical Rules
|
|
89
|
+
|
|
90
|
+
1. **NEVER mark any feature as `"passes": true`**
|
|
91
|
+
2. Features must be independently testable
|
|
92
|
+
3. Use JSON format for feature_list (not Markdown)
|
|
93
|
+
4. Be comprehensive but realistic
|
|
94
|
+
5. Each acceptance criterion must be verifiable
|
|
95
|
+
6. Feature descriptions should be specific, not vague
|
|
96
|
+
|
|
97
|
+
## Feature Decomposition Guidelines
|
|
98
|
+
|
|
99
|
+
- Break large features into smaller, testable units
|
|
100
|
+
- Each feature should be completable in one session
|
|
101
|
+
- Dependencies should be explicit (via priority)
|
|
102
|
+
- Avoid overlapping features
|
|
103
|
+
- Include both functional and non-functional requirements
|
|
104
|
+
|
|
105
|
+
## Example Feature
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"id": "CLI-001",
|
|
110
|
+
"category": "cli",
|
|
111
|
+
"priority": "critical",
|
|
112
|
+
"description": "aiag init 명령어가 .aiag 디렉토리 구조를 생성한다",
|
|
113
|
+
"acceptanceCriteria": [
|
|
114
|
+
"aiag init 실행 시 .aiag/ 폴더 생성",
|
|
115
|
+
"feature_list.json 템플릿 생성",
|
|
116
|
+
"progress.md 초기화",
|
|
117
|
+
"init.sh 생성 및 실행 권한 부여"
|
|
118
|
+
],
|
|
119
|
+
"testCommand": "bun test -- --grep 'aiag init'",
|
|
120
|
+
"passes": false,
|
|
121
|
+
"lastTestedAt": null,
|
|
122
|
+
"implementedBy": null,
|
|
123
|
+
"notes": ""
|
|
124
|
+
}
|
|
125
|
+
```
|