Make lightcone-cli agent-agnostic: remove Claude Code integration - #168
Make lightcone-cli agent-agnostic: remove Claude Code integration#168EiffL wants to merge 18 commits into
Conversation
lc init no longer installs a .claude/ plugin bundle, writes a project CLAUDE.md, or takes --permissions; the plugin discovery module, the wheel force-include, and the skills/agent-workflow docs are removed. The lc eval harness is kept. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
init now creates what's missing, repairs the managed .gitignore block
and --scratch override, and never overwrites user files; a directory
that already holds an astra.yaml is adopted instead of rejected.
--check reports drift without writing (exit 1 when not converged);
--json emits {converged, created, repaired, unchanged, warnings}.
The spec scaffold now calls astra's boilerplate helper directly:
astra init's callback refuses non-empty directories and overwrites
.gitignore, both wrong for convergence.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
Falls back to the private helper on astra-tools releases that predate LightconeResearch/astra-tools#99. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
## Summary Companion to LightconeResearch/lightcone-cli#168, which turns `lc init` into an idempotent converger. This PR brings `astra init` in line with the same philosophy and exposes the scaffold writer as a public API. **`astra init` is now an idempotent converger.** Each run creates whatever is missing (`astra.yaml` + `universes/baseline.yaml`, `universes/`, `src/`, `.gitignore`, git repo) and never overwrites existing files. The old refusals — "already an ASTRA project" and "directory not empty" — are gone; those directories are adopted instead. Two new flags, matching the `lc init` contract: - `--check` — report what a run would create, write nothing, exit 1 when not converged - `--json` — emit the report as `{converged, created, repaired, unchanged, warnings}` One deliberate subtlety: the boilerplate `astra.yaml` and `universes/baseline.yaml` are treated as a single unit keyed on `astra.yaml` presence — a user-authored spec never gets the boilerplate baseline written next to it (it references the boilerplate's example decision). **`create_boilerplate(directory)` is public.** It writes only `universes/`, `src/`, `astra.yaml`, and `universes/baseline.yaml` — no `.gitignore`, no git init, no policy — so downstream tools (lightcone-cli's `lc init`) can scaffold the spec under their own conventions. `astra init` delegates to it. ## Test plan - [x] New tests: adoption of non-empty directories (existing files and `.gitignore` untouched), idempotent re-run (byte-identical tree, `converged: true`), user-spec-without-baseline invariant, `--check` drift/no-write/exit-code behavior, `create_boilerplate` contents and side-effect freedom - [x] `uv run pytest` — 221 passed, 21 skipped (existing scaffold-content, validation, and git tests unchanged and green) - [x] `ruff check` clean - [x] Manual smoke test: converge into a non-empty directory, re-run with `--json`, `--check` exit codes 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Tracks LightconeResearch/astra-tools#100: the spec scaffold no longer creates an empty src/ — where code lives is the user's choice. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
An empty gitignored placeholder is invisible in git, so it carried no hint after clone. The README says outputs land in results/<universe>/<output_id>/ via lc run and must not be written by hand; the gitignore block becomes results/* + !results/README.md so the one file stays tracked while outputs remain ignored. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
The venv exists to run analysis code; `lc` lives outside it (uv tool install), and a second copy inside shadowed it with whatever version PyPI resolved — unpinned, so even released drivers got skew. The venv now installs requirements.txt (which the old venv never did), and the execution-stack pin moves from requirements.txt into its own Containerfile layer, where the image — the one place that genuinely needs lightcone-cli — still gets it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
requirements.txt changes on every dependency edit; the lightcone-cli layer is the heavy one (snakemake, dask, distributed, dask-gateway) and its pin rarely changes. Ordering it first keeps it cached across requirements edits. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
Nothing ever read the baked copy: recipes run against the live project tree (bind-mounted -v $PWD -w $PWD locally, shared filesystem on a hub). Meanwhile compute_image_tag hashes every COPY source, so the copy made each code edit change the tag and force a rebuild. The image is now a pure environment — the tag moves only when the Containerfile or dependency files change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
With the image now a pure environment, directory COPY sources (COPY . ., COPY src/) would only bake in a copy nothing executes — recipes run against the live project tree — while forcing a full tree hash on every tag computation and a rebuild on every code edit. They now raise ContainerBuildError with guidance. Removes _COPY_DIR_EXCLUDE, _hash_dir_into, and _copy_tree_filtered (~60 lines); file COPY sources remain fully supported. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
Three moves cover the ten confirmed findings: - One error boundary: CloudBuildError now subclasses ContainerBuildError, and the click group translates ContainerBuildError into a clean ClickException — lc run/build/ status/cloudbuild all stop leaking tracebacks (findings 1-3). - The converger repairs what lightcone wrote: _converge_file gains a repair(text)->str|None hook; legacy scaffold artifacts migrate forward (old Containerfile template -> current, lightcone-cli pin stripped from requirements.txt, blanket results/ gitignore rule narrowed so results/README.md stays tracked), and the warnings channel now carries what init sees but must not fix — hand-edited Containerfiles with directory COPYs (via the shared directory_copy_sources detector) and unparseable lightcone.yaml (findings 4, 5, 7, 8). - Point fixes: eval loop prompt no longer invokes deleted skills; src/ scaffold claims removed from docstring and troubleshooting; the astra.yaml container: rewrite is a top-level-line regex with a warning fallback and a CI test pinning the result; the astra import fallback no longer swallows nested ImportErrors (findings 6, 9, 10). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
Projects from previous releases are not migrated: the verbatim Containerfile upgrade, requirements pin-stripping, and blanket results/ gitignore rewrite are gone along with their tests. What remains is version-agnostic: the error boundary, the gitignore append-once repair (adoption, not migration), the lightcone.yaml parse guard, and the directory-COPY advisory warning. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
## Summary Split out from #168 so the deployment switch can land (and current-main docs can be redeployed) independently of the CLI changes. - **Release-gated deploys**: `docs-deploy.yml` now triggers on `release: published` — the same moment as the PyPI publish — instead of every push to main, so docs.lightconeresearch.org never documents behavior `pip install lightcone-cli` can't deliver yet. `workflow_dispatch` remains for manual intermediate deploys (typo fixes, clarifications) from the Actions tab. - **One hosting target**: consolidates on GitHub Pages. `wrangler.jsonc` (added by the Cloudflare bot's autoconfig PR #118, not a design decision) is deleted; the Cloudflare Workers deployment retires. - `check-docs.yml` is untouched: docs are still build-validated on every merged PR — they just don't ship until a release or a manual dispatch. ## Manual follow-ups (dashboard-side, can't be done from the repo) 1. Cloudflare: disconnect this repo from Workers Builds and retire the `lightcone-cli` worker. 2. Cloudflare DNS: CNAME `docs.lightconeresearch.org` → `lightconeresearch.github.io` (DNS-only while GitHub validates). 3. GitHub Pages settings: set the custom domain, then enable Enforce HTTPS. After merging, run the workflow once manually to deploy current main to Pages. ## Test plan - [x] Docs build (`zensical build`) unchanged and green - [x] Workflow YAML: triggers are `release: published` + `workflow_dispatch`; build/deploy jobs otherwise identical to what ran before 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Delete the lightcone.eval subpackage (Daytona sandbox, harness, graders, report, models, lc eval CLI) and its tests, deps, and config. The eval is now a single workflow job: scaffold a project with lc init, overlay the task seed, run Claude Code headlessly with evals/prompt.md (astra skill installed from the LightconeResearch/agent-skills plugin marketplace), then gate on astra validate + lc status --json. The prompt carries a lightcone-cli primer (lc run / lc status, results layout, manifest rules) since the skill system no longer ships with the CLI. Also fix the snae seed spec: dependency declarations moved from recipe.inputs to Output.inputs in the current astra schema. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
✅ Eval
lc statusFull trace: |
The eval-project artifact keeps hidden files for the provenance manifests, so explicitly exclude the project .venv and .snakemake scratch. Configure a global git identity at the start of project setup so agent commits don't fail on the fresh runner. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ
|
@claude can you review this PR? one note on the intent, we want to make lightcone cli a completely standalone cli, intended to be used by agents and humans, but decoupled completely from claude code or other harnesses. |
|
Claude finished @EiffL's task in 2m 56s —— View job Review: agent-agnostic decoupling
Confirmed the intent: this cleanly severs Findings
Not verified: I wasn't able to run Overall: the decoupling itself is thorough and I found no stray references to the removed Claude Code machinery. Main actionable item is tightening the PR description to match the actual (larger) diff. |
Linear: LCR-181 · Design: de-bundling design doc . This PR superseeds #161
Summary
This branch removes all Claude Code-specific machinery from lightcone-cli, trimming it down to a plain, agent-agnostic CLI.
Removed:
claude/lightcone/plugin bundle — skills, agents, hooks, session scripts, templates (first commit)src/lightcone/cli/plugin.py(plugin discovery) and theclaude/lightconewheel force-include / sdist include inpyproject.tomllc init: the.claude/bundle install, the projectCLAUDE.mdstub, the--permissionsflag, andPERMISSION_TIERS; its next-steps output now points at editingastra.yamland runninglc rundocs/skills/(10 pages) anddocs/user/agent-workflow.md, plus their nav entriestests/test_paper_extraction_caption.py, which imported a script from the deleted skills treeKept:
lcCLI surface (init, run, status, verify, build, export), the Snakemake/Dask engine, and the manifest integrity layer — all unchangedlc evalharness (deliberately retained; only a stale docstring touched). Note: its loop prompt still references the now-removed/lc-cliskill — evals run fine, but that line is a no-op to revisit.Docs:
astra.yamland the analysis scripts by hand (example spec validated withastra validate, fixing previously invalid placeholder syntax)docs/api/site_registry.mdcalled the module orphaned (it's used bylc init,engine.scratch,engine.container);docs/contributing/testing.mdcarried an obsolete "lc evalnot registered" workaroundTest plan
uv run pytest— 388 passeduv run ruff check src/ tests/anduv run mypy src/— cleanuv build --wheel— builds; no claude/plugin files in the wheeljust docs— site builds with no errors, no dead links to removed pages🤖 Generated with Claude Code
https://claude.ai/code/session_016EL5bESx3CqfMNZNPA1KHJ