Skip to content

feat(auxiliary): generate agent guidance for coordinated worktrees#72

Merged
nettee merged 1 commit into
mainfrom
codex-wtk-auxiliary-guidance
Jun 14, 2026
Merged

feat(auxiliary): generate agent guidance for coordinated worktrees#72
nettee merged 1 commit into
mainfrom
codex-wtk-auxiliary-guidance

Conversation

@nettee

@nettee nettee commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Generate WTK-AUXILIARY.md inside coordinated Primary worktrees with concrete Auxiliary Repository refs and targets.
  • Keep generated auxiliary surfaces ignored by writing /refs/ and /WTK-AUXILIARY.md to the true common .git/info/exclude, avoiding worktree-specific core.excludesFile for p10k compatibility.
  • Update E2E coverage, README docs, and the Zest spec through implemented status.

Validation

  • cargo test
  • uv run --project e2e pytest e2e/test_auxiliary_group.py
  • uv run --project e2e pytest e2e/test_repo_mode.py::test_repo_mode_new_with_explicit_base_from_current_and_dirty_failures
  • uv run --project e2e pytest e2e
  • git diff --check

@nettee nettee merged commit 5144e75 into main Jun 14, 2026
2 checks passed

@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: 79cef60da9

ℹ️ 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 src/auxiliary.rs
pub fn write_guidance(primary_worktree: &Path, entry: &WorktreeEntry) -> AppResult<()> {
let path = primary_worktree.join(GUIDANCE_FILE);
let text = render_guidance(entry);
fs::write(&path, text).map_err(|error| {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Refuse to overwrite tracked guidance files

If the base branch already contains a tracked root WTK-AUXILIARY.md, the new worktree checks it out and this unconditional fs::write truncates it with generated guidance. The exclude rule does not apply to tracked files, so wtk new --ag can report success while leaving the Primary worktree dirty and replacing the repository’s tracked content; fail when the path already exists instead of overwriting it.

Useful? React with 👍 / 👎.

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.

1 participant