WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green - #75

Merged
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer
Jul 8, 2026
Merged

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green#75
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

What this is

The Layer-0 pulse-designer track from tonight's spec (spec — drafted in Aaron's personal vault, spec-20260703-020630-amicode-opencode-thin-fork; will be socialized before team-canon promotion). It implements the front-of-chain interview (UX1 #46's storyboard) as opencode-native config: an agent + instructions + a bookkeeping tool pack. Nothing in the phased build moves — amico-run, run-dir contract, schemas, inspector, scheduler/Δ-cloud tracks are all untouched; the only modified prod file is opencode_config.ts (additive keys).

Commits

  1. feat(L0) interview spine in AGENTS.md — 8 stages, one-question-at-a-time, scoped to the pulse-designer persona so the default build agent behaves exactly as before
  2. test(L0) tiered e2e suite (A registration / B plugin load / C live turns / D full chain)
  3. feat(L0)amicode_* tool pack v0 + registration (plugin abs-path + agent block via OPENCODE_CONFIG_CONTENT — both verified live at 1.17.3)
  4. tier C + D enablement

Evidence (all on this branch, tonight)

  • Fast suite: 122 passed (was 91 on main)
  • e2e 4/4 tiers green incl. tier D full chain: 10 interview turns (free anonymous provider — zero creds on the machine!) → all four tools fired (System → Formulation → Run entities on disk) → agent authored solve.jl from the vetted template → detached amico-run launch → run-dir → FINISHEDF = 0.9998977, 60 iters
  • Repro: AMICODE_E2E_LIVE=1 AMICODE_E2E_FULLCHAIN=1 npx vitest run test/slow/interview_e2e.test.ts

Not in this PR

The opencode fork (branded binary — L1 "AMICODE" + build recipe) lives in a local-only clone, deliberately unpublished pending discussion. This branch runs green against the stock vendored binary too — the L0 layer is binary-agnostic by design.

Known follow-ups

.vsix packaging of opencode-plugin/ unverified (TODO in headers); set_model merges via json sidecar; Rydberg is recorded-honestly (template is transmon-only); free-model phrasing variance noted in the tier-D transcript.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

T16 landed after the PR opened: amicode_to_hardware + amicode_calibrate guided stubs (no device I/O; gate/checks values pinned by the serializer). The pack now covers all 8 interview stages — 6 tools registered, 128 tests green. Also since opening: e2e re-verified 4/4 against the refreshed fork binary (fast suite + smoke + tiers; one tier-C flake traced to free-model sampling noise, passed on rerun — live tiers are env-gated off in CI).

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Live-demo-driven additions (Aaron driving the dev host, ~03:00–04:00): Amico identity + proactive interview kickoff (fc7b13d) and amicode_ask — option-stage questions as button payloads, 7 tools registered (903ce76). The matching UI (entity rail, collapsed chips, ask-button cards, start-screen wordmark, en-default locale) lives in the local fork's patch stack (11 commits, unpublished — see the handoff note in the personal vault). All L0 changes here remain binary-agnostic: on a stock binary, amicode_ask degrades to a plain-text question with listed options.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

This branch now additionally carries: the scores runtime (#76 merged, interview-as-data — score #0 v2 with ask-discipline + anchor-on-recorded-state), and the fixed opencode port (amicode.opencodePort, default 43117 — Remote-SSH users forward once). Suite: 203/203. Note for reviewers: 6471ed9 was momentarily red (hardcoded score-version literals in the stacked tests), fixed in 7f28414.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Final night addition: consolidated on opencode's native question tool (turn-blocking form — structurally prevents the self-answer/prose-repeat failure modes) as the one ask mechanism; amicode_ask deprecated-but-kept (8e9c89e). Score #0 at v3. Fork brands the native form and ships a 5-chip start screen with a repertoire-chips TODO (chips become one-per-entitled-score once a small endpoint exposes the compiled repertoire).

🤖 Generated with Claude Code

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review July 3, 2026 10:46
@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Ready for review — merge gated on @jack-champagne's eyes (Aaron's call: everything ships except the merge).

Since the last update: scores runtime merged in (#76 content — interview-as-data, score #0 v3, guard, router, usage funnel), fixed port 43117, curated capabilities answer, native-question-tool consolidation, H-robot brand mark + spinner, and the distribution chain is live: the vendored binary now comes from the private mirror release harmoniqs/opencode v1.17.3-amicode.1 (linux-x64 + darwin-arm64), clean-fetch verified byte-identical.

Review pointers (the seams):opencode.lock.json + scripts/fetch_opencode.mjs (repo/tag + authenticated gh path), src/opencode_config.ts (additive agent/plugin/permission injection), opencode-plugin/ (Bun-side, single-export), scores/ (splice never touches source AGENTS.md — fallback intact). Suite: 206 fast + slow gates green, CI green both platforms. Setup for testing: root AGENTS.md (agent-forward) or packages/extension/TESTING.md (human).

Known-not-done, honestly: Rydberg CZ template is EXPERIMENTAL (vetting stalled, marked in-file); amicode_ask deprecated-not-removed; ask-card/bridge legacy code pending pruning; repertoire-driven start chips need a server endpoint.

🤖 Generated with Claude Code

jack-champagne pushed a commit that referenced this pull request Jul 3, 2026
…the per-solve "ask" nag (#79)
AGENTS.md instructs the agent to READ run artifacts (FINISHED/result.toml for
results, run.log for failure tracebacks) under the runs root — but the injected
permission.external_directory only granted the templates dir + /tmp/amicode-work.
opencode defaults external_directory to "ask", so every read-back fired a
permission prompt: one per solve, and repeatedly on failures (the 2026-07-03
live test hit this hard — four failing runs, agent in run.log each time).
Thread the resolved runsRoot (respects the amicode.runsRoot setting) into
buildOpencodeConfigContent and grant `${runsRoot}/**`. Still least-privilege:
scoped to the one additional root AGENTS.md actually sends the agent's file
tools into; amico-run's own subprocess writes never needed a grant.
Tests: unit (grant present + still path-scoped), real-opencode integration
(grant survives the 1.17.3 deep-merge alongside the user's global permission
keys). 93 pass, typecheck clean.
Note: Aaron's #75/#76 restructure the same permission block (adding entities/
scores grants — correctly); whichever lands second has a one-line rebase.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
aarontrowbridgeand others added 20 commits July 3, 2026 17:02
Scoped to the pulse-designer persona (never hijacks the default build agent),
one-question-at-a-time, 8 stages PLATFORM→CALIBRATE, transmon fully wired /
Rydberg recorded-honestly, amicode_* tools as bookkeeping with bash+amico-run
still the launch mechanism. Tests: interview block + no-unknown-placeholder
assertion (only {{TEMPLATE_PATH}}/{{JULIA_PROJECT}} substituted).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gin load / live turns)
Tier A green vs stock 1.17.3; B gates on the plugin file, C on creds
(none on this machine tonight — morning step: opencode auth login).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Four bookkeeping tools (pick_system / set_model / formulate / solve-record)
executed by opencode's embedded Bun runtime; entities as TOML under
~/.amico/runs/default/_entities ($AMICODE_ENTITIES_DIR override). Registration
via buildOpencodeConfigContent: plugin abs-path + pulse-designer agent block +
entities-dir permission grant (T8 probe: both mechanisms live at 1.17.3).
Plugin stays outside the extension bundle/tsconfig; load line on stderr
(debug-config stdout purity — regression-guarded). 99→122 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Free anonymous provider (opencode/big-pickle) resolves without auth.json →
AMICODE_E2E_LIVE=1 forces the creds gate. Cadence assertion = stage-batching
check (multiple '?' inside one platform question is fine); transcript saved
to tmpdir for the experiment note.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Real-home mode now substitutes AGENTS.md via prepareOpencodeProject (stage 6
needs real template/julia paths). Keyword-routed answers, bounded turns,
run-dir poll. Result: 10 turns on the free model → all four amicode_* tools
fired (System→Formulation→Run stub) → authored solve.jl → amico-run launch →
F=0.9998977/60 iters. AMICODE_E2E_FULLCHAIN=1 gates it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amicode_to_hardware (device_session stub; gate + checks PINNED by the
serializer so a stub can never claim an approval that didn't happen) and
amicode_calibrate (ILC stub, auto-refs device_session.toml). No device I/O —
explanations say so explicitly, mirroring AGENTS.md stage 8, which now names
both tools. 6 tools registered (verified via /experimental/tool/ids). 122→128
tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
'Who are you?' now answers 'I'm Amico — Amicode's pulse-design copilot'
(never 'opencode, an interactive CLI tool'), and a greeting/no-intent session
opener triggers the stage-1 PLATFORM question instead of a generic assistant
reply. Specific asks keep the skip rule.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Interview option-stages (platform, sim-vs-solve, problem/gate) now go through
amicode_ask(question, options[2-6]); the renderer draws buttons from the tool
part's input and a click sends the option text as the next user message.
Free-form values stay plain questions. 7 tools registered (runtime-verified).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Live-demo findings: the free model repeated the question in prose and answered
it itself. Tool return now says STOP HERE explicitly; AGENTS.md mirrors it.
New optional details[] arg — one dim qualifier per button (minimalist card,
slightly more context).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pixel <0110> face in brand yellow on the H silhouette (from the website
robot); currentColor body serves dark+light. Same asset ships in the fork's
logo/favicon (kept in sync manually — canonical geometry recorded there in
AMICODE-PATCHES.md).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ited stop
Work found staged in the night tree (parallel session / Aaron) — folded in
after validating build + full suite green. Fixes the Remote-SSH pain: forward
43117 once, restarts reuse it; stop() now resolves on child exit so a
fixed-port restart can't race the old process for the socket. Set 0 to restore
per-start ephemeral ports.
…e_manifest transport, scores-root grant, never-brick fallback
aarontrowbridgeand others added 11 commits July 3, 2026 17:04
…s (score_guard sibling module, entitiesDir transport)
…ded-state (v2)
The compiled score is now what runtime users see — the STOP-HERE ask
discipline and optional per-option details move in from the AGENTS.md
fallback, plus the anti-drift anchor from Aaron's live session (rail said
rydberg while the interview asked transmon-omega): re-read the System entity
before stage-2+ questions; correct the record first if it's wrong.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion cross-check
Score content bumps (v1->v2 tonight) must not red the suite; instead assert
the compiled banner and the manifest agree on whatever version ships.
… deprecated
Live finding: 1.17.3 ships a turn-blocking question tool (tool/question.ts)
with options+descriptions+custom answers — the model reached for it unprompted
and its semantics structurally kill self-answering and prose repeats. Score #0
v3 + AGENTS.md fallback now route all choice questions through it; amicode_ask
stays registered but deprecated. One mechanism, upstream-owned.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ine talk
The starter chip hit a Webfetch to the engine's website and a flat 3-sentence
reply. The canonical question now has a canonical answer: capability bullets
(interview, fast-path, live inspector, warm-start/resume, hardware preview),
honest scope line, then next-step options via the question tool.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…late
fetch_opencode gains repo/tag manifest fields with authenticated gh download
for the private harmoniqs/opencode release (206 tests). TESTING.md = the
7-point branch test script for the team. solve_rydberg_cz.jl: 2-atom 3-level
QuEra deep-blockade CZ, public-Piccolo-only (fixed-phase NLP + post-hoc
virtual-Z scan; free_phase kwarg is Piccolissimo-gated) — vetting solve in
flight, score wiring lands with its result.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Point an agent at the repo and it can set up, verify, and test the branch:
prerequisites with checks, ordered setup, five verification gates, dev facts
(fixed port, fork boundary, plugin runtime, scores), sharp edges.
…icode.1)
Lock repointed to the mirror (both platform shas from the release assets);
clean-fetch verified end-to-end via the authenticated gh path — downloaded
binary is byte-identical to the deployed build (8aa718ad…) and serves
<title>Amicode</title>. Rydberg CZ template clearly marked EXPERIMENTAL
(vetting stalled on pathological first-iteration NLP cost; parked) and
TESTING.md de-overclaimed accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ot signature
The rebase onto main folded in #79's runsRoot param (3rd position). These test
call sites predated it and passed pluginPath/scoresRoot into the wrong slots or
omitted runsRoot entirely. Insert runsRoot so scores + slow-e2e configs grant
the right paths. Fast suite 207 pass; tsc --noEmit clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aarontrowbridge
aarontrowbridgeforce-pushed the aaron/night-l0-pulse-designer branch from 05db60f to d81e63fCompareJuly 3, 2026 21:08
jack-champagne added a commit that referenced this pull request Jul 4, 2026
The pre-solve formulation.toml emit could not run through the agent deploy
path: AGENTS.md copies solve_template.jl alone into a scratch dir and runs the
copy, so @__DIR__ was the scratch dir and include(emit_formulation.jl) resolved
to a file that was never copied — LoadError before solve!, on every run. CI
never executes the template, so it stayed green.
- Inline emit_formulation into solve_template.jl; delete the sibling helper.
Sharing moves to a Julia package (AmicoRunDir.jl) when #75/#76 add a second
template — the only share mechanism that survives the single-file copy.
- Tighten formulation.schema.json: per-family if/then — transmon requires and
type-checks delta/levels/drive_max; formulation requires gate/T/N; Q/R
optional; additionalProperties:true per family (unknown families lenient).
- Add template_deploy_contract.test.ts: reproduces the AGENTS.md single-file
copy and asserts every include() resolves. Red on the bug, green inlined.
schema_version stays "1" (additive: no on-disk formulation.toml exists yet).
@jack-champagne
jack-champagne merged commit d81e63f into mainJul 8, 2026
1 of 5 checks passed
aarontrowbridge added a commit that referenced this pull request Sep 1, 2026
… warrant-bounds schema (#703) (#706)
* feat(schema): the autonomy datum — device {none|ro|rw} documented in warrant bounds, rejection pinned (#703)
SEAM 6, amicode's half of the one-autonomy-doctrine (codesign spec
spec-20260831-120000, issue #703):
- $defs.bounds.device — the enum {none, ro, rw} — now carries the datum's
documented semantics: none = no device access; ro = read-only device
access; rw = device writes permitted, gated by the real-board-session
human gate. The approval branch's description points at the datum (one
definition, this schema — the fleet §2.1 pointer formalized).
- The three-systems contract stated once in the schema's documentation,
each counterpart's criterion NAMED under its own owner: amicode's bounds
(this schema), the P4 gate's end-to-end read (merge-gated on strumento #75
MERGED), Telaio's warrant-bounds deserialization conformance (their
campaign). The SEAM 4 contract note is not on main yet — the director
wires the cross-reference line post-merge.
- Rejection tests pin the no-second-knob doctrine mechanically:
validateBounds REFUSES any device value outside the enum and any unknown
device-permission-shaped field (additionalProperties:false), field-precise
errors naming the impostor key; the approval record kind refuses a second
device knob the same way.
* feat(extension): the approval tool surface validates against the schema's device datum (#703)
SEAM 6's tool-surface half (issue #703) — one definition, no free text:
- amicode_request_approval's bounds arg now cites the @amicode/schema
warrant-bounds schema ($defs.bounds — the one definition) and its execute()
validates bounds via validateBounds: a device value outside {none, ro, rw}
or a second device-shaped field is refused BEFORE the card renders, so a
malformed ask can never become a pressable button.
- The plugin twin (retired from the config, still drift-guarded by the
projection test) mirrors the same gate: opencode-plugin/warrant_bounds.ts is
the dependency-free twin of $defs.bounds (bare package specifiers do not
resolve in the plugin runtime — unreachable by construction, per
./ledger_client's sibling-module rules), PINNED to the schema by
test/warrant_bounds_parity.test.ts: the corpus (every datum case) must agree
with validateBounds on ok AND error strings, and DEVICE_DATUM must equal
the schema's own device enum — growth breaks the pin.
- The mint path (amicode_service/warrants.ts approveArgv) validates bounds
against the schema too, refusing invalid bounds instead of silently
dropping them — a dropped key silently under-authorises the minted warrant;
test/amicode_service_warrants.test.ts is the flag-mapping pin the export
always promised, plus the refusal cases.
The three-systems contract line for the PR (the director's): amicode's bounds
are this slice (the schema datum, above); the P4 gate's end-to-end read is
merge-gated on strumento #75 MERGED; Telaio's warrant-bounds deserialization
conformance is their campaign's criterion — each named under its own owner,
none claimed as another's.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@aarontrowbridge@jack-champagne
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green - #75

Merged
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer
Jul 8, 2026
Merged

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green#75
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

What this is

The Layer-0 pulse-designer track from tonight's spec (spec — drafted in Aaron's personal vault, spec-20260703-020630-amicode-opencode-thin-fork; will be socialized before team-canon promotion). It implements the front-of-chain interview (UX1 #46's storyboard) as opencode-native config: an agent + instructions + a bookkeeping tool pack. Nothing in the phased build moves — amico-run, run-dir contract, schemas, inspector, scheduler/Δ-cloud tracks are all untouched; the only modified prod file is opencode_config.ts (additive keys).

Commits

  1. feat(L0) interview spine in AGENTS.md — 8 stages, one-question-at-a-time, scoped to the pulse-designer persona so the default build agent behaves exactly as before
  2. test(L0) tiered e2e suite (A registration / B plugin load / C live turns / D full chain)
  3. feat(L0)amicode_* tool pack v0 + registration (plugin abs-path + agent block via OPENCODE_CONFIG_CONTENT — both verified live at 1.17.3)
  4. tier C + D enablement

Evidence (all on this branch, tonight)

  • Fast suite: 122 passed (was 91 on main)
  • e2e 4/4 tiers green incl. tier D full chain: 10 interview turns (free anonymous provider — zero creds on the machine!) → all four tools fired (System → Formulation → Run entities on disk) → agent authored solve.jl from the vetted template → detached amico-run launch → run-dir → FINISHEDF = 0.9998977, 60 iters
  • Repro: AMICODE_E2E_LIVE=1 AMICODE_E2E_FULLCHAIN=1 npx vitest run test/slow/interview_e2e.test.ts

Not in this PR

The opencode fork (branded binary — L1 "AMICODE" + build recipe) lives in a local-only clone, deliberately unpublished pending discussion. This branch runs green against the stock vendored binary too — the L0 layer is binary-agnostic by design.

Known follow-ups

.vsix packaging of opencode-plugin/ unverified (TODO in headers); set_model merges via json sidecar; Rydberg is recorded-honestly (template is transmon-only); free-model phrasing variance noted in the tier-D transcript.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

T16 landed after the PR opened: amicode_to_hardware + amicode_calibrate guided stubs (no device I/O; gate/checks values pinned by the serializer). The pack now covers all 8 interview stages — 6 tools registered, 128 tests green. Also since opening: e2e re-verified 4/4 against the refreshed fork binary (fast suite + smoke + tiers; one tier-C flake traced to free-model sampling noise, passed on rerun — live tiers are env-gated off in CI).

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Live-demo-driven additions (Aaron driving the dev host, ~03:00–04:00): Amico identity + proactive interview kickoff (fc7b13d) and amicode_ask — option-stage questions as button payloads, 7 tools registered (903ce76). The matching UI (entity rail, collapsed chips, ask-button cards, start-screen wordmark, en-default locale) lives in the local fork's patch stack (11 commits, unpublished — see the handoff note in the personal vault). All L0 changes here remain binary-agnostic: on a stock binary, amicode_ask degrades to a plain-text question with listed options.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

This branch now additionally carries: the scores runtime (#76 merged, interview-as-data — score #0 v2 with ask-discipline + anchor-on-recorded-state), and the fixed opencode port (amicode.opencodePort, default 43117 — Remote-SSH users forward once). Suite: 203/203. Note for reviewers: 6471ed9 was momentarily red (hardcoded score-version literals in the stacked tests), fixed in 7f28414.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Final night addition: consolidated on opencode's native question tool (turn-blocking form — structurally prevents the self-answer/prose-repeat failure modes) as the one ask mechanism; amicode_ask deprecated-but-kept (8e9c89e). Score #0 at v3. Fork brands the native form and ships a 5-chip start screen with a repertoire-chips TODO (chips become one-per-entitled-score once a small endpoint exposes the compiled repertoire).

🤖 Generated with Claude Code

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review July 3, 2026 10:46
@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Ready for review — merge gated on @jack-champagne's eyes (Aaron's call: everything ships except the merge).

Since the last update: scores runtime merged in (#76 content — interview-as-data, score #0 v3, guard, router, usage funnel), fixed port 43117, curated capabilities answer, native-question-tool consolidation, H-robot brand mark + spinner, and the distribution chain is live: the vendored binary now comes from the private mirror release harmoniqs/opencode v1.17.3-amicode.1 (linux-x64 + darwin-arm64), clean-fetch verified byte-identical.

Review pointers (the seams):opencode.lock.json + scripts/fetch_opencode.mjs (repo/tag + authenticated gh path), src/opencode_config.ts (additive agent/plugin/permission injection), opencode-plugin/ (Bun-side, single-export), scores/ (splice never touches source AGENTS.md — fallback intact). Suite: 206 fast + slow gates green, CI green both platforms. Setup for testing: root AGENTS.md (agent-forward) or packages/extension/TESTING.md (human).

Known-not-done, honestly: Rydberg CZ template is EXPERIMENTAL (vetting stalled, marked in-file); amicode_ask deprecated-not-removed; ask-card/bridge legacy code pending pruning; repertoire-driven start chips need a server endpoint.

🤖 Generated with Claude Code

jack-champagne pushed a commit that referenced this pull request Jul 3, 2026
…the per-solve "ask" nag (#79)
AGENTS.md instructs the agent to READ run artifacts (FINISHED/result.toml for
results, run.log for failure tracebacks) under the runs root — but the injected
permission.external_directory only granted the templates dir + /tmp/amicode-work.
opencode defaults external_directory to "ask", so every read-back fired a
permission prompt: one per solve, and repeatedly on failures (the 2026-07-03
live test hit this hard — four failing runs, agent in run.log each time).
Thread the resolved runsRoot (respects the amicode.runsRoot setting) into
buildOpencodeConfigContent and grant `${runsRoot}/**`. Still least-privilege:
scoped to the one additional root AGENTS.md actually sends the agent's file
tools into; amico-run's own subprocess writes never needed a grant.
Tests: unit (grant present + still path-scoped), real-opencode integration
(grant survives the 1.17.3 deep-merge alongside the user's global permission
keys). 93 pass, typecheck clean.
Note: Aaron's #75/#76 restructure the same permission block (adding entities/
scores grants — correctly); whichever lands second has a one-line rebase.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
aarontrowbridgeand others added 20 commits July 3, 2026 17:02
Scoped to the pulse-designer persona (never hijacks the default build agent),
one-question-at-a-time, 8 stages PLATFORM→CALIBRATE, transmon fully wired /
Rydberg recorded-honestly, amicode_* tools as bookkeeping with bash+amico-run
still the launch mechanism. Tests: interview block + no-unknown-placeholder
assertion (only {{TEMPLATE_PATH}}/{{JULIA_PROJECT}} substituted).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gin load / live turns)
Tier A green vs stock 1.17.3; B gates on the plugin file, C on creds
(none on this machine tonight — morning step: opencode auth login).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Four bookkeeping tools (pick_system / set_model / formulate / solve-record)
executed by opencode's embedded Bun runtime; entities as TOML under
~/.amico/runs/default/_entities ($AMICODE_ENTITIES_DIR override). Registration
via buildOpencodeConfigContent: plugin abs-path + pulse-designer agent block +
entities-dir permission grant (T8 probe: both mechanisms live at 1.17.3).
Plugin stays outside the extension bundle/tsconfig; load line on stderr
(debug-config stdout purity — regression-guarded). 99→122 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Free anonymous provider (opencode/big-pickle) resolves without auth.json →
AMICODE_E2E_LIVE=1 forces the creds gate. Cadence assertion = stage-batching
check (multiple '?' inside one platform question is fine); transcript saved
to tmpdir for the experiment note.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Real-home mode now substitutes AGENTS.md via prepareOpencodeProject (stage 6
needs real template/julia paths). Keyword-routed answers, bounded turns,
run-dir poll. Result: 10 turns on the free model → all four amicode_* tools
fired (System→Formulation→Run stub) → authored solve.jl → amico-run launch →
F=0.9998977/60 iters. AMICODE_E2E_FULLCHAIN=1 gates it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amicode_to_hardware (device_session stub; gate + checks PINNED by the
serializer so a stub can never claim an approval that didn't happen) and
amicode_calibrate (ILC stub, auto-refs device_session.toml). No device I/O —
explanations say so explicitly, mirroring AGENTS.md stage 8, which now names
both tools. 6 tools registered (verified via /experimental/tool/ids). 122→128
tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
'Who are you?' now answers 'I'm Amico — Amicode's pulse-design copilot'
(never 'opencode, an interactive CLI tool'), and a greeting/no-intent session
opener triggers the stage-1 PLATFORM question instead of a generic assistant
reply. Specific asks keep the skip rule.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Interview option-stages (platform, sim-vs-solve, problem/gate) now go through
amicode_ask(question, options[2-6]); the renderer draws buttons from the tool
part's input and a click sends the option text as the next user message.
Free-form values stay plain questions. 7 tools registered (runtime-verified).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Live-demo findings: the free model repeated the question in prose and answered
it itself. Tool return now says STOP HERE explicitly; AGENTS.md mirrors it.
New optional details[] arg — one dim qualifier per button (minimalist card,
slightly more context).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pixel <0110> face in brand yellow on the H silhouette (from the website
robot); currentColor body serves dark+light. Same asset ships in the fork's
logo/favicon (kept in sync manually — canonical geometry recorded there in
AMICODE-PATCHES.md).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ited stop
Work found staged in the night tree (parallel session / Aaron) — folded in
after validating build + full suite green. Fixes the Remote-SSH pain: forward
43117 once, restarts reuse it; stop() now resolves on child exit so a
fixed-port restart can't race the old process for the socket. Set 0 to restore
per-start ephemeral ports.
…e_manifest transport, scores-root grant, never-brick fallback
aarontrowbridgeand others added 11 commits July 3, 2026 17:04
…s (score_guard sibling module, entitiesDir transport)
…ded-state (v2)
The compiled score is now what runtime users see — the STOP-HERE ask
discipline and optional per-option details move in from the AGENTS.md
fallback, plus the anti-drift anchor from Aaron's live session (rail said
rydberg while the interview asked transmon-omega): re-read the System entity
before stage-2+ questions; correct the record first if it's wrong.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion cross-check
Score content bumps (v1->v2 tonight) must not red the suite; instead assert
the compiled banner and the manifest agree on whatever version ships.
… deprecated
Live finding: 1.17.3 ships a turn-blocking question tool (tool/question.ts)
with options+descriptions+custom answers — the model reached for it unprompted
and its semantics structurally kill self-answering and prose repeats. Score #0
v3 + AGENTS.md fallback now route all choice questions through it; amicode_ask
stays registered but deprecated. One mechanism, upstream-owned.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ine talk
The starter chip hit a Webfetch to the engine's website and a flat 3-sentence
reply. The canonical question now has a canonical answer: capability bullets
(interview, fast-path, live inspector, warm-start/resume, hardware preview),
honest scope line, then next-step options via the question tool.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…late
fetch_opencode gains repo/tag manifest fields with authenticated gh download
for the private harmoniqs/opencode release (206 tests). TESTING.md = the
7-point branch test script for the team. solve_rydberg_cz.jl: 2-atom 3-level
QuEra deep-blockade CZ, public-Piccolo-only (fixed-phase NLP + post-hoc
virtual-Z scan; free_phase kwarg is Piccolissimo-gated) — vetting solve in
flight, score wiring lands with its result.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Point an agent at the repo and it can set up, verify, and test the branch:
prerequisites with checks, ordered setup, five verification gates, dev facts
(fixed port, fork boundary, plugin runtime, scores), sharp edges.
…icode.1)
Lock repointed to the mirror (both platform shas from the release assets);
clean-fetch verified end-to-end via the authenticated gh path — downloaded
binary is byte-identical to the deployed build (8aa718ad…) and serves
<title>Amicode</title>. Rydberg CZ template clearly marked EXPERIMENTAL
(vetting stalled on pathological first-iteration NLP cost; parked) and
TESTING.md de-overclaimed accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ot signature
The rebase onto main folded in #79's runsRoot param (3rd position). These test
call sites predated it and passed pluginPath/scoresRoot into the wrong slots or
omitted runsRoot entirely. Insert runsRoot so scores + slow-e2e configs grant
the right paths. Fast suite 207 pass; tsc --noEmit clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aarontrowbridge
aarontrowbridgeforce-pushed the aaron/night-l0-pulse-designer branch from 05db60f to d81e63fCompareJuly 3, 2026 21:08
jack-champagne added a commit that referenced this pull request Jul 4, 2026
The pre-solve formulation.toml emit could not run through the agent deploy
path: AGENTS.md copies solve_template.jl alone into a scratch dir and runs the
copy, so @__DIR__ was the scratch dir and include(emit_formulation.jl) resolved
to a file that was never copied — LoadError before solve!, on every run. CI
never executes the template, so it stayed green.
- Inline emit_formulation into solve_template.jl; delete the sibling helper.
Sharing moves to a Julia package (AmicoRunDir.jl) when #75/#76 add a second
template — the only share mechanism that survives the single-file copy.
- Tighten formulation.schema.json: per-family if/then — transmon requires and
type-checks delta/levels/drive_max; formulation requires gate/T/N; Q/R
optional; additionalProperties:true per family (unknown families lenient).
- Add template_deploy_contract.test.ts: reproduces the AGENTS.md single-file
copy and asserts every include() resolves. Red on the bug, green inlined.
schema_version stays "1" (additive: no on-disk formulation.toml exists yet).
@jack-champagne
jack-champagne merged commit d81e63f into mainJul 8, 2026
1 of 5 checks passed
aarontrowbridge added a commit that referenced this pull request Sep 1, 2026
… warrant-bounds schema (#703) (#706)
* feat(schema): the autonomy datum — device {none|ro|rw} documented in warrant bounds, rejection pinned (#703)
SEAM 6, amicode's half of the one-autonomy-doctrine (codesign spec
spec-20260831-120000, issue #703):
- $defs.bounds.device — the enum {none, ro, rw} — now carries the datum's
documented semantics: none = no device access; ro = read-only device
access; rw = device writes permitted, gated by the real-board-session
human gate. The approval branch's description points at the datum (one
definition, this schema — the fleet §2.1 pointer formalized).
- The three-systems contract stated once in the schema's documentation,
each counterpart's criterion NAMED under its own owner: amicode's bounds
(this schema), the P4 gate's end-to-end read (merge-gated on strumento #75
MERGED), Telaio's warrant-bounds deserialization conformance (their
campaign). The SEAM 4 contract note is not on main yet — the director
wires the cross-reference line post-merge.
- Rejection tests pin the no-second-knob doctrine mechanically:
validateBounds REFUSES any device value outside the enum and any unknown
device-permission-shaped field (additionalProperties:false), field-precise
errors naming the impostor key; the approval record kind refuses a second
device knob the same way.
* feat(extension): the approval tool surface validates against the schema's device datum (#703)
SEAM 6's tool-surface half (issue #703) — one definition, no free text:
- amicode_request_approval's bounds arg now cites the @amicode/schema
warrant-bounds schema ($defs.bounds — the one definition) and its execute()
validates bounds via validateBounds: a device value outside {none, ro, rw}
or a second device-shaped field is refused BEFORE the card renders, so a
malformed ask can never become a pressable button.
- The plugin twin (retired from the config, still drift-guarded by the
projection test) mirrors the same gate: opencode-plugin/warrant_bounds.ts is
the dependency-free twin of $defs.bounds (bare package specifiers do not
resolve in the plugin runtime — unreachable by construction, per
./ledger_client's sibling-module rules), PINNED to the schema by
test/warrant_bounds_parity.test.ts: the corpus (every datum case) must agree
with validateBounds on ok AND error strings, and DEVICE_DATUM must equal
the schema's own device enum — growth breaks the pin.
- The mint path (amicode_service/warrants.ts approveArgv) validates bounds
against the schema too, refusing invalid bounds instead of silently
dropping them — a dropped key silently under-authorises the minted warrant;
test/amicode_service_warrants.test.ts is the flag-mapping pin the export
always promised, plus the refusal cases.
The three-systems contract line for the PR (the director's): amicode's bounds
are this slice (the schema datum, above); the P4 gate's end-to-end read is
merge-gated on strumento #75 MERGED; Telaio's warrant-bounds deserialization
conformance is their campaign's criterion — each named under its own owner,
none claimed as another's.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@aarontrowbridge@jack-champagne
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green - #75

Merged
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer
Jul 8, 2026
Merged

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green#75
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

What this is

The Layer-0 pulse-designer track from tonight's spec (spec — drafted in Aaron's personal vault, spec-20260703-020630-amicode-opencode-thin-fork; will be socialized before team-canon promotion). It implements the front-of-chain interview (UX1 #46's storyboard) as opencode-native config: an agent + instructions + a bookkeeping tool pack. Nothing in the phased build moves — amico-run, run-dir contract, schemas, inspector, scheduler/Δ-cloud tracks are all untouched; the only modified prod file is opencode_config.ts (additive keys).

Commits

  1. feat(L0) interview spine in AGENTS.md — 8 stages, one-question-at-a-time, scoped to the pulse-designer persona so the default build agent behaves exactly as before
  2. test(L0) tiered e2e suite (A registration / B plugin load / C live turns / D full chain)
  3. feat(L0)amicode_* tool pack v0 + registration (plugin abs-path + agent block via OPENCODE_CONFIG_CONTENT — both verified live at 1.17.3)
  4. tier C + D enablement

Evidence (all on this branch, tonight)

  • Fast suite: 122 passed (was 91 on main)
  • e2e 4/4 tiers green incl. tier D full chain: 10 interview turns (free anonymous provider — zero creds on the machine!) → all four tools fired (System → Formulation → Run entities on disk) → agent authored solve.jl from the vetted template → detached amico-run launch → run-dir → FINISHEDF = 0.9998977, 60 iters
  • Repro: AMICODE_E2E_LIVE=1 AMICODE_E2E_FULLCHAIN=1 npx vitest run test/slow/interview_e2e.test.ts

Not in this PR

The opencode fork (branded binary — L1 "AMICODE" + build recipe) lives in a local-only clone, deliberately unpublished pending discussion. This branch runs green against the stock vendored binary too — the L0 layer is binary-agnostic by design.

Known follow-ups

.vsix packaging of opencode-plugin/ unverified (TODO in headers); set_model merges via json sidecar; Rydberg is recorded-honestly (template is transmon-only); free-model phrasing variance noted in the tier-D transcript.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

T16 landed after the PR opened: amicode_to_hardware + amicode_calibrate guided stubs (no device I/O; gate/checks values pinned by the serializer). The pack now covers all 8 interview stages — 6 tools registered, 128 tests green. Also since opening: e2e re-verified 4/4 against the refreshed fork binary (fast suite + smoke + tiers; one tier-C flake traced to free-model sampling noise, passed on rerun — live tiers are env-gated off in CI).

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Live-demo-driven additions (Aaron driving the dev host, ~03:00–04:00): Amico identity + proactive interview kickoff (fc7b13d) and amicode_ask — option-stage questions as button payloads, 7 tools registered (903ce76). The matching UI (entity rail, collapsed chips, ask-button cards, start-screen wordmark, en-default locale) lives in the local fork's patch stack (11 commits, unpublished — see the handoff note in the personal vault). All L0 changes here remain binary-agnostic: on a stock binary, amicode_ask degrades to a plain-text question with listed options.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

This branch now additionally carries: the scores runtime (#76 merged, interview-as-data — score #0 v2 with ask-discipline + anchor-on-recorded-state), and the fixed opencode port (amicode.opencodePort, default 43117 — Remote-SSH users forward once). Suite: 203/203. Note for reviewers: 6471ed9 was momentarily red (hardcoded score-version literals in the stacked tests), fixed in 7f28414.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Final night addition: consolidated on opencode's native question tool (turn-blocking form — structurally prevents the self-answer/prose-repeat failure modes) as the one ask mechanism; amicode_ask deprecated-but-kept (8e9c89e). Score #0 at v3. Fork brands the native form and ships a 5-chip start screen with a repertoire-chips TODO (chips become one-per-entitled-score once a small endpoint exposes the compiled repertoire).

🤖 Generated with Claude Code

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review July 3, 2026 10:46
@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Ready for review — merge gated on @jack-champagne's eyes (Aaron's call: everything ships except the merge).

Since the last update: scores runtime merged in (#76 content — interview-as-data, score #0 v3, guard, router, usage funnel), fixed port 43117, curated capabilities answer, native-question-tool consolidation, H-robot brand mark + spinner, and the distribution chain is live: the vendored binary now comes from the private mirror release harmoniqs/opencode v1.17.3-amicode.1 (linux-x64 + darwin-arm64), clean-fetch verified byte-identical.

Review pointers (the seams):opencode.lock.json + scripts/fetch_opencode.mjs (repo/tag + authenticated gh path), src/opencode_config.ts (additive agent/plugin/permission injection), opencode-plugin/ (Bun-side, single-export), scores/ (splice never touches source AGENTS.md — fallback intact). Suite: 206 fast + slow gates green, CI green both platforms. Setup for testing: root AGENTS.md (agent-forward) or packages/extension/TESTING.md (human).

Known-not-done, honestly: Rydberg CZ template is EXPERIMENTAL (vetting stalled, marked in-file); amicode_ask deprecated-not-removed; ask-card/bridge legacy code pending pruning; repertoire-driven start chips need a server endpoint.

🤖 Generated with Claude Code

jack-champagne pushed a commit that referenced this pull request Jul 3, 2026
…the per-solve "ask" nag (#79)
AGENTS.md instructs the agent to READ run artifacts (FINISHED/result.toml for
results, run.log for failure tracebacks) under the runs root — but the injected
permission.external_directory only granted the templates dir + /tmp/amicode-work.
opencode defaults external_directory to "ask", so every read-back fired a
permission prompt: one per solve, and repeatedly on failures (the 2026-07-03
live test hit this hard — four failing runs, agent in run.log each time).
Thread the resolved runsRoot (respects the amicode.runsRoot setting) into
buildOpencodeConfigContent and grant `${runsRoot}/**`. Still least-privilege:
scoped to the one additional root AGENTS.md actually sends the agent's file
tools into; amico-run's own subprocess writes never needed a grant.
Tests: unit (grant present + still path-scoped), real-opencode integration
(grant survives the 1.17.3 deep-merge alongside the user's global permission
keys). 93 pass, typecheck clean.
Note: Aaron's #75/#76 restructure the same permission block (adding entities/
scores grants — correctly); whichever lands second has a one-line rebase.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
aarontrowbridgeand others added 20 commits July 3, 2026 17:02
Scoped to the pulse-designer persona (never hijacks the default build agent),
one-question-at-a-time, 8 stages PLATFORM→CALIBRATE, transmon fully wired /
Rydberg recorded-honestly, amicode_* tools as bookkeeping with bash+amico-run
still the launch mechanism. Tests: interview block + no-unknown-placeholder
assertion (only {{TEMPLATE_PATH}}/{{JULIA_PROJECT}} substituted).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gin load / live turns)
Tier A green vs stock 1.17.3; B gates on the plugin file, C on creds
(none on this machine tonight — morning step: opencode auth login).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Four bookkeeping tools (pick_system / set_model / formulate / solve-record)
executed by opencode's embedded Bun runtime; entities as TOML under
~/.amico/runs/default/_entities ($AMICODE_ENTITIES_DIR override). Registration
via buildOpencodeConfigContent: plugin abs-path + pulse-designer agent block +
entities-dir permission grant (T8 probe: both mechanisms live at 1.17.3).
Plugin stays outside the extension bundle/tsconfig; load line on stderr
(debug-config stdout purity — regression-guarded). 99→122 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Free anonymous provider (opencode/big-pickle) resolves without auth.json →
AMICODE_E2E_LIVE=1 forces the creds gate. Cadence assertion = stage-batching
check (multiple '?' inside one platform question is fine); transcript saved
to tmpdir for the experiment note.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Real-home mode now substitutes AGENTS.md via prepareOpencodeProject (stage 6
needs real template/julia paths). Keyword-routed answers, bounded turns,
run-dir poll. Result: 10 turns on the free model → all four amicode_* tools
fired (System→Formulation→Run stub) → authored solve.jl → amico-run launch →
F=0.9998977/60 iters. AMICODE_E2E_FULLCHAIN=1 gates it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amicode_to_hardware (device_session stub; gate + checks PINNED by the
serializer so a stub can never claim an approval that didn't happen) and
amicode_calibrate (ILC stub, auto-refs device_session.toml). No device I/O —
explanations say so explicitly, mirroring AGENTS.md stage 8, which now names
both tools. 6 tools registered (verified via /experimental/tool/ids). 122→128
tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
'Who are you?' now answers 'I'm Amico — Amicode's pulse-design copilot'
(never 'opencode, an interactive CLI tool'), and a greeting/no-intent session
opener triggers the stage-1 PLATFORM question instead of a generic assistant
reply. Specific asks keep the skip rule.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Interview option-stages (platform, sim-vs-solve, problem/gate) now go through
amicode_ask(question, options[2-6]); the renderer draws buttons from the tool
part's input and a click sends the option text as the next user message.
Free-form values stay plain questions. 7 tools registered (runtime-verified).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Live-demo findings: the free model repeated the question in prose and answered
it itself. Tool return now says STOP HERE explicitly; AGENTS.md mirrors it.
New optional details[] arg — one dim qualifier per button (minimalist card,
slightly more context).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pixel <0110> face in brand yellow on the H silhouette (from the website
robot); currentColor body serves dark+light. Same asset ships in the fork's
logo/favicon (kept in sync manually — canonical geometry recorded there in
AMICODE-PATCHES.md).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ited stop
Work found staged in the night tree (parallel session / Aaron) — folded in
after validating build + full suite green. Fixes the Remote-SSH pain: forward
43117 once, restarts reuse it; stop() now resolves on child exit so a
fixed-port restart can't race the old process for the socket. Set 0 to restore
per-start ephemeral ports.
…e_manifest transport, scores-root grant, never-brick fallback
aarontrowbridgeand others added 11 commits July 3, 2026 17:04
…s (score_guard sibling module, entitiesDir transport)
…ded-state (v2)
The compiled score is now what runtime users see — the STOP-HERE ask
discipline and optional per-option details move in from the AGENTS.md
fallback, plus the anti-drift anchor from Aaron's live session (rail said
rydberg while the interview asked transmon-omega): re-read the System entity
before stage-2+ questions; correct the record first if it's wrong.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion cross-check
Score content bumps (v1->v2 tonight) must not red the suite; instead assert
the compiled banner and the manifest agree on whatever version ships.
… deprecated
Live finding: 1.17.3 ships a turn-blocking question tool (tool/question.ts)
with options+descriptions+custom answers — the model reached for it unprompted
and its semantics structurally kill self-answering and prose repeats. Score #0
v3 + AGENTS.md fallback now route all choice questions through it; amicode_ask
stays registered but deprecated. One mechanism, upstream-owned.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ine talk
The starter chip hit a Webfetch to the engine's website and a flat 3-sentence
reply. The canonical question now has a canonical answer: capability bullets
(interview, fast-path, live inspector, warm-start/resume, hardware preview),
honest scope line, then next-step options via the question tool.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…late
fetch_opencode gains repo/tag manifest fields with authenticated gh download
for the private harmoniqs/opencode release (206 tests). TESTING.md = the
7-point branch test script for the team. solve_rydberg_cz.jl: 2-atom 3-level
QuEra deep-blockade CZ, public-Piccolo-only (fixed-phase NLP + post-hoc
virtual-Z scan; free_phase kwarg is Piccolissimo-gated) — vetting solve in
flight, score wiring lands with its result.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Point an agent at the repo and it can set up, verify, and test the branch:
prerequisites with checks, ordered setup, five verification gates, dev facts
(fixed port, fork boundary, plugin runtime, scores), sharp edges.
…icode.1)
Lock repointed to the mirror (both platform shas from the release assets);
clean-fetch verified end-to-end via the authenticated gh path — downloaded
binary is byte-identical to the deployed build (8aa718ad…) and serves
<title>Amicode</title>. Rydberg CZ template clearly marked EXPERIMENTAL
(vetting stalled on pathological first-iteration NLP cost; parked) and
TESTING.md de-overclaimed accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ot signature
The rebase onto main folded in #79's runsRoot param (3rd position). These test
call sites predated it and passed pluginPath/scoresRoot into the wrong slots or
omitted runsRoot entirely. Insert runsRoot so scores + slow-e2e configs grant
the right paths. Fast suite 207 pass; tsc --noEmit clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aarontrowbridge
aarontrowbridgeforce-pushed the aaron/night-l0-pulse-designer branch from 05db60f to d81e63fCompareJuly 3, 2026 21:08
jack-champagne added a commit that referenced this pull request Jul 4, 2026
The pre-solve formulation.toml emit could not run through the agent deploy
path: AGENTS.md copies solve_template.jl alone into a scratch dir and runs the
copy, so @__DIR__ was the scratch dir and include(emit_formulation.jl) resolved
to a file that was never copied — LoadError before solve!, on every run. CI
never executes the template, so it stayed green.
- Inline emit_formulation into solve_template.jl; delete the sibling helper.
Sharing moves to a Julia package (AmicoRunDir.jl) when #75/#76 add a second
template — the only share mechanism that survives the single-file copy.
- Tighten formulation.schema.json: per-family if/then — transmon requires and
type-checks delta/levels/drive_max; formulation requires gate/T/N; Q/R
optional; additionalProperties:true per family (unknown families lenient).
- Add template_deploy_contract.test.ts: reproduces the AGENTS.md single-file
copy and asserts every include() resolves. Red on the bug, green inlined.
schema_version stays "1" (additive: no on-disk formulation.toml exists yet).
@jack-champagne
jack-champagne merged commit d81e63f into mainJul 8, 2026
1 of 5 checks passed
aarontrowbridge added a commit that referenced this pull request Sep 1, 2026
… warrant-bounds schema (#703) (#706)
* feat(schema): the autonomy datum — device {none|ro|rw} documented in warrant bounds, rejection pinned (#703)
SEAM 6, amicode's half of the one-autonomy-doctrine (codesign spec
spec-20260831-120000, issue #703):
- $defs.bounds.device — the enum {none, ro, rw} — now carries the datum's
documented semantics: none = no device access; ro = read-only device
access; rw = device writes permitted, gated by the real-board-session
human gate. The approval branch's description points at the datum (one
definition, this schema — the fleet §2.1 pointer formalized).
- The three-systems contract stated once in the schema's documentation,
each counterpart's criterion NAMED under its own owner: amicode's bounds
(this schema), the P4 gate's end-to-end read (merge-gated on strumento #75
MERGED), Telaio's warrant-bounds deserialization conformance (their
campaign). The SEAM 4 contract note is not on main yet — the director
wires the cross-reference line post-merge.
- Rejection tests pin the no-second-knob doctrine mechanically:
validateBounds REFUSES any device value outside the enum and any unknown
device-permission-shaped field (additionalProperties:false), field-precise
errors naming the impostor key; the approval record kind refuses a second
device knob the same way.
* feat(extension): the approval tool surface validates against the schema's device datum (#703)
SEAM 6's tool-surface half (issue #703) — one definition, no free text:
- amicode_request_approval's bounds arg now cites the @amicode/schema
warrant-bounds schema ($defs.bounds — the one definition) and its execute()
validates bounds via validateBounds: a device value outside {none, ro, rw}
or a second device-shaped field is refused BEFORE the card renders, so a
malformed ask can never become a pressable button.
- The plugin twin (retired from the config, still drift-guarded by the
projection test) mirrors the same gate: opencode-plugin/warrant_bounds.ts is
the dependency-free twin of $defs.bounds (bare package specifiers do not
resolve in the plugin runtime — unreachable by construction, per
./ledger_client's sibling-module rules), PINNED to the schema by
test/warrant_bounds_parity.test.ts: the corpus (every datum case) must agree
with validateBounds on ok AND error strings, and DEVICE_DATUM must equal
the schema's own device enum — growth breaks the pin.
- The mint path (amicode_service/warrants.ts approveArgv) validates bounds
against the schema too, refusing invalid bounds instead of silently
dropping them — a dropped key silently under-authorises the minted warrant;
test/amicode_service_warrants.test.ts is the flag-mapping pin the export
always promised, plus the refusal cases.
The three-systems contract line for the PR (the director's): amicode's bounds
are this slice (the schema datum, above); the P4 gate's end-to-end read is
merge-gated on strumento #75 MERGED; Telaio's warrant-bounds deserialization
conformance is their campaign's criterion — each named under its own owner,
none claimed as another's.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@aarontrowbridge@jack-champagne
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green - #75

Merged
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer
Jul 8, 2026
Merged

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green#75
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

What this is

The Layer-0 pulse-designer track from tonight's spec (spec — drafted in Aaron's personal vault, spec-20260703-020630-amicode-opencode-thin-fork; will be socialized before team-canon promotion). It implements the front-of-chain interview (UX1 #46's storyboard) as opencode-native config: an agent + instructions + a bookkeeping tool pack. Nothing in the phased build moves — amico-run, run-dir contract, schemas, inspector, scheduler/Δ-cloud tracks are all untouched; the only modified prod file is opencode_config.ts (additive keys).

Commits

  1. feat(L0) interview spine in AGENTS.md — 8 stages, one-question-at-a-time, scoped to the pulse-designer persona so the default build agent behaves exactly as before
  2. test(L0) tiered e2e suite (A registration / B plugin load / C live turns / D full chain)
  3. feat(L0)amicode_* tool pack v0 + registration (plugin abs-path + agent block via OPENCODE_CONFIG_CONTENT — both verified live at 1.17.3)
  4. tier C + D enablement

Evidence (all on this branch, tonight)

  • Fast suite: 122 passed (was 91 on main)
  • e2e 4/4 tiers green incl. tier D full chain: 10 interview turns (free anonymous provider — zero creds on the machine!) → all four tools fired (System → Formulation → Run entities on disk) → agent authored solve.jl from the vetted template → detached amico-run launch → run-dir → FINISHEDF = 0.9998977, 60 iters
  • Repro: AMICODE_E2E_LIVE=1 AMICODE_E2E_FULLCHAIN=1 npx vitest run test/slow/interview_e2e.test.ts

Not in this PR

The opencode fork (branded binary — L1 "AMICODE" + build recipe) lives in a local-only clone, deliberately unpublished pending discussion. This branch runs green against the stock vendored binary too — the L0 layer is binary-agnostic by design.

Known follow-ups

.vsix packaging of opencode-plugin/ unverified (TODO in headers); set_model merges via json sidecar; Rydberg is recorded-honestly (template is transmon-only); free-model phrasing variance noted in the tier-D transcript.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

T16 landed after the PR opened: amicode_to_hardware + amicode_calibrate guided stubs (no device I/O; gate/checks values pinned by the serializer). The pack now covers all 8 interview stages — 6 tools registered, 128 tests green. Also since opening: e2e re-verified 4/4 against the refreshed fork binary (fast suite + smoke + tiers; one tier-C flake traced to free-model sampling noise, passed on rerun — live tiers are env-gated off in CI).

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Live-demo-driven additions (Aaron driving the dev host, ~03:00–04:00): Amico identity + proactive interview kickoff (fc7b13d) and amicode_ask — option-stage questions as button payloads, 7 tools registered (903ce76). The matching UI (entity rail, collapsed chips, ask-button cards, start-screen wordmark, en-default locale) lives in the local fork's patch stack (11 commits, unpublished — see the handoff note in the personal vault). All L0 changes here remain binary-agnostic: on a stock binary, amicode_ask degrades to a plain-text question with listed options.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

This branch now additionally carries: the scores runtime (#76 merged, interview-as-data — score #0 v2 with ask-discipline + anchor-on-recorded-state), and the fixed opencode port (amicode.opencodePort, default 43117 — Remote-SSH users forward once). Suite: 203/203. Note for reviewers: 6471ed9 was momentarily red (hardcoded score-version literals in the stacked tests), fixed in 7f28414.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Final night addition: consolidated on opencode's native question tool (turn-blocking form — structurally prevents the self-answer/prose-repeat failure modes) as the one ask mechanism; amicode_ask deprecated-but-kept (8e9c89e). Score #0 at v3. Fork brands the native form and ships a 5-chip start screen with a repertoire-chips TODO (chips become one-per-entitled-score once a small endpoint exposes the compiled repertoire).

🤖 Generated with Claude Code

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review July 3, 2026 10:46
@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Ready for review — merge gated on @jack-champagne's eyes (Aaron's call: everything ships except the merge).

Since the last update: scores runtime merged in (#76 content — interview-as-data, score #0 v3, guard, router, usage funnel), fixed port 43117, curated capabilities answer, native-question-tool consolidation, H-robot brand mark + spinner, and the distribution chain is live: the vendored binary now comes from the private mirror release harmoniqs/opencode v1.17.3-amicode.1 (linux-x64 + darwin-arm64), clean-fetch verified byte-identical.

Review pointers (the seams):opencode.lock.json + scripts/fetch_opencode.mjs (repo/tag + authenticated gh path), src/opencode_config.ts (additive agent/plugin/permission injection), opencode-plugin/ (Bun-side, single-export), scores/ (splice never touches source AGENTS.md — fallback intact). Suite: 206 fast + slow gates green, CI green both platforms. Setup for testing: root AGENTS.md (agent-forward) or packages/extension/TESTING.md (human).

Known-not-done, honestly: Rydberg CZ template is EXPERIMENTAL (vetting stalled, marked in-file); amicode_ask deprecated-not-removed; ask-card/bridge legacy code pending pruning; repertoire-driven start chips need a server endpoint.

🤖 Generated with Claude Code

jack-champagne pushed a commit that referenced this pull request Jul 3, 2026
…the per-solve "ask" nag (#79)
AGENTS.md instructs the agent to READ run artifacts (FINISHED/result.toml for
results, run.log for failure tracebacks) under the runs root — but the injected
permission.external_directory only granted the templates dir + /tmp/amicode-work.
opencode defaults external_directory to "ask", so every read-back fired a
permission prompt: one per solve, and repeatedly on failures (the 2026-07-03
live test hit this hard — four failing runs, agent in run.log each time).
Thread the resolved runsRoot (respects the amicode.runsRoot setting) into
buildOpencodeConfigContent and grant `${runsRoot}/**`. Still least-privilege:
scoped to the one additional root AGENTS.md actually sends the agent's file
tools into; amico-run's own subprocess writes never needed a grant.
Tests: unit (grant present + still path-scoped), real-opencode integration
(grant survives the 1.17.3 deep-merge alongside the user's global permission
keys). 93 pass, typecheck clean.
Note: Aaron's #75/#76 restructure the same permission block (adding entities/
scores grants — correctly); whichever lands second has a one-line rebase.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
aarontrowbridgeand others added 20 commits July 3, 2026 17:02
Scoped to the pulse-designer persona (never hijacks the default build agent),
one-question-at-a-time, 8 stages PLATFORM→CALIBRATE, transmon fully wired /
Rydberg recorded-honestly, amicode_* tools as bookkeeping with bash+amico-run
still the launch mechanism. Tests: interview block + no-unknown-placeholder
assertion (only {{TEMPLATE_PATH}}/{{JULIA_PROJECT}} substituted).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gin load / live turns)
Tier A green vs stock 1.17.3; B gates on the plugin file, C on creds
(none on this machine tonight — morning step: opencode auth login).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Four bookkeeping tools (pick_system / set_model / formulate / solve-record)
executed by opencode's embedded Bun runtime; entities as TOML under
~/.amico/runs/default/_entities ($AMICODE_ENTITIES_DIR override). Registration
via buildOpencodeConfigContent: plugin abs-path + pulse-designer agent block +
entities-dir permission grant (T8 probe: both mechanisms live at 1.17.3).
Plugin stays outside the extension bundle/tsconfig; load line on stderr
(debug-config stdout purity — regression-guarded). 99→122 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Free anonymous provider (opencode/big-pickle) resolves without auth.json →
AMICODE_E2E_LIVE=1 forces the creds gate. Cadence assertion = stage-batching
check (multiple '?' inside one platform question is fine); transcript saved
to tmpdir for the experiment note.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Real-home mode now substitutes AGENTS.md via prepareOpencodeProject (stage 6
needs real template/julia paths). Keyword-routed answers, bounded turns,
run-dir poll. Result: 10 turns on the free model → all four amicode_* tools
fired (System→Formulation→Run stub) → authored solve.jl → amico-run launch →
F=0.9998977/60 iters. AMICODE_E2E_FULLCHAIN=1 gates it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amicode_to_hardware (device_session stub; gate + checks PINNED by the
serializer so a stub can never claim an approval that didn't happen) and
amicode_calibrate (ILC stub, auto-refs device_session.toml). No device I/O —
explanations say so explicitly, mirroring AGENTS.md stage 8, which now names
both tools. 6 tools registered (verified via /experimental/tool/ids). 122→128
tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
'Who are you?' now answers 'I'm Amico — Amicode's pulse-design copilot'
(never 'opencode, an interactive CLI tool'), and a greeting/no-intent session
opener triggers the stage-1 PLATFORM question instead of a generic assistant
reply. Specific asks keep the skip rule.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Interview option-stages (platform, sim-vs-solve, problem/gate) now go through
amicode_ask(question, options[2-6]); the renderer draws buttons from the tool
part's input and a click sends the option text as the next user message.
Free-form values stay plain questions. 7 tools registered (runtime-verified).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Live-demo findings: the free model repeated the question in prose and answered
it itself. Tool return now says STOP HERE explicitly; AGENTS.md mirrors it.
New optional details[] arg — one dim qualifier per button (minimalist card,
slightly more context).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pixel <0110> face in brand yellow on the H silhouette (from the website
robot); currentColor body serves dark+light. Same asset ships in the fork's
logo/favicon (kept in sync manually — canonical geometry recorded there in
AMICODE-PATCHES.md).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ited stop
Work found staged in the night tree (parallel session / Aaron) — folded in
after validating build + full suite green. Fixes the Remote-SSH pain: forward
43117 once, restarts reuse it; stop() now resolves on child exit so a
fixed-port restart can't race the old process for the socket. Set 0 to restore
per-start ephemeral ports.
…e_manifest transport, scores-root grant, never-brick fallback
aarontrowbridgeand others added 11 commits July 3, 2026 17:04
…s (score_guard sibling module, entitiesDir transport)
…ded-state (v2)
The compiled score is now what runtime users see — the STOP-HERE ask
discipline and optional per-option details move in from the AGENTS.md
fallback, plus the anti-drift anchor from Aaron's live session (rail said
rydberg while the interview asked transmon-omega): re-read the System entity
before stage-2+ questions; correct the record first if it's wrong.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion cross-check
Score content bumps (v1->v2 tonight) must not red the suite; instead assert
the compiled banner and the manifest agree on whatever version ships.
… deprecated
Live finding: 1.17.3 ships a turn-blocking question tool (tool/question.ts)
with options+descriptions+custom answers — the model reached for it unprompted
and its semantics structurally kill self-answering and prose repeats. Score #0
v3 + AGENTS.md fallback now route all choice questions through it; amicode_ask
stays registered but deprecated. One mechanism, upstream-owned.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ine talk
The starter chip hit a Webfetch to the engine's website and a flat 3-sentence
reply. The canonical question now has a canonical answer: capability bullets
(interview, fast-path, live inspector, warm-start/resume, hardware preview),
honest scope line, then next-step options via the question tool.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…late
fetch_opencode gains repo/tag manifest fields with authenticated gh download
for the private harmoniqs/opencode release (206 tests). TESTING.md = the
7-point branch test script for the team. solve_rydberg_cz.jl: 2-atom 3-level
QuEra deep-blockade CZ, public-Piccolo-only (fixed-phase NLP + post-hoc
virtual-Z scan; free_phase kwarg is Piccolissimo-gated) — vetting solve in
flight, score wiring lands with its result.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Point an agent at the repo and it can set up, verify, and test the branch:
prerequisites with checks, ordered setup, five verification gates, dev facts
(fixed port, fork boundary, plugin runtime, scores), sharp edges.
…icode.1)
Lock repointed to the mirror (both platform shas from the release assets);
clean-fetch verified end-to-end via the authenticated gh path — downloaded
binary is byte-identical to the deployed build (8aa718ad…) and serves
<title>Amicode</title>. Rydberg CZ template clearly marked EXPERIMENTAL
(vetting stalled on pathological first-iteration NLP cost; parked) and
TESTING.md de-overclaimed accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ot signature
The rebase onto main folded in #79's runsRoot param (3rd position). These test
call sites predated it and passed pluginPath/scoresRoot into the wrong slots or
omitted runsRoot entirely. Insert runsRoot so scores + slow-e2e configs grant
the right paths. Fast suite 207 pass; tsc --noEmit clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aarontrowbridge
aarontrowbridgeforce-pushed the aaron/night-l0-pulse-designer branch from 05db60f to d81e63fCompareJuly 3, 2026 21:08
jack-champagne added a commit that referenced this pull request Jul 4, 2026
The pre-solve formulation.toml emit could not run through the agent deploy
path: AGENTS.md copies solve_template.jl alone into a scratch dir and runs the
copy, so @__DIR__ was the scratch dir and include(emit_formulation.jl) resolved
to a file that was never copied — LoadError before solve!, on every run. CI
never executes the template, so it stayed green.
- Inline emit_formulation into solve_template.jl; delete the sibling helper.
Sharing moves to a Julia package (AmicoRunDir.jl) when #75/#76 add a second
template — the only share mechanism that survives the single-file copy.
- Tighten formulation.schema.json: per-family if/then — transmon requires and
type-checks delta/levels/drive_max; formulation requires gate/T/N; Q/R
optional; additionalProperties:true per family (unknown families lenient).
- Add template_deploy_contract.test.ts: reproduces the AGENTS.md single-file
copy and asserts every include() resolves. Red on the bug, green inlined.
schema_version stays "1" (additive: no on-disk formulation.toml exists yet).
@jack-champagne
jack-champagne merged commit d81e63f into mainJul 8, 2026
1 of 5 checks passed
aarontrowbridge added a commit that referenced this pull request Sep 1, 2026
… warrant-bounds schema (#703) (#706)
* feat(schema): the autonomy datum — device {none|ro|rw} documented in warrant bounds, rejection pinned (#703)
SEAM 6, amicode's half of the one-autonomy-doctrine (codesign spec
spec-20260831-120000, issue #703):
- $defs.bounds.device — the enum {none, ro, rw} — now carries the datum's
documented semantics: none = no device access; ro = read-only device
access; rw = device writes permitted, gated by the real-board-session
human gate. The approval branch's description points at the datum (one
definition, this schema — the fleet §2.1 pointer formalized).
- The three-systems contract stated once in the schema's documentation,
each counterpart's criterion NAMED under its own owner: amicode's bounds
(this schema), the P4 gate's end-to-end read (merge-gated on strumento #75
MERGED), Telaio's warrant-bounds deserialization conformance (their
campaign). The SEAM 4 contract note is not on main yet — the director
wires the cross-reference line post-merge.
- Rejection tests pin the no-second-knob doctrine mechanically:
validateBounds REFUSES any device value outside the enum and any unknown
device-permission-shaped field (additionalProperties:false), field-precise
errors naming the impostor key; the approval record kind refuses a second
device knob the same way.
* feat(extension): the approval tool surface validates against the schema's device datum (#703)
SEAM 6's tool-surface half (issue #703) — one definition, no free text:
- amicode_request_approval's bounds arg now cites the @amicode/schema
warrant-bounds schema ($defs.bounds — the one definition) and its execute()
validates bounds via validateBounds: a device value outside {none, ro, rw}
or a second device-shaped field is refused BEFORE the card renders, so a
malformed ask can never become a pressable button.
- The plugin twin (retired from the config, still drift-guarded by the
projection test) mirrors the same gate: opencode-plugin/warrant_bounds.ts is
the dependency-free twin of $defs.bounds (bare package specifiers do not
resolve in the plugin runtime — unreachable by construction, per
./ledger_client's sibling-module rules), PINNED to the schema by
test/warrant_bounds_parity.test.ts: the corpus (every datum case) must agree
with validateBounds on ok AND error strings, and DEVICE_DATUM must equal
the schema's own device enum — growth breaks the pin.
- The mint path (amicode_service/warrants.ts approveArgv) validates bounds
against the schema too, refusing invalid bounds instead of silently
dropping them — a dropped key silently under-authorises the minted warrant;
test/amicode_service_warrants.test.ts is the flag-mapping pin the export
always promised, plus the refusal cases.
The three-systems contract line for the PR (the director's): amicode's bounds
are this slice (the schema datum, above); the P4 gate's end-to-end read is
merge-gated on strumento #75 MERGED; Telaio's warrant-bounds deserialization
conformance is their campaign's criterion — each named under its own owner,
none claimed as another's.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@aarontrowbridge@jack-champagne
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green - #75

Merged
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer
Jul 8, 2026
Merged

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green#75
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

What this is

The Layer-0 pulse-designer track from tonight's spec (spec — drafted in Aaron's personal vault, spec-20260703-020630-amicode-opencode-thin-fork; will be socialized before team-canon promotion). It implements the front-of-chain interview (UX1 #46's storyboard) as opencode-native config: an agent + instructions + a bookkeeping tool pack. Nothing in the phased build moves — amico-run, run-dir contract, schemas, inspector, scheduler/Δ-cloud tracks are all untouched; the only modified prod file is opencode_config.ts (additive keys).

Commits

  1. feat(L0) interview spine in AGENTS.md — 8 stages, one-question-at-a-time, scoped to the pulse-designer persona so the default build agent behaves exactly as before
  2. test(L0) tiered e2e suite (A registration / B plugin load / C live turns / D full chain)
  3. feat(L0)amicode_* tool pack v0 + registration (plugin abs-path + agent block via OPENCODE_CONFIG_CONTENT — both verified live at 1.17.3)
  4. tier C + D enablement

Evidence (all on this branch, tonight)

  • Fast suite: 122 passed (was 91 on main)
  • e2e 4/4 tiers green incl. tier D full chain: 10 interview turns (free anonymous provider — zero creds on the machine!) → all four tools fired (System → Formulation → Run entities on disk) → agent authored solve.jl from the vetted template → detached amico-run launch → run-dir → FINISHEDF = 0.9998977, 60 iters
  • Repro: AMICODE_E2E_LIVE=1 AMICODE_E2E_FULLCHAIN=1 npx vitest run test/slow/interview_e2e.test.ts

Not in this PR

The opencode fork (branded binary — L1 "AMICODE" + build recipe) lives in a local-only clone, deliberately unpublished pending discussion. This branch runs green against the stock vendored binary too — the L0 layer is binary-agnostic by design.

Known follow-ups

.vsix packaging of opencode-plugin/ unverified (TODO in headers); set_model merges via json sidecar; Rydberg is recorded-honestly (template is transmon-only); free-model phrasing variance noted in the tier-D transcript.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

T16 landed after the PR opened: amicode_to_hardware + amicode_calibrate guided stubs (no device I/O; gate/checks values pinned by the serializer). The pack now covers all 8 interview stages — 6 tools registered, 128 tests green. Also since opening: e2e re-verified 4/4 against the refreshed fork binary (fast suite + smoke + tiers; one tier-C flake traced to free-model sampling noise, passed on rerun — live tiers are env-gated off in CI).

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Live-demo-driven additions (Aaron driving the dev host, ~03:00–04:00): Amico identity + proactive interview kickoff (fc7b13d) and amicode_ask — option-stage questions as button payloads, 7 tools registered (903ce76). The matching UI (entity rail, collapsed chips, ask-button cards, start-screen wordmark, en-default locale) lives in the local fork's patch stack (11 commits, unpublished — see the handoff note in the personal vault). All L0 changes here remain binary-agnostic: on a stock binary, amicode_ask degrades to a plain-text question with listed options.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

This branch now additionally carries: the scores runtime (#76 merged, interview-as-data — score #0 v2 with ask-discipline + anchor-on-recorded-state), and the fixed opencode port (amicode.opencodePort, default 43117 — Remote-SSH users forward once). Suite: 203/203. Note for reviewers: 6471ed9 was momentarily red (hardcoded score-version literals in the stacked tests), fixed in 7f28414.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Final night addition: consolidated on opencode's native question tool (turn-blocking form — structurally prevents the self-answer/prose-repeat failure modes) as the one ask mechanism; amicode_ask deprecated-but-kept (8e9c89e). Score #0 at v3. Fork brands the native form and ships a 5-chip start screen with a repertoire-chips TODO (chips become one-per-entitled-score once a small endpoint exposes the compiled repertoire).

🤖 Generated with Claude Code

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review July 3, 2026 10:46
@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Ready for review — merge gated on @jack-champagne's eyes (Aaron's call: everything ships except the merge).

Since the last update: scores runtime merged in (#76 content — interview-as-data, score #0 v3, guard, router, usage funnel), fixed port 43117, curated capabilities answer, native-question-tool consolidation, H-robot brand mark + spinner, and the distribution chain is live: the vendored binary now comes from the private mirror release harmoniqs/opencode v1.17.3-amicode.1 (linux-x64 + darwin-arm64), clean-fetch verified byte-identical.

Review pointers (the seams):opencode.lock.json + scripts/fetch_opencode.mjs (repo/tag + authenticated gh path), src/opencode_config.ts (additive agent/plugin/permission injection), opencode-plugin/ (Bun-side, single-export), scores/ (splice never touches source AGENTS.md — fallback intact). Suite: 206 fast + slow gates green, CI green both platforms. Setup for testing: root AGENTS.md (agent-forward) or packages/extension/TESTING.md (human).

Known-not-done, honestly: Rydberg CZ template is EXPERIMENTAL (vetting stalled, marked in-file); amicode_ask deprecated-not-removed; ask-card/bridge legacy code pending pruning; repertoire-driven start chips need a server endpoint.

🤖 Generated with Claude Code

jack-champagne pushed a commit that referenced this pull request Jul 3, 2026
…the per-solve "ask" nag (#79)
AGENTS.md instructs the agent to READ run artifacts (FINISHED/result.toml for
results, run.log for failure tracebacks) under the runs root — but the injected
permission.external_directory only granted the templates dir + /tmp/amicode-work.
opencode defaults external_directory to "ask", so every read-back fired a
permission prompt: one per solve, and repeatedly on failures (the 2026-07-03
live test hit this hard — four failing runs, agent in run.log each time).
Thread the resolved runsRoot (respects the amicode.runsRoot setting) into
buildOpencodeConfigContent and grant `${runsRoot}/**`. Still least-privilege:
scoped to the one additional root AGENTS.md actually sends the agent's file
tools into; amico-run's own subprocess writes never needed a grant.
Tests: unit (grant present + still path-scoped), real-opencode integration
(grant survives the 1.17.3 deep-merge alongside the user's global permission
keys). 93 pass, typecheck clean.
Note: Aaron's #75/#76 restructure the same permission block (adding entities/
scores grants — correctly); whichever lands second has a one-line rebase.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
aarontrowbridgeand others added 20 commits July 3, 2026 17:02
Scoped to the pulse-designer persona (never hijacks the default build agent),
one-question-at-a-time, 8 stages PLATFORM→CALIBRATE, transmon fully wired /
Rydberg recorded-honestly, amicode_* tools as bookkeeping with bash+amico-run
still the launch mechanism. Tests: interview block + no-unknown-placeholder
assertion (only {{TEMPLATE_PATH}}/{{JULIA_PROJECT}} substituted).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gin load / live turns)
Tier A green vs stock 1.17.3; B gates on the plugin file, C on creds
(none on this machine tonight — morning step: opencode auth login).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Four bookkeeping tools (pick_system / set_model / formulate / solve-record)
executed by opencode's embedded Bun runtime; entities as TOML under
~/.amico/runs/default/_entities ($AMICODE_ENTITIES_DIR override). Registration
via buildOpencodeConfigContent: plugin abs-path + pulse-designer agent block +
entities-dir permission grant (T8 probe: both mechanisms live at 1.17.3).
Plugin stays outside the extension bundle/tsconfig; load line on stderr
(debug-config stdout purity — regression-guarded). 99→122 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Free anonymous provider (opencode/big-pickle) resolves without auth.json →
AMICODE_E2E_LIVE=1 forces the creds gate. Cadence assertion = stage-batching
check (multiple '?' inside one platform question is fine); transcript saved
to tmpdir for the experiment note.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Real-home mode now substitutes AGENTS.md via prepareOpencodeProject (stage 6
needs real template/julia paths). Keyword-routed answers, bounded turns,
run-dir poll. Result: 10 turns on the free model → all four amicode_* tools
fired (System→Formulation→Run stub) → authored solve.jl → amico-run launch →
F=0.9998977/60 iters. AMICODE_E2E_FULLCHAIN=1 gates it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amicode_to_hardware (device_session stub; gate + checks PINNED by the
serializer so a stub can never claim an approval that didn't happen) and
amicode_calibrate (ILC stub, auto-refs device_session.toml). No device I/O —
explanations say so explicitly, mirroring AGENTS.md stage 8, which now names
both tools. 6 tools registered (verified via /experimental/tool/ids). 122→128
tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
'Who are you?' now answers 'I'm Amico — Amicode's pulse-design copilot'
(never 'opencode, an interactive CLI tool'), and a greeting/no-intent session
opener triggers the stage-1 PLATFORM question instead of a generic assistant
reply. Specific asks keep the skip rule.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Interview option-stages (platform, sim-vs-solve, problem/gate) now go through
amicode_ask(question, options[2-6]); the renderer draws buttons from the tool
part's input and a click sends the option text as the next user message.
Free-form values stay plain questions. 7 tools registered (runtime-verified).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Live-demo findings: the free model repeated the question in prose and answered
it itself. Tool return now says STOP HERE explicitly; AGENTS.md mirrors it.
New optional details[] arg — one dim qualifier per button (minimalist card,
slightly more context).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pixel <0110> face in brand yellow on the H silhouette (from the website
robot); currentColor body serves dark+light. Same asset ships in the fork's
logo/favicon (kept in sync manually — canonical geometry recorded there in
AMICODE-PATCHES.md).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ited stop
Work found staged in the night tree (parallel session / Aaron) — folded in
after validating build + full suite green. Fixes the Remote-SSH pain: forward
43117 once, restarts reuse it; stop() now resolves on child exit so a
fixed-port restart can't race the old process for the socket. Set 0 to restore
per-start ephemeral ports.
…e_manifest transport, scores-root grant, never-brick fallback
aarontrowbridgeand others added 11 commits July 3, 2026 17:04
…s (score_guard sibling module, entitiesDir transport)
…ded-state (v2)
The compiled score is now what runtime users see — the STOP-HERE ask
discipline and optional per-option details move in from the AGENTS.md
fallback, plus the anti-drift anchor from Aaron's live session (rail said
rydberg while the interview asked transmon-omega): re-read the System entity
before stage-2+ questions; correct the record first if it's wrong.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion cross-check
Score content bumps (v1->v2 tonight) must not red the suite; instead assert
the compiled banner and the manifest agree on whatever version ships.
… deprecated
Live finding: 1.17.3 ships a turn-blocking question tool (tool/question.ts)
with options+descriptions+custom answers — the model reached for it unprompted
and its semantics structurally kill self-answering and prose repeats. Score #0
v3 + AGENTS.md fallback now route all choice questions through it; amicode_ask
stays registered but deprecated. One mechanism, upstream-owned.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ine talk
The starter chip hit a Webfetch to the engine's website and a flat 3-sentence
reply. The canonical question now has a canonical answer: capability bullets
(interview, fast-path, live inspector, warm-start/resume, hardware preview),
honest scope line, then next-step options via the question tool.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…late
fetch_opencode gains repo/tag manifest fields with authenticated gh download
for the private harmoniqs/opencode release (206 tests). TESTING.md = the
7-point branch test script for the team. solve_rydberg_cz.jl: 2-atom 3-level
QuEra deep-blockade CZ, public-Piccolo-only (fixed-phase NLP + post-hoc
virtual-Z scan; free_phase kwarg is Piccolissimo-gated) — vetting solve in
flight, score wiring lands with its result.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Point an agent at the repo and it can set up, verify, and test the branch:
prerequisites with checks, ordered setup, five verification gates, dev facts
(fixed port, fork boundary, plugin runtime, scores), sharp edges.
…icode.1)
Lock repointed to the mirror (both platform shas from the release assets);
clean-fetch verified end-to-end via the authenticated gh path — downloaded
binary is byte-identical to the deployed build (8aa718ad…) and serves
<title>Amicode</title>. Rydberg CZ template clearly marked EXPERIMENTAL
(vetting stalled on pathological first-iteration NLP cost; parked) and
TESTING.md de-overclaimed accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ot signature
The rebase onto main folded in #79's runsRoot param (3rd position). These test
call sites predated it and passed pluginPath/scoresRoot into the wrong slots or
omitted runsRoot entirely. Insert runsRoot so scores + slow-e2e configs grant
the right paths. Fast suite 207 pass; tsc --noEmit clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aarontrowbridge
aarontrowbridgeforce-pushed the aaron/night-l0-pulse-designer branch from 05db60f to d81e63fCompareJuly 3, 2026 21:08
jack-champagne added a commit that referenced this pull request Jul 4, 2026
The pre-solve formulation.toml emit could not run through the agent deploy
path: AGENTS.md copies solve_template.jl alone into a scratch dir and runs the
copy, so @__DIR__ was the scratch dir and include(emit_formulation.jl) resolved
to a file that was never copied — LoadError before solve!, on every run. CI
never executes the template, so it stayed green.
- Inline emit_formulation into solve_template.jl; delete the sibling helper.
Sharing moves to a Julia package (AmicoRunDir.jl) when #75/#76 add a second
template — the only share mechanism that survives the single-file copy.
- Tighten formulation.schema.json: per-family if/then — transmon requires and
type-checks delta/levels/drive_max; formulation requires gate/T/N; Q/R
optional; additionalProperties:true per family (unknown families lenient).
- Add template_deploy_contract.test.ts: reproduces the AGENTS.md single-file
copy and asserts every include() resolves. Red on the bug, green inlined.
schema_version stays "1" (additive: no on-disk formulation.toml exists yet).
@jack-champagne
jack-champagne merged commit d81e63f into mainJul 8, 2026
1 of 5 checks passed
aarontrowbridge added a commit that referenced this pull request Sep 1, 2026
… warrant-bounds schema (#703) (#706)
* feat(schema): the autonomy datum — device {none|ro|rw} documented in warrant bounds, rejection pinned (#703)
SEAM 6, amicode's half of the one-autonomy-doctrine (codesign spec
spec-20260831-120000, issue #703):
- $defs.bounds.device — the enum {none, ro, rw} — now carries the datum's
documented semantics: none = no device access; ro = read-only device
access; rw = device writes permitted, gated by the real-board-session
human gate. The approval branch's description points at the datum (one
definition, this schema — the fleet §2.1 pointer formalized).
- The three-systems contract stated once in the schema's documentation,
each counterpart's criterion NAMED under its own owner: amicode's bounds
(this schema), the P4 gate's end-to-end read (merge-gated on strumento #75
MERGED), Telaio's warrant-bounds deserialization conformance (their
campaign). The SEAM 4 contract note is not on main yet — the director
wires the cross-reference line post-merge.
- Rejection tests pin the no-second-knob doctrine mechanically:
validateBounds REFUSES any device value outside the enum and any unknown
device-permission-shaped field (additionalProperties:false), field-precise
errors naming the impostor key; the approval record kind refuses a second
device knob the same way.
* feat(extension): the approval tool surface validates against the schema's device datum (#703)
SEAM 6's tool-surface half (issue #703) — one definition, no free text:
- amicode_request_approval's bounds arg now cites the @amicode/schema
warrant-bounds schema ($defs.bounds — the one definition) and its execute()
validates bounds via validateBounds: a device value outside {none, ro, rw}
or a second device-shaped field is refused BEFORE the card renders, so a
malformed ask can never become a pressable button.
- The plugin twin (retired from the config, still drift-guarded by the
projection test) mirrors the same gate: opencode-plugin/warrant_bounds.ts is
the dependency-free twin of $defs.bounds (bare package specifiers do not
resolve in the plugin runtime — unreachable by construction, per
./ledger_client's sibling-module rules), PINNED to the schema by
test/warrant_bounds_parity.test.ts: the corpus (every datum case) must agree
with validateBounds on ok AND error strings, and DEVICE_DATUM must equal
the schema's own device enum — growth breaks the pin.
- The mint path (amicode_service/warrants.ts approveArgv) validates bounds
against the schema too, refusing invalid bounds instead of silently
dropping them — a dropped key silently under-authorises the minted warrant;
test/amicode_service_warrants.test.ts is the flag-mapping pin the export
always promised, plus the refusal cases.
The three-systems contract line for the PR (the director's): amicode's bounds
are this slice (the schema datum, above); the P4 gate's end-to-end read is
merge-gated on strumento #75 MERGED; Telaio's warrant-bounds deserialization
conformance is their campaign's criterion — each named under its own owner,
none claimed as another's.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@aarontrowbridge@jack-champagne
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green - #75

Merged
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer
Jul 8, 2026
Merged

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green#75
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

What this is

The Layer-0 pulse-designer track from tonight's spec (spec — drafted in Aaron's personal vault, spec-20260703-020630-amicode-opencode-thin-fork; will be socialized before team-canon promotion). It implements the front-of-chain interview (UX1 #46's storyboard) as opencode-native config: an agent + instructions + a bookkeeping tool pack. Nothing in the phased build moves — amico-run, run-dir contract, schemas, inspector, scheduler/Δ-cloud tracks are all untouched; the only modified prod file is opencode_config.ts (additive keys).

Commits

  1. feat(L0) interview spine in AGENTS.md — 8 stages, one-question-at-a-time, scoped to the pulse-designer persona so the default build agent behaves exactly as before
  2. test(L0) tiered e2e suite (A registration / B plugin load / C live turns / D full chain)
  3. feat(L0)amicode_* tool pack v0 + registration (plugin abs-path + agent block via OPENCODE_CONFIG_CONTENT — both verified live at 1.17.3)
  4. tier C + D enablement

Evidence (all on this branch, tonight)

  • Fast suite: 122 passed (was 91 on main)
  • e2e 4/4 tiers green incl. tier D full chain: 10 interview turns (free anonymous provider — zero creds on the machine!) → all four tools fired (System → Formulation → Run entities on disk) → agent authored solve.jl from the vetted template → detached amico-run launch → run-dir → FINISHEDF = 0.9998977, 60 iters
  • Repro: AMICODE_E2E_LIVE=1 AMICODE_E2E_FULLCHAIN=1 npx vitest run test/slow/interview_e2e.test.ts

Not in this PR

The opencode fork (branded binary — L1 "AMICODE" + build recipe) lives in a local-only clone, deliberately unpublished pending discussion. This branch runs green against the stock vendored binary too — the L0 layer is binary-agnostic by design.

Known follow-ups

.vsix packaging of opencode-plugin/ unverified (TODO in headers); set_model merges via json sidecar; Rydberg is recorded-honestly (template is transmon-only); free-model phrasing variance noted in the tier-D transcript.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

T16 landed after the PR opened: amicode_to_hardware + amicode_calibrate guided stubs (no device I/O; gate/checks values pinned by the serializer). The pack now covers all 8 interview stages — 6 tools registered, 128 tests green. Also since opening: e2e re-verified 4/4 against the refreshed fork binary (fast suite + smoke + tiers; one tier-C flake traced to free-model sampling noise, passed on rerun — live tiers are env-gated off in CI).

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Live-demo-driven additions (Aaron driving the dev host, ~03:00–04:00): Amico identity + proactive interview kickoff (fc7b13d) and amicode_ask — option-stage questions as button payloads, 7 tools registered (903ce76). The matching UI (entity rail, collapsed chips, ask-button cards, start-screen wordmark, en-default locale) lives in the local fork's patch stack (11 commits, unpublished — see the handoff note in the personal vault). All L0 changes here remain binary-agnostic: on a stock binary, amicode_ask degrades to a plain-text question with listed options.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

This branch now additionally carries: the scores runtime (#76 merged, interview-as-data — score #0 v2 with ask-discipline + anchor-on-recorded-state), and the fixed opencode port (amicode.opencodePort, default 43117 — Remote-SSH users forward once). Suite: 203/203. Note for reviewers: 6471ed9 was momentarily red (hardcoded score-version literals in the stacked tests), fixed in 7f28414.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Final night addition: consolidated on opencode's native question tool (turn-blocking form — structurally prevents the self-answer/prose-repeat failure modes) as the one ask mechanism; amicode_ask deprecated-but-kept (8e9c89e). Score #0 at v3. Fork brands the native form and ships a 5-chip start screen with a repertoire-chips TODO (chips become one-per-entitled-score once a small endpoint exposes the compiled repertoire).

🤖 Generated with Claude Code

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review July 3, 2026 10:46
@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Ready for review — merge gated on @jack-champagne's eyes (Aaron's call: everything ships except the merge).

Since the last update: scores runtime merged in (#76 content — interview-as-data, score #0 v3, guard, router, usage funnel), fixed port 43117, curated capabilities answer, native-question-tool consolidation, H-robot brand mark + spinner, and the distribution chain is live: the vendored binary now comes from the private mirror release harmoniqs/opencode v1.17.3-amicode.1 (linux-x64 + darwin-arm64), clean-fetch verified byte-identical.

Review pointers (the seams):opencode.lock.json + scripts/fetch_opencode.mjs (repo/tag + authenticated gh path), src/opencode_config.ts (additive agent/plugin/permission injection), opencode-plugin/ (Bun-side, single-export), scores/ (splice never touches source AGENTS.md — fallback intact). Suite: 206 fast + slow gates green, CI green both platforms. Setup for testing: root AGENTS.md (agent-forward) or packages/extension/TESTING.md (human).

Known-not-done, honestly: Rydberg CZ template is EXPERIMENTAL (vetting stalled, marked in-file); amicode_ask deprecated-not-removed; ask-card/bridge legacy code pending pruning; repertoire-driven start chips need a server endpoint.

🤖 Generated with Claude Code

jack-champagne pushed a commit that referenced this pull request Jul 3, 2026
…the per-solve "ask" nag (#79)
AGENTS.md instructs the agent to READ run artifacts (FINISHED/result.toml for
results, run.log for failure tracebacks) under the runs root — but the injected
permission.external_directory only granted the templates dir + /tmp/amicode-work.
opencode defaults external_directory to "ask", so every read-back fired a
permission prompt: one per solve, and repeatedly on failures (the 2026-07-03
live test hit this hard — four failing runs, agent in run.log each time).
Thread the resolved runsRoot (respects the amicode.runsRoot setting) into
buildOpencodeConfigContent and grant `${runsRoot}/**`. Still least-privilege:
scoped to the one additional root AGENTS.md actually sends the agent's file
tools into; amico-run's own subprocess writes never needed a grant.
Tests: unit (grant present + still path-scoped), real-opencode integration
(grant survives the 1.17.3 deep-merge alongside the user's global permission
keys). 93 pass, typecheck clean.
Note: Aaron's #75/#76 restructure the same permission block (adding entities/
scores grants — correctly); whichever lands second has a one-line rebase.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
aarontrowbridgeand others added 20 commits July 3, 2026 17:02
Scoped to the pulse-designer persona (never hijacks the default build agent),
one-question-at-a-time, 8 stages PLATFORM→CALIBRATE, transmon fully wired /
Rydberg recorded-honestly, amicode_* tools as bookkeeping with bash+amico-run
still the launch mechanism. Tests: interview block + no-unknown-placeholder
assertion (only {{TEMPLATE_PATH}}/{{JULIA_PROJECT}} substituted).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gin load / live turns)
Tier A green vs stock 1.17.3; B gates on the plugin file, C on creds
(none on this machine tonight — morning step: opencode auth login).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Four bookkeeping tools (pick_system / set_model / formulate / solve-record)
executed by opencode's embedded Bun runtime; entities as TOML under
~/.amico/runs/default/_entities ($AMICODE_ENTITIES_DIR override). Registration
via buildOpencodeConfigContent: plugin abs-path + pulse-designer agent block +
entities-dir permission grant (T8 probe: both mechanisms live at 1.17.3).
Plugin stays outside the extension bundle/tsconfig; load line on stderr
(debug-config stdout purity — regression-guarded). 99→122 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Free anonymous provider (opencode/big-pickle) resolves without auth.json →
AMICODE_E2E_LIVE=1 forces the creds gate. Cadence assertion = stage-batching
check (multiple '?' inside one platform question is fine); transcript saved
to tmpdir for the experiment note.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Real-home mode now substitutes AGENTS.md via prepareOpencodeProject (stage 6
needs real template/julia paths). Keyword-routed answers, bounded turns,
run-dir poll. Result: 10 turns on the free model → all four amicode_* tools
fired (System→Formulation→Run stub) → authored solve.jl → amico-run launch →
F=0.9998977/60 iters. AMICODE_E2E_FULLCHAIN=1 gates it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amicode_to_hardware (device_session stub; gate + checks PINNED by the
serializer so a stub can never claim an approval that didn't happen) and
amicode_calibrate (ILC stub, auto-refs device_session.toml). No device I/O —
explanations say so explicitly, mirroring AGENTS.md stage 8, which now names
both tools. 6 tools registered (verified via /experimental/tool/ids). 122→128
tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
'Who are you?' now answers 'I'm Amico — Amicode's pulse-design copilot'
(never 'opencode, an interactive CLI tool'), and a greeting/no-intent session
opener triggers the stage-1 PLATFORM question instead of a generic assistant
reply. Specific asks keep the skip rule.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Interview option-stages (platform, sim-vs-solve, problem/gate) now go through
amicode_ask(question, options[2-6]); the renderer draws buttons from the tool
part's input and a click sends the option text as the next user message.
Free-form values stay plain questions. 7 tools registered (runtime-verified).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Live-demo findings: the free model repeated the question in prose and answered
it itself. Tool return now says STOP HERE explicitly; AGENTS.md mirrors it.
New optional details[] arg — one dim qualifier per button (minimalist card,
slightly more context).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pixel <0110> face in brand yellow on the H silhouette (from the website
robot); currentColor body serves dark+light. Same asset ships in the fork's
logo/favicon (kept in sync manually — canonical geometry recorded there in
AMICODE-PATCHES.md).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ited stop
Work found staged in the night tree (parallel session / Aaron) — folded in
after validating build + full suite green. Fixes the Remote-SSH pain: forward
43117 once, restarts reuse it; stop() now resolves on child exit so a
fixed-port restart can't race the old process for the socket. Set 0 to restore
per-start ephemeral ports.
…e_manifest transport, scores-root grant, never-brick fallback
aarontrowbridgeand others added 11 commits July 3, 2026 17:04
…s (score_guard sibling module, entitiesDir transport)
…ded-state (v2)
The compiled score is now what runtime users see — the STOP-HERE ask
discipline and optional per-option details move in from the AGENTS.md
fallback, plus the anti-drift anchor from Aaron's live session (rail said
rydberg while the interview asked transmon-omega): re-read the System entity
before stage-2+ questions; correct the record first if it's wrong.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion cross-check
Score content bumps (v1->v2 tonight) must not red the suite; instead assert
the compiled banner and the manifest agree on whatever version ships.
… deprecated
Live finding: 1.17.3 ships a turn-blocking question tool (tool/question.ts)
with options+descriptions+custom answers — the model reached for it unprompted
and its semantics structurally kill self-answering and prose repeats. Score #0
v3 + AGENTS.md fallback now route all choice questions through it; amicode_ask
stays registered but deprecated. One mechanism, upstream-owned.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ine talk
The starter chip hit a Webfetch to the engine's website and a flat 3-sentence
reply. The canonical question now has a canonical answer: capability bullets
(interview, fast-path, live inspector, warm-start/resume, hardware preview),
honest scope line, then next-step options via the question tool.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…late
fetch_opencode gains repo/tag manifest fields with authenticated gh download
for the private harmoniqs/opencode release (206 tests). TESTING.md = the
7-point branch test script for the team. solve_rydberg_cz.jl: 2-atom 3-level
QuEra deep-blockade CZ, public-Piccolo-only (fixed-phase NLP + post-hoc
virtual-Z scan; free_phase kwarg is Piccolissimo-gated) — vetting solve in
flight, score wiring lands with its result.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Point an agent at the repo and it can set up, verify, and test the branch:
prerequisites with checks, ordered setup, five verification gates, dev facts
(fixed port, fork boundary, plugin runtime, scores), sharp edges.
…icode.1)
Lock repointed to the mirror (both platform shas from the release assets);
clean-fetch verified end-to-end via the authenticated gh path — downloaded
binary is byte-identical to the deployed build (8aa718ad…) and serves
<title>Amicode</title>. Rydberg CZ template clearly marked EXPERIMENTAL
(vetting stalled on pathological first-iteration NLP cost; parked) and
TESTING.md de-overclaimed accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ot signature
The rebase onto main folded in #79's runsRoot param (3rd position). These test
call sites predated it and passed pluginPath/scoresRoot into the wrong slots or
omitted runsRoot entirely. Insert runsRoot so scores + slow-e2e configs grant
the right paths. Fast suite 207 pass; tsc --noEmit clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aarontrowbridge
aarontrowbridgeforce-pushed the aaron/night-l0-pulse-designer branch from 05db60f to d81e63fCompareJuly 3, 2026 21:08
jack-champagne added a commit that referenced this pull request Jul 4, 2026
The pre-solve formulation.toml emit could not run through the agent deploy
path: AGENTS.md copies solve_template.jl alone into a scratch dir and runs the
copy, so @__DIR__ was the scratch dir and include(emit_formulation.jl) resolved
to a file that was never copied — LoadError before solve!, on every run. CI
never executes the template, so it stayed green.
- Inline emit_formulation into solve_template.jl; delete the sibling helper.
Sharing moves to a Julia package (AmicoRunDir.jl) when #75/#76 add a second
template — the only share mechanism that survives the single-file copy.
- Tighten formulation.schema.json: per-family if/then — transmon requires and
type-checks delta/levels/drive_max; formulation requires gate/T/N; Q/R
optional; additionalProperties:true per family (unknown families lenient).
- Add template_deploy_contract.test.ts: reproduces the AGENTS.md single-file
copy and asserts every include() resolves. Red on the bug, green inlined.
schema_version stays "1" (additive: no on-disk formulation.toml exists yet).
@jack-champagne
jack-champagne merged commit d81e63f into mainJul 8, 2026
1 of 5 checks passed
aarontrowbridge added a commit that referenced this pull request Sep 1, 2026
… warrant-bounds schema (#703) (#706)
* feat(schema): the autonomy datum — device {none|ro|rw} documented in warrant bounds, rejection pinned (#703)
SEAM 6, amicode's half of the one-autonomy-doctrine (codesign spec
spec-20260831-120000, issue #703):
- $defs.bounds.device — the enum {none, ro, rw} — now carries the datum's
documented semantics: none = no device access; ro = read-only device
access; rw = device writes permitted, gated by the real-board-session
human gate. The approval branch's description points at the datum (one
definition, this schema — the fleet §2.1 pointer formalized).
- The three-systems contract stated once in the schema's documentation,
each counterpart's criterion NAMED under its own owner: amicode's bounds
(this schema), the P4 gate's end-to-end read (merge-gated on strumento #75
MERGED), Telaio's warrant-bounds deserialization conformance (their
campaign). The SEAM 4 contract note is not on main yet — the director
wires the cross-reference line post-merge.
- Rejection tests pin the no-second-knob doctrine mechanically:
validateBounds REFUSES any device value outside the enum and any unknown
device-permission-shaped field (additionalProperties:false), field-precise
errors naming the impostor key; the approval record kind refuses a second
device knob the same way.
* feat(extension): the approval tool surface validates against the schema's device datum (#703)
SEAM 6's tool-surface half (issue #703) — one definition, no free text:
- amicode_request_approval's bounds arg now cites the @amicode/schema
warrant-bounds schema ($defs.bounds — the one definition) and its execute()
validates bounds via validateBounds: a device value outside {none, ro, rw}
or a second device-shaped field is refused BEFORE the card renders, so a
malformed ask can never become a pressable button.
- The plugin twin (retired from the config, still drift-guarded by the
projection test) mirrors the same gate: opencode-plugin/warrant_bounds.ts is
the dependency-free twin of $defs.bounds (bare package specifiers do not
resolve in the plugin runtime — unreachable by construction, per
./ledger_client's sibling-module rules), PINNED to the schema by
test/warrant_bounds_parity.test.ts: the corpus (every datum case) must agree
with validateBounds on ok AND error strings, and DEVICE_DATUM must equal
the schema's own device enum — growth breaks the pin.
- The mint path (amicode_service/warrants.ts approveArgv) validates bounds
against the schema too, refusing invalid bounds instead of silently
dropping them — a dropped key silently under-authorises the minted warrant;
test/amicode_service_warrants.test.ts is the flag-mapping pin the export
always promised, plus the refusal cases.
The three-systems contract line for the PR (the director's): amicode's bounds
are this slice (the schema datum, above); the P4 gate's end-to-end read is
merge-gated on strumento #75 MERGED; Telaio's warrant-bounds deserialization
conformance is their campaign's criterion — each named under its own owner,
none claimed as another's.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@aarontrowbridge@jack-champagne
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green - #75

Merged
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer
Jul 8, 2026
Merged

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green#75
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

What this is

The Layer-0 pulse-designer track from tonight's spec (spec — drafted in Aaron's personal vault, spec-20260703-020630-amicode-opencode-thin-fork; will be socialized before team-canon promotion). It implements the front-of-chain interview (UX1 #46's storyboard) as opencode-native config: an agent + instructions + a bookkeeping tool pack. Nothing in the phased build moves — amico-run, run-dir contract, schemas, inspector, scheduler/Δ-cloud tracks are all untouched; the only modified prod file is opencode_config.ts (additive keys).

Commits

  1. feat(L0) interview spine in AGENTS.md — 8 stages, one-question-at-a-time, scoped to the pulse-designer persona so the default build agent behaves exactly as before
  2. test(L0) tiered e2e suite (A registration / B plugin load / C live turns / D full chain)
  3. feat(L0)amicode_* tool pack v0 + registration (plugin abs-path + agent block via OPENCODE_CONFIG_CONTENT — both verified live at 1.17.3)
  4. tier C + D enablement

Evidence (all on this branch, tonight)

  • Fast suite: 122 passed (was 91 on main)
  • e2e 4/4 tiers green incl. tier D full chain: 10 interview turns (free anonymous provider — zero creds on the machine!) → all four tools fired (System → Formulation → Run entities on disk) → agent authored solve.jl from the vetted template → detached amico-run launch → run-dir → FINISHEDF = 0.9998977, 60 iters
  • Repro: AMICODE_E2E_LIVE=1 AMICODE_E2E_FULLCHAIN=1 npx vitest run test/slow/interview_e2e.test.ts

Not in this PR

The opencode fork (branded binary — L1 "AMICODE" + build recipe) lives in a local-only clone, deliberately unpublished pending discussion. This branch runs green against the stock vendored binary too — the L0 layer is binary-agnostic by design.

Known follow-ups

.vsix packaging of opencode-plugin/ unverified (TODO in headers); set_model merges via json sidecar; Rydberg is recorded-honestly (template is transmon-only); free-model phrasing variance noted in the tier-D transcript.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

T16 landed after the PR opened: amicode_to_hardware + amicode_calibrate guided stubs (no device I/O; gate/checks values pinned by the serializer). The pack now covers all 8 interview stages — 6 tools registered, 128 tests green. Also since opening: e2e re-verified 4/4 against the refreshed fork binary (fast suite + smoke + tiers; one tier-C flake traced to free-model sampling noise, passed on rerun — live tiers are env-gated off in CI).

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Live-demo-driven additions (Aaron driving the dev host, ~03:00–04:00): Amico identity + proactive interview kickoff (fc7b13d) and amicode_ask — option-stage questions as button payloads, 7 tools registered (903ce76). The matching UI (entity rail, collapsed chips, ask-button cards, start-screen wordmark, en-default locale) lives in the local fork's patch stack (11 commits, unpublished — see the handoff note in the personal vault). All L0 changes here remain binary-agnostic: on a stock binary, amicode_ask degrades to a plain-text question with listed options.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

This branch now additionally carries: the scores runtime (#76 merged, interview-as-data — score #0 v2 with ask-discipline + anchor-on-recorded-state), and the fixed opencode port (amicode.opencodePort, default 43117 — Remote-SSH users forward once). Suite: 203/203. Note for reviewers: 6471ed9 was momentarily red (hardcoded score-version literals in the stacked tests), fixed in 7f28414.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Final night addition: consolidated on opencode's native question tool (turn-blocking form — structurally prevents the self-answer/prose-repeat failure modes) as the one ask mechanism; amicode_ask deprecated-but-kept (8e9c89e). Score #0 at v3. Fork brands the native form and ships a 5-chip start screen with a repertoire-chips TODO (chips become one-per-entitled-score once a small endpoint exposes the compiled repertoire).

🤖 Generated with Claude Code

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review July 3, 2026 10:46
@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Ready for review — merge gated on @jack-champagne's eyes (Aaron's call: everything ships except the merge).

Since the last update: scores runtime merged in (#76 content — interview-as-data, score #0 v3, guard, router, usage funnel), fixed port 43117, curated capabilities answer, native-question-tool consolidation, H-robot brand mark + spinner, and the distribution chain is live: the vendored binary now comes from the private mirror release harmoniqs/opencode v1.17.3-amicode.1 (linux-x64 + darwin-arm64), clean-fetch verified byte-identical.

Review pointers (the seams):opencode.lock.json + scripts/fetch_opencode.mjs (repo/tag + authenticated gh path), src/opencode_config.ts (additive agent/plugin/permission injection), opencode-plugin/ (Bun-side, single-export), scores/ (splice never touches source AGENTS.md — fallback intact). Suite: 206 fast + slow gates green, CI green both platforms. Setup for testing: root AGENTS.md (agent-forward) or packages/extension/TESTING.md (human).

Known-not-done, honestly: Rydberg CZ template is EXPERIMENTAL (vetting stalled, marked in-file); amicode_ask deprecated-not-removed; ask-card/bridge legacy code pending pruning; repertoire-driven start chips need a server endpoint.

🤖 Generated with Claude Code

jack-champagne pushed a commit that referenced this pull request Jul 3, 2026
…the per-solve "ask" nag (#79)
AGENTS.md instructs the agent to READ run artifacts (FINISHED/result.toml for
results, run.log for failure tracebacks) under the runs root — but the injected
permission.external_directory only granted the templates dir + /tmp/amicode-work.
opencode defaults external_directory to "ask", so every read-back fired a
permission prompt: one per solve, and repeatedly on failures (the 2026-07-03
live test hit this hard — four failing runs, agent in run.log each time).
Thread the resolved runsRoot (respects the amicode.runsRoot setting) into
buildOpencodeConfigContent and grant `${runsRoot}/**`. Still least-privilege:
scoped to the one additional root AGENTS.md actually sends the agent's file
tools into; amico-run's own subprocess writes never needed a grant.
Tests: unit (grant present + still path-scoped), real-opencode integration
(grant survives the 1.17.3 deep-merge alongside the user's global permission
keys). 93 pass, typecheck clean.
Note: Aaron's #75/#76 restructure the same permission block (adding entities/
scores grants — correctly); whichever lands second has a one-line rebase.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
aarontrowbridgeand others added 20 commits July 3, 2026 17:02
Scoped to the pulse-designer persona (never hijacks the default build agent),
one-question-at-a-time, 8 stages PLATFORM→CALIBRATE, transmon fully wired /
Rydberg recorded-honestly, amicode_* tools as bookkeeping with bash+amico-run
still the launch mechanism. Tests: interview block + no-unknown-placeholder
assertion (only {{TEMPLATE_PATH}}/{{JULIA_PROJECT}} substituted).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gin load / live turns)
Tier A green vs stock 1.17.3; B gates on the plugin file, C on creds
(none on this machine tonight — morning step: opencode auth login).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Four bookkeeping tools (pick_system / set_model / formulate / solve-record)
executed by opencode's embedded Bun runtime; entities as TOML under
~/.amico/runs/default/_entities ($AMICODE_ENTITIES_DIR override). Registration
via buildOpencodeConfigContent: plugin abs-path + pulse-designer agent block +
entities-dir permission grant (T8 probe: both mechanisms live at 1.17.3).
Plugin stays outside the extension bundle/tsconfig; load line on stderr
(debug-config stdout purity — regression-guarded). 99→122 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Free anonymous provider (opencode/big-pickle) resolves without auth.json →
AMICODE_E2E_LIVE=1 forces the creds gate. Cadence assertion = stage-batching
check (multiple '?' inside one platform question is fine); transcript saved
to tmpdir for the experiment note.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Real-home mode now substitutes AGENTS.md via prepareOpencodeProject (stage 6
needs real template/julia paths). Keyword-routed answers, bounded turns,
run-dir poll. Result: 10 turns on the free model → all four amicode_* tools
fired (System→Formulation→Run stub) → authored solve.jl → amico-run launch →
F=0.9998977/60 iters. AMICODE_E2E_FULLCHAIN=1 gates it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amicode_to_hardware (device_session stub; gate + checks PINNED by the
serializer so a stub can never claim an approval that didn't happen) and
amicode_calibrate (ILC stub, auto-refs device_session.toml). No device I/O —
explanations say so explicitly, mirroring AGENTS.md stage 8, which now names
both tools. 6 tools registered (verified via /experimental/tool/ids). 122→128
tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
'Who are you?' now answers 'I'm Amico — Amicode's pulse-design copilot'
(never 'opencode, an interactive CLI tool'), and a greeting/no-intent session
opener triggers the stage-1 PLATFORM question instead of a generic assistant
reply. Specific asks keep the skip rule.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Interview option-stages (platform, sim-vs-solve, problem/gate) now go through
amicode_ask(question, options[2-6]); the renderer draws buttons from the tool
part's input and a click sends the option text as the next user message.
Free-form values stay plain questions. 7 tools registered (runtime-verified).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Live-demo findings: the free model repeated the question in prose and answered
it itself. Tool return now says STOP HERE explicitly; AGENTS.md mirrors it.
New optional details[] arg — one dim qualifier per button (minimalist card,
slightly more context).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pixel <0110> face in brand yellow on the H silhouette (from the website
robot); currentColor body serves dark+light. Same asset ships in the fork's
logo/favicon (kept in sync manually — canonical geometry recorded there in
AMICODE-PATCHES.md).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ited stop
Work found staged in the night tree (parallel session / Aaron) — folded in
after validating build + full suite green. Fixes the Remote-SSH pain: forward
43117 once, restarts reuse it; stop() now resolves on child exit so a
fixed-port restart can't race the old process for the socket. Set 0 to restore
per-start ephemeral ports.
…e_manifest transport, scores-root grant, never-brick fallback
aarontrowbridgeand others added 11 commits July 3, 2026 17:04
…s (score_guard sibling module, entitiesDir transport)
…ded-state (v2)
The compiled score is now what runtime users see — the STOP-HERE ask
discipline and optional per-option details move in from the AGENTS.md
fallback, plus the anti-drift anchor from Aaron's live session (rail said
rydberg while the interview asked transmon-omega): re-read the System entity
before stage-2+ questions; correct the record first if it's wrong.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion cross-check
Score content bumps (v1->v2 tonight) must not red the suite; instead assert
the compiled banner and the manifest agree on whatever version ships.
… deprecated
Live finding: 1.17.3 ships a turn-blocking question tool (tool/question.ts)
with options+descriptions+custom answers — the model reached for it unprompted
and its semantics structurally kill self-answering and prose repeats. Score #0
v3 + AGENTS.md fallback now route all choice questions through it; amicode_ask
stays registered but deprecated. One mechanism, upstream-owned.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ine talk
The starter chip hit a Webfetch to the engine's website and a flat 3-sentence
reply. The canonical question now has a canonical answer: capability bullets
(interview, fast-path, live inspector, warm-start/resume, hardware preview),
honest scope line, then next-step options via the question tool.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…late
fetch_opencode gains repo/tag manifest fields with authenticated gh download
for the private harmoniqs/opencode release (206 tests). TESTING.md = the
7-point branch test script for the team. solve_rydberg_cz.jl: 2-atom 3-level
QuEra deep-blockade CZ, public-Piccolo-only (fixed-phase NLP + post-hoc
virtual-Z scan; free_phase kwarg is Piccolissimo-gated) — vetting solve in
flight, score wiring lands with its result.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Point an agent at the repo and it can set up, verify, and test the branch:
prerequisites with checks, ordered setup, five verification gates, dev facts
(fixed port, fork boundary, plugin runtime, scores), sharp edges.
…icode.1)
Lock repointed to the mirror (both platform shas from the release assets);
clean-fetch verified end-to-end via the authenticated gh path — downloaded
binary is byte-identical to the deployed build (8aa718ad…) and serves
<title>Amicode</title>. Rydberg CZ template clearly marked EXPERIMENTAL
(vetting stalled on pathological first-iteration NLP cost; parked) and
TESTING.md de-overclaimed accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ot signature
The rebase onto main folded in #79's runsRoot param (3rd position). These test
call sites predated it and passed pluginPath/scoresRoot into the wrong slots or
omitted runsRoot entirely. Insert runsRoot so scores + slow-e2e configs grant
the right paths. Fast suite 207 pass; tsc --noEmit clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aarontrowbridge
aarontrowbridgeforce-pushed the aaron/night-l0-pulse-designer branch from 05db60f to d81e63fCompareJuly 3, 2026 21:08
jack-champagne added a commit that referenced this pull request Jul 4, 2026
The pre-solve formulation.toml emit could not run through the agent deploy
path: AGENTS.md copies solve_template.jl alone into a scratch dir and runs the
copy, so @__DIR__ was the scratch dir and include(emit_formulation.jl) resolved
to a file that was never copied — LoadError before solve!, on every run. CI
never executes the template, so it stayed green.
- Inline emit_formulation into solve_template.jl; delete the sibling helper.
Sharing moves to a Julia package (AmicoRunDir.jl) when #75/#76 add a second
template — the only share mechanism that survives the single-file copy.
- Tighten formulation.schema.json: per-family if/then — transmon requires and
type-checks delta/levels/drive_max; formulation requires gate/T/N; Q/R
optional; additionalProperties:true per family (unknown families lenient).
- Add template_deploy_contract.test.ts: reproduces the AGENTS.md single-file
copy and asserts every include() resolves. Red on the bug, green inlined.
schema_version stays "1" (additive: no on-disk formulation.toml exists yet).
@jack-champagne
jack-champagne merged commit d81e63f into mainJul 8, 2026
1 of 5 checks passed
aarontrowbridge added a commit that referenced this pull request Sep 1, 2026
… warrant-bounds schema (#703) (#706)
* feat(schema): the autonomy datum — device {none|ro|rw} documented in warrant bounds, rejection pinned (#703)
SEAM 6, amicode's half of the one-autonomy-doctrine (codesign spec
spec-20260831-120000, issue #703):
- $defs.bounds.device — the enum {none, ro, rw} — now carries the datum's
documented semantics: none = no device access; ro = read-only device
access; rw = device writes permitted, gated by the real-board-session
human gate. The approval branch's description points at the datum (one
definition, this schema — the fleet §2.1 pointer formalized).
- The three-systems contract stated once in the schema's documentation,
each counterpart's criterion NAMED under its own owner: amicode's bounds
(this schema), the P4 gate's end-to-end read (merge-gated on strumento #75
MERGED), Telaio's warrant-bounds deserialization conformance (their
campaign). The SEAM 4 contract note is not on main yet — the director
wires the cross-reference line post-merge.
- Rejection tests pin the no-second-knob doctrine mechanically:
validateBounds REFUSES any device value outside the enum and any unknown
device-permission-shaped field (additionalProperties:false), field-precise
errors naming the impostor key; the approval record kind refuses a second
device knob the same way.
* feat(extension): the approval tool surface validates against the schema's device datum (#703)
SEAM 6's tool-surface half (issue #703) — one definition, no free text:
- amicode_request_approval's bounds arg now cites the @amicode/schema
warrant-bounds schema ($defs.bounds — the one definition) and its execute()
validates bounds via validateBounds: a device value outside {none, ro, rw}
or a second device-shaped field is refused BEFORE the card renders, so a
malformed ask can never become a pressable button.
- The plugin twin (retired from the config, still drift-guarded by the
projection test) mirrors the same gate: opencode-plugin/warrant_bounds.ts is
the dependency-free twin of $defs.bounds (bare package specifiers do not
resolve in the plugin runtime — unreachable by construction, per
./ledger_client's sibling-module rules), PINNED to the schema by
test/warrant_bounds_parity.test.ts: the corpus (every datum case) must agree
with validateBounds on ok AND error strings, and DEVICE_DATUM must equal
the schema's own device enum — growth breaks the pin.
- The mint path (amicode_service/warrants.ts approveArgv) validates bounds
against the schema too, refusing invalid bounds instead of silently
dropping them — a dropped key silently under-authorises the minted warrant;
test/amicode_service_warrants.test.ts is the flag-mapping pin the export
always promised, plus the refusal cases.
The three-systems contract line for the PR (the director's): amicode's bounds
are this slice (the schema datum, above); the P4 gate's end-to-end read is
merge-gated on strumento #75 MERGED; Telaio's warrant-bounds deserialization
conformance is their campaign's criterion — each named under its own owner,
none claimed as another's.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@aarontrowbridge@jack-champagne
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green - #75

Merged
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer
Jul 8, 2026
Merged

WIP night spike: pulse-designer Layer-0 — interview → entities → solve, e2e green#75
jack-champagne merged 31 commits into
mainfrom
aaron/night-l0-pulse-designer

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

What this is

The Layer-0 pulse-designer track from tonight's spec (spec — drafted in Aaron's personal vault, spec-20260703-020630-amicode-opencode-thin-fork; will be socialized before team-canon promotion). It implements the front-of-chain interview (UX1 #46's storyboard) as opencode-native config: an agent + instructions + a bookkeeping tool pack. Nothing in the phased build moves — amico-run, run-dir contract, schemas, inspector, scheduler/Δ-cloud tracks are all untouched; the only modified prod file is opencode_config.ts (additive keys).

Commits

  1. feat(L0) interview spine in AGENTS.md — 8 stages, one-question-at-a-time, scoped to the pulse-designer persona so the default build agent behaves exactly as before
  2. test(L0) tiered e2e suite (A registration / B plugin load / C live turns / D full chain)
  3. feat(L0)amicode_* tool pack v0 + registration (plugin abs-path + agent block via OPENCODE_CONFIG_CONTENT — both verified live at 1.17.3)
  4. tier C + D enablement

Evidence (all on this branch, tonight)

  • Fast suite: 122 passed (was 91 on main)
  • e2e 4/4 tiers green incl. tier D full chain: 10 interview turns (free anonymous provider — zero creds on the machine!) → all four tools fired (System → Formulation → Run entities on disk) → agent authored solve.jl from the vetted template → detached amico-run launch → run-dir → FINISHEDF = 0.9998977, 60 iters
  • Repro: AMICODE_E2E_LIVE=1 AMICODE_E2E_FULLCHAIN=1 npx vitest run test/slow/interview_e2e.test.ts

Not in this PR

The opencode fork (branded binary — L1 "AMICODE" + build recipe) lives in a local-only clone, deliberately unpublished pending discussion. This branch runs green against the stock vendored binary too — the L0 layer is binary-agnostic by design.

Known follow-ups

.vsix packaging of opencode-plugin/ unverified (TODO in headers); set_model merges via json sidecar; Rydberg is recorded-honestly (template is transmon-only); free-model phrasing variance noted in the tier-D transcript.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

T16 landed after the PR opened: amicode_to_hardware + amicode_calibrate guided stubs (no device I/O; gate/checks values pinned by the serializer). The pack now covers all 8 interview stages — 6 tools registered, 128 tests green. Also since opening: e2e re-verified 4/4 against the refreshed fork binary (fast suite + smoke + tiers; one tier-C flake traced to free-model sampling noise, passed on rerun — live tiers are env-gated off in CI).

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Live-demo-driven additions (Aaron driving the dev host, ~03:00–04:00): Amico identity + proactive interview kickoff (fc7b13d) and amicode_ask — option-stage questions as button payloads, 7 tools registered (903ce76). The matching UI (entity rail, collapsed chips, ask-button cards, start-screen wordmark, en-default locale) lives in the local fork's patch stack (11 commits, unpublished — see the handoff note in the personal vault). All L0 changes here remain binary-agnostic: on a stock binary, amicode_ask degrades to a plain-text question with listed options.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

This branch now additionally carries: the scores runtime (#76 merged, interview-as-data — score #0 v2 with ask-discipline + anchor-on-recorded-state), and the fixed opencode port (amicode.opencodePort, default 43117 — Remote-SSH users forward once). Suite: 203/203. Note for reviewers: 6471ed9 was momentarily red (hardcoded score-version literals in the stacked tests), fixed in 7f28414.

🤖 Generated with Claude Code

@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Final night addition: consolidated on opencode's native question tool (turn-blocking form — structurally prevents the self-answer/prose-repeat failure modes) as the one ask mechanism; amicode_ask deprecated-but-kept (8e9c89e). Score #0 at v3. Fork brands the native form and ships a 5-chip start screen with a repertoire-chips TODO (chips become one-per-entitled-score once a small endpoint exposes the compiled repertoire).

🤖 Generated with Claude Code

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review July 3, 2026 10:46
@aarontrowbridge

Copy link
Copy Markdown
MemberAuthor

Ready for review — merge gated on @jack-champagne's eyes (Aaron's call: everything ships except the merge).

Since the last update: scores runtime merged in (#76 content — interview-as-data, score #0 v3, guard, router, usage funnel), fixed port 43117, curated capabilities answer, native-question-tool consolidation, H-robot brand mark + spinner, and the distribution chain is live: the vendored binary now comes from the private mirror release harmoniqs/opencode v1.17.3-amicode.1 (linux-x64 + darwin-arm64), clean-fetch verified byte-identical.

Review pointers (the seams):opencode.lock.json + scripts/fetch_opencode.mjs (repo/tag + authenticated gh path), src/opencode_config.ts (additive agent/plugin/permission injection), opencode-plugin/ (Bun-side, single-export), scores/ (splice never touches source AGENTS.md — fallback intact). Suite: 206 fast + slow gates green, CI green both platforms. Setup for testing: root AGENTS.md (agent-forward) or packages/extension/TESTING.md (human).

Known-not-done, honestly: Rydberg CZ template is EXPERIMENTAL (vetting stalled, marked in-file); amicode_ask deprecated-not-removed; ask-card/bridge legacy code pending pruning; repertoire-driven start chips need a server endpoint.

🤖 Generated with Claude Code

jack-champagne pushed a commit that referenced this pull request Jul 3, 2026
…the per-solve "ask" nag (#79)
AGENTS.md instructs the agent to READ run artifacts (FINISHED/result.toml for
results, run.log for failure tracebacks) under the runs root — but the injected
permission.external_directory only granted the templates dir + /tmp/amicode-work.
opencode defaults external_directory to "ask", so every read-back fired a
permission prompt: one per solve, and repeatedly on failures (the 2026-07-03
live test hit this hard — four failing runs, agent in run.log each time).
Thread the resolved runsRoot (respects the amicode.runsRoot setting) into
buildOpencodeConfigContent and grant `${runsRoot}/**`. Still least-privilege:
scoped to the one additional root AGENTS.md actually sends the agent's file
tools into; amico-run's own subprocess writes never needed a grant.
Tests: unit (grant present + still path-scoped), real-opencode integration
(grant survives the 1.17.3 deep-merge alongside the user's global permission
keys). 93 pass, typecheck clean.
Note: Aaron's #75/#76 restructure the same permission block (adding entities/
scores grants — correctly); whichever lands second has a one-line rebase.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
aarontrowbridgeand others added 20 commits July 3, 2026 17:02
Scoped to the pulse-designer persona (never hijacks the default build agent),
one-question-at-a-time, 8 stages PLATFORM→CALIBRATE, transmon fully wired /
Rydberg recorded-honestly, amicode_* tools as bookkeeping with bash+amico-run
still the launch mechanism. Tests: interview block + no-unknown-placeholder
assertion (only {{TEMPLATE_PATH}}/{{JULIA_PROJECT}} substituted).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gin load / live turns)
Tier A green vs stock 1.17.3; B gates on the plugin file, C on creds
(none on this machine tonight — morning step: opencode auth login).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Four bookkeeping tools (pick_system / set_model / formulate / solve-record)
executed by opencode's embedded Bun runtime; entities as TOML under
~/.amico/runs/default/_entities ($AMICODE_ENTITIES_DIR override). Registration
via buildOpencodeConfigContent: plugin abs-path + pulse-designer agent block +
entities-dir permission grant (T8 probe: both mechanisms live at 1.17.3).
Plugin stays outside the extension bundle/tsconfig; load line on stderr
(debug-config stdout purity — regression-guarded). 99→122 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Free anonymous provider (opencode/big-pickle) resolves without auth.json →
AMICODE_E2E_LIVE=1 forces the creds gate. Cadence assertion = stage-batching
check (multiple '?' inside one platform question is fine); transcript saved
to tmpdir for the experiment note.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Real-home mode now substitutes AGENTS.md via prepareOpencodeProject (stage 6
needs real template/julia paths). Keyword-routed answers, bounded turns,
run-dir poll. Result: 10 turns on the free model → all four amicode_* tools
fired (System→Formulation→Run stub) → authored solve.jl → amico-run launch →
F=0.9998977/60 iters. AMICODE_E2E_FULLCHAIN=1 gates it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amicode_to_hardware (device_session stub; gate + checks PINNED by the
serializer so a stub can never claim an approval that didn't happen) and
amicode_calibrate (ILC stub, auto-refs device_session.toml). No device I/O —
explanations say so explicitly, mirroring AGENTS.md stage 8, which now names
both tools. 6 tools registered (verified via /experimental/tool/ids). 122→128
tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
'Who are you?' now answers 'I'm Amico — Amicode's pulse-design copilot'
(never 'opencode, an interactive CLI tool'), and a greeting/no-intent session
opener triggers the stage-1 PLATFORM question instead of a generic assistant
reply. Specific asks keep the skip rule.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Interview option-stages (platform, sim-vs-solve, problem/gate) now go through
amicode_ask(question, options[2-6]); the renderer draws buttons from the tool
part's input and a click sends the option text as the next user message.
Free-form values stay plain questions. 7 tools registered (runtime-verified).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Live-demo findings: the free model repeated the question in prose and answered
it itself. Tool return now says STOP HERE explicitly; AGENTS.md mirrors it.
New optional details[] arg — one dim qualifier per button (minimalist card,
slightly more context).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pixel <0110> face in brand yellow on the H silhouette (from the website
robot); currentColor body serves dark+light. Same asset ships in the fork's
logo/favicon (kept in sync manually — canonical geometry recorded there in
AMICODE-PATCHES.md).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ited stop
Work found staged in the night tree (parallel session / Aaron) — folded in
after validating build + full suite green. Fixes the Remote-SSH pain: forward
43117 once, restarts reuse it; stop() now resolves on child exit so a
fixed-port restart can't race the old process for the socket. Set 0 to restore
per-start ephemeral ports.
…e_manifest transport, scores-root grant, never-brick fallback
aarontrowbridgeand others added 11 commits July 3, 2026 17:04
…s (score_guard sibling module, entitiesDir transport)
…ded-state (v2)
The compiled score is now what runtime users see — the STOP-HERE ask
discipline and optional per-option details move in from the AGENTS.md
fallback, plus the anti-drift anchor from Aaron's live session (rail said
rydberg while the interview asked transmon-omega): re-read the System entity
before stage-2+ questions; correct the record first if it's wrong.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion cross-check
Score content bumps (v1->v2 tonight) must not red the suite; instead assert
the compiled banner and the manifest agree on whatever version ships.
… deprecated
Live finding: 1.17.3 ships a turn-blocking question tool (tool/question.ts)
with options+descriptions+custom answers — the model reached for it unprompted
and its semantics structurally kill self-answering and prose repeats. Score #0
v3 + AGENTS.md fallback now route all choice questions through it; amicode_ask
stays registered but deprecated. One mechanism, upstream-owned.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ine talk
The starter chip hit a Webfetch to the engine's website and a flat 3-sentence
reply. The canonical question now has a canonical answer: capability bullets
(interview, fast-path, live inspector, warm-start/resume, hardware preview),
honest scope line, then next-step options via the question tool.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…late
fetch_opencode gains repo/tag manifest fields with authenticated gh download
for the private harmoniqs/opencode release (206 tests). TESTING.md = the
7-point branch test script for the team. solve_rydberg_cz.jl: 2-atom 3-level
QuEra deep-blockade CZ, public-Piccolo-only (fixed-phase NLP + post-hoc
virtual-Z scan; free_phase kwarg is Piccolissimo-gated) — vetting solve in
flight, score wiring lands with its result.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Point an agent at the repo and it can set up, verify, and test the branch:
prerequisites with checks, ordered setup, five verification gates, dev facts
(fixed port, fork boundary, plugin runtime, scores), sharp edges.
…icode.1)
Lock repointed to the mirror (both platform shas from the release assets);
clean-fetch verified end-to-end via the authenticated gh path — downloaded
binary is byte-identical to the deployed build (8aa718ad…) and serves
<title>Amicode</title>. Rydberg CZ template clearly marked EXPERIMENTAL
(vetting stalled on pathological first-iteration NLP cost; parked) and
TESTING.md de-overclaimed accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ot signature
The rebase onto main folded in #79's runsRoot param (3rd position). These test
call sites predated it and passed pluginPath/scoresRoot into the wrong slots or
omitted runsRoot entirely. Insert runsRoot so scores + slow-e2e configs grant
the right paths. Fast suite 207 pass; tsc --noEmit clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aarontrowbridge
aarontrowbridgeforce-pushed the aaron/night-l0-pulse-designer branch from 05db60f to d81e63fCompareJuly 3, 2026 21:08
jack-champagne added a commit that referenced this pull request Jul 4, 2026
The pre-solve formulation.toml emit could not run through the agent deploy
path: AGENTS.md copies solve_template.jl alone into a scratch dir and runs the
copy, so @__DIR__ was the scratch dir and include(emit_formulation.jl) resolved
to a file that was never copied — LoadError before solve!, on every run. CI
never executes the template, so it stayed green.
- Inline emit_formulation into solve_template.jl; delete the sibling helper.
Sharing moves to a Julia package (AmicoRunDir.jl) when #75/#76 add a second
template — the only share mechanism that survives the single-file copy.
- Tighten formulation.schema.json: per-family if/then — transmon requires and
type-checks delta/levels/drive_max; formulation requires gate/T/N; Q/R
optional; additionalProperties:true per family (unknown families lenient).
- Add template_deploy_contract.test.ts: reproduces the AGENTS.md single-file
copy and asserts every include() resolves. Red on the bug, green inlined.
schema_version stays "1" (additive: no on-disk formulation.toml exists yet).
@jack-champagne
jack-champagne merged commit d81e63f into mainJul 8, 2026
1 of 5 checks passed
aarontrowbridge added a commit that referenced this pull request Sep 1, 2026
… warrant-bounds schema (#703) (#706)
* feat(schema): the autonomy datum — device {none|ro|rw} documented in warrant bounds, rejection pinned (#703)
SEAM 6, amicode's half of the one-autonomy-doctrine (codesign spec
spec-20260831-120000, issue #703):
- $defs.bounds.device — the enum {none, ro, rw} — now carries the datum's
documented semantics: none = no device access; ro = read-only device
access; rw = device writes permitted, gated by the real-board-session
human gate. The approval branch's description points at the datum (one
definition, this schema — the fleet §2.1 pointer formalized).
- The three-systems contract stated once in the schema's documentation,
each counterpart's criterion NAMED under its own owner: amicode's bounds
(this schema), the P4 gate's end-to-end read (merge-gated on strumento #75
MERGED), Telaio's warrant-bounds deserialization conformance (their
campaign). The SEAM 4 contract note is not on main yet — the director
wires the cross-reference line post-merge.
- Rejection tests pin the no-second-knob doctrine mechanically:
validateBounds REFUSES any device value outside the enum and any unknown
device-permission-shaped field (additionalProperties:false), field-precise
errors naming the impostor key; the approval record kind refuses a second
device knob the same way.
* feat(extension): the approval tool surface validates against the schema's device datum (#703)
SEAM 6's tool-surface half (issue #703) — one definition, no free text:
- amicode_request_approval's bounds arg now cites the @amicode/schema
warrant-bounds schema ($defs.bounds — the one definition) and its execute()
validates bounds via validateBounds: a device value outside {none, ro, rw}
or a second device-shaped field is refused BEFORE the card renders, so a
malformed ask can never become a pressable button.
- The plugin twin (retired from the config, still drift-guarded by the
projection test) mirrors the same gate: opencode-plugin/warrant_bounds.ts is
the dependency-free twin of $defs.bounds (bare package specifiers do not
resolve in the plugin runtime — unreachable by construction, per
./ledger_client's sibling-module rules), PINNED to the schema by
test/warrant_bounds_parity.test.ts: the corpus (every datum case) must agree
with validateBounds on ok AND error strings, and DEVICE_DATUM must equal
the schema's own device enum — growth breaks the pin.
- The mint path (amicode_service/warrants.ts approveArgv) validates bounds
against the schema too, refusing invalid bounds instead of silently
dropping them — a dropped key silently under-authorises the minted warrant;
test/amicode_service_warrants.test.ts is the flag-mapping pin the export
always promised, plus the refusal cases.
The three-systems contract line for the PR (the director's): amicode's bounds
are this slice (the schema datum, above); the P4 gate's end-to-end read is
merge-gated on strumento #75 MERGED; Telaio's warrant-bounds deserialization
conformance is their campaign's criterion — each named under its own owner,
none claimed as another's.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@aarontrowbridge@jack-champagne