@fifine/aim-studio 0.0.2 → 0.0.3

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.
Files changed (91) hide show
  1. package/dist/commands/init.d.ts.map +1 -1
  2. package/dist/commands/init.js +123 -101
  3. package/dist/commands/init.js.map +1 -1
  4. package/dist/configurators/workflow.d.ts.map +1 -1
  5. package/dist/configurators/workflow.js +91 -65
  6. package/dist/configurators/workflow.js.map +1 -1
  7. package/dist/templates/aim/scripts/common/paths.py +3 -2
  8. package/dist/templates/aim/scripts/export.py +427 -0
  9. package/dist/templates/claude/commands/aim/export.md +89 -115
  10. package/dist/templates/claude/commands/aim/onboard.md +10 -8
  11. package/dist/templates/claude/commands/aim/start.md +104 -37
  12. package/dist/templates/claude/hooks/inject-subagent-context.py +6 -10
  13. package/dist/templates/claude/hooks/session-start.py +134 -24
  14. package/dist/templates/markdown/index.d.ts +5 -0
  15. package/dist/templates/markdown/index.d.ts.map +1 -1
  16. package/dist/templates/markdown/index.js +6 -0
  17. package/dist/templates/markdown/index.js.map +1 -1
  18. package/dist/templates/markdown/spec/cli/directory-structure.md.txt +71 -0
  19. package/dist/templates/markdown/spec/cli/error-handling.md.txt +91 -0
  20. package/dist/templates/markdown/spec/cli/index.md.txt +37 -0
  21. package/dist/templates/markdown/spec/cli/options-flags.md.txt +71 -0
  22. package/dist/templates/markdown/spec/cli/output-formatting.md.txt +93 -0
  23. package/dist/utils/project-detector.d.ts +1 -1
  24. package/dist/utils/project-detector.d.ts.map +1 -1
  25. package/dist/utils/project-detector.js +20 -0
  26. package/dist/utils/project-detector.js.map +1 -1
  27. package/package.json +1 -1
  28. package/dist/templates/claude/commands/trellis/before-backend-dev.md +0 -13
  29. package/dist/templates/claude/commands/trellis/before-frontend-dev.md +0 -13
  30. package/dist/templates/claude/commands/trellis/break-loop.md +0 -125
  31. package/dist/templates/claude/commands/trellis/check-backend.md +0 -13
  32. package/dist/templates/claude/commands/trellis/check-cross-layer.md +0 -153
  33. package/dist/templates/claude/commands/trellis/check-frontend.md +0 -13
  34. package/dist/templates/claude/commands/trellis/create-command.md +0 -154
  35. package/dist/templates/claude/commands/trellis/finish-work.md +0 -129
  36. package/dist/templates/claude/commands/trellis/integrate-skill.md +0 -219
  37. package/dist/templates/claude/commands/trellis/onboard.md +0 -358
  38. package/dist/templates/claude/commands/trellis/parallel.md +0 -193
  39. package/dist/templates/claude/commands/trellis/record-session.md +0 -62
  40. package/dist/templates/claude/commands/trellis/start.md +0 -280
  41. package/dist/templates/claude/commands/trellis/update-spec.md +0 -285
  42. package/dist/templates/trellis/gitignore.txt +0 -29
  43. package/dist/templates/trellis/index.d.ts +0 -49
  44. package/dist/templates/trellis/index.d.ts.map +0 -1
  45. package/dist/templates/trellis/index.js +0 -92
  46. package/dist/templates/trellis/index.js.map +0 -1
  47. package/dist/templates/trellis/scripts/__init__.py +0 -5
  48. package/dist/templates/trellis/scripts/add_session.py +0 -392
  49. package/dist/templates/trellis/scripts/common/__init__.py +0 -80
  50. package/dist/templates/trellis/scripts/common/cli_adapter.py +0 -435
  51. package/dist/templates/trellis/scripts/common/developer.py +0 -190
  52. package/dist/templates/trellis/scripts/common/git_context.py +0 -383
  53. package/dist/templates/trellis/scripts/common/paths.py +0 -347
  54. package/dist/templates/trellis/scripts/common/phase.py +0 -253
  55. package/dist/templates/trellis/scripts/common/registry.py +0 -366
  56. package/dist/templates/trellis/scripts/common/task_queue.py +0 -255
  57. package/dist/templates/trellis/scripts/common/task_utils.py +0 -178
  58. package/dist/templates/trellis/scripts/common/worktree.py +0 -219
  59. package/dist/templates/trellis/scripts/create_bootstrap.py +0 -290
  60. package/dist/templates/trellis/scripts/get_context.py +0 -16
  61. package/dist/templates/trellis/scripts/get_developer.py +0 -26
  62. package/dist/templates/trellis/scripts/init_developer.py +0 -51
  63. package/dist/templates/trellis/scripts/multi_agent/__init__.py +0 -5
  64. package/dist/templates/trellis/scripts/multi_agent/cleanup.py +0 -403
  65. package/dist/templates/trellis/scripts/multi_agent/create_pr.py +0 -329
  66. package/dist/templates/trellis/scripts/multi_agent/plan.py +0 -233
  67. package/dist/templates/trellis/scripts/multi_agent/start.py +0 -461
  68. package/dist/templates/trellis/scripts/multi_agent/status.py +0 -817
  69. package/dist/templates/trellis/scripts/task.py +0 -1056
  70. package/dist/templates/trellis/scripts-shell-archive/add-session.sh +0 -384
  71. package/dist/templates/trellis/scripts-shell-archive/common/developer.sh +0 -129
  72. package/dist/templates/trellis/scripts-shell-archive/common/git-context.sh +0 -263
  73. package/dist/templates/trellis/scripts-shell-archive/common/paths.sh +0 -208
  74. package/dist/templates/trellis/scripts-shell-archive/common/phase.sh +0 -150
  75. package/dist/templates/trellis/scripts-shell-archive/common/registry.sh +0 -247
  76. package/dist/templates/trellis/scripts-shell-archive/common/task-queue.sh +0 -142
  77. package/dist/templates/trellis/scripts-shell-archive/common/task-utils.sh +0 -151
  78. package/dist/templates/trellis/scripts-shell-archive/common/worktree.sh +0 -128
  79. package/dist/templates/trellis/scripts-shell-archive/create-bootstrap.sh +0 -299
  80. package/dist/templates/trellis/scripts-shell-archive/get-context.sh +0 -7
  81. package/dist/templates/trellis/scripts-shell-archive/get-developer.sh +0 -15
  82. package/dist/templates/trellis/scripts-shell-archive/init-developer.sh +0 -34
  83. package/dist/templates/trellis/scripts-shell-archive/multi-agent/cleanup.sh +0 -396
  84. package/dist/templates/trellis/scripts-shell-archive/multi-agent/create-pr.sh +0 -241
  85. package/dist/templates/trellis/scripts-shell-archive/multi-agent/plan.sh +0 -207
  86. package/dist/templates/trellis/scripts-shell-archive/multi-agent/start.sh +0 -317
  87. package/dist/templates/trellis/scripts-shell-archive/multi-agent/status.sh +0 -828
  88. package/dist/templates/trellis/scripts-shell-archive/task.sh +0 -1204
  89. package/dist/templates/trellis/tasks/.gitkeep +0 -0
  90. package/dist/templates/trellis/workflow.md +0 -416
  91. package/dist/templates/trellis/worktree.yaml +0 -47
