Commit 92cc18b
authored
feat: enhance skills handling, openspec upgrades, and cli improvements (#106)
* fix(skills): resolve symlinks before copying skill files
When skill directories are symlinks (e.g. ~/.claude/skills/comet -> ~/.agents/skills/comet), copyFile and ensureDir wrote to the literal path instead of following the symlink target. Broken symlinks caused silent copy failures.
Added resolveSymlinkPath() to file-system.ts that walks up the path tree and follows readlink targets for broken symlinks. Applied to ensureDir, copyFile, and writeFile.
Fixes #85
* fix(openspec): always upgrade to latest and retry without --profile
Two changes to fix issue #84:
1. ensureOpenSpecCli now always installs/upgrades openspec to the
latest version, even if an older version is already present. This
ensures users get the --profile support and other improvements.
2. Added fallback logic: if openspec init fails with 'unknown option
--profile' in stderr, retry without the flag. This handles edge
cases where the upgrade fails but an older openspec remains.
The --profile flag is redundant since XDG_CONFIG_HOME config already
sets profile to 'custom', but it helps newer openspec versions.
Fixes #84
* fix: force LF line endings for JS/TS files to fix npm shebang issue on macOS
When npm packs the project on Windows, bin/comet.js shebang line gets
CRLF line endings, causing macOS to interpret '#!/usr/bin/env node\r'
instead of '#!/usr/bin/env node', resulting in 'command not found'.
Add explicit eol=lf rules for all text file extensions and binary
markers for image files in .gitattributes.
Fixes #82
* docs: add changelog for v0.3.8 and bump version
* feat(skills): extract subagent dispatch protocol and sync English skills
- Extract inline subagent-driven-development protocol from comet-build/SKILL.md
into standalone comet/reference/subagent-dispatch.md (ZH + EN)
- Sync English comet-build/SKILL.md with Chinese optimizations: simplified
subagent instructions, TDD constraints reference, context recovery guidance
- Add task-checkoff subcommand to comet-state.sh for targeted task verification
- Add phase guard recovery steps for subagent build mode after compaction
- Update tests: phase-guard assertions, task-checkoff edge cases, English
SKILL.md assertions
- Update CHANGELOG.md for v0.3.8
* refactor(skills): extract shared protocol docs for progressive loading
Extract four reference documents from inline skill content to enable
on-demand loading and reduce per-invocation token cost:
- auto-transition.md: shared auto-transition protocol (7 sub-skills)
- context-recovery.md: context compression recovery steps (4 sub-skills)
- comet-yaml-fields.md: .comet.yaml field table (main SKILL.md)
- file-structure.md: directory structure reference (main SKILL.md)
Both Chinese and English versions updated. Key commands and state machine
hard constraints retained inline; full protocol details moved to reference.
Also fixes comet-tweak missing systematic-debugging handling (both langs),
and syncs phase guard rule with bilingual recovery references.
Estimated savings: 600-1500 tokens per skill invocation, ~4100 tokens
across a full workflow.
* fix(codegraph): use auto-detect install instead of platform filtering
CodeGraph's `codegraph install` auto-detects and configures all
installed agents (Claude Code, Cursor, Codex CLI, etc.). Passing
`--target` and `--location` manually caused Codex CLI to be
skipped with "does not support --location=local" because Codex
has no project-local config concept.
Simplify to `codegraph install --yes` and let CodeGraph handle
platform detection itself. Remove now-unused filterSupportedPlatforms
and CODEGRAPH_SUPPORTED_TARGETS.
Closes #98
* refactor(subagent): enhance subagent-driven development with strict Comet extensions
* feat: update documentation to reference decision point and debug gate protocols
* fix(hooks): preserve user-defined hooks during Comet hook configuration merging
* docs: design OpenSpec artifact rules compliance
* fix(SKILL): enforce explicit user confirmation and standard artifact loop for Comet workflow
* feat(cli): add command to remove Comet skills, rules, and hooks
* feat(cli): add version info and update check to init and update commands
* feat(cli): enforce official npm registry for comet package updates
* fix(core): detect OpenCode plugin-installed Superpowers correctly
* docs: design Pi slash command extension
* fix(pi): register Comet slash commands
* chore(docs): remove outdated docs
* fix(ci): correct Windows path escaping in init-e2e verification
The init-e2e workflow's Pi settings verification interpolated a Windows
$RUNNER_TEMP path (with backslashes) into a node -e require() JS string
literal, where \a and \_ were parsed as escape characters and mangled
the path (D:\a\_temp -> D:a_temp), failing the init-e2e (windows-latest)
runners on Node 20 and 22. Pass the path via process.env so it never
enters a JS string literal. Linux and macOS were unaffected.
Also reformat src/core/openspec.ts to satisfy prettier --check, which was
failing the format:check CI step.
* chore(ci): add husky pre-commit formatting hook
Add a husky + lint-staged pre-commit hook that runs prettier --write on
staged source files under src/ at every git commit (scope aligned with
CI format:check). Editor-agnostic, so it enforces formatting for all
contributors regardless of IDE or agent, preventing the prettier
formatting issues that broke CI from recurring.
prepare now installs the hook on pnpm install; .husky/ is excluded from
the published package via the files whitelist. Document the pre-commit
workflow in CLAUDE.md and AGENTS.md.
* fix: address PR #106 review findings
- file-system: symlink-safe removal during uninstall (removeFile/removeDir
no longer resolve symlinks before deleting, so a symlinked dir's target is
never recursively deleted); isDirEmpty no longer treats unreadable dirs as empty
- update: discard npm stdio in --json mode to avoid corrupting output; add
codegraph field to the no-targets JSON branch for a stable shape; skip the
npm-registry version check in JSON mode
- skills: coerce parsed hook groups to arrays before merge/filter so malformed
hand-edited settings cannot throw during init/update
- init: skip the version check in JSON mode
- manifest: bump version 0.3.3 -> 0.3.8 to match package.json
- docs: add text fence language tags (MD040) in file-structure.md and
subagent-dispatch.md, Chinese and English
* test(skills): handle malformed hook groups without throwing1 parent 76ab1b6 commit 92cc18b
70 files changed
Lines changed: 4502 additions & 606 deletions
File tree
- .claude
- .github/workflows
- .husky
- assets
- skills-zh
- comet-archive
- comet-build
- comet-design
- comet-hotfix
- comet-open
- comet-tweak
- comet-verify
- comet
- reference
- skills
- comet-archive
- comet-build
- comet-design
- comet-hotfix
- comet-open
- comet-tweak
- comet-verify
- comet
- reference
- rules
- scripts
- src
- cli
- commands
- core
- utils
- test/ts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
3 | 10 | | |
4 | 11 | | |
5 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
220 | | - | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| |||
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
| 231 | + | |
| 232 | + | |
229 | 233 | | |
230 | 234 | | |
231 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
8 | 23 | | |
9 | 24 | | |
10 | 25 | | |
| |||
37 | 52 | | |
38 | 53 | | |
39 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
40 | 61 | | |
41 | 62 | | |
42 | 63 | | |
| |||
53 | 74 | | |
54 | 75 | | |
55 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
8 | 23 | | |
9 | 24 | | |
10 | 25 | | |
| |||
46 | 61 | | |
47 | 62 | | |
48 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
49 | 70 | | |
50 | 71 | | |
51 | 72 | | |
| |||
62 | 83 | | |
63 | 84 | | |
64 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
201 | 220 | | |
202 | 221 | | |
203 | 222 | | |
204 | 223 | | |
205 | 224 | | |
206 | 225 | | |
207 | 226 | | |
208 | | - | |
| 227 | + | |
209 | 228 | | |
210 | 229 | | |
211 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
220 | 239 | | |
221 | 240 | | |
222 | 241 | | |
| |||
0 commit comments