@mindfoldhq/trellis 0.1.0 → 0.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 +58 -11
- package/dist/cli/index.js +1 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +28 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/configurators/opencode.d.ts +24 -0
- package/dist/configurators/opencode.d.ts.map +1 -0
- package/dist/configurators/opencode.js +73 -0
- package/dist/configurators/opencode.js.map +1 -0
- package/dist/configurators/workflow.d.ts +2 -0
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +30 -1
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/templates/agents/bodies/check.md +91 -0
- package/dist/templates/agents/bodies/debug.md +102 -0
- package/dist/templates/agents/{dispatch.txt → bodies/dispatch.md} +17 -12
- package/dist/templates/agents/bodies/implement.md +94 -0
- package/dist/templates/agents/bodies/research.md +113 -0
- package/dist/templates/agents/index.d.ts +22 -15
- package/dist/templates/agents/index.d.ts.map +1 -1
- package/dist/templates/agents/index.js +125 -48
- package/dist/templates/agents/index.js.map +1 -1
- package/dist/templates/agents/metadata.d.ts +48 -0
- package/dist/templates/agents/metadata.d.ts.map +1 -0
- package/dist/templates/agents/metadata.js +101 -0
- package/dist/templates/agents/metadata.js.map +1 -0
- package/dist/templates/commands/claude/parallel.md.txt +199 -0
- package/dist/templates/commands/claude/start.md.txt +120 -55
- package/dist/templates/commands/common/onboard-developer.txt +2 -2
- package/dist/templates/commands/common/record-agent-flow.txt +1 -1
- package/dist/templates/commands/cursor/start.md.txt +92 -29
- package/dist/templates/commands/index.d.ts +2 -0
- package/dist/templates/commands/index.d.ts.map +1 -1
- package/dist/templates/commands/index.js +16 -0
- package/dist/templates/commands/index.js.map +1 -1
- package/dist/templates/commands/opencode/start.md.txt +127 -0
- package/dist/templates/markdown/agent-traces-index.md.txt +8 -9
- package/dist/templates/markdown/agents.md.txt +1 -1
- package/dist/templates/markdown/init-agent.md.txt +8 -8
- package/dist/templates/markdown/workflow.md.txt +6 -6
- package/dist/templates/scripts/add-session.sh.txt +14 -14
- package/dist/templates/scripts/common/developer.sh.txt +13 -13
- package/dist/templates/scripts/common/git-context.sh.txt +8 -8
- package/dist/templates/scripts/common/paths.sh.txt +4 -4
- package/dist/templates/scripts/common/worktree.sh.txt +138 -0
- package/dist/templates/scripts/feature.sh.txt +292 -0
- package/dist/templates/scripts/index.d.ts +12 -1
- package/dist/templates/scripts/index.d.ts.map +1 -1
- package/dist/templates/scripts/index.js +14 -1
- package/dist/templates/scripts/index.js.map +1 -1
- package/dist/templates/scripts/multi-agent/cleanup.sh.txt +327 -0
- package/dist/templates/scripts/multi-agent/start.sh.txt +323 -0
- package/dist/templates/scripts/multi-agent/status.sh.txt +423 -0
- package/dist/templates/scripts/worktree.yaml.txt +49 -0
- package/dist/types/ai-tools.d.ts +2 -2
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +4 -0
- package/dist/types/ai-tools.js.map +1 -1
- package/package.json +1 -1
- package/dist/templates/agents/check.txt +0 -120
- package/dist/templates/agents/debug.txt +0 -121
- package/dist/templates/agents/implement.txt +0 -114
- package/dist/templates/agents/research.txt +0 -258
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/templates/agents/metadata.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA8BH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkC;IAC3D,SAAS,EAAE;QACT,IAAI,EAAE,WAAW;QACjB,WAAW,EACT,kHAAkH;QACpH,KAAK,EAAE;YACL,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;SACX;QACD,KAAK,EAAE,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AAY;IAC3C,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,MAA6B;IAE7B,OAAO,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC;SAClC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;SAC7E,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# Multi-Agent Pipeline Orchestrator
|
|
2
|
+
|
|
3
|
+
You are the Multi-Agent Pipeline Orchestrator Agent, running in the main repository, responsible for collaborating with users to manage parallel development tasks.
|
|
4
|
+
|
|
5
|
+
## Role Definition
|
|
6
|
+
|
|
7
|
+
- **You are in the main repository**, not in a worktree
|
|
8
|
+
- **You don't write code directly** - code work is done by agents in worktrees
|
|
9
|
+
- **You are responsible for planning and dispatching**: discuss requirements, create plans, configure context, start worktree agents
|
|
10
|
+
- **Delegate complex analysis to research agent**: finding specs, analyzing code structure
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Operation Types
|
|
15
|
+
|
|
16
|
+
Operations in this document are categorized as:
|
|
17
|
+
|
|
18
|
+
| Marker | Meaning | Executor |
|
|
19
|
+
|--------|---------|----------|
|
|
20
|
+
| `[AI]` | Bash scripts or Task calls executed by AI | You (AI) |
|
|
21
|
+
| `[USER]` | Slash commands executed by user | User |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Startup Flow
|
|
26
|
+
|
|
27
|
+
### Step 1: Understand Trellis Workflow `[AI]`
|
|
28
|
+
|
|
29
|
+
First, read the following files to understand the workflow system:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
cat init-agent.md # Project overview and initialization guide
|
|
33
|
+
cat .trellis/workflow.md # Development process and conventions
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Step 2: Get Current Status `[AI]`
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
./.trellis/scripts/get-context.sh
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Step 3: Read Project Guidelines `[AI]`
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
cat .trellis/structure/frontend/index.md # Frontend guidelines index
|
|
46
|
+
cat .trellis/structure/backend/index.md # Backend guidelines index
|
|
47
|
+
cat .trellis/structure/guides/index.md # Thinking guides
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Step 4: Ask User for Requirements
|
|
51
|
+
|
|
52
|
+
Ask the user:
|
|
53
|
+
|
|
54
|
+
1. What feature to develop?
|
|
55
|
+
2. Which modules are involved?
|
|
56
|
+
3. Development type? (backend / frontend / fullstack)
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Core Workflow
|
|
61
|
+
|
|
62
|
+
### Step 1: Create Feature Directory `[AI]`
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
FEATURE_DIR=$(./.trellis/scripts/feature.sh create <feature-name>)
|
|
66
|
+
# Returns: .trellis/agent-traces/{developer}/features/{day}-{name}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Step 2: Configure Feature `[AI]`
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Initialize jsonl context files
|
|
73
|
+
./.trellis/scripts/feature.sh init-context "$FEATURE_DIR" <dev_type>
|
|
74
|
+
|
|
75
|
+
# Set branch (for creating worktree)
|
|
76
|
+
./.trellis/scripts/feature.sh set-branch "$FEATURE_DIR" feature/<name>
|
|
77
|
+
|
|
78
|
+
# Set scope (for PR title)
|
|
79
|
+
./.trellis/scripts/feature.sh set-scope "$FEATURE_DIR" <scope>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Step 3: Call Research Agent to Analyze Task `[AI]`
|
|
83
|
+
|
|
84
|
+
Let research agent find relevant specs and code structure:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Task(
|
|
88
|
+
subagent_type: "research",
|
|
89
|
+
prompt: "Analyze what development specs are needed for this task:
|
|
90
|
+
|
|
91
|
+
Task description: <user requirements>
|
|
92
|
+
Development type: <dev_type>
|
|
93
|
+
|
|
94
|
+
Please:
|
|
95
|
+
1. Find relevant spec files under .trellis/structure/
|
|
96
|
+
2. Find related code modules and patterns in the project
|
|
97
|
+
3. List specific files to add to implement.jsonl, check.jsonl, debug.jsonl
|
|
98
|
+
|
|
99
|
+
Output format:
|
|
100
|
+
## implement.jsonl
|
|
101
|
+
- path: <file path>, reason: <reason>
|
|
102
|
+
|
|
103
|
+
## check.jsonl
|
|
104
|
+
- path: <file path>, reason: <reason>
|
|
105
|
+
|
|
106
|
+
## debug.jsonl
|
|
107
|
+
- path: <file path>, reason: <reason>",
|
|
108
|
+
model: "opus"
|
|
109
|
+
)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Step 4: Add Specs to jsonl `[AI]`
|
|
113
|
+
|
|
114
|
+
Based on research agent output:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
./.trellis/scripts/feature.sh add-context "$FEATURE_DIR" implement "<path>" "<reason>"
|
|
118
|
+
./.trellis/scripts/feature.sh add-context "$FEATURE_DIR" check "<path>" "<reason>"
|
|
119
|
+
./.trellis/scripts/feature.sh add-context "$FEATURE_DIR" debug "<path>" "<reason>"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Step 5: Validate Configuration `[AI]`
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
./.trellis/scripts/feature.sh validate "$FEATURE_DIR"
|
|
126
|
+
./.trellis/scripts/feature.sh list-context "$FEATURE_DIR"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Step 6: Create Requirements Document `[AI]`
|
|
130
|
+
|
|
131
|
+
Create `prd.md` in the feature directory:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
cat > "$FEATURE_DIR/prd.md" << 'EOF'
|
|
135
|
+
# Feature: <name>
|
|
136
|
+
|
|
137
|
+
## Requirements
|
|
138
|
+
- ...
|
|
139
|
+
|
|
140
|
+
## Acceptance Criteria
|
|
141
|
+
- ...
|
|
142
|
+
EOF
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Step 7: Start Worktree Agent `[AI]`
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
./.trellis/scripts/multi-agent/start.sh "$FEATURE_DIR"
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Step 8: Report Status
|
|
152
|
+
|
|
153
|
+
Tell the user the agent has started and provide monitoring commands.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## User Available Commands `[USER]`
|
|
158
|
+
|
|
159
|
+
The following slash commands are for users (not AI):
|
|
160
|
+
|
|
161
|
+
| Command | Description |
|
|
162
|
+
|---------|-------------|
|
|
163
|
+
| `/parallel` | Start Multi-Agent Pipeline (this command) |
|
|
164
|
+
| `/start` | Start normal development mode (single process) |
|
|
165
|
+
| `/record-agent-flow` | Record session progress |
|
|
166
|
+
| `/finish-work` | Pre-completion checklist |
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Monitoring Commands (for user reference)
|
|
171
|
+
|
|
172
|
+
Tell the user they can use these commands to monitor:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
./.trellis/scripts/multi-agent/status.sh # Overview
|
|
176
|
+
./.trellis/scripts/multi-agent/status.sh --log <name> # View log
|
|
177
|
+
./.trellis/scripts/multi-agent/status.sh --watch <name> # Real-time monitoring
|
|
178
|
+
./.trellis/scripts/multi-agent/cleanup.sh <branch> # Cleanup worktree
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Pipeline Phases
|
|
184
|
+
|
|
185
|
+
The dispatch agent in worktree will automatically execute:
|
|
186
|
+
|
|
187
|
+
1. implement → Implement feature
|
|
188
|
+
2. check → Check code quality
|
|
189
|
+
3. finish → Final verification
|
|
190
|
+
4. create-pr → Create PR
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Core Rules
|
|
195
|
+
|
|
196
|
+
- **Don't write code directly** - delegate to agents in worktree
|
|
197
|
+
- **Don't execute git commit** - agent does it via create-pr action
|
|
198
|
+
- **Delegate complex analysis to research** - finding specs, analyzing code structure
|
|
199
|
+
- **All sub agents use opus model** - ensure output quality
|
|
@@ -2,16 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
Initialize your AI development session and begin working on tasks.
|
|
4
4
|
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Operation Types
|
|
8
|
+
|
|
9
|
+
Operations in this document are categorized as:
|
|
10
|
+
|
|
11
|
+
| Marker | Meaning | Executor |
|
|
12
|
+
|--------|---------|----------|
|
|
13
|
+
| `[AI]` | Bash scripts or Task calls executed by AI | You (AI) |
|
|
14
|
+
| `[USER]` | Slash commands executed by user | User |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
5
18
|
## Initialization
|
|
6
19
|
|
|
7
|
-
1
|
|
8
|
-
```bash
|
|
9
|
-
./.trellis/scripts/get-context.sh
|
|
10
|
-
```
|
|
20
|
+
### Step 1: Understand Trellis Workflow `[AI]`
|
|
11
21
|
|
|
12
|
-
|
|
22
|
+
First, read the following files to understand the workflow system:
|
|
13
23
|
|
|
14
|
-
|
|
24
|
+
```bash
|
|
25
|
+
cat init-agent.md # Project overview and initialization guide
|
|
26
|
+
cat .trellis/workflow.md # Development process and conventions
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Step 2: Get Current Status `[AI]`
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
./.trellis/scripts/get-context.sh
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Step 3: Read Project Guidelines `[AI]`
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cat .trellis/structure/frontend/index.md # Frontend guidelines index
|
|
39
|
+
cat .trellis/structure/backend/index.md # Backend guidelines index
|
|
40
|
+
cat .trellis/structure/guides/index.md # Thinking guides
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Step 4: Report Ready Status and Ask for Tasks
|
|
15
44
|
|
|
16
45
|
---
|
|
17
46
|
|
|
@@ -19,109 +48,145 @@ Initialize your AI development session and begin working on tasks.
|
|
|
19
48
|
|
|
20
49
|
### For Simple Tasks
|
|
21
50
|
|
|
22
|
-
1. Read relevant guidelines based on task type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
2. Implement the task directly
|
|
27
|
-
|
|
28
|
-
3. Before committing, remind user to run `/finish-work`
|
|
51
|
+
1. Read relevant guidelines based on task type `[AI]`
|
|
52
|
+
2. Implement the task directly `[AI]`
|
|
53
|
+
3. Remind user to run `/finish-work` before committing `[USER]`
|
|
29
54
|
|
|
30
55
|
### For Complex Tasks (Multi-Step Features)
|
|
31
56
|
|
|
32
|
-
Use feature tracking and delegate to specialized agents
|
|
57
|
+
Use feature tracking and delegate to specialized agents.
|
|
33
58
|
|
|
34
|
-
#### Step 1: Create Feature
|
|
59
|
+
#### Step 1: Create Feature Directory `[AI]`
|
|
35
60
|
|
|
36
61
|
```bash
|
|
37
|
-
./.trellis/scripts/feature.sh create <name>
|
|
38
|
-
# Example: ./.trellis/scripts/feature.sh create user-auth
|
|
62
|
+
FEATURE_DIR=$(./.trellis/scripts/feature.sh create <name>)
|
|
39
63
|
```
|
|
40
64
|
|
|
41
|
-
#### Step 2: Initialize Context
|
|
65
|
+
#### Step 2: Initialize Context `[AI]`
|
|
42
66
|
|
|
43
67
|
```bash
|
|
44
|
-
FEATURE_DIR=".trellis/agent-traces/{developer}/features/{feature-name}"
|
|
45
68
|
./.trellis/scripts/feature.sh init-context "$FEATURE_DIR" <type>
|
|
46
69
|
# type: backend | frontend | fullstack
|
|
47
70
|
```
|
|
48
71
|
|
|
49
|
-
#### Step 3:
|
|
72
|
+
#### Step 3: Call Research Agent to Analyze Task `[AI]`
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Task(
|
|
76
|
+
subagent_type: "research",
|
|
77
|
+
prompt: "Analyze what development specs are needed for this task:
|
|
78
|
+
|
|
79
|
+
Task description: <user requirements>
|
|
80
|
+
Development type: <dev_type>
|
|
81
|
+
|
|
82
|
+
Please:
|
|
83
|
+
1. Find relevant spec files under .trellis/structure/
|
|
84
|
+
2. Find related code modules and patterns in the project
|
|
85
|
+
3. List specific files to add to implement.jsonl, check.jsonl, debug.jsonl
|
|
50
86
|
|
|
51
|
-
|
|
87
|
+
Output format:
|
|
88
|
+
## implement.jsonl
|
|
89
|
+
- path: <file path>, reason: <reason>
|
|
90
|
+
|
|
91
|
+
## check.jsonl
|
|
92
|
+
- path: <file path>, reason: <reason>
|
|
93
|
+
|
|
94
|
+
## debug.jsonl
|
|
95
|
+
- path: <file path>, reason: <reason>",
|
|
96
|
+
model: "opus"
|
|
97
|
+
)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### Step 4: Add Specs to jsonl `[AI]`
|
|
52
101
|
|
|
53
102
|
```bash
|
|
54
|
-
|
|
55
|
-
./.trellis/scripts/feature.sh add-context "$FEATURE_DIR"
|
|
56
|
-
./.trellis/scripts/feature.sh add-context "$FEATURE_DIR"
|
|
103
|
+
./.trellis/scripts/feature.sh add-context "$FEATURE_DIR" implement "<path>" "<reason>"
|
|
104
|
+
./.trellis/scripts/feature.sh add-context "$FEATURE_DIR" check "<path>" "<reason>"
|
|
105
|
+
./.trellis/scripts/feature.sh add-context "$FEATURE_DIR" debug "<path>" "<reason>"
|
|
57
106
|
```
|
|
58
107
|
|
|
59
|
-
|
|
108
|
+
Validate:
|
|
60
109
|
```bash
|
|
61
110
|
./.trellis/scripts/feature.sh list-context "$FEATURE_DIR"
|
|
62
111
|
```
|
|
63
112
|
|
|
64
|
-
#### Step
|
|
65
|
-
|
|
66
|
-
Create `prd.md` in the feature directory describing what needs to be done.
|
|
113
|
+
#### Step 5: Create Requirements Document `[AI]`
|
|
67
114
|
|
|
68
|
-
|
|
115
|
+
Create `prd.md` in the feature directory.
|
|
69
116
|
|
|
70
|
-
#### Step
|
|
117
|
+
#### Step 6: Start Feature `[AI]`
|
|
71
118
|
|
|
72
119
|
```bash
|
|
73
120
|
./.trellis/scripts/feature.sh start "$FEATURE_DIR"
|
|
74
121
|
```
|
|
75
122
|
|
|
76
|
-
#### Step
|
|
77
|
-
|
|
78
|
-
Use specialized agents for implementation:
|
|
123
|
+
#### Step 7: Delegate Work `[AI]`
|
|
79
124
|
|
|
80
125
|
```
|
|
81
|
-
Task(subagent_type: "implement", prompt: "Implement the feature described in prd.md", model: "
|
|
126
|
+
Task(subagent_type: "implement", prompt: "Implement the feature described in prd.md", model: "opus")
|
|
82
127
|
```
|
|
83
128
|
|
|
84
|
-
|
|
129
|
+
Check quality:
|
|
85
130
|
|
|
86
131
|
```
|
|
87
|
-
Task(subagent_type: "check", prompt: "Check code changes and fix any issues", model: "
|
|
132
|
+
Task(subagent_type: "check", prompt: "Check code changes and fix any issues", model: "opus")
|
|
88
133
|
```
|
|
89
134
|
|
|
90
|
-
#### Step
|
|
135
|
+
#### Step 8: Complete
|
|
91
136
|
|
|
92
|
-
1. Verify typecheck and lint pass
|
|
137
|
+
1. Verify typecheck and lint pass `[AI]`
|
|
93
138
|
2. Remind user to test
|
|
94
139
|
3. Remind user to commit
|
|
95
|
-
4.
|
|
96
|
-
5. Archive feature
|
|
140
|
+
4. Remind user to run `/record-agent-flow` `[USER]`
|
|
141
|
+
5. Archive feature `[AI]`:
|
|
97
142
|
```bash
|
|
98
143
|
./.trellis/scripts/feature.sh archive <feature-name>
|
|
99
144
|
```
|
|
100
145
|
|
|
101
146
|
---
|
|
102
147
|
|
|
148
|
+
## User Available Commands `[USER]`
|
|
149
|
+
|
|
150
|
+
The following slash commands are for users (not AI):
|
|
151
|
+
|
|
152
|
+
| Command | Description |
|
|
153
|
+
|---------|-------------|
|
|
154
|
+
| `/start` | Start development session (this command) |
|
|
155
|
+
| `/parallel` | Start Multi-Agent Pipeline (worktree mode) |
|
|
156
|
+
| `/finish-work` | Pre-completion checklist |
|
|
157
|
+
| `/record-agent-flow` | Record session progress |
|
|
158
|
+
| `/check-frontend` | Check frontend code |
|
|
159
|
+
| `/check-backend` | Check backend code |
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
103
163
|
## Session End Reminder
|
|
104
164
|
|
|
105
|
-
**IMPORTANT**: When a task or session is completed,
|
|
165
|
+
**IMPORTANT**: When a task or session is completed, remind the user:
|
|
106
166
|
|
|
107
167
|
> Before ending this session, please run `/record-agent-flow` to record what we accomplished.
|
|
108
|
-
> This helps maintain continuity across sessions.
|
|
109
168
|
|
|
110
169
|
---
|
|
111
170
|
|
|
112
|
-
##
|
|
113
|
-
|
|
114
|
-
| Task Size | Approach |
|
|
115
|
-
|-----------|----------|
|
|
116
|
-
| Small fix / simple change | Implement directly |
|
|
117
|
-
| New feature / multi-file change | Use feature tracking + delegation |
|
|
118
|
-
| Research / exploration | Use research agent |
|
|
171
|
+
## AI Executed Scripts `[AI]`
|
|
119
172
|
|
|
120
|
-
|
|
|
121
|
-
|
|
173
|
+
| Script | Purpose |
|
|
174
|
+
|--------|---------|
|
|
122
175
|
| `feature.sh create <name>` | Create feature directory |
|
|
123
|
-
| `feature.sh
|
|
176
|
+
| `feature.sh init-context <dir> <type>` | Initialize jsonl files |
|
|
177
|
+
| `feature.sh add-context <dir> <jsonl> <path>` | Add specs |
|
|
178
|
+
| `feature.sh start <dir>` | Set current feature |
|
|
124
179
|
| `feature.sh finish` | Clear current feature |
|
|
125
|
-
| `feature.sh archive <name>` | Archive
|
|
126
|
-
| `
|
|
127
|
-
|
|
180
|
+
| `feature.sh archive <name>` | Archive feature |
|
|
181
|
+
| `get-context.sh` | Get session context |
|
|
182
|
+
|
|
183
|
+
## Sub Agent Calls `[AI]`
|
|
184
|
+
|
|
185
|
+
All sub agent calls use the opus model:
|
|
186
|
+
|
|
187
|
+
| Agent | Purpose |
|
|
188
|
+
|-------|---------|
|
|
189
|
+
| research | Find specs, analyze code |
|
|
190
|
+
| implement | Implement features |
|
|
191
|
+
| check | Check code |
|
|
192
|
+
| debug | Fix issues |
|
|
@@ -72,7 +72,7 @@ Even after injecting guidelines, AI has limited context window. As conversation
|
|
|
72
72
|
| \-- {developer}/ # Per-developer directory
|
|
73
73
|
| |-- index.md # Personal progress index
|
|
74
74
|
| |-- features/ # Active feature tracking
|
|
75
|
-
| \--
|
|
75
|
+
| \-- traces-N.md # Session records (max 2000 lines)
|
|
76
76
|
|-- structure/ # "AI Training Data" - project knowledge
|
|
77
77
|
| |-- frontend/ # Frontend conventions
|
|
78
78
|
| |-- backend/ # Backend conventions
|
|
@@ -196,7 +196,7 @@ The `/check-*` commands focus on code quality within a single layer. But real ch
|
|
|
196
196
|
All the context AI built during this session will be lost when session ends. The next session's `/start` needs this information.
|
|
197
197
|
|
|
198
198
|
**WHAT IT ACTUALLY DOES**:
|
|
199
|
-
1. Records session summary to `agent-traces/{developer}/
|
|
199
|
+
1. Records session summary to `agent-traces/{developer}/traces-N.md`
|
|
200
200
|
2. Captures what was done, learned, and what's remaining
|
|
201
201
|
3. Updates index files for quick lookup
|
|
202
202
|
|
|
@@ -35,7 +35,7 @@ EOF
|
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
**Auto-completes**:
|
|
38
|
-
- [OK] Appends session to
|
|
38
|
+
- [OK] Appends session to traces-N.md
|
|
39
39
|
- [OK] Auto-detects line count, creates new file if >2000 lines
|
|
40
40
|
- [OK] Updates index.md (Total Sessions +1, Last Active, line stats, history)
|
|
41
41
|
|
|
@@ -1,12 +1,32 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Start Session
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Initialize your AI development session and begin working on tasks.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Operation Types
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Operations in this document are categorized as:
|
|
10
|
+
|
|
11
|
+
| Marker | Meaning | Executor |
|
|
12
|
+
|--------|---------|----------|
|
|
13
|
+
| `[AI]` | Bash scripts or file reads executed by AI | You (AI) |
|
|
14
|
+
| `[USER]` | Slash commands executed by user | User |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Initialization
|
|
19
|
+
|
|
20
|
+
### Step 1: Understand Trellis Workflow `[AI]`
|
|
21
|
+
|
|
22
|
+
First, read the following files to understand the workflow system:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
cat init-agent.md # Project overview and initialization guide
|
|
26
|
+
cat .trellis/workflow.md # Development process and conventions
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Step 2: Get Current Status `[AI]`
|
|
10
30
|
|
|
11
31
|
```bash
|
|
12
32
|
./.trellis/scripts/get-context.sh
|
|
@@ -17,9 +37,9 @@ This returns:
|
|
|
17
37
|
- Git status (branch, uncommitted changes)
|
|
18
38
|
- Recent commits
|
|
19
39
|
- Active features
|
|
20
|
-
-
|
|
40
|
+
- Traces file status
|
|
21
41
|
|
|
22
|
-
### Step
|
|
42
|
+
### Step 3: Read Project Guidelines `[AI]`
|
|
23
43
|
|
|
24
44
|
Based on the upcoming task, read appropriate structure docs:
|
|
25
45
|
|
|
@@ -27,13 +47,11 @@ Based on the upcoming task, read appropriate structure docs:
|
|
|
27
47
|
```bash
|
|
28
48
|
cat .trellis/structure/frontend/index.md
|
|
29
49
|
```
|
|
30
|
-
Then read specific docs based on task type.
|
|
31
50
|
|
|
32
51
|
**For Backend Work**:
|
|
33
52
|
```bash
|
|
34
53
|
cat .trellis/structure/backend/index.md
|
|
35
54
|
```
|
|
36
|
-
Then read specific docs based on task type.
|
|
37
55
|
|
|
38
56
|
**For Cross-Layer Features**:
|
|
39
57
|
```bash
|
|
@@ -41,7 +59,7 @@ cat .trellis/structure/guides/index.md
|
|
|
41
59
|
cat .trellis/structure/guides/cross-layer-thinking-guide.md
|
|
42
60
|
```
|
|
43
61
|
|
|
44
|
-
### Step
|
|
62
|
+
### Step 4: Check Active Features `[AI]`
|
|
45
63
|
|
|
46
64
|
```bash
|
|
47
65
|
./.trellis/scripts/feature.sh list
|
|
@@ -49,7 +67,7 @@ cat .trellis/structure/guides/cross-layer-thinking-guide.md
|
|
|
49
67
|
|
|
50
68
|
If continuing previous work, review the feature file.
|
|
51
69
|
|
|
52
|
-
### Step
|
|
70
|
+
### Step 5: Report Ready Status and Ask for Tasks
|
|
53
71
|
|
|
54
72
|
Output a summary:
|
|
55
73
|
|
|
@@ -61,34 +79,79 @@ Output a summary:
|
|
|
61
79
|
| Developer | {name} |
|
|
62
80
|
| Branch | {branch} |
|
|
63
81
|
| Uncommitted | {count} file(s) |
|
|
64
|
-
|
|
|
82
|
+
| Traces | {file} ({lines}/2000 lines) |
|
|
65
83
|
| Active Features | {count} |
|
|
66
84
|
|
|
67
|
-
### Available Commands
|
|
68
|
-
- `/before-frontend-dev` - Read frontend guidelines
|
|
69
|
-
- `/before-backend-dev` - Read backend guidelines
|
|
70
|
-
- `/check-cross-layer` - Cross-layer verification
|
|
71
|
-
- `/finish-work` - Pre-commit checklist
|
|
72
|
-
- `/record-agent-flow` - Record session progress
|
|
73
|
-
|
|
74
85
|
Ready for your task. What would you like to work on?
|
|
75
86
|
```
|
|
76
87
|
|
|
77
88
|
---
|
|
78
89
|
|
|
79
|
-
##
|
|
90
|
+
## Working on Tasks
|
|
91
|
+
|
|
92
|
+
### For Simple Tasks
|
|
80
93
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
94
|
+
1. Read relevant guidelines based on task type `[AI]`
|
|
95
|
+
2. Implement the task directly `[AI]`
|
|
96
|
+
3. Remind user to run `/finish-work` before committing `[USER]`
|
|
97
|
+
|
|
98
|
+
### For Complex Tasks (Multi-Step Features)
|
|
99
|
+
|
|
100
|
+
#### Step 1: Create Feature `[AI]`
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
./.trellis/scripts/feature.sh create <name>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
#### Step 2: Implement and Verify `[AI]`
|
|
107
|
+
|
|
108
|
+
1. Read relevant structure docs
|
|
109
|
+
2. Implement the feature
|
|
110
|
+
3. Run lint and type checks
|
|
111
|
+
|
|
112
|
+
#### Step 3: Complete
|
|
113
|
+
|
|
114
|
+
1. Verify typecheck and lint pass `[AI]`
|
|
115
|
+
2. Remind user to test
|
|
116
|
+
3. Remind user to commit
|
|
117
|
+
4. Remind user to run `/record-agent-flow` `[USER]`
|
|
118
|
+
5. Archive feature `[AI]`:
|
|
119
|
+
```bash
|
|
120
|
+
./.trellis/scripts/feature.sh archive <feature-name>
|
|
121
|
+
```
|
|
87
122
|
|
|
88
123
|
---
|
|
89
124
|
|
|
90
|
-
##
|
|
125
|
+
## User Available Commands `[USER]`
|
|
126
|
+
|
|
127
|
+
The following slash commands are for users (not AI):
|
|
128
|
+
|
|
129
|
+
| Command | Description |
|
|
130
|
+
|---------|-------------|
|
|
131
|
+
| `/start` | Start development session (this command) |
|
|
132
|
+
| `/before-frontend-dev` | Read frontend guidelines |
|
|
133
|
+
| `/before-backend-dev` | Read backend guidelines |
|
|
134
|
+
| `/check-frontend` | Check frontend code |
|
|
135
|
+
| `/check-backend` | Check backend code |
|
|
136
|
+
| `/check-cross-layer` | Cross-layer verification |
|
|
137
|
+
| `/finish-work` | Pre-commit checklist |
|
|
138
|
+
| `/record-agent-flow` | Record session progress |
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## AI Executed Scripts `[AI]`
|
|
143
|
+
|
|
144
|
+
| Script | Purpose |
|
|
145
|
+
|--------|---------|
|
|
146
|
+
| `feature.sh create <name>` | Create feature directory |
|
|
147
|
+
| `feature.sh list` | List active features |
|
|
148
|
+
| `feature.sh archive <name>` | Archive feature |
|
|
149
|
+
| `get-context.sh` | Get session context |
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Session End Reminder
|
|
154
|
+
|
|
155
|
+
**IMPORTANT**: When a task or session is completed, remind the user:
|
|
91
156
|
|
|
92
|
-
-
|
|
93
|
-
- One feature at a time
|
|
94
|
-
- At session end, remind user to run `/record-agent-flow` to record progress
|
|
157
|
+
> Before ending this session, please run `/record-agent-flow` to record what we accomplished.
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { AITool, TemplateDir } from "../../types/ai-tools.js";
|
|
8
8
|
export declare const claudeStartTemplate: string;
|
|
9
|
+
export declare const claudeParallelTemplate: string;
|
|
9
10
|
export declare const cursorStartTemplate: string;
|
|
11
|
+
export declare const opencodeStartTemplate: string;
|
|
10
12
|
export declare const recordAgentFlowTemplate: string;
|
|
11
13
|
export declare const onboardDeveloperTemplate: string;
|
|
12
14
|
export declare const checkFrontendTemplate: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAmBnE,eAAO,MAAM,mBAAmB,EAAE,MAGjC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,MAGjC,CAAC;AAOF,eAAO,MAAM,uBAAuB,EAAE,MAGrC,CAAC;AACF,eAAO,MAAM,wBAAwB,EAAE,MAGtC,CAAC;AAGF,eAAO,MAAM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