-
Notifications
You must be signed in to change notification settings - Fork 1
β.3+β.5: AGENTS.md + vetted template + chat→solve→inspector slice (closes #3) #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
94507a1
feat(extension): rewrite AGENTS.md for D9/D10 script authoring; reloc…
Rchari1 6821e19
feat(extension): vetted transmon solve_template.jl + per-iter control…
Rchari1 8786190
feat(extension): deliver template + project-substituted AGENTS.md int…
Rchari1 15a2c2f
feat(extension): stage amico-run onto opencode PATH (esbuild); drop d…
Rchari1 b2ff736
feat(extension): reconcile runs-root to ~/.amico/runs/default (matche…
Rchari1 c60cdb3
feat(extension): watcher reads β.1 run-dir contract (FINISHED-keyed, …
Rchari1 4d01de4
feat(extension): inspector resource-root fix (Q69); status-bar failed…
Rchari1 259cdf6
fix(extension): vet template on Piccolo 1.19; public Piccolo.Callback…
Rchari1 a5121a9
fix(extension): address Jack's β.3 review (#9)
Rchari1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ dist/ | |
| .vscode-test/ | ||
| *.log | ||
| packages/extension/vendor/ | ||
| packages/extension/bin/ | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,3 +9,4 @@ node_modules/** | |
| esbuild.config.mjs | ||
| tsconfig.json | ||
| **/*.map | ||
| !bin/** | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Amicode project context | ||
|
|
||
| You help a quantum-control researcher synthesize optimal-control pulses with | ||
| Piccolo (Julia) without leaving VS Code. You author a Julia script, run it, | ||
| and the Run Inspector renders the live solve. | ||
|
|
||
| ## Workflow (this is the whole job) | ||
|
|
||
| 1. Read the bundled template `solve_template.jl` in this project dir. | ||
| 2. Copy it to a working file (e.g. `solve.jl`) and fill in the `# FILL IN` | ||
| parameter block from the user's request: transmon frequency `ω` (GHz), | ||
| anharmonicity `δ` (GHz), `levels`, the target gate, gate time `T` (ns), | ||
| timesteps `N`, `max_iter`. **Parameters live in the script — never in this | ||
| file.** If the user gives a `lab.toml` path, read it in the script. | ||
| 3. Run it via the `bash` tool: `amico-run --project <JULIA_PROJECT> solve.jl` | ||
| (use the project path provided below). `amico-run` takes only a script path | ||
| and runner flags — it parses **no** physics options; all the physics lives | ||
| in the script you wrote. | ||
| 4. When it finishes, quote the final `DONE fidelity=…` line. If F ≥ 0.99 the | ||
| extension prompts promotion automatically — don't ask. | ||
|
|
||
| There is **no MCP server**. The only tool is `amico-run` via bash. | ||
| `amico-run --help` prints usage. | ||
|
|
||
| ## The run-dir contract your script MUST emit | ||
|
|
||
| `amico-run` writes `manifest.toml` (first) and `FINISHED` (last) itself. Your | ||
| script, running with cwd = the run dir, must emit: | ||
|
|
||
| - `AMICODE_ITER iter=<n> f=<obj> inf_pr=<…> inf_du=<…>` to stdout, flushed, | ||
| once per Ipopt iteration (drives the live stats row). | ||
| - `iter_<N>.png` every few iterations (the live plot the Inspector shows). | ||
| - `result.toml`, written **atomically** (write `result.toml.tmp`, then `mv`), | ||
| with at least `fidelity` (float) and `iterations` (int). | ||
| - `pulse.jld2` (the solved pulse) via `JLD2.save`. | ||
| - a final `DONE fidelity=<…>` line. | ||
|
|
||
| The template already does all of this — you only fill in numbers. | ||
|
|
||
| ## Warm-start idiom | ||
|
|
||
| To seed from a previous solve: `traj = load_traj("path/to/pulse.jld2")` and | ||
| pass it as the initial guess to the problem constructor. `load_traj` is the | ||
| correct loader in this Piccolo. | ||
|
|
||
| ## Julia project | ||
|
|
||
| <!-- AMICO_JULIA_PROJECT --> The Julia project to pass as `--project` is: | ||
| **{{JULIA_PROJECT}}**. Always pass it. If it reads `UNSET`, omit `--project` | ||
| and tell the user `amicode.juliaProject` is not configured. | ||
|
|
||
| ## Style | ||
|
|
||
| Terse — the user is a quantum-control researcher. On failure, read the run's | ||
| `run.log` for the Julia traceback before guessing. Don't suggest installing | ||
| Julia packages; the environment is provisioned. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invocation omits
--laband the template writes no params, so a run can't report which lab/params it actually solved.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two parts: params — fixed in a5121a9, the template now writes a
[params]table (delta/levels/T/N/drive_max/max_iter) into result.toml, so each run is self-describing. --lab — added in e21539c (on #23, stacked above): the AGENTS.md invocation now passes--lab defaultso the run records its lab.