@mindfoldhq/trellis 0.3.10-beta.0 → 0.3.10
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/dist/cli/index.js +0 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +0 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +31 -203
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +6 -154
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/workflow.d.ts +2 -6
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +58 -88
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/migrations/index.d.ts +0 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +0 -2
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/manifests/0.3.10.json +9 -0
- package/dist/templates/claude/agents/dispatch.md +2 -1
- package/dist/templates/claude/agents/implement.md +3 -2
- 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/check-backend.md +13 -0
- package/dist/templates/claude/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/claude/commands/trellis/create-command.md +2 -2
- package/dist/templates/claude/commands/trellis/onboard.md +13 -13
- package/dist/templates/claude/commands/trellis/parallel.md +2 -1
- package/dist/templates/claude/commands/trellis/record-session.md +2 -2
- package/dist/templates/claude/commands/trellis/start.md +4 -8
- package/dist/templates/claude/hooks/inject-subagent-context.py +13 -21
- package/dist/templates/claude/hooks/session-start.py +2 -170
- package/dist/templates/codex/skills/before-backend-dev/SKILL.md +18 -0
- package/dist/templates/codex/skills/before-frontend-dev/SKILL.md +18 -0
- package/dist/templates/codex/skills/check-backend/SKILL.md +18 -0
- package/dist/templates/codex/skills/check-frontend/SKILL.md +18 -0
- package/dist/templates/codex/skills/create-command/SKILL.md +2 -2
- package/dist/templates/codex/skills/onboard/SKILL.md +11 -11
- package/dist/templates/codex/skills/record-session/SKILL.md +2 -2
- package/dist/templates/codex/skills/start/SKILL.md +3 -8
- package/dist/templates/cursor/commands/trellis-before-backend-dev.md +13 -0
- package/dist/templates/cursor/commands/trellis-before-frontend-dev.md +13 -0
- package/dist/templates/cursor/commands/trellis-check-backend.md +13 -0
- package/dist/templates/cursor/commands/trellis-check-frontend.md +13 -0
- package/dist/templates/cursor/commands/trellis-create-command.md +2 -2
- package/dist/templates/cursor/commands/trellis-onboard.md +13 -13
- package/dist/templates/cursor/commands/trellis-record-session.md +2 -2
- package/dist/templates/cursor/commands/trellis-start.md +16 -7
- package/dist/templates/gemini/commands/trellis/before-backend-dev.toml +17 -0
- package/dist/templates/gemini/commands/trellis/before-frontend-dev.toml +17 -0
- package/dist/templates/gemini/commands/trellis/check-backend.toml +17 -0
- package/dist/templates/gemini/commands/trellis/check-frontend.toml +17 -0
- package/dist/templates/gemini/commands/trellis/create-command.toml +2 -2
- package/dist/templates/gemini/commands/trellis/onboard.toml +2 -2
- package/dist/templates/gemini/commands/trellis/record-session.toml +2 -2
- package/dist/templates/gemini/commands/trellis/start.toml +4 -9
- package/dist/templates/iflow/agents/dispatch.md +2 -1
- package/dist/templates/iflow/agents/implement.md +3 -2
- package/dist/templates/iflow/commands/trellis/before-backend-dev.md +13 -0
- package/dist/templates/iflow/commands/trellis/before-frontend-dev.md +13 -0
- package/dist/templates/iflow/commands/trellis/check-backend.md +13 -0
- package/dist/templates/iflow/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/iflow/commands/trellis/create-command.md +2 -2
- package/dist/templates/iflow/commands/trellis/onboard.md +13 -13
- package/dist/templates/iflow/commands/trellis/parallel.md +2 -1
- package/dist/templates/iflow/commands/trellis/record-session.md +2 -2
- package/dist/templates/iflow/commands/trellis/start.md +4 -8
- package/dist/templates/iflow/hooks/inject-subagent-context.py +13 -21
- package/dist/templates/iflow/hooks/session-start.py +1 -156
- package/dist/templates/kilo/workflows/before-backend-dev.md +13 -0
- package/dist/templates/kilo/workflows/before-frontend-dev.md +13 -0
- package/dist/templates/kilo/workflows/check-backend.md +13 -0
- package/dist/templates/kilo/workflows/check-frontend.md +13 -0
- package/dist/templates/kilo/workflows/create-command.md +2 -2
- package/dist/templates/kilo/workflows/onboard.md +13 -13
- package/dist/templates/kilo/workflows/parallel.md +2 -1
- package/dist/templates/kilo/workflows/record-session.md +2 -2
- package/dist/templates/kilo/workflows/start.md +3 -8
- package/dist/templates/kiro/skills/before-backend-dev/SKILL.md +18 -0
- package/dist/templates/kiro/skills/before-frontend-dev/SKILL.md +18 -0
- package/dist/templates/kiro/skills/check-backend/SKILL.md +18 -0
- package/dist/templates/kiro/skills/check-frontend/SKILL.md +18 -0
- package/dist/templates/kiro/skills/create-command/SKILL.md +2 -2
- package/dist/templates/kiro/skills/onboard/SKILL.md +11 -11
- package/dist/templates/kiro/skills/record-session/SKILL.md +2 -2
- package/dist/templates/kiro/skills/start/SKILL.md +3 -8
- package/dist/templates/markdown/spec/backend/script-conventions.md +0 -93
- package/dist/templates/opencode/agents/dispatch.md +2 -1
- package/dist/templates/opencode/agents/implement.md +2 -2
- package/dist/templates/opencode/agents/research.md +2 -1
- package/dist/templates/opencode/commands/trellis/before-backend-dev.md +13 -0
- package/dist/templates/opencode/commands/trellis/before-frontend-dev.md +13 -0
- package/dist/templates/opencode/commands/trellis/check-backend.md +13 -0
- package/dist/templates/opencode/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/opencode/commands/trellis/create-command.md +2 -2
- package/dist/templates/opencode/commands/trellis/onboard.md +13 -13
- package/dist/templates/opencode/commands/trellis/parallel.md +2 -1
- package/dist/templates/opencode/commands/trellis/record-session.md +2 -2
- package/dist/templates/opencode/commands/trellis/start.md +3 -8
- package/dist/templates/opencode/plugin/inject-subagent-context.js +18 -45
- package/dist/templates/opencode/plugin/session-start.js +1 -149
- package/dist/templates/qoder/skills/before-backend-dev/SKILL.md +18 -0
- package/dist/templates/qoder/skills/before-frontend-dev/SKILL.md +18 -0
- package/dist/templates/qoder/skills/check-backend/SKILL.md +18 -0
- package/dist/templates/qoder/skills/check-frontend/SKILL.md +18 -0
- package/dist/templates/qoder/skills/create-command/SKILL.md +2 -2
- package/dist/templates/qoder/skills/onboard/SKILL.md +13 -13
- package/dist/templates/qoder/skills/record-session/SKILL.md +2 -2
- package/dist/templates/qoder/skills/start/SKILL.md +3 -8
- package/dist/templates/trellis/config.yaml +0 -20
- package/dist/templates/trellis/index.d.ts +0 -11
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +0 -22
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/add_session.py +7 -52
- package/dist/templates/trellis/scripts/common/cli_adapter.py +45 -33
- package/dist/templates/trellis/scripts/common/config.py +0 -152
- package/dist/templates/trellis/scripts/common/git_context.py +586 -23
- package/dist/templates/trellis/scripts/common/paths.py +0 -46
- package/dist/templates/trellis/scripts/common/phase.py +49 -50
- package/dist/templates/trellis/scripts/common/registry.py +72 -41
- package/dist/templates/trellis/scripts/common/task_queue.py +98 -27
- package/dist/templates/trellis/scripts/common/task_utils.py +6 -96
- package/dist/templates/trellis/scripts/create_bootstrap.py +26 -31
- package/dist/templates/trellis/scripts/multi_agent/cleanup.py +48 -43
- package/dist/templates/trellis/scripts/multi_agent/create_pr.py +45 -336
- package/dist/templates/trellis/scripts/multi_agent/plan.py +26 -2
- package/dist/templates/trellis/scripts/multi_agent/start.py +57 -126
- package/dist/templates/trellis/scripts/multi_agent/status.py +753 -12
- package/dist/templates/trellis/scripts/task.py +975 -50
- package/dist/templates/trellis/workflow.md +34 -21
- package/dist/types/migration.d.ts +1 -3
- package/dist/types/migration.d.ts.map +1 -1
- package/dist/utils/project-detector.d.ts +0 -23
- package/dist/utils/project-detector.d.ts.map +1 -1
- package/dist/utils/project-detector.js +0 -364
- package/dist/utils/project-detector.js.map +1 -1
- package/dist/utils/template-fetcher.d.ts +10 -2
- package/dist/utils/template-fetcher.d.ts.map +1 -1
- package/dist/utils/template-fetcher.js +43 -12
- package/dist/utils/template-fetcher.js.map +1 -1
- package/package.json +1 -1
- package/dist/migrations/manifests/0.4.0-beta.1.json +0 -228
- package/dist/templates/claude/commands/trellis/before-dev.md +0 -29
- package/dist/templates/claude/commands/trellis/check.md +0 -25
- package/dist/templates/codex/skills/before-dev/SKILL.md +0 -34
- package/dist/templates/codex/skills/check/SKILL.md +0 -30
- package/dist/templates/cursor/commands/trellis-before-dev.md +0 -29
- package/dist/templates/cursor/commands/trellis-check.md +0 -25
- package/dist/templates/gemini/commands/trellis/before-dev.toml +0 -33
- package/dist/templates/gemini/commands/trellis/check.toml +0 -29
- package/dist/templates/iflow/commands/trellis/before-dev.md +0 -29
- package/dist/templates/iflow/commands/trellis/check.md +0 -25
- package/dist/templates/kilo/workflows/before-dev.md +0 -29
- package/dist/templates/kilo/workflows/check.md +0 -25
- package/dist/templates/kiro/skills/before-dev/SKILL.md +0 -34
- package/dist/templates/kiro/skills/check/SKILL.md +0 -30
- package/dist/templates/opencode/commands/trellis/before-dev.md +0 -29
- package/dist/templates/opencode/commands/trellis/check.md +0 -25
- package/dist/templates/qoder/skills/before-dev/SKILL.md +0 -34
- package/dist/templates/qoder/skills/check/SKILL.md +0 -30
- package/dist/templates/trellis/scripts/common/git.py +0 -31
- package/dist/templates/trellis/scripts/common/io.py +0 -37
- package/dist/templates/trellis/scripts/common/log.py +0 -45
- package/dist/templates/trellis/scripts/common/packages_context.py +0 -233
- package/dist/templates/trellis/scripts/common/session_context.py +0 -466
- package/dist/templates/trellis/scripts/common/task_context.py +0 -384
- package/dist/templates/trellis/scripts/common/task_store.py +0 -534
- package/dist/templates/trellis/scripts/common/tasks.py +0 -109
- package/dist/templates/trellis/scripts/common/types.py +0 -112
- package/dist/templates/trellis/scripts/hooks/linear_sync.py +0 -243
- package/dist/templates/trellis/scripts/multi_agent/_bootstrap.py +0 -17
- package/dist/templates/trellis/scripts/multi_agent/status_display.py +0 -542
- package/dist/templates/trellis/scripts/multi_agent/status_monitor.py +0 -225
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
description = "Read frontend development guidelines before starting your task"
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
Read the frontend development guidelines before starting your development task.
|
|
5
|
+
|
|
6
|
+
Execute these steps:
|
|
7
|
+
1. Read `.trellis/spec/frontend/index.md` to understand available guidelines
|
|
8
|
+
2. Based on your task, read the relevant guideline files:
|
|
9
|
+
- Component work -> `.trellis/spec/frontend/component-guidelines.md`
|
|
10
|
+
- Hook work -> `.trellis/spec/frontend/hook-guidelines.md`
|
|
11
|
+
- State management -> `.trellis/spec/frontend/state-management.md`
|
|
12
|
+
- Type questions -> `.trellis/spec/frontend/type-safety.md`
|
|
13
|
+
3. Understand the coding standards and patterns you need to follow
|
|
14
|
+
4. Then proceed with your development plan
|
|
15
|
+
|
|
16
|
+
This step is **mandatory** before writing any frontend code.
|
|
17
|
+
"""
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
description = "Check if your code follows the backend development guidelines"
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
Check if the code you just wrote follows the backend development guidelines.
|
|
5
|
+
|
|
6
|
+
Execute these steps:
|
|
7
|
+
1. Run `git status` to see modified files
|
|
8
|
+
2. Read `.trellis/spec/backend/index.md` to understand which guidelines apply
|
|
9
|
+
3. Based on what you changed, read the relevant guideline files:
|
|
10
|
+
- Database changes -> `.trellis/spec/backend/database-guidelines.md`
|
|
11
|
+
- Error handling -> `.trellis/spec/backend/error-handling.md`
|
|
12
|
+
- Logging changes -> `.trellis/spec/backend/logging-guidelines.md`
|
|
13
|
+
- Type changes -> `.trellis/spec/backend/type-safety.md`
|
|
14
|
+
- Any changes -> `.trellis/spec/backend/quality-guidelines.md`
|
|
15
|
+
4. Review your code against the guidelines
|
|
16
|
+
5. Report any violations and fix them if found
|
|
17
|
+
"""
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
description = "Check if your code follows the frontend development guidelines"
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
Check if the code you just wrote follows the frontend development guidelines.
|
|
5
|
+
|
|
6
|
+
Execute these steps:
|
|
7
|
+
1. Run `git status` to see modified files
|
|
8
|
+
2. Read `.trellis/spec/frontend/index.md` to understand which guidelines apply
|
|
9
|
+
3. Based on what you changed, read the relevant guideline files:
|
|
10
|
+
- Component changes -> `.trellis/spec/frontend/component-guidelines.md`
|
|
11
|
+
- Hook changes -> `.trellis/spec/frontend/hook-guidelines.md`
|
|
12
|
+
- State changes -> `.trellis/spec/frontend/state-management.md`
|
|
13
|
+
- Type changes -> `.trellis/spec/frontend/type-safety.md`
|
|
14
|
+
- Any changes -> `.trellis/spec/frontend/quality-guidelines.md`
|
|
15
|
+
4. Review your code against the guidelines
|
|
16
|
+
5. Report any violations and fix them if found
|
|
17
|
+
"""
|
|
@@ -110,8 +110,8 @@ Description:
|
|
|
110
110
|
| Command Type | Prefix | Example |
|
|
111
111
|
|--------------|--------|---------|
|
|
112
112
|
| Session Start | `start` | `start` |
|
|
113
|
-
| Pre-development | `before-` | `before-dev` |
|
|
114
|
-
| Check | `check-` | `check` |
|
|
113
|
+
| Pre-development | `before-` | `before-frontend-dev` |
|
|
114
|
+
| Check | `check-` | `check-frontend` |
|
|
115
115
|
| Record | `record-` | `record-session` |
|
|
116
116
|
| Generate | `generate-` | `generate-api-doc` |
|
|
117
117
|
| Update | `update-` | `update-changelog` |
|
|
@@ -69,8 +69,8 @@ The `/check-*` commands re-verify code against guidelines AFTER writing, catchin
|
|
|
69
69
|
## COMMAND DEEP DIVE
|
|
70
70
|
|
|
71
71
|
### /trellis:start - Restore AI Memory
|
|
72
|
-
### /trellis:before-dev - Inject Specialized Knowledge
|
|
73
|
-
### /trellis:check - Combat Context Drift
|
|
72
|
+
### /trellis:before-frontend-dev and /trellis:before-backend-dev - Inject Specialized Knowledge
|
|
73
|
+
### /trellis:check-frontend and /trellis:check-backend - Combat Context Drift
|
|
74
74
|
### /trellis:check-cross-layer - Multi-Dimension Verification
|
|
75
75
|
### /trellis:finish-work - Holistic Pre-Commit Review
|
|
76
76
|
### /trellis:record-session - Persist Memory for Future
|
|
@@ -3,7 +3,7 @@ description = "Record work progress after human has tested and committed code"
|
|
|
3
3
|
prompt = """
|
|
4
4
|
[!] **Prerequisite**: This command should only be used AFTER the human has tested and committed the code.
|
|
5
5
|
|
|
6
|
-
**
|
|
6
|
+
**Do NOT run `git commit` directly** — the scripts below handle their own commits for `.trellis/` metadata. You only need to read git history (`git log`, `git status`, `git diff`) and run the Python scripts.
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -34,7 +34,7 @@ python3 ./.trellis/scripts/add_session.py \\
|
|
|
34
34
|
--summary "Brief summary of what was done"
|
|
35
35
|
|
|
36
36
|
# Method 2: Pass detailed content via stdin
|
|
37
|
-
cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --
|
|
37
|
+
cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash"
|
|
38
38
|
| Feature | Description |
|
|
39
39
|
|---------|-------------|
|
|
40
40
|
| New API | Added user authentication endpoint |
|
|
@@ -43,17 +43,12 @@ This shows: developer identity, git status, current task (if any), active tasks.
|
|
|
43
43
|
### Step 3: Read Guidelines Index
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
|
|
46
|
+
cat .trellis/spec/frontend/index.md # Frontend guidelines
|
|
47
|
+
cat .trellis/spec/backend/index.md # Backend guidelines
|
|
48
|
+
cat .trellis/spec/guides/index.md # Thinking guides
|
|
47
49
|
```
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
cat .trellis/spec/<package>/<layer>/index.md # Package-specific guidelines
|
|
53
|
-
cat .trellis/spec/guides/index.md # Thinking guides (always read)
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
> **Important**: The index files are navigation -- they list the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`).
|
|
51
|
+
> **Important**: The index files are navigation — they list the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`).
|
|
57
52
|
> At this step, just read the indexes to understand what's available.
|
|
58
53
|
> When you start actual development, you MUST go back and read the specific guideline files relevant to your task, as listed in the index's Pre-Development Checklist.
|
|
59
54
|
|
|
@@ -41,8 +41,9 @@ Before implementing, read:
|
|
|
41
41
|
|
|
42
42
|
Read relevant specs based on task type:
|
|
43
43
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
44
|
+
- Backend: `.trellis/spec/backend/`
|
|
45
|
+
- Frontend: `.trellis/spec/frontend/`
|
|
46
|
+
- Guides: `.trellis/spec/guides/`
|
|
46
47
|
|
|
47
48
|
### 2. Understand Requirements
|
|
48
49
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Read the backend development guidelines before starting your development task.
|
|
2
|
+
|
|
3
|
+
Execute these steps:
|
|
4
|
+
1. Read `.trellis/spec/backend/index.md` to understand available guidelines
|
|
5
|
+
2. Based on your task, read the relevant guideline files:
|
|
6
|
+
- Database work → `.trellis/spec/backend/database-guidelines.md`
|
|
7
|
+
- Error handling → `.trellis/spec/backend/error-handling.md`
|
|
8
|
+
- Logging → `.trellis/spec/backend/logging-guidelines.md`
|
|
9
|
+
- Type questions → `.trellis/spec/backend/type-safety.md`
|
|
10
|
+
3. Understand the coding standards and patterns you need to follow
|
|
11
|
+
4. Then proceed with your development plan
|
|
12
|
+
|
|
13
|
+
This step is **mandatory** before writing any backend code.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Read the frontend development guidelines before starting your development task.
|
|
2
|
+
|
|
3
|
+
Execute these steps:
|
|
4
|
+
1. Read `.trellis/spec/frontend/index.md` to understand available guidelines
|
|
5
|
+
2. Based on your task, read the relevant guideline files:
|
|
6
|
+
- Component work → `.trellis/spec/frontend/component-guidelines.md`
|
|
7
|
+
- Hook work → `.trellis/spec/frontend/hook-guidelines.md`
|
|
8
|
+
- State management → `.trellis/spec/frontend/state-management.md`
|
|
9
|
+
- Type questions → `.trellis/spec/frontend/type-safety.md`
|
|
10
|
+
3. Understand the coding standards and patterns you need to follow
|
|
11
|
+
4. Then proceed with your development plan
|
|
12
|
+
|
|
13
|
+
This step is **mandatory** before writing any frontend code.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Check if the code you just wrote follows the backend development guidelines.
|
|
2
|
+
|
|
3
|
+
Execute these steps:
|
|
4
|
+
1. Run `git status` to see modified files
|
|
5
|
+
2. Read `.trellis/spec/backend/index.md` to understand which guidelines apply
|
|
6
|
+
3. Based on what you changed, read the relevant guideline files:
|
|
7
|
+
- Database changes → `.trellis/spec/backend/database-guidelines.md`
|
|
8
|
+
- Error handling → `.trellis/spec/backend/error-handling.md`
|
|
9
|
+
- Logging changes → `.trellis/spec/backend/logging-guidelines.md`
|
|
10
|
+
- Type changes → `.trellis/spec/backend/type-safety.md`
|
|
11
|
+
- Any changes → `.trellis/spec/backend/quality-guidelines.md`
|
|
12
|
+
4. Review your code against the guidelines
|
|
13
|
+
5. Report any violations and fix them if found
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Check if the code you just wrote follows the frontend development guidelines.
|
|
2
|
+
|
|
3
|
+
Execute these steps:
|
|
4
|
+
1. Run `git status` to see modified files
|
|
5
|
+
2. Read `.trellis/spec/frontend/index.md` to understand which guidelines apply
|
|
6
|
+
3. Based on what you changed, read the relevant guideline files:
|
|
7
|
+
- Component changes → `.trellis/spec/frontend/component-guidelines.md`
|
|
8
|
+
- Hook changes → `.trellis/spec/frontend/hook-guidelines.md`
|
|
9
|
+
- State changes → `.trellis/spec/frontend/state-management.md`
|
|
10
|
+
- Type changes → `.trellis/spec/frontend/type-safety.md`
|
|
11
|
+
- Any changes → `.trellis/spec/frontend/quality-guidelines.md`
|
|
12
|
+
4. Review your code against the guidelines
|
|
13
|
+
5. Report any violations and fix them if found
|
|
@@ -99,8 +99,8 @@ Description:
|
|
|
99
99
|
| Command Type | Prefix | Example |
|
|
100
100
|
|--------------|--------|---------|
|
|
101
101
|
| Session Start | `start` | `start` |
|
|
102
|
-
| Pre-development | `before-` | `before-dev` |
|
|
103
|
-
| Check | `check-` | `check` |
|
|
102
|
+
| Pre-development | `before-` | `before-frontend-dev` |
|
|
103
|
+
| Check | `check-` | `check-frontend` |
|
|
104
104
|
| Record | `record-` | `record-session` |
|
|
105
105
|
| Generate | `generate-` | `generate-api-doc` |
|
|
106
106
|
| Update | `update-` | `update-changelog` |
|
|
@@ -126,13 +126,13 @@ AI needs the same onboarding - but compressed into seconds at session start.
|
|
|
126
126
|
|
|
127
127
|
---
|
|
128
128
|
|
|
129
|
-
### /trellis:before-dev - Inject Specialized Knowledge
|
|
129
|
+
### /trellis:before-frontend-dev and /trellis:before-backend-dev - Inject Specialized Knowledge
|
|
130
130
|
|
|
131
131
|
**WHY IT EXISTS**:
|
|
132
132
|
AI models have "pre-trained knowledge" - general patterns from millions of codebases. But YOUR project has specific conventions that differ from generic patterns.
|
|
133
133
|
|
|
134
134
|
**WHAT IT ACTUALLY DOES**:
|
|
135
|
-
1.
|
|
135
|
+
1. Reads `.trellis/spec/frontend/` or `.trellis/spec/backend/`
|
|
136
136
|
2. Loads project-specific patterns into AI's working context:
|
|
137
137
|
- Component naming conventions
|
|
138
138
|
- State management patterns
|
|
@@ -140,12 +140,12 @@ AI models have "pre-trained knowledge" - general patterns from millions of codeb
|
|
|
140
140
|
- Error handling standards
|
|
141
141
|
|
|
142
142
|
**WHY THIS MATTERS**:
|
|
143
|
-
- Without before
|
|
144
|
-
- With before
|
|
143
|
+
- Without before-*-dev: AI writes generic code that doesn't match project style.
|
|
144
|
+
- With before-*-dev: AI writes code that looks like the rest of the codebase.
|
|
145
145
|
|
|
146
146
|
---
|
|
147
147
|
|
|
148
|
-
### /trellis:check - Combat Context Drift
|
|
148
|
+
### /trellis:check-frontend and /trellis:check-backend - Combat Context Drift
|
|
149
149
|
|
|
150
150
|
**WHY IT EXISTS**:
|
|
151
151
|
AI context window has limited capacity. As conversation progresses, guidelines injected at session start become less influential. This causes "context drift."
|
|
@@ -211,9 +211,9 @@ All the context AI built during this session will be lost when session ends. The
|
|
|
211
211
|
|
|
212
212
|
**[1/8] /trellis:start** - AI needs project context before touching code
|
|
213
213
|
**[2/8] python3 ./.trellis/scripts/task.py create "Fix bug" --slug fix-bug** - Track work for future reference
|
|
214
|
-
**[3/8] /trellis:before-dev** - Inject project-specific
|
|
214
|
+
**[3/8] /trellis:before-frontend-dev** - Inject project-specific frontend knowledge
|
|
215
215
|
**[4/8] Investigate and fix the bug** - Actual development work
|
|
216
|
-
**[5/8] /trellis:check** - Re-verify code against guidelines
|
|
216
|
+
**[5/8] /trellis:check-frontend** - Re-verify code against guidelines
|
|
217
217
|
**[6/8] /trellis:finish-work** - Holistic cross-layer review
|
|
218
218
|
**[7/8] Human tests and commits** - Human validates before code enters repo
|
|
219
219
|
**[8/8] /trellis:record-session** - Persist memory for future sessions
|
|
@@ -228,9 +228,9 @@ All the context AI built during this session will be lost when session ends. The
|
|
|
228
228
|
### Example 3: Code Review Fixes
|
|
229
229
|
|
|
230
230
|
**[1/6] /trellis:start** - Resume context from previous session
|
|
231
|
-
**[2/6] /trellis:before-dev** - Re-inject guidelines before fixes
|
|
231
|
+
**[2/6] /trellis:before-backend-dev** - Re-inject guidelines before fixes
|
|
232
232
|
**[3/6] Fix each CR issue** - Address feedback with guidelines in context
|
|
233
|
-
**[4/6] /trellis:check** - Verify fixes
|
|
233
|
+
**[4/6] /trellis:check-backend** - Verify fixes didn't introduce new issues
|
|
234
234
|
**[5/6] /trellis:finish-work** - Document lessons from CR
|
|
235
235
|
**[6/6] Human commits, then /trellis:record-session** - Preserve CR lessons
|
|
236
236
|
|
|
@@ -238,16 +238,16 @@ All the context AI built during this session will be lost when session ends. The
|
|
|
238
238
|
|
|
239
239
|
**[1/5] /trellis:start** - Clear baseline before major changes
|
|
240
240
|
**[2/5] Plan phases** - Break into verifiable chunks
|
|
241
|
-
**[3/5] Execute phase by phase with /
|
|
241
|
+
**[3/5] Execute phase by phase with /check-* after each** - Incremental verification
|
|
242
242
|
**[4/5] /trellis:finish-work** - Check if new patterns should be documented
|
|
243
243
|
**[5/5] Record with multiple commit hashes** - Link all commits to one feature
|
|
244
244
|
|
|
245
245
|
### Example 5: Debug Session
|
|
246
246
|
|
|
247
247
|
**[1/6] /trellis:start** - See if this bug was investigated before
|
|
248
|
-
**[2/6] /trellis:before-dev** - Guidelines might document known gotchas
|
|
248
|
+
**[2/6] /trellis:before-backend-dev** - Guidelines might document known gotchas
|
|
249
249
|
**[3/6] Investigation** - Actual debugging work
|
|
250
|
-
**[4/6] /trellis:check** - Verify debug changes
|
|
250
|
+
**[4/6] /trellis:check-backend** - Verify debug changes don't break other things
|
|
251
251
|
**[5/6] /trellis:finish-work** - Debug findings might need documentation
|
|
252
252
|
**[6/6] Human commits, then /trellis:record-session** - Debug knowledge is valuable
|
|
253
253
|
|
|
@@ -256,7 +256,7 @@ All the context AI built during this session will be lost when session ends. The
|
|
|
256
256
|
## KEY RULES TO EMPHASIZE
|
|
257
257
|
|
|
258
258
|
1. **AI NEVER commits** - Human tests and approves. AI prepares, human validates.
|
|
259
|
-
2. **Guidelines before code** - /before
|
|
259
|
+
2. **Guidelines before code** - /before-*-dev commands inject project knowledge.
|
|
260
260
|
3. **Check after code** - /check-* commands catch context drift.
|
|
261
261
|
4. **Record everything** - /trellis:record-session persists memory.
|
|
262
262
|
|
|
@@ -41,7 +41,8 @@ python3 ./.trellis/scripts/get_context.py
|
|
|
41
41
|
### Step 3: Read Project Guidelines `[AI]`
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
|
|
44
|
+
cat .trellis/spec/frontend/index.md # Frontend guidelines index
|
|
45
|
+
cat .trellis/spec/backend/index.md # Backend guidelines index
|
|
45
46
|
cat .trellis/spec/guides/index.md # Thinking guides
|
|
46
47
|
```
|
|
47
48
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[!] **Prerequisite**: This command should only be used AFTER the human has tested and committed the code.
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Do NOT run `git commit` directly** — the scripts below handle their own commits for `.trellis/` metadata. You only need to read git history (`git log`, `git status`, `git diff`) and run the Python scripts.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@ python3 ./.trellis/scripts/add_session.py \
|
|
|
31
31
|
--summary "Brief summary of what was done"
|
|
32
32
|
|
|
33
33
|
# Method 2: Pass detailed content via stdin
|
|
34
|
-
cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --
|
|
34
|
+
cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash"
|
|
35
35
|
| Feature | Description |
|
|
36
36
|
|---------|-------------|
|
|
37
37
|
| New API | Added user authentication endpoint |
|
|
@@ -40,14 +40,10 @@ This shows: developer identity, git status, current task (if any), active tasks.
|
|
|
40
40
|
### Step 3: Read Guidelines Index
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
cat .trellis/spec/<package>/<layer>/index.md # Package-specific guidelines
|
|
50
|
-
cat .trellis/spec/guides/index.md # Thinking guides (always read)
|
|
43
|
+
cat .trellis/spec/frontend/index.md # Frontend guidelines
|
|
44
|
+
cat .trellis/spec/backend/index.md # Backend guidelines
|
|
45
|
+
cat .trellis/spec/guides/index.md # Thinking guides
|
|
46
|
+
cat .trellis/spec/unit-test/index.md # Testing guidelines
|
|
51
47
|
```
|
|
52
48
|
|
|
53
49
|
> **Important**: The index files are navigation — they list the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`).
|
|
@@ -339,7 +339,8 @@ def get_check_context(repo_root: str, task_dir: str) -> str:
|
|
|
339
339
|
check_files = [
|
|
340
340
|
(".iflow/commands/trellis/finish-work.md", "Finish work checklist"),
|
|
341
341
|
(".iflow/commands/trellis/check-cross-layer.md", "Cross-layer check spec"),
|
|
342
|
-
(".iflow/commands/trellis/check.md", "
|
|
342
|
+
(".iflow/commands/trellis/check-backend.md", "Backend check spec"),
|
|
343
|
+
(".iflow/commands/trellis/check-frontend.md", "Frontend check spec"),
|
|
343
344
|
]
|
|
344
345
|
for file_path, description in check_files:
|
|
345
346
|
content = read_file_content(repo_root, file_path)
|
|
@@ -431,7 +432,8 @@ def get_debug_context(repo_root: str, task_dir: str) -> str:
|
|
|
431
432
|
context_parts.append(f"=== {file_path} (Dev spec) ===\n{content}")
|
|
432
433
|
|
|
433
434
|
check_files = [
|
|
434
|
-
(".iflow/commands/trellis/check.md", "
|
|
435
|
+
(".iflow/commands/trellis/check-backend.md", "Backend check spec"),
|
|
436
|
+
(".iflow/commands/trellis/check-frontend.md", "Frontend check spec"),
|
|
435
437
|
(".iflow/commands/trellis/check-cross-layer.md", "Cross-layer check spec"),
|
|
436
438
|
]
|
|
437
439
|
for file_path, description in check_files:
|
|
@@ -601,34 +603,24 @@ def get_research_context(repo_root: str, task_dir: str | None) -> str:
|
|
|
601
603
|
"""
|
|
602
604
|
context_parts = []
|
|
603
605
|
|
|
604
|
-
# 1. Project structure overview (
|
|
606
|
+
# 1. Project structure overview (uses constants for paths)
|
|
605
607
|
spec_path = f"{DIR_WORKFLOW}/{DIR_SPEC}"
|
|
606
|
-
spec_root = Path(repo_root) / DIR_WORKFLOW / DIR_SPEC
|
|
607
|
-
|
|
608
|
-
# Build spec tree dynamically
|
|
609
|
-
tree_lines = [f"{spec_path}/"]
|
|
610
|
-
if spec_root.is_dir():
|
|
611
|
-
pkg_dirs = sorted(d for d in spec_root.iterdir() if d.is_dir())
|
|
612
|
-
for i, pkg_dir in enumerate(pkg_dirs):
|
|
613
|
-
is_last = i == len(pkg_dirs) - 1
|
|
614
|
-
prefix = "└── " if is_last else "├── "
|
|
615
|
-
layers = sorted(d.name for d in pkg_dir.iterdir() if d.is_dir())
|
|
616
|
-
layer_info = f" ({', '.join(layers)})" if layers else ""
|
|
617
|
-
tree_lines.append(f"{prefix}{pkg_dir.name}/{layer_info}")
|
|
618
|
-
|
|
619
|
-
spec_tree = "\n".join(tree_lines)
|
|
620
|
-
|
|
621
608
|
project_structure = f"""## Project Spec Directory Structure
|
|
622
609
|
|
|
623
610
|
```
|
|
624
|
-
{
|
|
625
|
-
|
|
611
|
+
{spec_path}/
|
|
612
|
+
├── shared/ # Cross-project common specs (TypeScript, code quality, git)
|
|
613
|
+
├── frontend/ # Frontend standards
|
|
614
|
+
├── backend/ # Backend standards
|
|
615
|
+
└── guides/ # Thinking guides (cross-layer, code reuse, etc.)
|
|
626
616
|
|
|
627
|
-
|
|
617
|
+
{DIR_WORKFLOW}/big-question/ # Known issues and pitfalls
|
|
618
|
+
```
|
|
628
619
|
|
|
629
620
|
## Search Tips
|
|
630
621
|
|
|
631
622
|
- Spec files: `{spec_path}/**/*.md`
|
|
623
|
+
- Known issues: `{DIR_WORKFLOW}/big-question/`
|
|
632
624
|
- Code search: Use Glob and Grep tools
|
|
633
625
|
- Tech solutions: Use mcp__exa__web_search_exa or mcp__exa__get_code_context_exa"""
|
|
634
626
|
|
|
@@ -120,140 +120,6 @@ def _get_task_status(trellis_dir: Path) -> str:
|
|
|
120
120
|
return f"Status: READY\nTask: {task_title}\nNext: Continue with implement or check"
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
def _load_trellis_config(trellis_dir: Path) -> tuple:
|
|
124
|
-
"""Load Trellis config for session-start decisions.
|
|
125
|
-
|
|
126
|
-
Returns:
|
|
127
|
-
(is_mono, packages_dict, spec_scope, task_pkg, default_pkg)
|
|
128
|
-
"""
|
|
129
|
-
scripts_dir = trellis_dir / "scripts"
|
|
130
|
-
if str(scripts_dir) not in sys.path:
|
|
131
|
-
sys.path.insert(0, str(scripts_dir))
|
|
132
|
-
|
|
133
|
-
try:
|
|
134
|
-
from common.config import get_default_package, get_packages, get_spec_scope, is_monorepo
|
|
135
|
-
from common.paths import get_current_task
|
|
136
|
-
|
|
137
|
-
repo_root = trellis_dir.parent
|
|
138
|
-
is_mono = is_monorepo(repo_root)
|
|
139
|
-
packages = get_packages(repo_root) or {}
|
|
140
|
-
scope = get_spec_scope(repo_root)
|
|
141
|
-
|
|
142
|
-
# Get active task's package
|
|
143
|
-
task_pkg = None
|
|
144
|
-
current = get_current_task(repo_root)
|
|
145
|
-
if current:
|
|
146
|
-
task_json = repo_root / current / "task.json"
|
|
147
|
-
if task_json.is_file():
|
|
148
|
-
try:
|
|
149
|
-
data = json.loads(task_json.read_text(encoding="utf-8"))
|
|
150
|
-
if isinstance(data, dict):
|
|
151
|
-
tp = data.get("package")
|
|
152
|
-
if isinstance(tp, str) and tp:
|
|
153
|
-
task_pkg = tp
|
|
154
|
-
except (json.JSONDecodeError, OSError):
|
|
155
|
-
pass
|
|
156
|
-
|
|
157
|
-
default_pkg = get_default_package(repo_root)
|
|
158
|
-
return is_mono, packages, scope, task_pkg, default_pkg
|
|
159
|
-
except Exception:
|
|
160
|
-
return False, {}, None, None, None
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
def _check_legacy_spec(trellis_dir: Path, is_mono: bool, packages: dict) -> str | None:
|
|
164
|
-
"""Check for legacy spec directory structure in monorepo."""
|
|
165
|
-
if not is_mono or not packages:
|
|
166
|
-
return None
|
|
167
|
-
|
|
168
|
-
spec_dir = trellis_dir / "spec"
|
|
169
|
-
if not spec_dir.is_dir():
|
|
170
|
-
return None
|
|
171
|
-
|
|
172
|
-
has_legacy = False
|
|
173
|
-
for legacy_name in ("backend", "frontend"):
|
|
174
|
-
legacy_dir = spec_dir / legacy_name
|
|
175
|
-
if legacy_dir.is_dir() and (legacy_dir / "index.md").is_file():
|
|
176
|
-
has_legacy = True
|
|
177
|
-
break
|
|
178
|
-
|
|
179
|
-
if not has_legacy:
|
|
180
|
-
return None
|
|
181
|
-
|
|
182
|
-
missing = [
|
|
183
|
-
name for name in sorted(packages.keys())
|
|
184
|
-
if not (spec_dir / name).is_dir()
|
|
185
|
-
]
|
|
186
|
-
|
|
187
|
-
if not missing:
|
|
188
|
-
return None
|
|
189
|
-
|
|
190
|
-
if len(missing) == len(packages):
|
|
191
|
-
return (
|
|
192
|
-
f"[!] Legacy spec structure detected: found `spec/backend/` or `spec/frontend/` "
|
|
193
|
-
f"but no package-scoped `spec/<package>/` directories.\n"
|
|
194
|
-
f"Monorepo packages: {', '.join(sorted(packages.keys()))}\n"
|
|
195
|
-
f"Please reorganize: `spec/backend/` -> `spec/<package>/backend/`"
|
|
196
|
-
)
|
|
197
|
-
return (
|
|
198
|
-
f"[!] Partial spec migration detected: packages {', '.join(missing)} "
|
|
199
|
-
f"still missing `spec/<pkg>/` directory.\n"
|
|
200
|
-
f"Please complete migration for all packages."
|
|
201
|
-
)
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
def _resolve_spec_scope(
|
|
205
|
-
is_mono: bool,
|
|
206
|
-
packages: dict,
|
|
207
|
-
scope,
|
|
208
|
-
task_pkg: str | None,
|
|
209
|
-
default_pkg: str | None,
|
|
210
|
-
) -> set | None:
|
|
211
|
-
"""Resolve which packages should have their specs injected."""
|
|
212
|
-
if not is_mono or not packages:
|
|
213
|
-
return None
|
|
214
|
-
|
|
215
|
-
if scope is None:
|
|
216
|
-
return None
|
|
217
|
-
|
|
218
|
-
if isinstance(scope, str) and scope == "active_task":
|
|
219
|
-
if task_pkg and task_pkg in packages:
|
|
220
|
-
return {task_pkg}
|
|
221
|
-
if default_pkg and default_pkg in packages:
|
|
222
|
-
return {default_pkg}
|
|
223
|
-
return None
|
|
224
|
-
|
|
225
|
-
if isinstance(scope, list):
|
|
226
|
-
valid = set()
|
|
227
|
-
for entry in scope:
|
|
228
|
-
if entry in packages:
|
|
229
|
-
valid.add(entry)
|
|
230
|
-
else:
|
|
231
|
-
print(
|
|
232
|
-
f"Warning: spec_scope contains unknown package: {entry}, ignoring",
|
|
233
|
-
file=sys.stderr,
|
|
234
|
-
)
|
|
235
|
-
|
|
236
|
-
if valid:
|
|
237
|
-
if task_pkg and task_pkg not in valid:
|
|
238
|
-
print(
|
|
239
|
-
f"Warning: active task package '{task_pkg}' is out of configured spec_scope",
|
|
240
|
-
file=sys.stderr,
|
|
241
|
-
)
|
|
242
|
-
return valid
|
|
243
|
-
|
|
244
|
-
print(
|
|
245
|
-
"Warning: all spec_scope entries invalid, falling back to task/default/full",
|
|
246
|
-
file=sys.stderr,
|
|
247
|
-
)
|
|
248
|
-
if task_pkg and task_pkg in packages:
|
|
249
|
-
return {task_pkg}
|
|
250
|
-
if default_pkg and default_pkg in packages:
|
|
251
|
-
return {default_pkg}
|
|
252
|
-
return None
|
|
253
|
-
|
|
254
|
-
return None
|
|
255
|
-
|
|
256
|
-
|
|
257
123
|
def main():
|
|
258
124
|
if should_skip_injection():
|
|
259
125
|
sys.exit(0)
|
|
@@ -263,10 +129,6 @@ def main():
|
|
|
263
129
|
trellis_dir = project_dir / ".trellis"
|
|
264
130
|
iflow_dir = project_dir / ".iflow"
|
|
265
131
|
|
|
266
|
-
# Load config for scope filtering and legacy detection
|
|
267
|
-
is_mono, packages, scope_config, task_pkg, default_pkg = _load_trellis_config(trellis_dir)
|
|
268
|
-
allowed_pkgs = _resolve_spec_scope(is_mono, packages, scope_config, task_pkg, default_pkg)
|
|
269
|
-
|
|
270
132
|
output = StringIO()
|
|
271
133
|
|
|
272
134
|
output.write("""<session-context>
|
|
@@ -276,11 +138,6 @@ Read and follow all instructions below carefully.
|
|
|
276
138
|
|
|
277
139
|
""")
|
|
278
140
|
|
|
279
|
-
# Legacy migration warning
|
|
280
|
-
legacy_warning = _check_legacy_spec(trellis_dir, is_mono, packages)
|
|
281
|
-
if legacy_warning:
|
|
282
|
-
output.write(f"<migration-warning>\n{legacy_warning}\n</migration-warning>\n\n")
|
|
283
|
-
|
|
284
141
|
output.write("<current-state>\n")
|
|
285
142
|
context_script = trellis_dir / "scripts" / "get_context.py"
|
|
286
143
|
output.write(run_script(context_script))
|
|
@@ -300,25 +157,13 @@ Read and follow all instructions below carefully.
|
|
|
300
157
|
for sub in sorted(spec_dir.iterdir()):
|
|
301
158
|
if not sub.is_dir() or sub.name.startswith("."):
|
|
302
159
|
continue
|
|
303
|
-
|
|
304
|
-
# Always include guides/ regardless of scope
|
|
305
|
-
if sub.name == "guides":
|
|
306
|
-
index_file = sub / "index.md"
|
|
307
|
-
if index_file.is_file():
|
|
308
|
-
output.write(f"## {sub.name}\n")
|
|
309
|
-
output.write(read_file(index_file))
|
|
310
|
-
output.write("\n\n")
|
|
311
|
-
continue
|
|
312
|
-
|
|
313
160
|
index_file = sub / "index.md"
|
|
314
161
|
if index_file.is_file():
|
|
315
162
|
output.write(f"## {sub.name}\n")
|
|
316
163
|
output.write(read_file(index_file))
|
|
317
164
|
output.write("\n\n")
|
|
318
165
|
else:
|
|
319
|
-
#
|
|
320
|
-
if allowed_pkgs is not None and sub.name not in allowed_pkgs:
|
|
321
|
-
continue
|
|
166
|
+
# Check for nested package dirs (monorepo: spec/<pkg>/<layer>/index.md)
|
|
322
167
|
for nested in sorted(sub.iterdir()):
|
|
323
168
|
if not nested.is_dir():
|
|
324
169
|
continue
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Read the backend development guidelines before starting your development task.
|
|
2
|
+
|
|
3
|
+
Execute these steps:
|
|
4
|
+
1. Read `.trellis/spec/backend/index.md` to understand available guidelines
|
|
5
|
+
2. Based on your task, read the relevant guideline files:
|
|
6
|
+
- Database work → `.trellis/spec/backend/database-guidelines.md`
|
|
7
|
+
- Error handling → `.trellis/spec/backend/error-handling.md`
|
|
8
|
+
- Logging → `.trellis/spec/backend/logging-guidelines.md`
|
|
9
|
+
- Type questions → `.trellis/spec/backend/type-safety.md`
|
|
10
|
+
3. Understand the coding standards and patterns you need to follow
|
|
11
|
+
4. Then proceed with your development plan
|
|
12
|
+
|
|
13
|
+
This step is **mandatory** before writing any backend code.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Read the frontend development guidelines before starting your development task.
|
|
2
|
+
|
|
3
|
+
Execute these steps:
|
|
4
|
+
1. Read `.trellis/spec/frontend/index.md` to understand available guidelines
|
|
5
|
+
2. Based on your task, read the relevant guideline files:
|
|
6
|
+
- Component work → `.trellis/spec/frontend/component-guidelines.md`
|
|
7
|
+
- Hook work → `.trellis/spec/frontend/hook-guidelines.md`
|
|
8
|
+
- State management → `.trellis/spec/frontend/state-management.md`
|
|
9
|
+
- Type questions → `.trellis/spec/frontend/type-safety.md`
|
|
10
|
+
3. Understand the coding standards and patterns you need to follow
|
|
11
|
+
4. Then proceed with your development plan
|
|
12
|
+
|
|
13
|
+
This step is **mandatory** before writing any frontend code.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Check if the code you just wrote follows the backend development guidelines.
|
|
2
|
+
|
|
3
|
+
Execute these steps:
|
|
4
|
+
1. Run `git status` to see modified files
|
|
5
|
+
2. Read `.trellis/spec/backend/index.md` to understand which guidelines apply
|
|
6
|
+
3. Based on what you changed, read the relevant guideline files:
|
|
7
|
+
- Database changes → `.trellis/spec/backend/database-guidelines.md`
|
|
8
|
+
- Error handling → `.trellis/spec/backend/error-handling.md`
|
|
9
|
+
- Logging changes → `.trellis/spec/backend/logging-guidelines.md`
|
|
10
|
+
- Type changes → `.trellis/spec/backend/type-safety.md`
|
|
11
|
+
- Any changes → `.trellis/spec/backend/quality-guidelines.md`
|
|
12
|
+
4. Review your code against the guidelines
|
|
13
|
+
5. Report any violations and fix them if found
|