ECC/tests
fxdv 8eedcff5ac
fix(commands): resolve active plugin root in /instinct-status (#2037) (#2059)
The `/instinct-status` slash command template expanded
`${CLAUDE_PLUGIN_ROOT}` directly and documented a manual-install
fallback to `~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py`.
When users had both an active plugin install (under
`~/.claude/plugins/cache/<slug>/<org>/<version>/`) and a legacy
`~/.claude/skills/continuous-learning-v2/` directory left over from a
previous manual install, an empty `CLAUDE_PLUGIN_ROOT` (which Claude
Code does not always populate in slash-command shell contexts) silently
made the command read the stale legacy install while the active plugin
hooks and observer wrote to the new XDG path. The user saw "No
instincts found" while the system was actively learning — exactly the
divergence the bug reporter spent hours diagnosing.

Replace the brittle two-block template with the same inline resolver
pattern that `hooks/hooks.json` and `/sessions` / `/skill-health`
already use: env var → standard install → known plugin roots → plugin
cache walk → fallback. The resolver is the canonical `INLINE_RESOLVE`
constant from `scripts/lib/resolve-ecc-root.js`, so no new code is
introduced — just consistent adoption of the existing pattern.

Apply the same fix to all five copies of the command:
  - commands/instinct-status.md (canonical)
  - .opencode/commands/instinct-status.md
  - docs/zh-CN/commands/instinct-status.md
  - docs/ja-JP/commands/instinct-status.md
  - docs/tr/commands/instinct-status.md

Extend tests/lib/command-plugin-root.test.js with an assertion that the
canonical instinct-status.md uses the inline resolver and no longer
hard-codes the legacy `~/.claude/skills/...` fallback (regression
guard).

zh-CN copy: polish the Chinese phrasing per LanguageTool feedback
(`使用与 ... 相同的解析器` → `以与 ... 相同的解析器`) so the verb is
introduced by an explicit preposition instead of reading as an awkward
verb-object construction.
2026-06-07 13:27:05 +08:00
..
ci fix(skills): keep curl credentials out of argv (#2175) 2026-06-07 13:25:45 +08:00
commands fix: accept crlf command frontmatter 2026-04-30 03:41:18 -04:00
docs docs(claude): install manual skills at top level (#2160) 2026-06-07 13:26:06 +08:00
hooks fix(hooks): stop false loop warnings and repeated identical context warnings (#2121) 2026-06-07 13:26:30 +08:00
integration fix(hooks): avoid escaped quotes in plugin bootstrap 2026-05-19 05:15:42 -04:00
lib fix(commands): resolve active plugin root in /instinct-status (#2037) (#2059) 2026-06-07 13:27:05 +08:00
scripts fix: surface legacy data warning in instinct-cli status (#2127) 2026-06-07 13:26:22 +08:00
__init__.py Small changes 2026-04-12 12:34:45 +05:30
codex-config.test.js fix(codex): broaden context7 config checks 2026-03-29 00:26:16 -04:00
conftest.py docs: salvage focused stale PR contributions 2026-05-11 05:31:12 -04:00
opencode-config.test.js fix: namespace opencode command agents 2026-04-05 14:21:57 -07:00
opencode-plugin-hooks.test.js fix: harden opencode project file probes 2026-05-11 22:40:19 -04:00
plugin-manifest.test.js docs: record rc1 live package readbacks (#2117) 2026-06-02 19:32:59 +08:00
run-all.js feat: worktree-lifecycle service (deterministic conflict prediction + safe GC) (#2164) 2026-06-07 13:00:08 +08:00
test_astraflow_provider.py feat: add Astraflow provider support 2026-05-11 23:21:46 -04:00
test_builder.py docs: salvage focused stale PR contributions 2026-05-11 05:31:12 -04:00
test_claude_provider.py docs: salvage focused stale PR contributions 2026-05-11 05:31:12 -04:00
test_executor.py Small changes 2026-04-12 12:34:45 +05:30
test_provider_tools.py fix: harden openai-compatible provider responses 2026-05-18 01:04:28 -04:00
test_resolver.py feat: add Astraflow provider support 2026-05-11 23:21:46 -04:00
test_templates.py docs: salvage focused stale PR contributions 2026-05-11 05:31:12 -04:00
test_types.py feat: add Astraflow provider support 2026-05-11 23:21:46 -04:00