docs(skill): /trade setup tracks the knowledge dir by default, drops the global gitignore entry; release v2.17.0 - #54
Merged
Conversation
…riting the global gitignore Setup step 4 unconditionally appended an unanchored `knowledge/` to the user's global gitignore, and the same pattern to the .gitignore of whatever repo setup ran in, on the premise that the knowledge dir "stays local". The rest of the skill says the opposite: L2 is private and usually a separate repo found via knowledge_path (SKILL.md, Knowledge Architecture), import.md never commits because the personal knowledge repo is version-tracked on purpose, and data-collection.md sets a repo's visibility by its corpora. The failure is silent. With the global line present, a notes repo keeps showing edits to files it already tracks, but a new writedown never appears in `git status` and `git add -A` skips it. The unanchored pattern also hid every `knowledge/` directory in every other repo, and the project entry resolved the repo from the cwd instead of from the target. Step 4 now classifies the repo that contains the target and asks which case applies: no repo (write nothing), a repo meant to hold the notes (write nothing, then probe with `git check-ignore -v --no-index`), or a repo not meant to hold them (an anchored entry in that clone's .git/info/exclude, never the committed .gitignore). It never writes the global gitignore and offers to delete the entries older versions wrote. The scaffolded template's Git tracking section follows the same model, and its stale `knowledge/*/raw/` tip is replaced by the corpus rule.
#53 shipped v2.16.0 and fixed the same raw/ leftovers in setup step 5 and the knowledge-index template. The conflicting hunks take its wording, which matches its import.md change (copy the source into a corpus, leave the original). This branch's release moves to v2.17.0, and its log entry now sits above #53's.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the git handling in
/trade setupstep 4 with one model that matches the rest of the skill: the personal knowledge dir is private and version-tracked by default. Setup ignores it only where it would otherwise be committed to the wrong repo, and never writes the global gitignore. The scaffolded template's "Git tracking" section now describes the same model. Bumps the plugin to v2.17.0 (plugin.json + both marketplace.json fields), so merging auto-tags and releases.Why
Step 4 unconditionally appended an unanchored
knowledge/to the user's global gitignore, and the same pattern to the.gitignoreof whatever repo setup ran in, on the premise that the knowledge dir "stays local". The rest of the skill says the opposite:SKILL.md→ Knowledge Architecture: L2 is "private, usually a separate repo found viaknowledge_path".commands/import.md: "Do not commit — the personal knowledge repo is version-tracked on purpose".data-collection.md: a repo's visibility is set by the most restrictive corpus it holds, a rule that only matters for a tracked repo.The failure is silent (reproduced in a scratch repo). With the global line present, a notes repo keeps showing edits to files it already tracks, but a new writedown never appears in
git statusandgit add -Askips it. Only an explicitgit add <path>complains. So a notes repo that keeps its bundle in aknowledge/subdirectory (e.g.~/Code/<site>/knowledge/, resolved viaknowledge_path) looks healthy while new notes never reach a commit. Two more problems:knowledge/directory in every other repo on the machine.How setup behaves now (step 4)
Setup finds the repo that contains the target (
git -C <target> rev-parse --show-toplevel) and asks which case applies instead of inferring it:git initplus a private remote.git check-ignore -v --no-indexon the scaffolded files to confirm no rule hides them (without--no-index, tracked files are skipped). Warns if the remote is public./<path>/entry to that clone's.git/info/exclude, which is never committed and is shared by linked worktrees. Skips the write if a rule already covers the dir, and warns if notes are already tracked there.git config.# Personal trade knowledge scaffolded by /trade setup — never commit.comment../knowledgewould then land inside it.Files
references/commands/setup.md: step 1 note, step 4 rewritten (4a–4d), constraints.references/commands/templates/knowledge-index.md: "Git tracking" and "Re-running setup" rewritten. The staleknowledge/*/raw/tip becomes the corpus rule: a large corpus goes to its own repo via$TRADE_CORPUS_DIR. The intro now says posts can arrive as links, matching docs(skill): prompt audit for Claude Opus 5.5 — fix accreted contradictions, de-shout gates; release v2.16.0 #53's step 1.references/log.md: dated entry above docs(skill): prompt audit for Claude Opus 5.5 — fix accreted contradictions, de-shout gates; release v2.16.0 #53's.plugins/trade/plugin.json,.claude-plugin/marketplace.json: 2.16.0 → 2.17.0.Reviewer notes
raw/leftovers in setup step 5 and in the template's ingestion steps and layout table. The conflicting hunks take docs(skill): prompt audit for Claude Opus 5.5 — fix accreted contradictions, de-shout gates; release v2.16.0 #53's wording, which matches itsimport.mdchange (copy the source into a corpus, leave the original). This PR's diff is therefore only the git model, and the version moves to 2.17.0.--git-path info/excludefrom a subdirectory and from a linked worktree,check-ignore -q/-v --no-indexon tracked, untracked and not-yet-existing paths, and anchored vs unanchored matching.claude plugin validate --strictpasses for the plugin and the marketplace, relative links in the edited files resolve, and the version matches in all three places.skill-lintruns only in CI and was not run locally..gitignoreentry forknowledge/is unchanged. It is the right protection for clones of this public repo, and step 4b's dedupe check detects it.index.mdis not rewritten, because setup never overwrites files. Step 4d's cleanup is how an old global entry gets removed.