@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
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Cross-Layer Check
|
|
2
|
+
|
|
3
|
+
Check if your changes considered all dimensions. Most bugs come from "didn't think of it", not lack of technical skill.
|
|
4
|
+
|
|
5
|
+
> **Note**: This is a **post-implementation** safety net. Ideally, read the [Pre-Implementation Checklist](.trellis/spec/guides/pre-implementation-checklist.md) **before** writing code.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Related Documents
|
|
10
|
+
|
|
11
|
+
| Document | Purpose | Timing |
|
|
12
|
+
|----------|---------|--------|
|
|
13
|
+
| [Pre-Implementation Checklist](.trellis/spec/guides/pre-implementation-checklist.md) | Questions before coding | **Before** writing code |
|
|
14
|
+
| [Code Reuse Thinking Guide](.trellis/spec/guides/code-reuse-thinking-guide.md) | Pattern recognition | During implementation |
|
|
15
|
+
| **`/trellis:check-cross-layer`** (this) | Verification check | **After** implementation |
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Execution Steps
|
|
20
|
+
|
|
21
|
+
### 1. Identify Change Scope
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
git status
|
|
25
|
+
git diff --name-only
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 2. Select Applicable Check Dimensions
|
|
29
|
+
|
|
30
|
+
Based on your change type, execute relevant checks below:
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Dimension A: Cross-Layer Data Flow (Required when 3+ layers)
|
|
35
|
+
|
|
36
|
+
**Trigger**: Changes involve 3 or more layers
|
|
37
|
+
|
|
38
|
+
| Layer | Common Locations |
|
|
39
|
+
|-------|------------------|
|
|
40
|
+
| API/Routes | `routes/`, `api/`, `handlers/`, `controllers/` |
|
|
41
|
+
| Service/Business Logic | `services/`, `lib/`, `core/`, `domain/` |
|
|
42
|
+
| Database/Storage | `db/`, `models/`, `repositories/`, `schema/` |
|
|
43
|
+
| UI/Presentation | `components/`, `views/`, `templates/`, `pages/` |
|
|
44
|
+
| Utility | `utils/`, `helpers/`, `common/` |
|
|
45
|
+
|
|
46
|
+
**Checklist**:
|
|
47
|
+
- [ ] Read flow: Database -> Service -> API -> UI
|
|
48
|
+
- [ ] Write flow: UI -> API -> Service -> Database
|
|
49
|
+
- [ ] Types/schemas correctly passed between layers?
|
|
50
|
+
- [ ] Errors properly propagated to caller?
|
|
51
|
+
- [ ] Loading/pending states handled at each layer?
|
|
52
|
+
|
|
53
|
+
**Detailed Guide**: `.trellis/spec/guides/cross-layer-thinking-guide.md`
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Dimension B: Code Reuse (Required when modifying constants/config)
|
|
58
|
+
|
|
59
|
+
**Trigger**:
|
|
60
|
+
- Modifying UI constants (label, icon, color)
|
|
61
|
+
- Modifying any hardcoded value
|
|
62
|
+
- Seeing similar code in multiple places
|
|
63
|
+
- Creating a new utility/helper function
|
|
64
|
+
- Just finished batch modifications across files
|
|
65
|
+
|
|
66
|
+
**Checklist**:
|
|
67
|
+
- [ ] Search first: How many places define this value?
|
|
68
|
+
```bash
|
|
69
|
+
# Search in source files (adjust extensions for your project)
|
|
70
|
+
grep -r "value-to-change" src/
|
|
71
|
+
```
|
|
72
|
+
- [ ] If 2+ places define same value -> Should extract to shared constant
|
|
73
|
+
- [ ] After modification, all usage sites updated?
|
|
74
|
+
- [ ] If creating utility: Does similar utility already exist?
|
|
75
|
+
|
|
76
|
+
**Detailed Guide**: `.trellis/spec/guides/code-reuse-thinking-guide.md`
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Dimension B2: New Utility Functions
|
|
81
|
+
|
|
82
|
+
**Trigger**: About to create a new utility/helper function
|
|
83
|
+
|
|
84
|
+
**Checklist**:
|
|
85
|
+
- [ ] Search for existing similar utilities first
|
|
86
|
+
```bash
|
|
87
|
+
grep -r "functionNamePattern" src/
|
|
88
|
+
```
|
|
89
|
+
- [ ] If similar exists, can you extend it instead?
|
|
90
|
+
- [ ] If creating new, is it in the right location (shared vs domain-specific)?
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Dimension B3: After Batch Modifications
|
|
95
|
+
|
|
96
|
+
**Trigger**: Just modified similar patterns in multiple files
|
|
97
|
+
|
|
98
|
+
**Checklist**:
|
|
99
|
+
- [ ] Did you check ALL files with similar patterns?
|
|
100
|
+
```bash
|
|
101
|
+
grep -r "patternYouChanged" src/
|
|
102
|
+
```
|
|
103
|
+
- [ ] Any files missed that should also be updated?
|
|
104
|
+
- [ ] Should this pattern be abstracted to prevent future duplication?
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Dimension C: Import/Dependency Paths (Required when creating new files)
|
|
109
|
+
|
|
110
|
+
**Trigger**: Creating new source files
|
|
111
|
+
|
|
112
|
+
**Checklist**:
|
|
113
|
+
- [ ] Using correct import paths (relative vs absolute)?
|
|
114
|
+
- [ ] No circular dependencies?
|
|
115
|
+
- [ ] Consistent with project's module organization?
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Dimension D: Same-Layer Consistency
|
|
120
|
+
|
|
121
|
+
**Trigger**:
|
|
122
|
+
- Modifying display logic or formatting
|
|
123
|
+
- Same domain concept used in multiple places
|
|
124
|
+
|
|
125
|
+
**Checklist**:
|
|
126
|
+
- [ ] Search for other places using same concept
|
|
127
|
+
```bash
|
|
128
|
+
grep -r "ConceptName" src/
|
|
129
|
+
```
|
|
130
|
+
- [ ] Are these usages consistent?
|
|
131
|
+
- [ ] Should they share configuration/constants?
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Common Issues Quick Reference
|
|
136
|
+
|
|
137
|
+
| Issue | Root Cause | Prevention |
|
|
138
|
+
|-------|------------|------------|
|
|
139
|
+
| Changed one place, missed others | Didn't search impact scope | `grep` before changing |
|
|
140
|
+
| Data lost at some layer | Didn't check data flow | Trace data source to destination |
|
|
141
|
+
| Type/schema mismatch | Cross-layer types inconsistent | Use shared type definitions |
|
|
142
|
+
| UI/output inconsistent | Same concept in multiple places | Extract shared constants |
|
|
143
|
+
| Similar utility exists | Didn't search first | Search before creating |
|
|
144
|
+
| Batch fix incomplete | Didn't verify all occurrences | grep after fixing |
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Output
|
|
149
|
+
|
|
150
|
+
Report:
|
|
151
|
+
1. Which dimensions your changes involve
|
|
152
|
+
2. Check results for each dimension
|
|
153
|
+
3. Issues found and fix suggestions
|
|
@@ -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
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Create New Slash Command
|
|
2
|
+
|
|
3
|
+
Create a new slash command in both `.cursor/commands/` (with `trellis-` prefix) and `.claude/commands/trellis/` directories based on user requirements.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/trellis:create-command <command-name> <description>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Example**:
|
|
12
|
+
```
|
|
13
|
+
/trellis:create-command review-pr Check PR code changes against project guidelines
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Execution Steps
|
|
17
|
+
|
|
18
|
+
### 1. Parse Input
|
|
19
|
+
|
|
20
|
+
Extract from user input:
|
|
21
|
+
- **Command name**: Use kebab-case (e.g., `review-pr`)
|
|
22
|
+
- **Description**: What the command should accomplish
|
|
23
|
+
|
|
24
|
+
### 2. Analyze Requirements
|
|
25
|
+
|
|
26
|
+
Determine command type based on description:
|
|
27
|
+
- **Initialization**: Read docs, establish context
|
|
28
|
+
- **Pre-development**: Read guidelines, check dependencies
|
|
29
|
+
- **Code check**: Validate code quality and guideline compliance
|
|
30
|
+
- **Recording**: Record progress, questions, structure changes
|
|
31
|
+
- **Generation**: Generate docs, code templates
|
|
32
|
+
|
|
33
|
+
### 3. Generate Command Content
|
|
34
|
+
|
|
35
|
+
Based on command type, generate appropriate content:
|
|
36
|
+
|
|
37
|
+
**Simple command** (1-3 lines):
|
|
38
|
+
```markdown
|
|
39
|
+
Concise instruction describing what to do
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Complex command** (with steps):
|
|
43
|
+
```markdown
|
|
44
|
+
# Command Title
|
|
45
|
+
|
|
46
|
+
Command description
|
|
47
|
+
|
|
48
|
+
## Steps
|
|
49
|
+
|
|
50
|
+
### 1. First Step
|
|
51
|
+
Specific action
|
|
52
|
+
|
|
53
|
+
### 2. Second Step
|
|
54
|
+
Specific action
|
|
55
|
+
|
|
56
|
+
## Output Format (if needed)
|
|
57
|
+
|
|
58
|
+
Template
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 4. Create Files
|
|
62
|
+
|
|
63
|
+
Create in both directories:
|
|
64
|
+
- `.cursor/commands/trellis-<command-name>.md`
|
|
65
|
+
- `.claude/commands/trellis/<command-name>.md`
|
|
66
|
+
|
|
67
|
+
### 5. Confirm Creation
|
|
68
|
+
|
|
69
|
+
Output result:
|
|
70
|
+
```
|
|
71
|
+
[OK] Created Slash Command: /<command-name>
|
|
72
|
+
|
|
73
|
+
File paths:
|
|
74
|
+
- .cursor/commands/trellis-<command-name>.md
|
|
75
|
+
- .claude/commands/trellis/<command-name>.md
|
|
76
|
+
|
|
77
|
+
Usage:
|
|
78
|
+
/trellis:<command-name>
|
|
79
|
+
|
|
80
|
+
Description:
|
|
81
|
+
<description>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Command Content Guidelines
|
|
85
|
+
|
|
86
|
+
### [OK] Good command content
|
|
87
|
+
|
|
88
|
+
1. **Clear and concise**: Immediately understandable
|
|
89
|
+
2. **Executable**: AI can follow steps directly
|
|
90
|
+
3. **Well-scoped**: Clear boundaries of what to do and not do
|
|
91
|
+
4. **Has output**: Specifies expected output format (if needed)
|
|
92
|
+
|
|
93
|
+
### [X] Avoid
|
|
94
|
+
|
|
95
|
+
1. **Too vague**: e.g., "optimize code"
|
|
96
|
+
2. **Too complex**: Single command should not exceed 100 lines
|
|
97
|
+
3. **Duplicate functionality**: Check if similar command exists first
|
|
98
|
+
|
|
99
|
+
## Naming Conventions
|
|
100
|
+
|
|
101
|
+
| Command Type | Prefix | Example |
|
|
102
|
+
|--------------|--------|---------|
|
|
103
|
+
| Session Start | `start` | `start` |
|
|
104
|
+
| Pre-development | `before-` | `before-frontend-dev` |
|
|
105
|
+
| Check | `check-` | `check-frontend` |
|
|
106
|
+
| Record | `record-` | `record-session` |
|
|
107
|
+
| Generate | `generate-` | `generate-api-doc` |
|
|
108
|
+
| Update | `update-` | `update-changelog` |
|
|
109
|
+
| Other | Verb-first | `review-code`, `sync-data` |
|
|
110
|
+
|
|
111
|
+
## Example
|
|
112
|
+
|
|
113
|
+
### Input
|
|
114
|
+
```
|
|
115
|
+
/trellis:create-command review-pr Check PR code changes against project guidelines
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Generated Command Content
|
|
119
|
+
```markdown
|
|
120
|
+
# PR Code Review
|
|
121
|
+
|
|
122
|
+
Check current PR code changes against project guidelines.
|
|
123
|
+
|
|
124
|
+
## Steps
|
|
125
|
+
|
|
126
|
+
### 1. Get Changed Files
|
|
127
|
+
```bash
|
|
128
|
+
git diff main...HEAD --name-only
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### 2. Categorized Review
|
|
132
|
+
|
|
133
|
+
**Frontend files** (`apps/web/`):
|
|
134
|
+
- Reference `.trellis/spec/frontend/index.md`
|
|
135
|
+
|
|
136
|
+
**Backend files** (`packages/api/`):
|
|
137
|
+
- Reference `.trellis/spec/backend/index.md`
|
|
138
|
+
|
|
139
|
+
### 3. Output Review Report
|
|
140
|
+
|
|
141
|
+
Format:
|
|
142
|
+
|
|
143
|
+
## PR Review Report
|
|
144
|
+
|
|
145
|
+
### Changed Files
|
|
146
|
+
- [file list]
|
|
147
|
+
|
|
148
|
+
### Check Results
|
|
149
|
+
- [OK] Passed items
|
|
150
|
+
- [X] Issues found
|
|
151
|
+
|
|
152
|
+
### Suggestions
|
|
153
|
+
- [improvement suggestions]
|
|
154
|
+
```
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Finish Work - Pre-Commit Checklist
|
|
2
|
+
|
|
3
|
+
Before submitting or committing, use this checklist to ensure work completeness.
|
|
4
|
+
|
|
5
|
+
**Timing**: After code is written and tested, before commit
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Checklist
|
|
10
|
+
|
|
11
|
+
### 1. Code Quality
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Must pass
|
|
15
|
+
pnpm lint
|
|
16
|
+
pnpm type-check
|
|
17
|
+
pnpm test
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- [ ] `pnpm lint` passes with 0 errors?
|
|
21
|
+
- [ ] `pnpm type-check` passes with no type errors?
|
|
22
|
+
- [ ] Tests pass?
|
|
23
|
+
- [ ] No `console.log` statements (use logger)?
|
|
24
|
+
- [ ] No non-null assertions (the `x!` operator)?
|
|
25
|
+
- [ ] No `any` types?
|
|
26
|
+
|
|
27
|
+
### 2. Documentation Sync
|
|
28
|
+
|
|
29
|
+
**Structure Docs**:
|
|
30
|
+
- [ ] Does `.trellis/spec/backend/` need updates?
|
|
31
|
+
- New patterns, new modules, new conventions
|
|
32
|
+
- [ ] Does `.trellis/spec/frontend/` need updates?
|
|
33
|
+
- New components, new hooks, new patterns
|
|
34
|
+
- [ ] Does `.trellis/spec/guides/` need updates?
|
|
35
|
+
- New cross-layer flows, lessons from bugs
|
|
36
|
+
|
|
37
|
+
**Key Question**:
|
|
38
|
+
> "If I fixed a bug or discovered something non-obvious, should I document it so future me (or others) won't hit the same issue?"
|
|
39
|
+
|
|
40
|
+
If YES -> Update the relevant spec doc.
|
|
41
|
+
|
|
42
|
+
### 3. API Changes
|
|
43
|
+
|
|
44
|
+
If you modified API endpoints:
|
|
45
|
+
|
|
46
|
+
- [ ] Input schema updated?
|
|
47
|
+
- [ ] Output schema updated?
|
|
48
|
+
- [ ] API documentation updated?
|
|
49
|
+
- [ ] Client code updated to match?
|
|
50
|
+
|
|
51
|
+
### 4. Database Changes
|
|
52
|
+
|
|
53
|
+
If you modified database schema:
|
|
54
|
+
|
|
55
|
+
- [ ] Migration file created?
|
|
56
|
+
- [ ] Schema file updated?
|
|
57
|
+
- [ ] Related queries updated?
|
|
58
|
+
- [ ] Seed data updated (if applicable)?
|
|
59
|
+
|
|
60
|
+
### 5. Cross-Layer Verification
|
|
61
|
+
|
|
62
|
+
If the change spans multiple layers:
|
|
63
|
+
|
|
64
|
+
- [ ] Data flows correctly through all layers?
|
|
65
|
+
- [ ] Error handling works at each boundary?
|
|
66
|
+
- [ ] Types are consistent across layers?
|
|
67
|
+
- [ ] Loading states handled?
|
|
68
|
+
|
|
69
|
+
### 6. Manual Testing
|
|
70
|
+
|
|
71
|
+
- [ ] Feature works in browser/app?
|
|
72
|
+
- [ ] Edge cases tested?
|
|
73
|
+
- [ ] Error states tested?
|
|
74
|
+
- [ ] Works after page refresh?
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Quick Check Flow
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# 1. Code checks
|
|
82
|
+
pnpm lint && pnpm type-check
|
|
83
|
+
|
|
84
|
+
# 2. View changes
|
|
85
|
+
git status
|
|
86
|
+
git diff --name-only
|
|
87
|
+
|
|
88
|
+
# 3. Based on changed files, check relevant items above
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Common Oversights
|
|
94
|
+
|
|
95
|
+
| Oversight | Consequence | Check |
|
|
96
|
+
|-----------|-------------|-------|
|
|
97
|
+
| Structure docs not updated | Others don't know the change | Check .trellis/spec/ |
|
|
98
|
+
| Migration not created | Schema out of sync | Check db/migrations/ |
|
|
99
|
+
| Types not synced | Runtime errors | Check shared types |
|
|
100
|
+
| Tests not updated | False confidence | Run full test suite |
|
|
101
|
+
| Console.log left in | Noisy production logs | Search for console.log |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Relationship to Other Commands
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Development Flow:
|
|
109
|
+
Write code -> Test -> /trellis:finish-work -> git commit -> /trellis:record-session
|
|
110
|
+
| |
|
|
111
|
+
Ensure completeness Record progress
|
|
112
|
+
|
|
113
|
+
Debug Flow:
|
|
114
|
+
Hit bug -> Fix -> /trellis:break-loop -> Knowledge capture
|
|
115
|
+
|
|
|
116
|
+
Deep analysis
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
- `/trellis:finish-work` - Check work completeness (this command)
|
|
120
|
+
- `/trellis:record-session` - Record session and commits
|
|
121
|
+
- `/trellis:break-loop` - Deep analysis after debugging
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Core Principle
|
|
126
|
+
|
|
127
|
+
> **Delivery includes not just code, but also documentation, verification, and knowledge capture.**
|
|
128
|
+
|
|
129
|
+
Complete work = Code + Docs + Tests + Verification
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# Integrate Claude Skill into Project Guidelines
|
|
2
|
+
|
|
3
|
+
Adapt and integrate a Claude global skill into your project's development guidelines (not directly into project code).
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/trellis:integrate-skill <skill-name>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Examples**:
|
|
12
|
+
```
|
|
13
|
+
/trellis:integrate-skill frontend-design
|
|
14
|
+
/trellis:integrate-skill mcp-builder
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Core Principle
|
|
18
|
+
|
|
19
|
+
> [!] **Important**: The goal of skill integration is to update **development guidelines**, not to generate project code directly.
|
|
20
|
+
>
|
|
21
|
+
> - Guidelines content -> Write to `.trellis/spec/{target}/doc.md`
|
|
22
|
+
> - Code examples -> Place in `.trellis/spec/{target}/examples/skills/<skill-name>/`
|
|
23
|
+
> - Example files -> Use `.template` suffix (e.g., `component.tsx.template`) to avoid IDE errors
|
|
24
|
+
>
|
|
25
|
+
> Where `{target}` is `frontend` or `backend`, determined by skill type.
|
|
26
|
+
|
|
27
|
+
## Execution Steps
|
|
28
|
+
|
|
29
|
+
### 1. Read Skill Content
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
openskills read <skill-name>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If the skill doesn't exist, prompt user to check available skills:
|
|
36
|
+
```bash
|
|
37
|
+
# Available skills are listed in AGENTS.md under <available_skills>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 2. Determine Integration Target
|
|
41
|
+
|
|
42
|
+
Based on skill type, determine which guidelines to update:
|
|
43
|
+
|
|
44
|
+
| Skill Category | Integration Target |
|
|
45
|
+
|----------------|-------------------|
|
|
46
|
+
| UI/Frontend (`frontend-design`, `web-artifacts-builder`) | `.trellis/spec/frontend/` |
|
|
47
|
+
| Backend/API (`mcp-builder`) | `.trellis/spec/backend/` |
|
|
48
|
+
| Documentation (`doc-coauthoring`, `docx`, `pdf`) | `.trellis/` or create dedicated guidelines |
|
|
49
|
+
| Testing (`webapp-testing`) | `.trellis/spec/frontend/` (E2E) |
|
|
50
|
+
|
|
51
|
+
### 3. Analyze Skill Content
|
|
52
|
+
|
|
53
|
+
Extract from the skill:
|
|
54
|
+
- **Core concepts**: How the skill works and key concepts
|
|
55
|
+
- **Best practices**: Recommended approaches
|
|
56
|
+
- **Code patterns**: Reusable code templates
|
|
57
|
+
- **Caveats**: Common issues and solutions
|
|
58
|
+
|
|
59
|
+
### 4. Execute Integration
|
|
60
|
+
|
|
61
|
+
#### 4.1 Update Guidelines Document
|
|
62
|
+
|
|
63
|
+
Add a new section to the corresponding `doc.md`:
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
@@@section:skill-<skill-name>
|
|
67
|
+
## # <Skill Name> Integration Guide
|
|
68
|
+
|
|
69
|
+
### Overview
|
|
70
|
+
[Core functionality and use cases of the skill]
|
|
71
|
+
|
|
72
|
+
### Project Adaptation
|
|
73
|
+
[How to use this skill in the current project]
|
|
74
|
+
|
|
75
|
+
### Usage Steps
|
|
76
|
+
1. [Step 1]
|
|
77
|
+
2. [Step 2]
|
|
78
|
+
|
|
79
|
+
### Caveats
|
|
80
|
+
- [Project-specific constraints]
|
|
81
|
+
- [Differences from default behavior]
|
|
82
|
+
|
|
83
|
+
### Reference Examples
|
|
84
|
+
See `examples/skills/<skill-name>/`
|
|
85
|
+
|
|
86
|
+
@@@/section:skill-<skill-name>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
#### 4.2 Create Examples Directory (if code examples exist)
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Directory structure ({target} = frontend or backend)
|
|
93
|
+
.trellis/spec/{target}/
|
|
94
|
+
|-- doc.md # Add skill-related section
|
|
95
|
+
|-- index.md # Update index
|
|
96
|
+
+-- examples/
|
|
97
|
+
+-- skills/
|
|
98
|
+
+-- <skill-name>/
|
|
99
|
+
|-- README.md # Example documentation
|
|
100
|
+
|-- example-1.ts.template # Code example (use .template suffix)
|
|
101
|
+
+-- example-2.tsx.template
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**File naming conventions**:
|
|
105
|
+
- Code files: `<name>.<ext>.template` (e.g., `component.tsx.template`)
|
|
106
|
+
- Config files: `<name>.config.template` (e.g., `tailwind.config.template`)
|
|
107
|
+
- Documentation: `README.md` (normal suffix)
|
|
108
|
+
|
|
109
|
+
#### 4.3 Update Index File
|
|
110
|
+
|
|
111
|
+
Add to the Quick Navigation table in `index.md`:
|
|
112
|
+
|
|
113
|
+
```markdown
|
|
114
|
+
| <Skill-related task> | <Section name> | `skill-<skill-name>` |
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 5. Generate Integration Report
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Skill Integration Report: `<skill-name>`
|
|
122
|
+
|
|
123
|
+
### # Overview
|
|
124
|
+
- **Skill description**: [Functionality description]
|
|
125
|
+
- **Integration target**: `.trellis/spec/{target}/`
|
|
126
|
+
|
|
127
|
+
### # Tech Stack Compatibility
|
|
128
|
+
|
|
129
|
+
| Skill Requirement | Project Status | Compatibility |
|
|
130
|
+
|-------------------|----------------|---------------|
|
|
131
|
+
| [Tech 1] | [Project tech] | [OK]/[!]/[X] |
|
|
132
|
+
|
|
133
|
+
### # Integration Locations
|
|
134
|
+
|
|
135
|
+
| Type | Path |
|
|
136
|
+
|------|------|
|
|
137
|
+
| Guidelines doc | `.trellis/spec/{target}/doc.md` (section: `skill-<name>`) |
|
|
138
|
+
| Code examples | `.trellis/spec/{target}/examples/skills/<name>/` |
|
|
139
|
+
| Index update | `.trellis/spec/{target}/index.md` |
|
|
140
|
+
|
|
141
|
+
> `{target}` = `frontend` or `backend`
|
|
142
|
+
|
|
143
|
+
### # Dependencies (if needed)
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Install required dependencies (adjust for your package manager)
|
|
147
|
+
npm install <package>
|
|
148
|
+
# or
|
|
149
|
+
pnpm add <package>
|
|
150
|
+
# or
|
|
151
|
+
yarn add <package>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### [OK] Completed Changes
|
|
155
|
+
|
|
156
|
+
- [ ] Added `@@@section:skill-<name>` section to `doc.md`
|
|
157
|
+
- [ ] Added index entry to `index.md`
|
|
158
|
+
- [ ] Created example files in `examples/skills/<name>/`
|
|
159
|
+
- [ ] Example files use `.template` suffix
|
|
160
|
+
|
|
161
|
+
### # Related Guidelines
|
|
162
|
+
|
|
163
|
+
- [Existing related section IDs]
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## 6. Optional: Create Usage Command
|
|
168
|
+
|
|
169
|
+
If this skill is frequently used, create a shortcut command:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
/trellis:create-command use-<skill-name> Use <skill-name> skill following project guidelines
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Common Skill Integration Reference
|
|
176
|
+
|
|
177
|
+
| Skill | Integration Target | Examples Directory |
|
|
178
|
+
|-------|-------------------|-------------------|
|
|
179
|
+
| `frontend-design` | `frontend` | `examples/skills/frontend-design/` |
|
|
180
|
+
| `mcp-builder` | `backend` | `examples/skills/mcp-builder/` |
|
|
181
|
+
| `webapp-testing` | `frontend` | `examples/skills/webapp-testing/` |
|
|
182
|
+
| `doc-coauthoring` | `.trellis/` | N/A (documentation workflow only) |
|
|
183
|
+
|
|
184
|
+
## Example: Integrating `mcp-builder` Skill
|
|
185
|
+
|
|
186
|
+
### Directory Structure
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
.trellis/spec/backend/
|
|
190
|
+
|-- doc.md # Add MCP section
|
|
191
|
+
|-- index.md # Add index entry
|
|
192
|
+
+-- examples/
|
|
193
|
+
+-- skills/
|
|
194
|
+
+-- mcp-builder/
|
|
195
|
+
|-- README.md
|
|
196
|
+
|-- server.ts.template
|
|
197
|
+
|-- tools.ts.template
|
|
198
|
+
+-- types.ts.template
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### New Section in doc.md
|
|
202
|
+
|
|
203
|
+
```markdown
|
|
204
|
+
@@@section:skill-mcp-builder
|
|
205
|
+
## # MCP Server Development Guide
|
|
206
|
+
|
|
207
|
+
### Overview
|
|
208
|
+
Create LLM-callable tool services using MCP (Model Context Protocol).
|
|
209
|
+
|
|
210
|
+
### Project Adaptation
|
|
211
|
+
- Place services in a dedicated directory
|
|
212
|
+
- Follow existing TypeScript and type definition conventions
|
|
213
|
+
- Use project's logging system
|
|
214
|
+
|
|
215
|
+
### Reference Examples
|
|
216
|
+
See `examples/skills/mcp-builder/`
|
|
217
|
+
|
|
218
|
+
@@@/section:skill-mcp-builder
|
|
219
|
+
```
|