Repository navigation
feat: a packaged project reads the reference docs from the plugin (decision 0019) - #33
Merged
Merged
Conversation
…cision 0019)
The four reference docs (COST-MODEL, MCP-INTEGRATION, MEMORY-STRATEGY, SPEC-MODEL) are generic,
never edited by a project, and overwritten verbatim by every upgrade. The aplyca-adf plugin now
carries them in docs/, generated from skeleton/docs/, and a packaged project commits none of them.
What sessions showed (Claude Code 2.1.286) decided how each part reaches them:
- Skills and agents get ${CLAUDE_PLUGIN_ROOT} filled in: they name the plugin's copy, and open with
a line saying it's outside the project. Without it, an agent on Haiku read docs/SPEC-MODEL.md in
the project instead.
- Workflow scripts don't: deep-spec-analysis's plugin copy carries the spec model's text, through
one SPEC_MODEL constant the build fills in.
- Reading any file outside the project asks first, the plugin's own folder and its installed copy
included: a packaged project commits Read(~/.claude/plugins/cache/aplyca/aplyca-adf/**).
- The plugin's SessionStart hook tells a packaged session where the docs are.
The project's files link the docs at the pinned release on GitHub. scripts/link-reference-docs.py
rewrites the links; /adopt runs it, /upgrade moves them with the pin and back on a switch to
committed. The committed install is unchanged. TRACKER-INTEGRATION and PARALLEL-AGENTS stay in the
project: they hold its settings.
Evals: link-script tests in test-plugin.sh, the plugin's session-context line in test-hooks.sh,
the plugin's workflows parsed by check-skills.sh, check-packaged.sh's reference-doc checks, and the
new plugin-docs session suite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The experiments behind decision 0019 (what a plugin's own files allow in Claude Code 2.1.286) and the new plugin-docs suite: run 1 found an agent on Haiku reading docs/SPEC-MODEL.md in the project instead of the plugin's copy; with the outside-the-project line, runs 2 and 3 passed (7/7, $0.58). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mauricios
marked this pull request as ready for review
October 6, 2026 03:52
mauricios
added a commit
that referenced
this pull request
Oct 6, 2026
A minor release: a packaged project no longer commits the framework's four reference docs; it reads them from the pinned plugin (#33, decision 0019). Unreleased becomes v1.2.0, with the upgrade from v1.1.x: /aplyca-adf:upgrade moves the pin and, in a packaged project, removes the unchanged copies, rewrites the links, adds the read rule, and extends the names note. plugin.json 1.2.0; both READMEs name the release. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
The four reference docs —
COST-MODEL.md,MCP-INTEGRATION.md,MEMORY-STRATEGY.md,SPEC-MODEL.md, about 950 lines — are generic, never edited by a project, and/upgradealready overwrites them verbatim. A packaged project no longer commits them: theaplyca-adfplugin carries them indocs/, generated fromskeleton/docs/(decision 0019, amending 0016).TRACKER-INTEGRATION.mdandPARALLEL-AGENTS.mdstay in the project, because they hold its settings. The committed install is unchanged.What sessions decided
Headless sessions on Claude Code 2.1.286 shaped the design (report):
${CLAUDE_PLUGIN_ROOT}is filled in for skills and agents${CLAUDE_PLUGIN_ROOT}/docs/<doc>.mddeep-spec-analysis's plugin copy carries the spec model's text, through oneSPEC_MODELconstant the build fills indocs/, a skill's own folder, the installed copy in~/.claude/plugins/cache/Read(~/.claude/plugins/cache/aplyca/aplyca-adf/**)inpermissions.allow. Checked: with it, the session and a plugin agent read the cache without askingdocs/SPEC-MODEL.mdin the project although its instructions gave the plugin's full pathThe plugin's SessionStart hook also tells a packaged session where the docs are, so Claude reads them locally instead of fetching the GitHub links.
The project's files
scripts/link-reference-docs.pyrewrites them:/adoptruns it;/upgraderuns it to move the links with each pin, and back on a switch to committed./adoptand/upgradeleave the docs out only when the release carries them inplugins/aplyca-adf/docs/, so adopting from an older tag still works./write-spec, which a packaged project can't do.Upgrade impact
session-context.shanddeep-spec-analysis.js. Both behave as before./aplyca-adf:upgradedoes four steps after moving the pin:Evals
check-skills158,test-hooks82,test-modules45,test-plugin18. New in this PR:node --check.check-packaged.sh: gains the reference-doc checks. On a correct packaged layout all 10 pass; with a doc put back and the rule removed, those two fail.plugin-docs(Haiku, default permission mode, no extra directories). Run 1 found the path-shortening issue above. Runs 2 and 3 passed after the fix (run 3: 7 of 7, $0.58).agent-spec-model: a plugin agent reads the plugin's spec model.session-docs: the session finds a doc through the session context.without-rule: the control, where the same read is denied.🤖 Generated with Claude Code