Skip to content

Generator cross-project portability design - #301

Merged
joelteply merged 1 commit into
mainfrom
docs/generator-cross-project-portability
Mar 12, 2026
Merged

joelteply merged 1 commit into
mainfrom
docs/generator-cross-project-portability

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

  • Documents ./jtag generate as an AI-callable tool for cross-project use
  • Platform adapters (Swift, Kotlin, C, Python, Proto) for multi-language generation from single spec
  • VHSM iOS/Android SDK as immediate use case
  • Decoupling requirements for standalone @cambrian/generator package

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.
Copilot AI review requested due to automatic review settings March 12, 2026 15:20
@joelteply
joelteply merged commit 5f2adff into main Mar 12, 2026
1 check passed
@joelteply
joelteply deleted the docs/generator-cross-project-portability branch March 12, 2026 15:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +492 to +496
## 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.

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +505 to +507
With the generator:
```bash
# AI agent generates a spec

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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)

Copilot uses AI. Check for mistakes.
```
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

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
3. AI calls: ./jtag generate --spec=my-feature.json
3. AI calls: ./jtag development/generate --spec=my-feature.json

Copilot uses AI. Check for mistakes.
joelteply added a commit that referenced this pull request Aug 2, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants