Skip to content

Commit 12dc128

Browse files
committed
docs: standardize ct binary invocation to always use 'deno task ct'
Updated all documentation to consistently use 'deno task ct' instead of direct 'ct' invocation to avoid issues with potentially out-of-date binaries. Changes: - docs/common/PATTERNS.md: 2 references updated - .claude/skills/ct/SKILL.md: 12 references updated - .claude/skills/pattern-dev/SKILL.md: 4 references updated - .claude/skills/pattern-dev/references/workflow-guide.md: 5 references updated This ensures Claude Code always invokes the ct binary via the deno task, which guarantees the source is up-to-date and prevents confusing errors during pattern development.
1 parent d394ec8 commit 12dc128

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

.claude/skills/ct/SKILL.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Most commands require these parameters:
9797

9898
### 1. Testing Recipes Locally
9999

100-
Use `ct dev` for rapid iteration during recipe development:
100+
Use `deno task ct dev` for rapid iteration during recipe development:
101101

102102
```bash
103103
# Type check and execute
@@ -115,10 +115,10 @@ deno task ct dev --help
115115
### 2. Deploying and Managing Charms
116116

117117
**Workflow pattern:**
118-
1. List charms → `ct charm ls`
119-
2. Deploy new → `ct charm new`
120-
3. Update existing → `ct charm setsrc` (faster than redeploying)
121-
4. Inspect state → `ct charm inspect`
118+
1. List charms → `deno task ct charm ls`
119+
2. Deploy new → `deno task ct charm new`
120+
3. Update existing → `deno task ct charm setsrc` (faster than redeploying)
121+
4. Inspect state → `deno task ct charm inspect`
122122

123123
**Discover commands:**
124124
```bash
@@ -133,9 +133,9 @@ deno task ct charm --help
133133
- **Path syntax**: Use forward slashes (e.g., `items/0/name`, `config/database/host`)
134134

135135
**Commands:**
136-
- `ct charm get` - Read data from charm
137-
- `ct charm set` - Direct field modification
138-
- `ct charm call` - Execute handler (for validation/side effects)
136+
- `deno task ct charm get` - Read data from charm
137+
- `deno task ct charm set` - Direct field modification
138+
- `deno task ct charm call` - Execute handler (for validation/side effects)
139139

140140
**Decision guide:**
141141
- Use **GET** to inspect charm state
@@ -165,7 +165,7 @@ deno task ct charm link --help
165165

166166
### 5. Visualizing Space Architecture
167167

168-
Use `ct charm map` to understand charm relationships:
168+
Use `deno task ct charm map` to understand charm relationships:
169169

170170
```bash
171171
# ASCII map
@@ -213,16 +213,16 @@ echo '{"name": "John"}' | deno task ct charm set ... user
213213
**Debugging steps:**
214214
1. For recipe errors: Run `deno task ct dev [recipe] --no-run` to check syntax
215215
2. For connection issues: Verify Tailnet connection for `*.ts.net` URLs
216-
3. For data issues: Use `ct charm inspect` to examine charm state
217-
4. For linking issues: Use `ct charm map` to visualize connections
216+
3. For data issues: Use `deno task ct charm inspect` to examine charm state
217+
4. For linking issues: Use `deno task ct charm map` to visualize connections
218218

219219
## Building Complex Applications
220220

221221
**Composability Pattern:**
222222
1. Create small, focused recipes (each does one thing well)
223223
2. Deploy recipes as separate charms
224224
3. Link charms together for data flow
225-
4. Use `ct charm map` to visualize architecture
225+
4. Use `deno task ct charm map` to visualize architecture
226226
5. Add new functionality by deploying and linking new charms
227227

228228
**Example architecture:**
@@ -243,7 +243,7 @@ Documentation of well-known charm IDs (like `allCharms`) that provide access to
243243
## Remember
244244

245245
- **Use `--help` flags** - The tool itself is the documentation
246-
- **Check `ct charm --help`** before asking about available commands
246+
- **Check `deno task ct charm --help`** before asking about available commands
247247
- **Path syntax** - Always forward slashes, numeric array indices
248248
- **JSON format** - All values must be valid JSON (strings need quotes)
249249
- **Environment variables** - Set `CT_API_URL` and `CT_IDENTITY` for convenience

.claude/skills/pattern-dev/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const addItem = handler<
114114

115115
### Step 4: Test and Deploy
116116

117-
Use the **ct** skill for testing with `ct dev` and deploying with `ct charm new/setsrc`.
117+
Use the **ct** skill for testing with `deno task ct dev` and deploying with `deno task ct charm new/setsrc`.
118118

119119
## Modifying Patterns
120120

@@ -128,8 +128,8 @@ Use the **ct** skill to retrieve source:
128128
### Making Changes
129129

130130
1. Edit the pattern file
131-
2. Check syntax: Use **ct** skill for `ct dev pattern.tsx --no-run`
132-
3. Update charm: Use **ct** skill for `ct charm setsrc`
131+
2. Check syntax: Use **ct** skill for `deno task ct dev pattern.tsx --no-run`
132+
3. Update charm: Use **ct** skill for `deno task ct charm setsrc`
133133

134134
## Debugging Patterns
135135

@@ -152,7 +152,7 @@ Use the **ct** skill to retrieve source:
152152

153153
### Debugging Process
154154

155-
1. **Check TypeScript errors first** - Use **ct** skill for `ct dev pattern.tsx --no-run`
155+
1. **Check TypeScript errors first** - Use **ct** skill for `deno task ct dev pattern.tsx --no-run`
156156
2. **Consult the docs** - Match error pattern to relevant doc:
157157
- Type errors → `HANDLERS.md`
158158
- Component issues → `COMPONENTS.md`

.claude/skills/pattern-dev/references/workflow-guide.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This guide covers high-level workflow patterns and best practices for developing
1313
1. **Write minimal pattern** - Basic types, minimal UI, single feature
1414
2. **Deploy and test** - Use ct skill for deployment commands
1515
3. **Inspect and verify** - Use ct skill for inspection commands
16-
4. **Iterate with updates** - Use `ct charm setsrc` for fast updates (via ct skill)
16+
4. **Iterate with updates** - Use `deno task ct charm setsrc` for fast updates (via ct skill)
1717
5. **Add next feature** - One at a time, repeat cycle
1818

1919
**Why this works:**
@@ -93,7 +93,7 @@ patterns/feature/
9393
- Cell operations? → See `RECIPES.md`
9494
3. Find similar example in `packages/patterns/`
9595
4. Apply fix
96-
5. Verify with `ct dev --no-run` (via ct skill)
96+
5. Verify with `deno task ct dev --no-run` (via ct skill)
9797

9898
### Runtime Error → Solution Mapping
9999

@@ -218,9 +218,9 @@ Use `derive()` judiciously for expensive operations.
218218
### Using ct Effectively
219219

220220
**Fast iteration:**
221-
- Deploy once with `ct charm new`
222-
- Update repeatedly with `ct charm setsrc`
223-
- Inspect with `ct charm inspect`
221+
- Deploy once with `deno task ct charm new`
222+
- Update repeatedly with `deno task ct charm setsrc`
223+
- Inspect with `deno task ct charm inspect`
224224

225225
**See ct skill for all command details.**
226226

docs/common/PATTERNS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ echo '{"title": "Test", "done": false}' | \
762762

763763
### Tips for Fast Iteration
764764

765-
- ✅ Use `ct dev` first to catch TypeScript errors
765+
- ✅ Use `deno task ct dev` first to catch TypeScript errors
766766
- ✅ Deploy once, then use `setsrc` for updates
767767
- ✅ Test one feature at a time
768768
- ✅ Use `charm inspect` to debug data issues
@@ -917,4 +917,4 @@ const categories = derive(groupedItems, (groups) => Object.keys(groups).sort());
917917
2. Use handlers for side effects and structural changes
918918
3. Use `derive()` for reactive transformations
919919
4. Keep it simple - don't over-engineer
920-
5. Test incrementally with `ct dev` and `charm setsrc`
920+
5. Test incrementally with `deno task ct dev` and `deno task ct charm setsrc`

0 commit comments

Comments
 (0)