@fifine/aim-studio 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 +159 -0
- package/bin/aim.js +3 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +89 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/commands/init.d.ts +13 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +513 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/update.d.ts +27 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +1275 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/configurators/claude.d.ts +32 -0
- package/dist/configurators/claude.d.ts.map +1 -0
- package/dist/configurators/claude.js +98 -0
- package/dist/configurators/claude.js.map +1 -0
- package/dist/configurators/index.d.ts +51 -0
- package/dist/configurators/index.d.ts.map +1 -0
- package/dist/configurators/index.js +113 -0
- package/dist/configurators/index.js.map +1 -0
- package/dist/configurators/shared.d.ts +12 -0
- package/dist/configurators/shared.d.ts.map +1 -0
- package/dist/configurators/shared.js +21 -0
- package/dist/configurators/shared.js.map +1 -0
- package/dist/configurators/workflow.d.ts +28 -0
- package/dist/configurators/workflow.d.ts.map +1 -0
- package/dist/configurators/workflow.js +147 -0
- package/dist/configurators/workflow.js.map +1 -0
- package/dist/constants/paths.d.ts +68 -0
- package/dist/constants/paths.d.ts.map +1 -0
- package/dist/constants/paths.js +77 -0
- package/dist/constants/paths.js.map +1 -0
- package/dist/constants/version.d.ts +9 -0
- package/dist/constants/version.d.ts.map +1 -0
- package/dist/constants/version.js +15 -0
- package/dist/constants/version.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/index.d.ts +54 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +160 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/migrations/manifests/0.0.1.json +9 -0
- package/dist/migrations/manifests/0.1.9.json +30 -0
- package/dist/migrations/manifests/0.2.0.json +49 -0
- package/dist/migrations/manifests/0.2.12.json +9 -0
- package/dist/migrations/manifests/0.2.13.json +9 -0
- package/dist/migrations/manifests/0.2.14.json +175 -0
- package/dist/migrations/manifests/0.2.15.json +33 -0
- package/dist/migrations/manifests/0.3.0-beta.0.json +278 -0
- package/dist/migrations/manifests/0.3.0-beta.1.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.11.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.12.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.13.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.14.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.15.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.16.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.5.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.6.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.7.json +11 -0
- package/dist/migrations/manifests/0.3.0-beta.8.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.9.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.0.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.1.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.2.json +9 -0
- package/dist/templates/CLAUDE.md +71 -0
- package/dist/templates/aim/gitignore.txt +29 -0
- package/dist/templates/aim/index.d.ts +49 -0
- package/dist/templates/aim/index.d.ts.map +1 -0
- package/dist/templates/aim/index.js +92 -0
- package/dist/templates/aim/index.js.map +1 -0
- package/dist/templates/aim/scripts/__init__.py +5 -0
- package/dist/templates/aim/scripts/add_session.py +392 -0
- package/dist/templates/aim/scripts/common/__init__.py +80 -0
- package/dist/templates/aim/scripts/common/cli_adapter.py +435 -0
- package/dist/templates/aim/scripts/common/developer.py +190 -0
- package/dist/templates/aim/scripts/common/git_context.py +383 -0
- package/dist/templates/aim/scripts/common/paths.py +347 -0
- package/dist/templates/aim/scripts/common/phase.py +253 -0
- package/dist/templates/aim/scripts/common/registry.py +366 -0
- package/dist/templates/aim/scripts/common/task_queue.py +255 -0
- package/dist/templates/aim/scripts/common/task_utils.py +178 -0
- package/dist/templates/aim/scripts/common/worktree.py +219 -0
- package/dist/templates/aim/scripts/create_bootstrap.py +290 -0
- package/dist/templates/aim/scripts/get_context.py +16 -0
- package/dist/templates/aim/scripts/get_developer.py +26 -0
- package/dist/templates/aim/scripts/init_developer.py +51 -0
- package/dist/templates/aim/scripts/multi_agent/__init__.py +5 -0
- package/dist/templates/aim/scripts/multi_agent/cleanup.py +403 -0
- package/dist/templates/aim/scripts/multi_agent/create_pr.py +329 -0
- package/dist/templates/aim/scripts/multi_agent/plan.py +233 -0
- package/dist/templates/aim/scripts/multi_agent/start.py +461 -0
- package/dist/templates/aim/scripts/multi_agent/status.py +817 -0
- package/dist/templates/aim/scripts/task.py +1068 -0
- package/dist/templates/aim/scripts-shell-archive/add-session.sh +384 -0
- package/dist/templates/aim/scripts-shell-archive/common/developer.sh +129 -0
- package/dist/templates/aim/scripts-shell-archive/common/git-context.sh +263 -0
- package/dist/templates/aim/scripts-shell-archive/common/paths.sh +208 -0
- package/dist/templates/aim/scripts-shell-archive/common/phase.sh +150 -0
- package/dist/templates/aim/scripts-shell-archive/common/registry.sh +247 -0
- package/dist/templates/aim/scripts-shell-archive/common/task-queue.sh +142 -0
- package/dist/templates/aim/scripts-shell-archive/common/task-utils.sh +151 -0
- package/dist/templates/aim/scripts-shell-archive/common/worktree.sh +128 -0
- package/dist/templates/aim/scripts-shell-archive/create-bootstrap.sh +299 -0
- package/dist/templates/aim/scripts-shell-archive/get-context.sh +7 -0
- package/dist/templates/aim/scripts-shell-archive/get-developer.sh +15 -0
- package/dist/templates/aim/scripts-shell-archive/init-developer.sh +34 -0
- package/dist/templates/aim/scripts-shell-archive/multi-agent/cleanup.sh +396 -0
- package/dist/templates/aim/scripts-shell-archive/multi-agent/create-pr.sh +241 -0
- package/dist/templates/aim/scripts-shell-archive/multi-agent/plan.sh +207 -0
- package/dist/templates/aim/scripts-shell-archive/multi-agent/start.sh +317 -0
- package/dist/templates/aim/scripts-shell-archive/multi-agent/status.sh +828 -0
- package/dist/templates/aim/scripts-shell-archive/task.sh +1204 -0
- package/dist/templates/aim/tasks/.gitkeep +0 -0
- package/dist/templates/aim/workflow.md +258 -0
- package/dist/templates/aim/worktree.yaml +47 -0
- package/dist/templates/claude/agents/check.md +122 -0
- package/dist/templates/claude/agents/debug.md +106 -0
- package/dist/templates/claude/agents/dispatch.md +230 -0
- package/dist/templates/claude/agents/implement.md +96 -0
- package/dist/templates/claude/agents/plan.md +396 -0
- package/dist/templates/claude/agents/research.md +120 -0
- package/dist/templates/claude/agents/story.md +53 -0
- package/dist/templates/claude/commands/aim/before-backend-dev.md +13 -0
- package/dist/templates/claude/commands/aim/before-frontend-dev.md +13 -0
- package/dist/templates/claude/commands/aim/break-loop.md +153 -0
- package/dist/templates/claude/commands/aim/check-backend.md +13 -0
- package/dist/templates/claude/commands/aim/check-cross-layer.md +153 -0
- package/dist/templates/claude/commands/aim/check-frontend.md +13 -0
- package/dist/templates/claude/commands/aim/check-story.md +59 -0
- package/dist/templates/claude/commands/aim/create-command.md +154 -0
- package/dist/templates/claude/commands/aim/export.md +187 -0
- package/dist/templates/claude/commands/aim/finish-work.md +104 -0
- package/dist/templates/claude/commands/aim/integrate-skill.md +219 -0
- package/dist/templates/claude/commands/aim/onboard.md +358 -0
- package/dist/templates/claude/commands/aim/parallel.md +217 -0
- package/dist/templates/claude/commands/aim/portrait.md +170 -0
- package/dist/templates/claude/commands/aim/record-session.md +92 -0
- package/dist/templates/claude/commands/aim/start.md +112 -0
- package/dist/templates/claude/commands/aim/story.md +140 -0
- package/dist/templates/claude/commands/aim/update-spec.md +285 -0
- package/dist/templates/claude/commands/aim/visualize.md +182 -0
- package/dist/templates/claude/commands/trellis/before-backend-dev.md +13 -0
- package/dist/templates/claude/commands/trellis/before-frontend-dev.md +13 -0
- package/dist/templates/claude/commands/trellis/break-loop.md +125 -0
- package/dist/templates/claude/commands/trellis/check-backend.md +13 -0
- package/dist/templates/claude/commands/trellis/check-cross-layer.md +153 -0
- package/dist/templates/claude/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/claude/commands/trellis/create-command.md +154 -0
- package/dist/templates/claude/commands/trellis/finish-work.md +129 -0
- package/dist/templates/claude/commands/trellis/integrate-skill.md +219 -0
- package/dist/templates/claude/commands/trellis/onboard.md +358 -0
- package/dist/templates/claude/commands/trellis/parallel.md +193 -0
- package/dist/templates/claude/commands/trellis/record-session.md +62 -0
- package/dist/templates/claude/commands/trellis/start.md +280 -0
- package/dist/templates/claude/commands/trellis/update-spec.md +285 -0
- package/dist/templates/claude/hooks/inject-subagent-context.py +772 -0
- package/dist/templates/claude/hooks/ralph-loop.py +388 -0
- package/dist/templates/claude/hooks/session-start.py +142 -0
- package/dist/templates/claude/index.d.ts +54 -0
- package/dist/templates/claude/index.d.ts.map +1 -0
- package/dist/templates/claude/index.js +85 -0
- package/dist/templates/claude/index.js.map +1 -0
- package/dist/templates/claude/settings.json +41 -0
- package/dist/templates/extract.d.ts +68 -0
- package/dist/templates/extract.d.ts.map +1 -0
- package/dist/templates/extract.js +128 -0
- package/dist/templates/extract.js.map +1 -0
- package/dist/templates/markdown/agents.md +25 -0
- package/dist/templates/markdown/gitignore.txt +12 -0
- package/dist/templates/markdown/index.d.ts +32 -0
- package/dist/templates/markdown/index.d.ts.map +1 -0
- package/dist/templates/markdown/index.js +58 -0
- package/dist/templates/markdown/index.js.map +1 -0
- package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/backend/error-handling.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/index.md +40 -0
- package/dist/templates/markdown/spec/backend/index.md.txt +38 -0
- package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/script-conventions.md +467 -0
- package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +59 -0
- package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/index.md.txt +39 -0
- package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/state-management.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/type-safety.md.txt +51 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md +118 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +92 -0
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +94 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md +394 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +319 -0
- package/dist/templates/markdown/spec/guides/index.md.txt +89 -0
- package/dist/templates/markdown/spec/story/character.md.txt +95 -0
- package/dist/templates/markdown/spec/story/index.md.txt +31 -0
- package/dist/templates/markdown/spec/story/script.md.txt +313 -0
- package/dist/templates/markdown/spec/story/world.md.txt +92 -0
- package/dist/templates/markdown/workspace-index.md +123 -0
- package/dist/templates/markdown/worktree.yaml.txt +58 -0
- package/dist/templates/trellis/gitignore.txt +29 -0
- package/dist/templates/trellis/index.d.ts +49 -0
- package/dist/templates/trellis/index.d.ts.map +1 -0
- package/dist/templates/trellis/index.js +92 -0
- package/dist/templates/trellis/index.js.map +1 -0
- package/dist/templates/trellis/scripts/__init__.py +5 -0
- package/dist/templates/trellis/scripts/add_session.py +392 -0
- package/dist/templates/trellis/scripts/common/__init__.py +80 -0
- package/dist/templates/trellis/scripts/common/cli_adapter.py +435 -0
- package/dist/templates/trellis/scripts/common/developer.py +190 -0
- package/dist/templates/trellis/scripts/common/git_context.py +383 -0
- package/dist/templates/trellis/scripts/common/paths.py +347 -0
- package/dist/templates/trellis/scripts/common/phase.py +253 -0
- package/dist/templates/trellis/scripts/common/registry.py +366 -0
- package/dist/templates/trellis/scripts/common/task_queue.py +255 -0
- package/dist/templates/trellis/scripts/common/task_utils.py +178 -0
- package/dist/templates/trellis/scripts/common/worktree.py +219 -0
- package/dist/templates/trellis/scripts/create_bootstrap.py +290 -0
- package/dist/templates/trellis/scripts/get_context.py +16 -0
- package/dist/templates/trellis/scripts/get_developer.py +26 -0
- package/dist/templates/trellis/scripts/init_developer.py +51 -0
- package/dist/templates/trellis/scripts/multi_agent/__init__.py +5 -0
- package/dist/templates/trellis/scripts/multi_agent/cleanup.py +403 -0
- package/dist/templates/trellis/scripts/multi_agent/create_pr.py +329 -0
- package/dist/templates/trellis/scripts/multi_agent/plan.py +233 -0
- package/dist/templates/trellis/scripts/multi_agent/start.py +461 -0
- package/dist/templates/trellis/scripts/multi_agent/status.py +817 -0
- package/dist/templates/trellis/scripts/task.py +1056 -0
- package/dist/templates/trellis/scripts-shell-archive/add-session.sh +384 -0
- package/dist/templates/trellis/scripts-shell-archive/common/developer.sh +129 -0
- package/dist/templates/trellis/scripts-shell-archive/common/git-context.sh +263 -0
- package/dist/templates/trellis/scripts-shell-archive/common/paths.sh +208 -0
- package/dist/templates/trellis/scripts-shell-archive/common/phase.sh +150 -0
- package/dist/templates/trellis/scripts-shell-archive/common/registry.sh +247 -0
- package/dist/templates/trellis/scripts-shell-archive/common/task-queue.sh +142 -0
- package/dist/templates/trellis/scripts-shell-archive/common/task-utils.sh +151 -0
- package/dist/templates/trellis/scripts-shell-archive/common/worktree.sh +128 -0
- package/dist/templates/trellis/scripts-shell-archive/create-bootstrap.sh +299 -0
- package/dist/templates/trellis/scripts-shell-archive/get-context.sh +7 -0
- package/dist/templates/trellis/scripts-shell-archive/get-developer.sh +15 -0
- package/dist/templates/trellis/scripts-shell-archive/init-developer.sh +34 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/cleanup.sh +396 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/create-pr.sh +241 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/plan.sh +207 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/start.sh +317 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/status.sh +828 -0
- package/dist/templates/trellis/scripts-shell-archive/task.sh +1204 -0
- package/dist/templates/trellis/tasks/.gitkeep +0 -0
- package/dist/templates/trellis/workflow.md +416 -0
- package/dist/templates/trellis/worktree.yaml +47 -0
- package/dist/types/ai-tools.d.ts +48 -0
- package/dist/types/ai-tools.d.ts.map +1 -0
- package/dist/types/ai-tools.js +32 -0
- package/dist/types/ai-tools.js.map +1 -0
- package/dist/types/migration.d.ts +86 -0
- package/dist/types/migration.d.ts.map +1 -0
- package/dist/types/migration.js +8 -0
- package/dist/types/migration.js.map +1 -0
- package/dist/utils/compare-versions.d.ts +12 -0
- package/dist/utils/compare-versions.d.ts.map +1 -0
- package/dist/utils/compare-versions.js +76 -0
- package/dist/utils/compare-versions.js.map +1 -0
- package/dist/utils/file-writer.d.ts +23 -0
- package/dist/utils/file-writer.d.ts.map +1 -0
- package/dist/utils/file-writer.js +140 -0
- package/dist/utils/file-writer.js.map +1 -0
- package/dist/utils/project-detector.d.ts +16 -0
- package/dist/utils/project-detector.d.ts.map +1 -0
- package/dist/utils/project-detector.js +188 -0
- package/dist/utils/project-detector.js.map +1 -0
- package/dist/utils/template-fetcher.d.ts +51 -0
- package/dist/utils/template-fetcher.d.ts.map +1 -0
- package/dist/utils/template-fetcher.js +174 -0
- package/dist/utils/template-fetcher.js.map +1 -0
- package/dist/utils/template-hash.d.ts +78 -0
- package/dist/utils/template-hash.d.ts.map +1 -0
- package/dist/utils/template-hash.js +239 -0
- package/dist/utils/template-hash.js.map +1 -0
- package/package.json +87 -0
|
File without changes
|
|
@@ -0,0 +1,416 @@
|
|
|
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
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Tool Types and Registry
|
|
3
|
+
*
|
|
4
|
+
* Defines supported AI tools and which command templates they can use.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Supported AI tools — only Claude Code
|
|
8
|
+
*/
|
|
9
|
+
export type AITool = "claude-code";
|
|
10
|
+
/**
|
|
11
|
+
* Template directory categories
|
|
12
|
+
*/
|
|
13
|
+
export type TemplateDir = "common" | "claude";
|
|
14
|
+
/**
|
|
15
|
+
* CLI flag names for platform selection
|
|
16
|
+
*/
|
|
17
|
+
export type CliFlag = "claude";
|
|
18
|
+
/**
|
|
19
|
+
* Configuration for an AI tool
|
|
20
|
+
*/
|
|
21
|
+
export interface AIToolConfig {
|
|
22
|
+
/** Display name of the tool */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Command template directory names to include */
|
|
25
|
+
templateDirs: TemplateDir[];
|
|
26
|
+
/** Config directory name in the project root (e.g., ".claude") */
|
|
27
|
+
configDir: string;
|
|
28
|
+
/** CLI flag name for --flag options (e.g., "claude" for --claude) */
|
|
29
|
+
cliFlag: CliFlag;
|
|
30
|
+
/** Whether this tool is checked by default in interactive init prompt */
|
|
31
|
+
defaultChecked: boolean;
|
|
32
|
+
/** Whether this tool uses Python hooks (affects Windows encoding detection) */
|
|
33
|
+
hasPythonHooks: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Registry of all supported AI tools and their configurations.
|
|
37
|
+
* This is the single source of truth for platform data.
|
|
38
|
+
*/
|
|
39
|
+
export declare const AI_TOOLS: Record<AITool, AIToolConfig>;
|
|
40
|
+
/**
|
|
41
|
+
* Get the configuration for a specific AI tool
|
|
42
|
+
*/
|
|
43
|
+
export declare function getToolConfig(tool: AITool): AIToolConfig;
|
|
44
|
+
/**
|
|
45
|
+
* Get template directories for a specific tool
|
|
46
|
+
*/
|
|
47
|
+
export declare function getTemplateDirs(tool: AITool): TemplateDir[];
|
|
48
|
+
//# sourceMappingURL=ai-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-tools.d.ts","sourceRoot":"","sources":["../../src/types/ai-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,aAAa,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,yEAAyE;IACzE,cAAc,EAAE,OAAO,CAAC;IACxB,+EAA+E;IAC/E,cAAc,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CASjD,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAExD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAE3D"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Tool Types and Registry
|
|
3
|
+
*
|
|
4
|
+
* Defines supported AI tools and which command templates they can use.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Registry of all supported AI tools and their configurations.
|
|
8
|
+
* This is the single source of truth for platform data.
|
|
9
|
+
*/
|
|
10
|
+
export const AI_TOOLS = {
|
|
11
|
+
"claude-code": {
|
|
12
|
+
name: "Claude Code",
|
|
13
|
+
templateDirs: ["common", "claude"],
|
|
14
|
+
configDir: ".claude",
|
|
15
|
+
cliFlag: "claude",
|
|
16
|
+
defaultChecked: true,
|
|
17
|
+
hasPythonHooks: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Get the configuration for a specific AI tool
|
|
22
|
+
*/
|
|
23
|
+
export function getToolConfig(tool) {
|
|
24
|
+
return AI_TOOLS[tool];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get template directories for a specific tool
|
|
28
|
+
*/
|
|
29
|
+
export function getTemplateDirs(tool) {
|
|
30
|
+
return AI_TOOLS[tool].templateDirs;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=ai-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-tools.js","sourceRoot":"","sources":["../../src/types/ai-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmCH;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAiC;IACpD,aAAa,EAAE;QACb,IAAI,EAAE,aAAa;QACnB,YAAY,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAClC,SAAS,EAAE,SAAS;QACpB,OAAO,EAAE,QAAQ;QACjB,cAAc,EAAE,IAAI;QACpB,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration types for Trellis update command
|
|
3
|
+
*
|
|
4
|
+
* These types support intelligent migration during updates,
|
|
5
|
+
* handling file renames, deletions, and user modification detection.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* A single migration action (rename, rename-dir, or delete)
|
|
9
|
+
*/
|
|
10
|
+
export interface MigrationItem {
|
|
11
|
+
/** Type of migration action */
|
|
12
|
+
type: "rename" | "rename-dir" | "delete";
|
|
13
|
+
/** Source path (relative to project root) */
|
|
14
|
+
from: string;
|
|
15
|
+
/** Target path for renames (relative to project root) */
|
|
16
|
+
to?: string;
|
|
17
|
+
/** Human-readable description of the change */
|
|
18
|
+
description?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Migration manifest for a specific version
|
|
22
|
+
*/
|
|
23
|
+
export interface MigrationManifest {
|
|
24
|
+
/** Target version this migration upgrades to */
|
|
25
|
+
version: string;
|
|
26
|
+
/** Human-readable description of changes in this version */
|
|
27
|
+
description?: string;
|
|
28
|
+
/** List of migration actions */
|
|
29
|
+
migrations: MigrationItem[];
|
|
30
|
+
/** Detailed changelog for display to users */
|
|
31
|
+
changelog?: string;
|
|
32
|
+
/** Whether this version contains breaking changes */
|
|
33
|
+
breaking?: boolean;
|
|
34
|
+
/** Whether users should run --migrate (recommended for breaking changes) */
|
|
35
|
+
recommendMigrate?: boolean;
|
|
36
|
+
/** Detailed migration guide for AI-assisted fixes (markdown format) */
|
|
37
|
+
migrationGuide?: string;
|
|
38
|
+
/** Instructions for AI assistants on how to help with migration */
|
|
39
|
+
aiInstructions?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Classification of how a migration should be handled
|
|
43
|
+
*/
|
|
44
|
+
export type MigrationClassification = "auto" | "confirm" | "conflict" | "skip";
|
|
45
|
+
/**
|
|
46
|
+
* Classified migration item with its determined action
|
|
47
|
+
*/
|
|
48
|
+
export interface ClassifiedMigrationItem extends MigrationItem {
|
|
49
|
+
classification: MigrationClassification;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Result of classifying all migrations
|
|
53
|
+
*/
|
|
54
|
+
export interface ClassifiedMigrations {
|
|
55
|
+
/** Unmodified files - safe to auto-migrate */
|
|
56
|
+
auto: MigrationItem[];
|
|
57
|
+
/** User-modified files - need confirmation */
|
|
58
|
+
confirm: MigrationItem[];
|
|
59
|
+
/** Conflict - both old and new exist */
|
|
60
|
+
conflict: MigrationItem[];
|
|
61
|
+
/** Skip - old file doesn't exist */
|
|
62
|
+
skip: MigrationItem[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Result of executing migrations
|
|
66
|
+
*/
|
|
67
|
+
export interface MigrationResult {
|
|
68
|
+
/** Number of files renamed */
|
|
69
|
+
renamed: number;
|
|
70
|
+
/** Number of files deleted */
|
|
71
|
+
deleted: number;
|
|
72
|
+
/** Number of files skipped (user choice or no action needed) */
|
|
73
|
+
skipped: number;
|
|
74
|
+
/** Number of conflicts encountered */
|
|
75
|
+
conflicts: number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* User action choice for migration confirmation
|
|
79
|
+
*/
|
|
80
|
+
export type MigrationAction = "rename" | "backup-rename" | "skip" | "view-diff";
|
|
81
|
+
/**
|
|
82
|
+
* Template hashes storage structure
|
|
83
|
+
* Maps relative file paths to their SHA256 hashes
|
|
84
|
+
*/
|
|
85
|
+
export type TemplateHashes = Record<string, string>;
|
|
86
|
+
//# sourceMappingURL=migration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.d.ts","sourceRoot":"","sources":["../../src/types/migration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,IAAI,EAAE,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAC;IACzC,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uEAAuE;IACvE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,SAAS,GACT,UAAU,GACV,MAAM,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D,cAAc,EAAE,uBAAuB,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,8CAA8C;IAC9C,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,wCAAwC;IACxC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,oCAAoC;IACpC,IAAI,EAAE,aAAa,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,QAAQ,GACR,eAAe,GACf,MAAM,GACN,WAAW,CAAC;AAEhB;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.js","sourceRoot":"","sources":["../../src/types/migration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compare two semver versions (handles prerelease versions)
|
|
3
|
+
* Returns: -1 if a < b, 0 if a == b, 1 if a > b
|
|
4
|
+
*
|
|
5
|
+
* Semver rules:
|
|
6
|
+
* - 0.3.0-beta.1 < 0.3.0 (prerelease is less than release)
|
|
7
|
+
* - 0.3.0-alpha < 0.3.0-beta (alphabetically)
|
|
8
|
+
* - 0.3.0-beta.1 < 0.3.0-beta.2 (numerically)
|
|
9
|
+
* - 0.3.0-beta.16 < 0.3.0-rc.0 (alphabetically: "beta" < "rc")
|
|
10
|
+
*/
|
|
11
|
+
export declare function compareVersions(a: string, b: string): number;
|
|
12
|
+
//# sourceMappingURL=compare-versions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare-versions.d.ts","sourceRoot":"","sources":["../../src/utils/compare-versions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CA8D5D"}
|