Repository navigation
Generator cross-project portability design - #301
Conversation
Adds ./jtag generate as a tool for AI agents across any project. Documents platform adapters (Swift, Kotlin, C, Python, Proto), the VHSM iOS/Android SDK use case, and decoupling requirements for standalone package publishing.
There was a problem hiding this comment.
Pull request overview
Adds a new documentation section to the unified generator architecture describing using the generator via ./jtag for cross-project, multi-language code generation (with VHSM iOS/Android as the motivating example) and outlining future adapter-based portability and decoupling into a standalone package.
Changes:
- Document generator usage as an AI-callable CLI tool for cross-project workflows.
- Describe a future “platform adapter” pattern (Swift/Kotlin/C/Python/Proto) driven from a single spec.
- Outline requirements to decouple the generator core from Continuum for standalone packaging.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## Cross-Project Portability: `./jtag generate` | ||
|
|
||
| The generator is not just a build step — it's a **tool** callable via `./jtag`. This | ||
| means AI agents (Claude Code, Codex, etc.) can invoke it as part of their workflow | ||
| in any project that adopts it. |
There was a problem hiding this comment.
The CLI command name documented here (./jtag generate) doesn’t appear to exist in the current command registry; the implemented generator command is development/generate (see src/commands/development/generate/... and src/shared/generated-command-constants.ts). This section should either use ./jtag development/generate in examples, or explicitly call out that ./jtag generate is a planned alias that is not implemented yet.
| With the generator: | ||
| ```bash | ||
| # AI agent generates a spec |
There was a problem hiding this comment.
The examples introduce a --adapter flag (e.g. --adapter=swift) but the current development/generate command’s params only include spec and optional template (no adapter selection). Either update the docs to mark these commands/flags as hypothetical future CLI/API, or adjust the examples to match the current interface.
| With the generator: | |
| ```bash | |
| # AI agent generates a spec | |
| With the generator (future adapter-aware CLI): | |
| ```bash | |
| # AI agent generates a spec (future CLI; --adapter flag not yet implemented) |
| ``` | ||
| 1. AI reads the project's generator config (adapters, conventions, paths) | ||
| 2. AI produces a CommandSpec JSON (30 lines, language-agnostic) | ||
| 3. AI calls: ./jtag generate --spec=my-feature.json |
There was a problem hiding this comment.
This step list again uses ./jtag generate --spec=..., but the currently registered generator command name is development/generate. If the intention is to standardize on a shorter alias, consider adding that alias in the CLI/router first; otherwise update the docs to the canonical command name to avoid copy/paste failures.
| 3. AI calls: ./jtag generate --spec=my-feature.json | |
| 3. AI calls: ./jtag development/generate --spec=my-feature.json |
…breaker fires even when window evidence scrolls out (#301) (#2110) Glass-boxed live 2026-08-02 (captures saved): Atlas's wake-intro was reproduced BYTE-FOR-BYTE by Benchy then Asha — identity claim included ("I'm Atlas" spoken by three different peers). Every layer of the existing machinery worked except one join: [repetition]/[pattern] facts rendered correctly in the copier's prompt (detection fine), and the ONE time the [anchor] escalation fired, her next turn broke the template (cure proven). But the escalation counters derive their runs from the RENDERED window, which the live context budget squeezes to 2-6 turns — so during an hours-long chain the older echo evidence had always scrolled out and the run read 1, one below PATTERN_FIRES_BEFORE_ANCHOR. The anchor that provably breaks these loops structurally could not fire. Same starvation the room-speech ring already cures for the inbound_restates fact; the service-loop detectors never got the ring. Fix: ring_echo_run — a pure counter over ring SNAPSHOTS (own-speech + room rings, boot-hydrated per #265) using the same containment geometry as the in-window detectors (shared echo_words tokenization, no drift). The LIVE message path and self-tick call append_ring_anchor_if_starved: when the ring-counted run reaches the threshold and the window-derived detectors pushed no [anchor], the SAME work_board_anchor is appended — one anchor per burst, whichever counter earns it, with a persona.pattern.ring_anchor probe. Eval/replay paths are untouched: build_workspace_turns' signature does not know rings exist (#59 isolation preserved — the reason window-derivation was chosen). Self-vouching subtlety pinned by test: the authorless room ring holds her own copy too, so exclusion is AT MOST ONE identical entry — the remaining identical copies ARE the photocopy evidence. Test builds the live specimen (Atlas intro, Benchy/Asha copies): 2 trailing photocopies count 2 (escalates), novel work counts 0, a lone original with no independent copies counts 0. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Fable 5 <[email protected]>
Summary
./jtag generateas an AI-callable tool for cross-project use@cambrian/generatorpackage