@jahanxu/trellis 0.5.9 → 0.6.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.
Files changed (107) hide show
  1. package/README.md +74 -130
  2. package/dist/cli/index.js +1 -0
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/commands/init.d.ts +1 -0
  5. package/dist/commands/init.d.ts.map +1 -1
  6. package/dist/commands/init.js +30 -2
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/update.d.ts.map +1 -1
  9. package/dist/commands/update.js +11 -39
  10. package/dist/commands/update.js.map +1 -1
  11. package/dist/configurators/index.d.ts.map +1 -1
  12. package/dist/configurators/index.js +15 -3
  13. package/dist/configurators/index.js.map +1 -1
  14. package/dist/configurators/kilo.d.ts +1 -1
  15. package/dist/configurators/kilo.d.ts.map +1 -1
  16. package/dist/configurators/kilo.js +2 -1
  17. package/dist/configurators/kilo.js.map +1 -1
  18. package/dist/configurators/qoder.d.ts +8 -0
  19. package/dist/configurators/qoder.d.ts.map +1 -0
  20. package/dist/configurators/qoder.js +52 -0
  21. package/dist/configurators/qoder.js.map +1 -0
  22. package/dist/configurators/workflow.d.ts.map +1 -1
  23. package/dist/configurators/workflow.js +3 -1
  24. package/dist/configurators/workflow.js.map +1 -1
  25. package/dist/migrations/manifests/0.3.2.json +9 -0
  26. package/dist/migrations/manifests/0.3.3.json +9 -0
  27. package/dist/migrations/manifests/0.3.4.json +21 -0
  28. package/dist/migrations/manifests/0.3.5.json +9 -0
  29. package/dist/templates/claude/commands/trellis/record-session.md +12 -16
  30. package/dist/templates/codex/skills/record-session/SKILL.md +13 -17
  31. package/dist/templates/cursor/commands/trellis-record-session.md +12 -16
  32. package/dist/templates/extract.d.ts +7 -0
  33. package/dist/templates/extract.d.ts.map +1 -1
  34. package/dist/templates/extract.js +13 -0
  35. package/dist/templates/extract.js.map +1 -1
  36. package/dist/templates/gemini/commands/trellis/record-session.toml +12 -16
  37. package/dist/templates/iflow/commands/trellis/record-session.md +12 -16
  38. package/dist/templates/iflow/hooks/session-start.py +1 -0
  39. package/dist/templates/kilo/commands/trellis/record-session.md +12 -16
  40. package/dist/templates/kilo/index.d.ts +3 -3
  41. package/dist/templates/kilo/index.d.ts.map +1 -1
  42. package/dist/templates/kilo/index.js +7 -7
  43. package/dist/templates/kilo/index.js.map +1 -1
  44. package/dist/templates/kilo/workflows/before-backend-dev.md +13 -0
  45. package/dist/templates/kilo/workflows/before-frontend-dev.md +13 -0
  46. package/dist/templates/kilo/workflows/brainstorm.md +474 -0
  47. package/dist/templates/kilo/workflows/break-loop.md +125 -0
  48. package/dist/templates/kilo/workflows/check-backend.md +13 -0
  49. package/dist/templates/kilo/workflows/check-cross-layer.md +153 -0
  50. package/dist/templates/kilo/workflows/check-frontend.md +13 -0
  51. package/dist/templates/kilo/workflows/create-command.md +152 -0
  52. package/dist/templates/kilo/workflows/finish-work.md +129 -0
  53. package/dist/templates/kilo/workflows/integrate-skill.md +219 -0
  54. package/dist/templates/kilo/workflows/onboard.md +358 -0
  55. package/dist/templates/kilo/workflows/parallel.md +194 -0
  56. package/dist/templates/kilo/workflows/record-session.md +58 -0
  57. package/dist/templates/kilo/workflows/start.md +321 -0
  58. package/dist/templates/kilo/workflows/update-spec.md +285 -0
  59. package/dist/templates/kiro/skills/record-session/SKILL.md +13 -17
  60. package/dist/templates/opencode/commands/trellis/record-session.md +12 -16
  61. package/dist/templates/qoder/index.d.ts +18 -0
  62. package/dist/templates/qoder/index.d.ts.map +1 -0
  63. package/dist/templates/qoder/index.js +40 -0
  64. package/dist/templates/qoder/index.js.map +1 -0
  65. package/dist/templates/qoder/skills/before-backend-dev/SKILL.md +18 -0
  66. package/dist/templates/qoder/skills/before-frontend-dev/SKILL.md +18 -0
  67. package/dist/templates/qoder/skills/brainstorm/SKILL.md +479 -0
  68. package/dist/templates/qoder/skills/break-loop/SKILL.md +130 -0
  69. package/dist/templates/qoder/skills/check-backend/SKILL.md +18 -0
  70. package/dist/templates/qoder/skills/check-cross-layer/SKILL.md +158 -0
  71. package/dist/templates/qoder/skills/check-frontend/SKILL.md +18 -0
  72. package/dist/templates/qoder/skills/create-command/SKILL.md +101 -0
  73. package/dist/templates/qoder/skills/finish-work/SKILL.md +134 -0
  74. package/dist/templates/qoder/skills/integrate-skill/SKILL.md +221 -0
  75. package/dist/templates/qoder/skills/onboard/SKILL.md +363 -0
  76. package/dist/templates/qoder/skills/record-session/SKILL.md +63 -0
  77. package/dist/templates/qoder/skills/start/SKILL.md +326 -0
  78. package/dist/templates/qoder/skills/update-spec/SKILL.md +290 -0
  79. package/dist/templates/trellis/config.yaml +15 -0
  80. package/dist/templates/trellis/index.d.ts +3 -0
  81. package/dist/templates/trellis/index.d.ts.map +1 -1
  82. package/dist/templates/trellis/index.js +4 -0
  83. package/dist/templates/trellis/index.js.map +1 -1
  84. package/dist/templates/trellis/scripts/add_session.py +52 -21
  85. package/dist/templates/trellis/scripts/common/__init__.py +3 -1
  86. package/dist/templates/trellis/scripts/common/cli_adapter.py +125 -20
  87. package/dist/templates/trellis/scripts/common/config.py +52 -0
  88. package/dist/templates/trellis/scripts/common/git_context.py +121 -11
  89. package/dist/templates/trellis/scripts/multi_agent/plan.py +4 -1
  90. package/dist/templates/trellis/scripts/multi_agent/start.py +5 -1
  91. package/dist/templates/trellis/scripts/task.py +26 -0
  92. package/dist/types/ai-tools.d.ts +3 -3
  93. package/dist/types/ai-tools.d.ts.map +1 -1
  94. package/dist/types/ai-tools.js +8 -0
  95. package/dist/types/ai-tools.js.map +1 -1
  96. package/dist/utils/proxy.d.ts +25 -0
  97. package/dist/utils/proxy.d.ts.map +1 -0
  98. package/dist/utils/proxy.js +60 -0
  99. package/dist/utils/proxy.js.map +1 -0
  100. package/dist/utils/template-fetcher.d.ts +11 -2
  101. package/dist/utils/template-fetcher.d.ts.map +1 -1
  102. package/dist/utils/template-fetcher.js +92 -19
  103. package/dist/utils/template-fetcher.js.map +1 -1
  104. package/dist/utils/template-hash.d.ts.map +1 -1
  105. package/dist/utils/template-hash.js +1 -0
  106. package/dist/utils/template-hash.js.map +1 -1
  107. package/package.json +10 -9
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: break-loop
3
+ description: "Break the Loop - Deep Bug Analysis"
4
+ ---
5
+
6
+ # Break the Loop - Deep Bug Analysis
7
+
8
+ When debug is complete, use this command for deep analysis to break the "fix bug -> forget -> repeat" cycle.
9
+
10
+ ---
11
+
12
+ ## Analysis Framework
13
+
14
+ Analyze the bug you just fixed from these 5 dimensions:
15
+
16
+ ### 1. Root Cause Category
17
+
18
+ Which category does this bug belong to?
19
+
20
+ | Category | Characteristics | Example |
21
+ |----------|-----------------|---------|
22
+ | **A. Missing Spec** | No documentation on how to do it | New feature without checklist |
23
+ | **B. Cross-Layer Contract** | Interface between layers unclear | API returns different format than expected |
24
+ | **C. Change Propagation Failure** | Changed one place, missed others | Changed function signature, missed call sites |
25
+ | **D. Test Coverage Gap** | Unit test passes, integration fails | Works alone, breaks when combined |
26
+ | **E. Implicit Assumption** | Code relies on undocumented assumption | Timestamp seconds vs milliseconds |
27
+
28
+ ### 2. Why Fixes Failed (if applicable)
29
+
30
+ If you tried multiple fixes before succeeding, analyze each failure:
31
+
32
+ - **Surface Fix**: Fixed symptom, not root cause
33
+ - **Incomplete Scope**: Found root cause, didn't cover all cases
34
+ - **Tool Limitation**: grep missed it, type check wasn't strict
35
+ - **Mental Model**: Kept looking in same layer, didn't think cross-layer
36
+
37
+ ### 3. Prevention Mechanisms
38
+
39
+ What mechanisms would prevent this from happening again?
40
+
41
+ | Type | Description | Example |
42
+ |------|-------------|---------|
43
+ | **Documentation** | Write it down so people know | Update thinking guide |
44
+ | **Architecture** | Make the error impossible structurally | Type-safe wrappers |
45
+ | **Compile-time** | TypeScript strict, no any | Signature change causes compile error |
46
+ | **Runtime** | Monitoring, alerts, scans | Detect orphan entities |
47
+ | **Test Coverage** | E2E tests, integration tests | Verify full flow |
48
+ | **Code Review** | Checklist, PR template | "Did you check X?" |
49
+
50
+ ### 4. Systematic Expansion
51
+
52
+ What broader problems does this bug reveal?
53
+
54
+ - **Similar Issues**: Where else might this problem exist?
55
+ - **Design Flaw**: Is there a fundamental architecture issue?
56
+ - **Process Flaw**: Is there a development process improvement?
57
+ - **Knowledge Gap**: Is the team missing some understanding?
58
+
59
+ ### 5. Knowledge Capture
60
+
61
+ Solidify insights into the system:
62
+
63
+ - [ ] Update `.trellis/spec/guides/` thinking guides
64
+ - [ ] Update `.trellis/spec/backend/` or `frontend/` docs
65
+ - [ ] Create issue record (if applicable)
66
+ - [ ] Create feature ticket for root fix
67
+ - [ ] Update check commands if needed
68
+
69
+ ---
70
+
71
+ ## Output Format
72
+
73
+ Please output analysis in this format:
74
+
75
+ ```markdown
76
+ ## Bug Analysis: [Short Description]
77
+
78
+ ### 1. Root Cause Category
79
+ - **Category**: [A/B/C/D/E] - [Category Name]
80
+ - **Specific Cause**: [Detailed description]
81
+
82
+ ### 2. Why Fixes Failed (if applicable)
83
+ 1. [First attempt]: [Why it failed]
84
+ 2. [Second attempt]: [Why it failed]
85
+ ...
86
+
87
+ ### 3. Prevention Mechanisms
88
+ | Priority | Mechanism | Specific Action | Status |
89
+ |----------|-----------|-----------------|--------|
90
+ | P0 | ... | ... | TODO/DONE |
91
+
92
+ ### 4. Systematic Expansion
93
+ - **Similar Issues**: [List places with similar problems]
94
+ - **Design Improvement**: [Architecture-level suggestions]
95
+ - **Process Improvement**: [Development process suggestions]
96
+
97
+ ### 5. Knowledge Capture
98
+ - [ ] [Documents to update / tickets to create]
99
+ ```
100
+
101
+ ---
102
+
103
+ ## Core Philosophy
104
+
105
+ > **The value of debugging is not in fixing the bug, but in making this class of bugs never happen again.**
106
+
107
+ Three levels of insight:
108
+ 1. **Tactical**: How to fix THIS bug
109
+ 2. **Strategic**: How to prevent THIS CLASS of bugs
110
+ 3. **Philosophical**: How to expand thinking patterns
111
+
112
+ 30 minutes of analysis saves 30 hours of future debugging.
113
+
114
+ ---
115
+
116
+ ## After Analysis: Immediate Actions
117
+
118
+ **IMPORTANT**: After completing the analysis above, you MUST immediately:
119
+
120
+ 1. **Update spec/guides** - Don't just list TODOs, actually update the relevant files:
121
+ - If it's a cross-platform issue → update `cross-platform-thinking-guide.md`
122
+ - If it's a cross-layer issue → update `cross-layer-thinking-guide.md`
123
+ - If it's a code reuse issue → update `code-reuse-thinking-guide.md`
124
+ - If it's domain-specific → update `backend/*.md` or `frontend/*.md`
125
+
126
+ 2. **Sync templates** - After updating `.trellis/spec/`, sync to `src/templates/markdown/spec/`
127
+
128
+ 3. **Commit the spec updates** - This is the primary output, not just the analysis text
129
+
130
+ > **The analysis is worthless if it stays in chat. The value is in the updated specs.**
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: check-backend
3
+ description: "Check if the code you just wrote follows the backend development guidelines."
4
+ ---
5
+
6
+ Check if the code you just wrote follows the backend development guidelines.
7
+
8
+ Execute these steps:
9
+ 1. Run `git status` to see modified files
10
+ 2. Read `.trellis/spec/backend/index.md` to understand which guidelines apply
11
+ 3. Based on what you changed, read the relevant guideline files:
12
+ - Database changes → `.trellis/spec/backend/database-guidelines.md`
13
+ - Error handling → `.trellis/spec/backend/error-handling.md`
14
+ - Logging changes → `.trellis/spec/backend/logging-guidelines.md`
15
+ - Type changes → `.trellis/spec/backend/type-safety.md`
16
+ - Any changes → `.trellis/spec/backend/quality-guidelines.md`
17
+ 4. Review your code against the guidelines
18
+ 5. Report any violations and fix them if found
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: check-cross-layer
3
+ description: "Cross-Layer Check"
4
+ ---
5
+
6
+ # Cross-Layer Check
7
+
8
+ Check if your changes considered all dimensions. Most bugs come from "didn't think of it", not lack of technical skill.
9
+
10
+ > **Note**: This is a **post-implementation** safety net. Ideally, read the [Pre-Implementation Checklist](.trellis/spec/guides/pre-implementation-checklist.md) **before** writing code.
11
+
12
+ ---
13
+
14
+ ## Related Documents
15
+
16
+ | Document | Purpose | Timing |
17
+ |----------|---------|--------|
18
+ | [Pre-Implementation Checklist](.trellis/spec/guides/pre-implementation-checklist.md) | Questions before coding | **Before** writing code |
19
+ | [Code Reuse Thinking Guide](.trellis/spec/guides/code-reuse-thinking-guide.md) | Pattern recognition | During implementation |
20
+ | **`$check-cross-layer`** (this) | Verification check | **After** implementation |
21
+
22
+ ---
23
+
24
+ ## Execution Steps
25
+
26
+ ### 1. Identify Change Scope
27
+
28
+ ```bash
29
+ git status
30
+ git diff --name-only
31
+ ```
32
+
33
+ ### 2. Select Applicable Check Dimensions
34
+
35
+ Based on your change type, execute relevant checks below:
36
+
37
+ ---
38
+
39
+ ## Dimension A: Cross-Layer Data Flow (Required when 3+ layers)
40
+
41
+ **Trigger**: Changes involve 3 or more layers
42
+
43
+ | Layer | Common Locations |
44
+ |-------|------------------|
45
+ | API/Routes | `routes/`, `api/`, `handlers/`, `controllers/` |
46
+ | Service/Business Logic | `services/`, `lib/`, `core/`, `domain/` |
47
+ | Database/Storage | `db/`, `models/`, `repositories/`, `schema/` |
48
+ | UI/Presentation | `components/`, `views/`, `templates/`, `pages/` |
49
+ | Utility | `utils/`, `helpers/`, `common/` |
50
+
51
+ **Checklist**:
52
+ - [ ] Read flow: Database -> Service -> API -> UI
53
+ - [ ] Write flow: UI -> API -> Service -> Database
54
+ - [ ] Types/schemas correctly passed between layers?
55
+ - [ ] Errors properly propagated to caller?
56
+ - [ ] Loading/pending states handled at each layer?
57
+
58
+ **Detailed Guide**: `.trellis/spec/guides/cross-layer-thinking-guide.md`
59
+
60
+ ---
61
+
62
+ ## Dimension B: Code Reuse (Required when modifying constants/config)
63
+
64
+ **Trigger**:
65
+ - Modifying UI constants (label, icon, color)
66
+ - Modifying any hardcoded value
67
+ - Seeing similar code in multiple places
68
+ - Creating a new utility/helper function
69
+ - Just finished batch modifications across files
70
+
71
+ **Checklist**:
72
+ - [ ] Search first: How many places define this value?
73
+ ```bash
74
+ # Search in source files (adjust extensions for your project)
75
+ grep -r "value-to-change" src/
76
+ ```
77
+ - [ ] If 2+ places define same value -> Should extract to shared constant
78
+ - [ ] After modification, all usage sites updated?
79
+ - [ ] If creating utility: Does similar utility already exist?
80
+
81
+ **Detailed Guide**: `.trellis/spec/guides/code-reuse-thinking-guide.md`
82
+
83
+ ---
84
+
85
+ ## Dimension B2: New Utility Functions
86
+
87
+ **Trigger**: About to create a new utility/helper function
88
+
89
+ **Checklist**:
90
+ - [ ] Search for existing similar utilities first
91
+ ```bash
92
+ grep -r "functionNamePattern" src/
93
+ ```
94
+ - [ ] If similar exists, can you extend it instead?
95
+ - [ ] If creating new, is it in the right location (shared vs domain-specific)?
96
+
97
+ ---
98
+
99
+ ## Dimension B3: After Batch Modifications
100
+
101
+ **Trigger**: Just modified similar patterns in multiple files
102
+
103
+ **Checklist**:
104
+ - [ ] Did you check ALL files with similar patterns?
105
+ ```bash
106
+ grep -r "patternYouChanged" src/
107
+ ```
108
+ - [ ] Any files missed that should also be updated?
109
+ - [ ] Should this pattern be abstracted to prevent future duplication?
110
+
111
+ ---
112
+
113
+ ## Dimension C: Import/Dependency Paths (Required when creating new files)
114
+
115
+ **Trigger**: Creating new source files
116
+
117
+ **Checklist**:
118
+ - [ ] Using correct import paths (relative vs absolute)?
119
+ - [ ] No circular dependencies?
120
+ - [ ] Consistent with project's module organization?
121
+
122
+ ---
123
+
124
+ ## Dimension D: Same-Layer Consistency
125
+
126
+ **Trigger**:
127
+ - Modifying display logic or formatting
128
+ - Same domain concept used in multiple places
129
+
130
+ **Checklist**:
131
+ - [ ] Search for other places using same concept
132
+ ```bash
133
+ grep -r "ConceptName" src/
134
+ ```
135
+ - [ ] Are these usages consistent?
136
+ - [ ] Should they share configuration/constants?
137
+
138
+ ---
139
+
140
+ ## Common Issues Quick Reference
141
+
142
+ | Issue | Root Cause | Prevention |
143
+ |-------|------------|------------|
144
+ | Changed one place, missed others | Didn't search impact scope | `grep` before changing |
145
+ | Data lost at some layer | Didn't check data flow | Trace data source to destination |
146
+ | Type/schema mismatch | Cross-layer types inconsistent | Use shared type definitions |
147
+ | UI/output inconsistent | Same concept in multiple places | Extract shared constants |
148
+ | Similar utility exists | Didn't search first | Search before creating |
149
+ | Batch fix incomplete | Didn't verify all occurrences | grep after fixing |
150
+
151
+ ---
152
+
153
+ ## Output
154
+
155
+ Report:
156
+ 1. Which dimensions your changes involve
157
+ 2. Check results for each dimension
158
+ 3. Issues found and fix suggestions
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: check-frontend
3
+ description: "Check if the code you just wrote follows the frontend development guidelines."
4
+ ---
5
+
6
+ Check if the code you just wrote follows the frontend development guidelines.
7
+
8
+ Execute these steps:
9
+ 1. Run `git status` to see modified files
10
+ 2. Read `.trellis/spec/frontend/index.md` to understand which guidelines apply
11
+ 3. Based on what you changed, read the relevant guideline files:
12
+ - Component changes → `.trellis/spec/frontend/component-guidelines.md`
13
+ - Hook changes → `.trellis/spec/frontend/hook-guidelines.md`
14
+ - State changes → `.trellis/spec/frontend/state-management.md`
15
+ - Type changes → `.trellis/spec/frontend/type-safety.md`
16
+ - Any changes → `.trellis/spec/frontend/quality-guidelines.md`
17
+ 4. Review your code against the guidelines
18
+ 5. Report any violations and fix them if found
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: create-command
3
+ description: "Create New Skill"
4
+ ---
5
+
6
+ # Create New Skill
7
+
8
+ Create a new Qoder skill in `.qoder/skills/<skill-name>/SKILL.md` based on user requirements.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ $create-command <skill-name> <description>
14
+ ```
15
+
16
+ **Example**:
17
+ ```bash
18
+ $create-command review-pr Check PR code changes against project guidelines
19
+ ```
20
+
21
+ ## Execution Steps
22
+
23
+ ### 1. Parse Input
24
+
25
+ Extract from user input:
26
+ - **Skill name**: Use kebab-case (e.g., `review-pr`)
27
+ - **Description**: What the skill should accomplish
28
+
29
+ ### 2. Analyze Requirements
30
+
31
+ Determine skill type based on description:
32
+ - **Initialization**: Read docs, establish context
33
+ - **Pre-development**: Read guidelines, check dependencies
34
+ - **Code check**: Validate code quality and guideline compliance
35
+ - **Recording**: Record progress, questions, structure changes
36
+ - **Generation**: Generate docs or code templates
37
+
38
+ ### 3. Generate Skill Content
39
+
40
+ Minimum `SKILL.md` structure:
41
+
42
+ ```markdown
43
+ ---
44
+ name: <skill-name>
45
+ description: "<description>"
46
+ ---
47
+
48
+ # <Skill Title>
49
+
50
+ <Instructions for when and how to use this skill>
51
+ ```
52
+
53
+ ### 4. Create Files
54
+
55
+ Create:
56
+ - `.qoder/skills/<skill-name>/SKILL.md`
57
+
58
+ ### 5. Confirm Creation
59
+
60
+ Output result:
61
+
62
+ ```text
63
+ [OK] Created Skill: <skill-name>
64
+
65
+ File path:
66
+ - .qoder/skills/<skill-name>/SKILL.md
67
+
68
+ Usage:
69
+ - Trigger directly with $<skill-name>
70
+ - Or open /skills and select it
71
+
72
+ Description:
73
+ <description>
74
+ ```
75
+
76
+ ## Skill Content Guidelines
77
+
78
+ ### [OK] Good skill content
79
+
80
+ 1. **Clear and concise**: Immediately understandable
81
+ 2. **Executable**: AI can follow steps directly
82
+ 3. **Well-scoped**: Clear boundaries of what to do and not do
83
+ 4. **Has output**: Specifies expected output format (if needed)
84
+
85
+ ### [X] Avoid
86
+
87
+ 1. **Too vague**: e.g., "optimize code"
88
+ 2. **Too complex**: Single skill should not exceed 100 lines
89
+ 3. **Duplicate functionality**: Check if similar skill exists first
90
+
91
+ ## Naming Conventions
92
+
93
+ | Skill Type | Prefix | Example |
94
+ |------------|--------|---------|
95
+ | Session Start | `start` | `start` |
96
+ | Pre-development | `before-` | `before-frontend-dev` |
97
+ | Check | `check-` | `check-frontend` |
98
+ | Record | `record-` | `record-session` |
99
+ | Generate | `generate-` | `generate-api-doc` |
100
+ | Update | `update-` | `update-changelog` |
101
+ | Other | Verb-first | `review-code`, `sync-data` |
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: finish-work
3
+ description: "Finish Work - Pre-Commit Checklist"
4
+ ---
5
+
6
+ # Finish Work - Pre-Commit Checklist
7
+
8
+ Before submitting or committing, use this checklist to ensure work completeness.
9
+
10
+ **Timing**: After code is written and tested, before commit
11
+
12
+ ---
13
+
14
+ ## Checklist
15
+
16
+ ### 1. Code Quality
17
+
18
+ ```bash
19
+ # Must pass
20
+ pnpm lint
21
+ pnpm type-check
22
+ pnpm test
23
+ ```
24
+
25
+ - [ ] `pnpm lint` passes with 0 errors?
26
+ - [ ] `pnpm type-check` passes with no type errors?
27
+ - [ ] Tests pass?
28
+ - [ ] No `console.log` statements (use logger)?
29
+ - [ ] No non-null assertions (the `x!` operator)?
30
+ - [ ] No `any` types?
31
+
32
+ ### 2. Documentation Sync
33
+
34
+ **Structure Docs**:
35
+ - [ ] Does `.trellis/spec/backend/` need updates?
36
+ - New patterns, new modules, new conventions
37
+ - [ ] Does `.trellis/spec/frontend/` need updates?
38
+ - New components, new hooks, new patterns
39
+ - [ ] Does `.trellis/spec/guides/` need updates?
40
+ - New cross-layer flows, lessons from bugs
41
+
42
+ **Key Question**:
43
+ > "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?"
44
+
45
+ If YES -> Update the relevant spec doc.
46
+
47
+ ### 3. API Changes
48
+
49
+ If you modified API endpoints:
50
+
51
+ - [ ] Input schema updated?
52
+ - [ ] Output schema updated?
53
+ - [ ] API documentation updated?
54
+ - [ ] Client code updated to match?
55
+
56
+ ### 4. Database Changes
57
+
58
+ If you modified database schema:
59
+
60
+ - [ ] Migration file created?
61
+ - [ ] Schema file updated?
62
+ - [ ] Related queries updated?
63
+ - [ ] Seed data updated (if applicable)?
64
+
65
+ ### 5. Cross-Layer Verification
66
+
67
+ If the change spans multiple layers:
68
+
69
+ - [ ] Data flows correctly through all layers?
70
+ - [ ] Error handling works at each boundary?
71
+ - [ ] Types are consistent across layers?
72
+ - [ ] Loading states handled?
73
+
74
+ ### 6. Manual Testing
75
+
76
+ - [ ] Feature works in browser/app?
77
+ - [ ] Edge cases tested?
78
+ - [ ] Error states tested?
79
+ - [ ] Works after page refresh?
80
+
81
+ ---
82
+
83
+ ## Quick Check Flow
84
+
85
+ ```bash
86
+ # 1. Code checks
87
+ pnpm lint && pnpm type-check
88
+
89
+ # 2. View changes
90
+ git status
91
+ git diff --name-only
92
+
93
+ # 3. Based on changed files, check relevant items above
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Common Oversights
99
+
100
+ | Oversight | Consequence | Check |
101
+ |-----------|-------------|-------|
102
+ | Structure docs not updated | Others don't know the change | Check .trellis/spec/ |
103
+ | Migration not created | Schema out of sync | Check db/migrations/ |
104
+ | Types not synced | Runtime errors | Check shared types |
105
+ | Tests not updated | False confidence | Run full test suite |
106
+ | Console.log left in | Noisy production logs | Search for console.log |
107
+
108
+ ---
109
+
110
+ ## Relationship to Other Commands
111
+
112
+ ```
113
+ Development Flow:
114
+ Write code -> Test -> $finish-work -> git commit -> $record-session
115
+ | |
116
+ Ensure completeness Record progress
117
+
118
+ Debug Flow:
119
+ Hit bug -> Fix -> $break-loop -> Knowledge capture
120
+ |
121
+ Deep analysis
122
+ ```
123
+
124
+ - `$finish-work` - Check work completeness (this skill)
125
+ - `$record-session` - Record session and commits
126
+ - `$break-loop` - Deep analysis after debugging
127
+
128
+ ---
129
+
130
+ ## Core Principle
131
+
132
+ > **Delivery includes not just code, but also documentation, verification, and knowledge capture.**
133
+
134
+ Complete work = Code + Docs + Tests + Verification