Overview
Finish the science-project → assistant refer-back mechanics locked in skills/start-new-project.md. A project created by start-new-project refers back to the autolens_assistant clone for skills/ + wiki/ rather than vendoring a copy; the resolution order ($AUTOLENS_ASSISTANT → sibling ../autolens_assistant → clone-on-demand into gitignored sources/autolens_assistant/), the env-var name, and the project.yaml assistant_ref provenance pin are already specified in the skill. The audit against current main shows one mechanic from the Mind prompt genuinely missing: the non-blocking provenance-drift warning — compare the resolved clone's commit against assistant_ref.commit, warn on mismatch, offer to re-pin, never hard-block or force a checkout.
Filed under --auto (effective level: safe = min(header safe, feature/small cap safe)); this plan is written to the issue per the autonomy contract — no Plan-Mode hold.
Plan
- Add the provenance-drift check to the skill's "Locating the assistant from a project" section: after resolution, compare the clone's HEAD to
project.yaml's assistant_ref.commit; on mismatch warn (never block, never checkout) and offer a re-pin that updates assistant_ref.commit.
- Mirror a one-line instruction in the generated thin
AGENTS.md template so a copilot invoked inside a project performs the check without reading this skill first.
- Note the re-pin act in the journal convention (a drift decision is a project decision — one line, no new machinery).
- Gate with the repo's own audit (
autoassistant/audit_skill_apis.py incl. --check-citations) + pytest; markdown-only change, no library surface.
Detailed implementation plan
Affected Repositories
- autolens_assistant (primary, only; public generic template — no personal content)
Branch Survey
| Repository |
Current Branch |
Dirty? |
| ./autolens_assistant |
main |
clean (one untracked personal file, james.bib — must not be committed) |
Suggested branch: feature/assistant-ref-mechanics (in-place; repo develops in-place, no worktree claim conflict)
Implementation Steps
skills/start-new-project.md § "Locating the assistant from a project" — append the drift-check paragraph: resolved-clone commit vs assistant_ref.commit; mismatch → non-blocking warning stating both commits + what drift means (toolchain provenance, not correctness); offer re-pin (project.yaml update + journal line); explicitly never force a checkout (the manifest records what was actually used — that stays the operative record).
- Same file, thin
AGENTS.md template ("## The assistant" block) — add one line: "After resolving, compare the clone's commit to project.yaml assistant_ref.commit; if they differ, note the drift and offer to re-pin — never block on it."
- Same file, Phase 2 (Work) — one clarifying clause tying the re-pin offer to the existing journal convention (dated entry references the re-pin; no second log).
- Verify no stale cross-references:
wiki/core/external/*.md + modes/maintainer.md mentions of the locate rule stay consistent.
Key Files
skills/start-new-project.md — all edits land here (the locked design doc + generated templates)
Verification
python -m pytest autoassistant/tests -q green.
python autoassistant/audit_skill_apis.py and --check-citations pass (no new Project:path citations, no symbol drift).
- Grep: resolution rule + drift check consistent between the skill body and the generated AGENTS.md template.
Original Prompt
Click to expand starting prompt
A science project created by start-new-project is a separate, self-contained
Type: feature / Target: autolens_assistant / Difficulty: small / Autonomy: safe / Priority: high
A science project created by start-new-project is a separate, self-contained repo that refers back to the autolens_assistant copilot for its skills/ and wiki/ rather than vendoring a copy. The model is already locked and partly implemented in autolens_assistant/skills/start-new-project.md (see the "Locating the assistant from a project" section and the Create scaffold). This task finishes the resolution + provenance mechanics — it is implementation detail, not a fresh decision.
What to implement:
- Resolution order when the copilot is invoked inside a project: an environment variable pointing at a local assistant clone -> a sibling directory (
../autolens_assistant) -> clone-on-demand of the recorded URL into a gitignored path (sources/autolens_assistant/), mirroring the source-of-truth sources/ clone pattern in autolens_assistant/AGENTS.md.
- Pick the env var name (proposed:
AUTOLENS_ASSISTANT) and document it in the thin AGENTS.md that start-new-project generates for each project.
- Provenance pin (record, not enforced checkout). The project records the assistant repo URL + commit in
project.yaml (assistant_ref), and every run manifest already records assistant: {repo, commit}. Day-to-day operation uses the resolved current clone; the manifest captures what was actually used.
- Mismatch warning (non-blocking). If the resolved assistant clone's commit differs from
project.yaml's assistant_ref.commit, warn the user about provenance drift and offer to re-pin; never hard-block or force a checkout.
(Audit at start_dev 2026-07-09: the first three bullets already shipped in the skill on main; this task implements the fourth + mirrors the check into the generated project docs.)
Overview
Finish the science-project → assistant refer-back mechanics locked in
skills/start-new-project.md. A project created bystart-new-projectrefers back to theautolens_assistantclone forskills/+wiki/rather than vendoring a copy; the resolution order ($AUTOLENS_ASSISTANT→ sibling../autolens_assistant→ clone-on-demand into gitignoredsources/autolens_assistant/), the env-var name, and theproject.yamlassistant_refprovenance pin are already specified in the skill. The audit against currentmainshows one mechanic from the Mind prompt genuinely missing: the non-blocking provenance-drift warning — compare the resolved clone's commit againstassistant_ref.commit, warn on mismatch, offer to re-pin, never hard-block or force a checkout.Filed under
--auto(effective level: safe = min(header safe, feature/small cap safe)); this plan is written to the issue per the autonomy contract — no Plan-Mode hold.Plan
project.yaml'sassistant_ref.commit; on mismatch warn (never block, never checkout) and offer a re-pin that updatesassistant_ref.commit.AGENTS.mdtemplate so a copilot invoked inside a project performs the check without reading this skill first.autoassistant/audit_skill_apis.pyincl.--check-citations) + pytest; markdown-only change, no library surface.Detailed implementation plan
Affected Repositories
Branch Survey
james.bib— must not be committed)Suggested branch:
feature/assistant-ref-mechanics(in-place; repo develops in-place, no worktree claim conflict)Implementation Steps
skills/start-new-project.md§ "Locating the assistant from a project" — append the drift-check paragraph: resolved-clone commit vsassistant_ref.commit; mismatch → non-blocking warning stating both commits + what drift means (toolchain provenance, not correctness); offer re-pin (project.yamlupdate + journal line); explicitly never force a checkout (the manifest records what was actually used — that stays the operative record).AGENTS.mdtemplate ("## The assistant" block) — add one line: "After resolving, compare the clone's commit toproject.yamlassistant_ref.commit; if they differ, note the drift and offer to re-pin — never block on it."wiki/core/external/*.md+modes/maintainer.mdmentions of the locate rule stay consistent.Key Files
skills/start-new-project.md— all edits land here (the locked design doc + generated templates)Verification
python -m pytest autoassistant/tests -qgreen.python autoassistant/audit_skill_apis.pyand--check-citationspass (no new Project:path citations, no symbol drift).Original Prompt
Click to expand starting prompt
A science project created by
start-new-projectis a separate, self-containedType: feature / Target: autolens_assistant / Difficulty: small / Autonomy: safe / Priority: high
A science project created by
start-new-projectis a separate, self-contained repo that refers back to theautolens_assistantcopilot for itsskills/andwiki/rather than vendoring a copy. The model is already locked and partly implemented inautolens_assistant/skills/start-new-project.md(see the "Locating the assistant from a project" section and the Create scaffold). This task finishes the resolution + provenance mechanics — it is implementation detail, not a fresh decision.What to implement:
../autolens_assistant) -> clone-on-demand of the recorded URL into a gitignored path (sources/autolens_assistant/), mirroring the source-of-truthsources/clone pattern inautolens_assistant/AGENTS.md.AUTOLENS_ASSISTANT) and document it in the thinAGENTS.mdthatstart-new-projectgenerates for each project.project.yaml(assistant_ref), and every run manifest already recordsassistant: {repo, commit}. Day-to-day operation uses the resolved current clone; the manifest captures what was actually used.project.yaml'sassistant_ref.commit, warn the user about provenance drift and offer to re-pin; never hard-block or force a checkout.(Audit at start_dev 2026-07-09: the first three bullets already shipped in the skill on
main; this task implements the fourth + mirrors the check into the generated project docs.)