Skip to content

[codex] Add Lab local agent guidance support - #660

Merged
JannikSt merged 1 commit into
mainfrom
codex/lab-local-agent-guidance
Jun 1, 2026
Merged

[codex] Add Lab local agent guidance support#660
JannikSt merged 1 commit into
mainfrom
codex/lab-local-agent-guidance

Conversation

@willccbb

@willccbb willccbb commented May 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Treat root AGENTS.md, root CLAUDE.md, and environments/AGENTS.md as Prime-managed guidance refreshed by prime lab setup / prime lab sync.
  • Use Claude-native CLAUDE.local.md as the local write space when Claude is configured; preserve it and never overwrite it.
  • Add Lab git hygiene guardrails: ignore generated guidance, Claude local guidance, outputs, caches, and environment build artifacts.
  • Add prime lab doctor checks and --fix support to detect and untrack Lab generated/local guidance files that were already added to git.
  • Bump VERIFIERS_REF to the merged Verifiers guidance ref f43e42c1fabfe2604afc95b9ce62779a8f55d487.

Validation

  • uv run pytest packages/prime/tests/test_lab_setup.py -q
  • uv run pytest packages/prime/tests/test_lab_view.py::test_prime_lab_sync_service_refreshes_agent_assets -q
  • uv run ruff check packages/prime/src/prime_cli/lab_setup.py packages/prime/tests/test_lab_setup.py
  • uv run ruff format --check packages/prime/src/prime_cli/lab_setup.py packages/prime/tests/test_lab_setup.py
  • git diff --check -- packages/prime/src/prime_cli/lab_setup.py packages/prime/tests/test_lab_setup.py

Note

Low Risk
Changes are confined to Lab CLI workspace scaffolding and optional git index cleanup on doctor --fix; no auth, payments, or production runtime paths.

Overview
Prime Lab now treats root AGENTS.md, CLAUDE.md, and environments/AGENTS.md as Prime-managed files refreshed on prime lab setup / prime lab sync, with CLAUDE.md refreshed for all agents (not only Claude). CLAUDE.local.md is the user-owned Claude overlay: created from a template when Claude is configured, never overwritten if it already exists, and omitted for non-Claude setups.

Git hygiene expands standard .gitignore entries for those guidance files plus existing Lab artifacts; sync/setup also appends ignores. prime lab doctor adds a Lab guidance tracking check (warn if those paths are still tracked) and --fix can git rm --cached them while leaving files on disk. Doctor renames the gitignore check to Lab gitignore.

The Lab docs index and CLI help text now mention CLAUDE.local.md. VERIFIERS_REF is bumped so downloaded lab guidance/skills match the new upstream assets. Tests cover guidance refresh, preservation, gitignore, and doctor untrack behavior.

Reviewed by Cursor Bugbot for commit 1ad0086. Bugbot is set up for automated code reviews on this repo. Configure here.

@willccbb
willccbb marked this pull request as ready for review May 15, 2026 04:27
@willccbb
willccbb force-pushed the codex/lab-local-agent-guidance branch from fa22043 to 63d3af8 Compare May 15, 2026 05:18
@willccbb
willccbb marked this pull request as draft May 15, 2026 05:18
@willccbb
willccbb marked this pull request as ready for review May 22, 2026 07:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 63d3af8ed6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/prime/src/prime_cli/lab_setup.py Outdated
@willccbb
willccbb force-pushed the codex/lab-local-agent-guidance branch from 63d3af8 to b85d751 Compare May 22, 2026 07:35
@willccbb
willccbb force-pushed the codex/lab-local-agent-guidance branch from b85d751 to 1ad0086 Compare May 30, 2026 04:40
@JannikSt
JannikSt merged commit 1199d7b into main Jun 1, 2026
16 checks passed
@JannikSt
JannikSt deleted the codex/lab-local-agent-guidance branch June 1, 2026 08:53
Sign up for free to 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