@mindfoldhq/trellis 0.1.0
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 +110 -0
- package/README.md +149 -0
- package/bin/trellis.js +3 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +42 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/commands/init.d.ts +11 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +236 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/configurators/claude.d.ts +35 -0
- package/dist/configurators/claude.d.ts.map +1 -0
- package/dist/configurators/claude.js +83 -0
- package/dist/configurators/claude.js.map +1 -0
- package/dist/configurators/cursor.d.ts +8 -0
- package/dist/configurators/cursor.d.ts.map +1 -0
- package/dist/configurators/cursor.js +22 -0
- package/dist/configurators/cursor.js.map +1 -0
- package/dist/configurators/templates.d.ts +40 -0
- package/dist/configurators/templates.d.ts.map +1 -0
- package/dist/configurators/templates.js +67 -0
- package/dist/configurators/templates.js.map +1 -0
- package/dist/configurators/workflow.d.ts +16 -0
- package/dist/configurators/workflow.d.ts.map +1 -0
- package/dist/configurators/workflow.js +169 -0
- package/dist/configurators/workflow.js.map +1 -0
- package/dist/constants/paths.d.ts +69 -0
- package/dist/constants/paths.d.ts.map +1 -0
- package/dist/constants/paths.js +80 -0
- package/dist/constants/paths.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/templates/agents/check.txt +120 -0
- package/dist/templates/agents/debug.txt +121 -0
- package/dist/templates/agents/dispatch.txt +201 -0
- package/dist/templates/agents/implement.txt +114 -0
- package/dist/templates/agents/index.d.ts +35 -0
- package/dist/templates/agents/index.d.ts.map +1 -0
- package/dist/templates/agents/index.js +71 -0
- package/dist/templates/agents/index.js.map +1 -0
- package/dist/templates/agents/research.txt +258 -0
- package/dist/templates/commands/claude/start.md.txt +127 -0
- package/dist/templates/commands/common/before-backend-dev.txt +13 -0
- package/dist/templates/commands/common/before-frontend-dev.txt +13 -0
- package/dist/templates/commands/common/break-loop.txt +107 -0
- package/dist/templates/commands/common/check-backend.txt +13 -0
- package/dist/templates/commands/common/check-cross-layer.txt +153 -0
- package/dist/templates/commands/common/check-frontend.txt +13 -0
- package/dist/templates/commands/common/create-command.txt +154 -0
- package/dist/templates/commands/common/finish-work.txt +129 -0
- package/dist/templates/commands/common/integrate-skill.txt +219 -0
- package/dist/templates/commands/common/onboard-developer.txt +355 -0
- package/dist/templates/commands/common/record-agent-flow.txt +62 -0
- package/dist/templates/commands/cursor/start.md.txt +94 -0
- package/dist/templates/commands/index.d.ts +46 -0
- package/dist/templates/commands/index.d.ts.map +1 -0
- package/dist/templates/commands/index.js +151 -0
- package/dist/templates/commands/index.js.map +1 -0
- package/dist/templates/extract.d.ts +22 -0
- package/dist/templates/extract.d.ts.map +1 -0
- package/dist/templates/extract.js +34 -0
- package/dist/templates/extract.js.map +1 -0
- package/dist/templates/hooks/index.d.ts +33 -0
- package/dist/templates/hooks/index.d.ts.map +1 -0
- package/dist/templates/hooks/index.js +53 -0
- package/dist/templates/hooks/index.js.map +1 -0
- package/dist/templates/hooks/inject-subagent-context.py +620 -0
- package/dist/templates/hooks/settings.json +16 -0
- package/dist/templates/markdown/agent-traces-index.md.txt +124 -0
- package/dist/templates/markdown/agents.md.txt +18 -0
- package/dist/templates/markdown/gitignore.txt +3 -0
- package/dist/templates/markdown/index.d.ts +26 -0
- package/dist/templates/markdown/index.d.ts.map +1 -0
- package/dist/templates/markdown/index.js +33 -0
- package/dist/templates/markdown/index.js.map +1 -0
- package/dist/templates/markdown/init-agent.md.txt +315 -0
- package/dist/templates/markdown/structure/backend/database-guidelines.md.txt +51 -0
- package/dist/templates/markdown/structure/backend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/structure/backend/error-handling.md.txt +51 -0
- package/dist/templates/markdown/structure/backend/index.md.txt +38 -0
- package/dist/templates/markdown/structure/backend/logging-guidelines.md.txt +51 -0
- package/dist/templates/markdown/structure/backend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/structure/frontend/component-guidelines.md.txt +59 -0
- package/dist/templates/markdown/structure/frontend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/structure/frontend/hook-guidelines.md.txt +51 -0
- package/dist/templates/markdown/structure/frontend/index.md.txt +39 -0
- package/dist/templates/markdown/structure/frontend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/structure/frontend/state-management.md.txt +51 -0
- package/dist/templates/markdown/structure/frontend/type-safety.md.txt +51 -0
- package/dist/templates/markdown/structure/guides/code-reuse-thinking-guide.md.txt +92 -0
- package/dist/templates/markdown/structure/guides/cross-layer-thinking-guide.md.txt +94 -0
- package/dist/templates/markdown/structure/guides/index.md.txt +79 -0
- package/dist/templates/markdown/workflow.md.txt +335 -0
- package/dist/templates/scripts/add-session.sh.txt +384 -0
- package/dist/templates/scripts/common/developer.sh.txt +130 -0
- package/dist/templates/scripts/common/git-context.sh.txt +237 -0
- package/dist/templates/scripts/common/paths.sh.txt +201 -0
- package/dist/templates/scripts/create-bootstrap.sh.txt +298 -0
- package/dist/templates/scripts/feature.sh.txt +700 -0
- package/dist/templates/scripts/get-context.sh.txt +7 -0
- package/dist/templates/scripts/get-developer.sh.txt +15 -0
- package/dist/templates/scripts/index.d.ts +25 -0
- package/dist/templates/scripts/index.d.ts.map +1 -0
- package/dist/templates/scripts/index.js +28 -0
- package/dist/templates/scripts/index.js.map +1 -0
- package/dist/templates/scripts/init-developer.sh.txt +34 -0
- package/dist/types/ai-tools.d.ts +35 -0
- package/dist/types/ai-tools.d.ts.map +1 -0
- package/dist/types/ai-tools.js +31 -0
- package/dist/types/ai-tools.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 +186 -0
- package/dist/utils/project-detector.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Create New Slash Command
|
|
2
|
+
|
|
3
|
+
Create a new slash command in both `.cursor/commands/` and `.claude/commands/` directories based on user requirements.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/create-command <command-name> <description>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Example**:
|
|
12
|
+
```
|
|
13
|
+
/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/<command-name>.md`
|
|
65
|
+
- `.claude/commands/<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/<command-name>.md
|
|
75
|
+
- .claude/commands/<command-name>.md
|
|
76
|
+
|
|
77
|
+
Usage:
|
|
78
|
+
/<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-agent-flow` |
|
|
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
|
+
/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/structure/frontend/index.md`
|
|
135
|
+
|
|
136
|
+
**Backend files** (`packages/api/`):
|
|
137
|
+
- Reference `.trellis/structure/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 `!`?
|
|
25
|
+
- [ ] No `any` types?
|
|
26
|
+
|
|
27
|
+
### 2. Documentation Sync
|
|
28
|
+
|
|
29
|
+
**Structure Docs**:
|
|
30
|
+
- [ ] Does `.trellis/structure/backend/` need updates?
|
|
31
|
+
- New patterns, new modules, new conventions
|
|
32
|
+
- [ ] Does `.trellis/structure/frontend/` need updates?
|
|
33
|
+
- New components, new hooks, new patterns
|
|
34
|
+
- [ ] Does `.trellis/structure/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 structure 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/structure/ |
|
|
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 -> /finish-work -> git commit -> /record-agent-flow
|
|
110
|
+
| |
|
|
111
|
+
Ensure completeness Record progress
|
|
112
|
+
|
|
113
|
+
Debug Flow:
|
|
114
|
+
Hit bug -> Fix -> /break-loop -> Knowledge capture
|
|
115
|
+
|
|
|
116
|
+
Deep analysis
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
- `/finish-work` - Check work completeness (this command)
|
|
120
|
+
- `/record-agent-flow` - Record session and commits
|
|
121
|
+
- `/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
|
+
/integrate-skill <skill-name>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Examples**:
|
|
12
|
+
```
|
|
13
|
+
/integrate-skill frontend-design
|
|
14
|
+
/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/structure/{target}/doc.md`
|
|
22
|
+
> - Code examples -> Place in `.trellis/structure/{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/structure/frontend/` |
|
|
47
|
+
| Backend/API (`mcp-builder`) | `.trellis/structure/backend/` |
|
|
48
|
+
| Documentation (`doc-coauthoring`, `docx`, `pdf`) | `.trellis/` or create dedicated guidelines |
|
|
49
|
+
| Testing (`webapp-testing`) | `.trellis/structure/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/structure/{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/structure/{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/structure/{target}/doc.md` (section: `skill-<name>`) |
|
|
138
|
+
| Code examples | `.trellis/structure/{target}/examples/skills/<name>/` |
|
|
139
|
+
| Index update | `.trellis/structure/{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
|
+
/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/structure/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
|
+
```
|