Reference-don't-copy, agent adapter generation, and upward toolkit lookup - #58
Conversation
Add a "Consuming This Toolkit From a Project" README section and reinforce in AGENTS.md that toolkit skills, features, and contracts are referenced, not copied; only executable tooling is vendored. Update the bootstrap-project skill, agent templates, and bootstrap prompts to install project contracts and generate thin agent adapters. Make the example a complete reference with a thin adapter generator, generated Codex/Vibe/Copilot/Cursor adapters, and a Copilot entry point. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Do not assume the architecture-knowledge-toolkit is a direct sibling of the consuming project. Change the local lookup order in AGENTS.md, README, the agent template, the prompts, and the example so agents search ../architecture-knowledge-toolkit and then each parent directory up to the filesystem root before falling back to a recorded reference or the public repository. This supports projects that live outside the toolkit's parent folder. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dieterbaier
left a comment
There was a problem hiding this comment.
Die konzeptionelle Richtung passt sehr gut. Ich habe allerdings einen Blocker im Bootstrap-Pfad gefunden: Der Skill weist konsumierende Projekte an, den Generator unverändert aus dem Toolkit zu kopieren. Dieser Generator ist aktuell toolkit-spezifisch (u. a. feste Cursor-Datei und Toolkit-Text) und erzeugt daher nicht die beschriebenen projektbezogenen Adapter. Dafür braucht es entweder einen generischen/parametrisierbaren Projektgenerator oder eine explizite Anpassungs-/Template-Stufe beim Bootstrap.
| Then set up thin, generated agent adapters instead of hand-writing per-agent | ||
| files: | ||
|
|
||
| - Copy `scripts/build-agent-adapters.js` and `scripts/check-agent-adapters.js` |
There was a problem hiding this comment.
Blocker: scripts/build-agent-adapters.js im Toolkit kann nicht unverändert in ein Zielprojekt kopiert werden. Er ist derzeit auf architecture-knowledge-toolkit fest verdrahtet (inkl. adapters/cursor/rules/architecture-knowledge-toolkit.mdc und toolkit-spezifischem Adaptertext). Damit erzeugt der hier beschriebene Bootstrap im Zielprojekt falsche Adapter. Bitte entweder einen generischen/parametrisierbaren Projektgenerator bereitstellen oder hier ausdrücklich vorgeben, dass der Generator aus einem Projekt-Template erzeugt bzw. für Projektname und Routingmodus angepasst wird.
Review blocker: the bootstrap path told projects to copy the toolkit's own scripts/build-agent-adapters.js, which is wired to the architecture-knowledge-toolkit name, Cursor file, and boundary text, so it produced adapters for the wrong project. Add a parameterizable generator template under templates/scripts/ that derives the project name (AGENT_ADAPTER_PROJECT env, adapters/agent-adapters.config.json, or the repo directory name) and auto-detects routing (list local skills, else route to the toolkit). Point the bootstrap skill, agent template, prompts, and README at it, and switch the example to copy it verbatim. Add test/build-agent-adapters-template.test.mjs and wire it into build.sh test-js. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Blocker behoben ( Statt Projekte den toolkit-eigenen, fest verdrahteten Generator kopieren zu lassen, gibt es jetzt einen generischen, parametrisierbaren Generator unter
|
dieterbaier
left a comment
There was a problem hiding this comment.
Der ursprüngliche Blocker ist mit 42b9a43 sauber behoben: generischer Projektgenerator, expliziter Template-Pfad, echte Verwendung im Beispiel und passende Tests. Ein kleiner Randfall bleibt: Ändert sich der aufgelöste Projektname (z. B. von Verzeichnisname auf Config/Environment), schreibt der Generator eine neue Cursor-Regel, entfernt die alte adapters/cursor/rules/<alter-name>.mdc aber nicht. Dadurch können mehrere alwaysApply: true-Regeln liegen bleiben, und --check bemerkt die zusätzliche Altdatei nicht. Bitte entweder alte generierte Cursor-Regeln bereinigen oder den Check auf unerwartete generierte .mdc-Dateien erweitern. CI ist grün; abgesehen davon sieht die Korrektur gut aus.
Review edge case: when the resolved project name changes, the generic generator wrote a new adapters/cursor/rules/<name>.mdc but left the old one in place, leaving several alwaysApply rules active without --check noticing. Treat generated .mdc files under adapters/cursor/rules as generator-owned: remove them on build and flag them on --check when they are not the current rule. Hand-authored rules (without the generated marker) are left untouched. Add tests and sync the example copy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Randfall behoben ( Generierte Cursor-Regeln unter
Getestet in |
Summary
Make the toolkit describe how a consuming project should use it, and align the bootstrap path with the generated agent-adapter approach.
README.mdand reinforce reference, don't copy inAGENTS.md: toolkitskills/**/SKILL.md,features/, and contract text are referenced, never copied; only executable tooling (schemas, templates, validators/generators, the adapter generator) is vendored and kept in sync.skills/bootstrap-project/SKILL.md,templates/agents/*, and the bootstrap prompts so a new/existing project installs thin agent contracts and generates the Codex/Vibe/GitHub Copilot/Cursor adapters instead of hand-writing them, with.github/copilot-instructions.mdas an entry point.example/a complete reference: thin adapter generator, generated adapters, and a Copilot entry point.../architecture-knowledge-toolkit, then each parent directory up to the filesystem root, before the recorded reference or public fallback. This supports projects outside the toolkit's parent folder.Verification
node scripts/check-agent-adapters.js(toolkit andexample/): adapters current.node --test test/build-agent-adapters.test.mjs: 4/4 pass.🤖 Generated with Claude Code