File without changes
@@ -1,416 +0,0 @@
1
- # Development Workflow
2
-
3
- > Based on [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents)
4
-
5
- ---
6
-
7
- ## Table of Contents
8
-
9
- 1. [Quick Start (Do This First)](#quick-start-do-this-first)
10
- 2. [Workflow Overview](#workflow-overview)
11
- 3. [Session Start Process](#session-start-process)
12
- 4. [Development Process](#development-process)
13
- 5. [Session End](#session-end)
14
- 6. [File Descriptions](#file-descriptions)
15
- 7. [Best Practices](#best-practices)
16
-
17
- ---
18
-
19
- ## Quick Start (Do This First)
20
-
21
- ### Step 0: Initialize Developer Identity (First Time Only)
22
-
23
- > **Multi-developer support**: Each developer/Agent needs to initialize their identity first
24
-
25
- ```bash
26
- # Check if already initialized
27
- python3 ./.trellis/scripts/get_developer.py
28
-
29
- # If not initialized, run:
30
- python3 ./.trellis/scripts/init_developer.py <your-name>
31
- # Example: python3 ./.trellis/scripts/init_developer.py cursor-agent
32
- ```
33
-
34
- This creates:
35
- - `.trellis/.developer` - Your identity file (gitignored, not committed)
36
- - `.trellis/workspace/<your-name>/` - Your personal workspace directory
37
-
38
- **Naming suggestions**:
39
- - Human developers: Use your name, e.g., `john-doe`
40
- - Cursor AI: `cursor-agent` or `cursor-<task>`
41
- - Claude Code: `claude-agent` or `claude-<task>`
42
- - iFlow cli: `iflow-agent` or `iflow-<task>`
43
-
44
- ### Step 1: Understand Current Context
45
-
46
- ```bash
47
- # Get full context in one command
48
- python3 ./.trellis/scripts/get_context.py
49
-
50
- # Or check manually:
51
- python3 ./.trellis/scripts/get_developer.py # Your identity
52
- python3 ./.trellis/scripts/task.py list # Active tasks
53
- git status && git log --oneline -10 # Git state
54
- ```
55
-
56
- ### Step 2: Read Project Guidelines [MANDATORY]
57
-
58
- **CRITICAL**: Read guidelines before writing any code:
59
-
60
- ```bash
61
- # Read frontend guidelines index (if applicable)
62
- cat .trellis/spec/frontend/index.md
63
-
64
- # Read backend guidelines index (if applicable)
65
- cat .trellis/spec/backend/index.md
66
- ```
67
-
68
- **Why read both?**
69
- - Understand the full project architecture
70
- - Know coding standards for the entire codebase
71
- - See how frontend and backend interact
72
- - Learn the overall code quality requirements
73
-
74
- ### Step 3: Before Coding - Read Specific Guidelines (Required)
75
-
76
- Based on your task, read the **detailed** guidelines:
77
-
78
- **Frontend Task**:
79
- ```bash
80
- cat .trellis/spec/frontend/hook-guidelines.md # For hooks
81
- cat .trellis/spec/frontend/component-guidelines.md # For components
82
- cat .trellis/spec/frontend/type-safety.md # For types
83
- ```
84
-
85
- **Backend Task**:
86
- ```bash
87
- cat .trellis/spec/backend/database-guidelines.md # For DB operations
88
- cat .trellis/spec/backend/type-safety.md # For types
89
- cat .trellis/spec/backend/logging-guidelines.md # For logging
90
- ```
91
-
92
- ---
93
-
94
- ## Workflow Overview
95
-
96
- ### Core Principles
97
-
98
- 1. **Read Before Write** - Understand context before starting
99
- 2. **Follow Standards** - [!] **MUST read `.trellis/spec/` guidelines before coding**
100
- 3. **Incremental Development** - Complete one task at a time
101
- 4. **Record Promptly** - Update tracking files immediately after completion
102
- 5. **Document Limits** - [!] **Max 2000 lines per journal document**
103
-
104
- ### File System
105
-
106
- ```
107
- .trellis/
108
- |-- .developer # Developer identity (gitignored)
109
- |-- scripts/
110
- | |-- __init__.py # Python package init
111
- | |-- common/ # Shared utilities (Python)
112
- | | |-- __init__.py
113
- | | |-- paths.py # Path utilities
114
- | | |-- developer.py # Developer management
115
- | | +-- git_context.py # Git context implementation
116
- | |-- multi_agent/ # Multi-agent pipeline scripts
117
- | | |-- __init__.py
118
- | | |-- start.py # Start worktree agent
119
- | | |-- status.py # Monitor agent status
120
- | | |-- create_pr.py # Create PR
121
- | | +-- cleanup.py # Cleanup worktree
122
- | |-- init_developer.py # Initialize developer identity
123
- | |-- get_developer.py # Get current developer name
124
- | |-- task.py # Manage tasks
125
- | |-- get_context.py # Get session context
126
- | +-- add_session.py # One-click session recording
127
- |-- workspace/ # Developer workspaces
128
- | |-- index.md # Workspace index + Session template
129
- | +-- {developer}/ # Per-developer directories
130
- | |-- index.md # Personal index (with @@@auto markers)
131
- | +-- journal-N.md # Journal files (sequential numbering)
132
- |-- tasks/ # Task tracking
133
- | +-- {MM}-{DD}-{name}/
134
- | +-- task.json
135
- |-- spec/ # [!] MUST READ before coding
136
- | |-- frontend/ # Frontend guidelines (if applicable)
137
- | | |-- index.md # Start here - guidelines index
138
- | | +-- *.md # Topic-specific docs
139
- | |-- backend/ # Backend guidelines (if applicable)
140
- | | |-- index.md # Start here - guidelines index
141
- | | +-- *.md # Topic-specific docs
142
- | +-- guides/ # Thinking guides
143
- | |-- index.md # Guides index
144
- | |-- cross-layer-thinking-guide.md # Pre-implementation checklist
145
- | +-- *.md # Other guides
146
- +-- workflow.md # This document
147
- ```
148
-
149
- ---
150
-
151
- ## Session Start Process
152
-
153
- ### Step 1: Get Session Context
154
-
155
- Use the unified context script:
156
-
157
- ```bash
158
- # Get all context in one command
159
- python3 ./.trellis/scripts/get_context.py
160
-
161
- # Or get JSON format
162
- python3 ./.trellis/scripts/get_context.py --json
163
- ```
164
-
165
- ### Step 2: Read Development Guidelines [!] REQUIRED
166
-
167
- **[!] CRITICAL: MUST read guidelines before writing any code**
168
-
169
- Based on what you'll develop, read the corresponding guidelines:
170
-
171
- **Frontend Development** (if applicable):
172
- ```bash
173
- # Read index first, then specific docs based on task
174
- cat .trellis/spec/frontend/index.md
175
- ```
176
-
177
- **Backend Development** (if applicable):
178
- ```bash
179
- # Read index first, then specific docs based on task
180
- cat .trellis/spec/backend/index.md
181
- ```
182
-
183
- **Cross-Layer Features**:
184
- ```bash
185
- # For features spanning multiple layers
186
- cat .trellis/spec/guides/cross-layer-thinking-guide.md
187
- ```
188
-
189
- ### Step 3: Select Task to Develop
190
-
191
- Use the task management script:
192
-
193
- ```bash
194
- # List active tasks
195
- python3 ./.trellis/scripts/task.py list
196
-
197
- # Create new task (creates directory with task.json)
198
- python3 ./.trellis/scripts/task.py create "<title>" --slug <task-name>
199
- ```
200
-
201
- ---
202
-
203
- ## Development Process
204
-
205
- ### Task Development Flow
206
-
207
- ```
208
- 1. Create or select task
209
- --> python3 ./.trellis/scripts/task.py create "<title>" --slug <name> or list
210
-
211
- 2. Write code according to guidelines
212
- --> Read .trellis/spec/ docs relevant to your task
213
- --> For cross-layer: read .trellis/spec/guides/
214
-
215
- 3. Self-test
216
- --> Run project's lint/test commands (see spec docs)
217
- --> Manual feature testing
218
-
219
- 4. Commit code
220
- --> git add <files>
221
- --> git commit -m "type(scope): description"
222
- Format: feat/fix/docs/refactor/test/chore
223
-
224
- 5. Record session (one command)
225
- --> python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash"
226
- ```
227
-
228
- ### Code Quality Checklist
229
-
230
- **Must pass before commit**:
231
- - [OK] Lint checks pass (project-specific command)
232
- - [OK] Type checks pass (if applicable)
233
- - [OK] Manual feature testing passes
234
-
235
- **Project-specific checks**:
236
- - See `.trellis/spec/frontend/quality-guidelines.md` for frontend
237
- - See `.trellis/spec/backend/quality-guidelines.md` for backend
238
-
239
- ---
240
-
241
- ## Session End
242
-
243
- ### One-Click Session Recording
244
-
245
- After code is committed, use:
246
-
247
- ```bash
248
- python3 ./.trellis/scripts/add_session.py \
249
- --title "Session Title" \
250
- --commit "abc1234" \
251
- --summary "Brief summary"
252
- ```
253
-
254
- This automatically:
255
- 1. Detects current journal file
256
- 2. Creates new file if 2000-line limit exceeded
257
- 3. Appends session content
258
- 4. Updates index.md (sessions count, history table)
259
-
260
- ### Pre-end Checklist
261
-
262
- Use `/trellis:finish-work` command to run through:
263
- 1. [OK] All code committed, commit message follows convention
264
- 2. [OK] Session recorded via `add_session.py`
265
- 3. [OK] No lint/test errors
266
- 4. [OK] Working directory clean (or WIP noted)
267
- 5. [OK] Spec docs updated if needed
268
-
269
- ---
270
-
271
- ## File Descriptions
272
-
273
- ### 1. workspace/ - Developer Workspaces
274
-
275
- **Purpose**: Record each AI Agent session's work content
276
-
277
- **Structure** (Multi-developer support):
278
- ```
279
- workspace/
280
- |-- index.md # Main index (Active Developers table)
281
- +-- {developer}/ # Per-developer directory
282
- |-- index.md # Personal index (with @@@auto markers)
283
- +-- journal-N.md # Journal files (sequential: 1, 2, 3...)
284
- ```
285
-
286
- **When to update**:
287
- - [OK] End of each session
288
- - [OK] Complete important task
289
- - [OK] Fix important bug
290
-
291
- ### 2. spec/ - Development Guidelines
292
-
293
- **Purpose**: Documented standards for consistent development
294
-
295
- **Structure** (Multi-doc format):
296
- ```
297
- spec/
298
- |-- frontend/ # Frontend docs (if applicable)
299
- | |-- index.md # Start here
300
- | +-- *.md # Topic-specific docs
301
- |-- backend/ # Backend docs (if applicable)
302
- | |-- index.md # Start here
303
- | +-- *.md # Topic-specific docs
304
- +-- guides/ # Thinking guides
305
- |-- index.md # Start here
306
- +-- *.md # Guide-specific docs
307
- ```
308
-
309
- **When to update**:
310
- - [OK] New pattern discovered
311
- - [OK] Bug fixed that reveals missing guidance
312
- - [OK] New convention established
313
-
314
- ### 3. Tasks - Task Tracking
315
-
316
- Each task is a directory containing `task.json`:
317
-
318
- ```
319
- tasks/
320
- |-- 01-21-my-task/
321
- | +-- task.json
322
- +-- archive/
323
- +-- 2026-01/
324
- +-- 01-15-old-task/
325
- +-- task.json
326
- ```
327
-
328
- **Commands**:
329
- ```bash
330
- python3 ./.trellis/scripts/task.py create "<title>" [--slug <name>] # Create task directory
331
- python3 ./.trellis/scripts/task.py archive <name> # Archive to archive/{year-month}/
332
- python3 ./.trellis/scripts/task.py list # List active tasks
333
- python3 ./.trellis/scripts/task.py list-archive # List archived tasks
334
- ```
335
-
336
- ---
337
-
338
- ## Best Practices
339
-
340
- ### [OK] DO - Should Do
341
-
342
- 1. **Before session start**:
343
- - Run `python3 ./.trellis/scripts/get_context.py` for full context
344
- - [!] **MUST read** relevant `.trellis/spec/` docs
345
-
346
- 2. **During development**:
347
- - [!] **Follow** `.trellis/spec/` guidelines
348
- - For cross-layer features, use `/trellis:check-cross-layer`
349
- - Develop only one task at a time
350
- - Run lint and tests frequently
351
-
352
- 3. **After development complete**:
353
- - Use `/trellis:finish-work` for completion checklist
354
- - After fix bug, use `/trellis:break-loop` for deep analysis
355
- - Human commits after testing passes
356
- - Use `add_session.py` to record progress
357
-
358
- ### [X] DON'T - Should Not Do
359
-
360
- 1. [!] **Don't** skip reading `.trellis/spec/` guidelines
361
- 2. [!] **Don't** let journal single file exceed 2000 lines
362
- 3. **Don't** develop multiple unrelated tasks simultaneously
363
- 4. **Don't** commit code with lint/test errors
364
- 5. **Don't** forget to update spec docs after learning something
365
- 6. [!] **Don't** execute `git commit` - AI should not commit code
366
-
367
- ---
368
-
369
- ## Quick Reference
370
-
371
- ### Must-read Before Development
372
-
373
- | Task Type | Must-read Document |
374
- |-----------|-------------------|
375
- | Frontend work | `frontend/index.md` → relevant docs |
376
- | Backend work | `backend/index.md` → relevant docs |
377
- | Cross-Layer Feature | `guides/cross-layer-thinking-guide.md` |
378
-
379
- ### Commit Convention
380
-
381
- ```bash
382
- git commit -m "type(scope): description"
383
- ```
384
-
385
- **Type**: feat, fix, docs, refactor, test, chore
386
- **Scope**: Module name (e.g., auth, api, ui)
387
-
388
- ### Common Commands
389
-
390
- ```bash
391
- # Session management
392
- python3 ./.trellis/scripts/get_context.py # Get full context
393
- python3 ./.trellis/scripts/add_session.py # Record session
394
-
395
- # Task management
396
- python3 ./.trellis/scripts/task.py list # List tasks
397
- python3 ./.trellis/scripts/task.py create "<title>" # Create task
398
-
399
- # Slash commands
400
- /trellis:finish-work # Pre-commit checklist
401
- /trellis:break-loop # Post-debug analysis
402
- /trellis:check-cross-layer # Cross-layer verification
403
- ```
404
-
405
- ---
406
-
407
- ## Summary
408
-
409
- Following this workflow ensures:
410
- - [OK] Continuity across multiple sessions
411
- - [OK] Consistent code quality
412
- - [OK] Trackable progress
413
- - [OK] Knowledge accumulation in spec docs
414
- - [OK] Transparent team collaboration
415
-
416
- **Core Philosophy**: Read before write, follow standards, record promptly, capture learnings
@@ -1,47 +0,0 @@
1
- # Worktree Configuration for Multi-Agent Pipeline
2
- # Used for worktree initialization in multi-agent workflows
3
- #
4
- # All paths are relative to project root
5
-
6
- #-------------------------------------------------------------------------------
7
- # Paths
8
- #-------------------------------------------------------------------------------
9
-
10
- # Worktree storage directory (relative to project root)
11
- worktree_dir: ../trellis-worktrees
12
-
13
- #-------------------------------------------------------------------------------
14
- # Files to Copy
15
- #-------------------------------------------------------------------------------
16
-
17
- # Files to copy to each worktree (each worktree needs independent copy)
18
- # These files contain sensitive info or need worktree-independent config
19
- copy:
20
- # Environment variables (uncomment and customize as needed)
21
- # - .env
22
- # - .env.local
23
- # Workflow config
24
- - .trellis/.developer
25
-
26
- #-------------------------------------------------------------------------------
27
- # Post-Create Hooks
28
- #-------------------------------------------------------------------------------
29
-
30
- # Commands to run after creating worktree
31
- # Executed in worktree directory, in order, abort on failure
32
- post_create:
33
- # Install dependencies (uncomment based on your package manager)
34
- # - npm install
35
- # - pnpm install --frozen-lockfile
36
- # - yarn install --frozen-lockfile
37
-
38
- #-------------------------------------------------------------------------------
39
- # Check Agent Verification (Ralph Loop)
40
- #-------------------------------------------------------------------------------
41
-
42
- # Commands to verify code quality before allowing check agent to finish
43
- # If configured, Ralph Loop will run these commands - all must pass to allow completion
44
- # If not configured or empty, trusts agent's completion markers
45
- verify:
46
- # - pnpm lint
47
- # - pnpm typecheck