Repository navigation
fix: check reports linked skills as unmanaged, and .team/ never ignored itself - #132
Conversation
The skill loop in `check` passed the already-resolved symlink target to `targetInRepo`, which expects the link path and calls `readlinkSync` on its argument. Resolving a directory failed, so every installed `skills/team-*` link was reported as "not managed" and `opencode-team check` disagreed with the installer. Pass the link path instead, matching the agents/commands loop, and add a regression test that fails on the old behaviour.
The docs, the orchestrator and the memory skill all stated that .team/ is gitignored, but nothing ever created an ignore rule: the repository's own .gitignore only covers this repo, and the installer cannot know which project a later /team run happens in. In a user project, artifacts, memory and run checkpoints showed up in git status and could be committed by accident. The first /team run (/memory init does the same) now writes .team/.gitignore with a comment and a single `*` line. The workspace ignores itself, including that file, so no tracked file changes and the project's own .gitignore stays untouched. Docs now describe that mechanism, and the stale reference to the removed docs/rfcs/0001-project-memory.md is dropped.
README and docs/usage.md said agents use free-tier OpenCode Zen models and that the defaults are free-tier, while no agent pins a `model:` and each one inherits the session's model. They also showed a `name:` field in an agent frontmatter, which OpenCode 2 ignores because the filename supplies the id — scripts/validate.rb rejects it for exactly that reason. Describe the actual behaviour, keep the free-tier models as reported test picks, and show a frontmatter that validates.
|
Thanks for this PR — nice, focused work, and the root-cause analysis is spot on. I reviewed it locally and verified the following:
There are two things I'd like to see addressed before merging: 1.
|
Review follow-up on sametcelikbicak#132. - team/AGENTS.md now carries a general workspace rule: create .team/.gitignore before writing anything under .team/. Every agent loads that file through the instructions config, so a direct @analyst or @fe invocation is covered without /team ever running. - run_state.py creates the same file idempotently in start-run and start-task, so the checkpoint-driven path does not depend on the model following an instruction. An existing file is never rewritten. - scripts/test-run-state.py asserts creation and preservation. - docs/testing/memory.md re-verifies scenario 8 against .team/.gitignore instead of the project's own .gitignore, notes the change for scenario 1, corrects the file count to 48 and records the remaining gap for bare agent calls. - Absolute claims ('never reach a commit', 'cannot be committed') become what ignore rules actually do: new files are not picked up by normal git commands. Already-tracked files, git add -f and a custom artifact_dir or memory_dir outside .team/ are called out in docs/faq.md, docs/customization.md and docs/output.md.
|
Thanks for the careful review — both points were real, and the second one was a genuine hole in my reasoning. Pushed 1.
|
|
Thanks —
One cleanup before merge, plus a few tiny notes. Please remove the committed bytecode file
It is not in Please remove it: git rm -r --cached skills/team-memory/__pycache__
rm -rf skills/team-memory/__pycache__and ignore it in both __pycache__/
*.py[cod]Optionally, add a small assertion to the Minor notes (non-blocking — fix if easy)
Once the bytecode file is gone and CI stays green, I'm happy to merge. And leaving |
Review follow-up on sametcelikbicak#132. Workspace ignore rule - team/AGENTS.md gains a Workspace section: create .team/.gitignore before writing anything under .team/. Every agent loads that file through the instructions config, so a direct @analyst or @fe invocation is covered without /team ever running. - run_state.py creates the same file idempotently in start-run and start-task, so the checkpoint-driven path does not depend on the model following an instruction. An existing file is never rewritten. - scripts/test-run-state.py asserts creation, the trailing * and that a user-edited file survives start-task. Docs - docs/testing/memory.md re-verifies scenario 8 against .team/.gitignore instead of the project's own .gitignore, notes the change for scenario 1, corrects the file count to 48 and records the remaining gap for bare agent calls. - Absolute claims ('never reach a commit', 'cannot be committed') become what ignore rules actually do: new files are not picked up by normal git commands. Already-tracked files, git add -f and a custom artifact_dir or memory_dir outside .team/ are called out in docs/faq.md, docs/customization.md and docs/output.md. - Say "short comment block" rather than "a single * line", and name start-task alongside start-run as a creator of .team/.gitignore. Packaging - Ignore __pycache__/ and *.py[cod] in .gitignore. A stray py_compile run had committed and packaged skills/team-memory/__pycache__/run_state.cpython-314.pyc. - Add skills/team-memory/.npmignore, the only form npm honours for paths that package.json "files" already allows. - Fail the pack CI job when a tarball contains __pycache__ or .pyc; verified to catch the leak when the nested ignore file is absent.
a1ea748 to
4386c91
Compare
|
Good catch on the bytecode — that was my mistake. I ran Bytecode
Minor notes
Verification after the squashruby scripts/validate.rb # validate: 48 files OK
python3 scripts/test-run-state.py # run-state: OK
npm test # 23 tests, 23 pass, 0 fail
bash -n ... && shellcheck --severity=error ... # OK
./scripts/smoke-install.sh # OK
./scripts/test-memory-compact.sh # OK
npm run generate:reference && git diff --exit-code -- docs/reference # clean
npm run docs:build # build complete
npm pack --dry-run # 64 files, bytecode: []The branch was force-pushed, so CI needs to run once more on |
sametcelikbicak
left a comment
There was a problem hiding this comment.
Thanks for the thorough follow-up — the bytecode is gone from the tree and the history, the nested .npmignore plus CI backstop is a solid fix, and the docs are consistent now. CI is green on 4386c91, so I'm approving and merging this. Appreciate the careful work!
VitePress 1.6.4 pins vite ^5.4.14, and Vite 5 is end-of-life with 8 open advisories; its esbuild ^0.21.3 is also affected. Dependabot cannot produce a compatible fix, so override Vite to the patched 6.x line. The plugin-vue peer range already covers Vite 6. Also finish the docs consistency left from #132 by naming start-task alongside start-run as a creator of .team/.gitignore, and document the override and its removal condition in CONTRIBUTING.
What changed
Four focused commits:
fix: check reports linked skills as unmanaged— one-line fix inbin/opencode-teamplus a regression test.fix: make .team/ ignore itself instead of claiming it is gitignored— the first/teamrun (and/memory init) now writes.team/.gitignore; docs describe that mechanism.docs: correct the model claims and the agent frontmatter example— README/docs/usage.mdno longer claim the defaults are free-tier Zen models, and the example frontmatter no longer showsname:, which OpenCode 2 ignores andscripts/validate.rbrejects.fix: cover direct agent calls and keep bytecode out of the package— review follow-up: the workspace rule inteam/AGENTS.md, idempotent creation inrun_state.py, a re-verified memory report, and packaging hygiene after a stray__pycache__slipped in.Why
1.
opencode-team checkcalls every installed skill "not managed".The skill loop passed the already-resolved symlink target to
targetInRepo, but that helper expects the link path and callsreadlinkSyncon its argument. Reading a directory link target fails, thecatchreturnsfalse, andcheckwarns for all 14 skills while the installer has just linked them:The
agents/commandsloop right above already passesconfigPath, so this was a copy/paste slip.install.sh --checkis unaffected. The existing test only assertedagents →andteam.yaml →, which is why it slipped through; the new test fails on the old code and passes on the new one.2.
.team/is documented as gitignored but never was.docs/faq.md,docs/memory.md,docs/runs.md,team/AGENTS.mdand the orchestrator all said.team/is gitignored. Nothing created an ignore rule: the repository's own.gitignoreonly covers this repo, and the installer cannot know which project a later/teamrun happens in. In a user project,.team/01-research.mdand.team/runs/showed up ingit statusand were onegit add .away from being committed.Making
.team/ignore itself is the only option that needs no project-side edit and no tracked file:The orchestrator's first-run lifecycle creates it (preserved when present),
/memory initdoes the same,run_state.py start-run/start-taskcreate it idempotently,team/AGENTS.mdcarries it as a general rule for every agent including direct@rolecalls, and the docs describe the mechanism instead of asserting a guarantee that did not exist.3. Model docs contradicted the manifests and each other.
README said "Models are free-tier OpenCode Zen models" and "the defaults use free-tier models", while no agent pins a
model:and each one inherits the session's model — whichdocs/faq.mdalready documents correctly. The same section showedname: marketingin an agent frontmatter; OpenCode 2 derives the id from the filename, and the validator explicitly rejectsname:inagents/. Both are now accurate, and the example validates.Also dropped a reference to
docs/rfcs/0001-project-memory.md, which no longer exists.Checklist
ruby scripts/validate.rbpassesbash -n install.sh scripts/*.shand./scripts/smoke-install.shpasswindows-latest, both shells); no PowerShell file changeddescriptionvalues are quoted when they contain:— no new frontmatter descriptionsteam.yamlreferences resolve (agent,skill, profile stage ids)docs/install.mdrequirements section updatedVerification (local, OpenCode 2.2.7, Node 22.18)
The new CLI test was checked against the old code:
not ok 1 - check reports installed skills as managed symlinks.Runtime confirmation that the 14 agents still load in OpenCode 2.x, with the installed config dir:
Related issue
No open issue covers these; found while reviewing the v2.0.0 tree.