Skip to content

feat(conductor): coordinate planning and building sessions - #235

Merged
foadshafighi merged 13 commits into
mainfrom
feat/conductor-command
Nov 13, 2026
Merged

foadshafighi merged 13 commits into
mainfrom
feat/conductor-command

Conversation

@foadshafighi

@foadshafighi foadshafighi commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add /lp-conductor to coordinate separate planning and building sessions. The Conductor reviews their file-based reports, answers routine questions, and brings the user decisions that need their input.

Changes

  • Add start, approved-plan, active-build join, and resume instructions with ignored inboxes, logs, checkpoint verification, and explicit user authority for push, PR, and merge.
  • Add Author and Implementer protocols and handoff templates with host-specific waits, compaction prompts, and convergent native review instructions.
  • Add a standard-library watcher with persistent metadata snapshots, stable multi-root polling, readiness output, and filtered role notifications. Cover normal operation, corrupt state, invalid intervals, and filesystem errors.
  • Document the command, update the inventory to 43 commands, record command-template placement, and add the unreleased changelog entry.

Test plan

  • pnpm test
  • pnpm typecheck
  • pnpm lint
  • python -m pytest -q from plugins/launchpad/scripts/: 2432 passed, 5 skipped.
  • pyright from plugins/launchpad/scripts/: 0 errors.
  • ruff check --config plugins/launchpad/scripts/pyproject.toml plugins/launchpad/scripts/
  • ruff format --check --config plugins/launchpad/scripts/pyproject.toml plugins/launchpad/scripts/
  • lefthook run pre-commit before each commit.
  • bash scripts/maintenance/check-repo-structure.sh
  • Both LaunchPad review passes completed with no unresolved findings.
  • Throwaway-repository dry run: setup, probe firing, complete kickoff generation, and resume detection of an unanswered delivery.
  • Codex inventory lists lp-conductor; current command-count and public-copy scans pass.

Callouts for reviewers

  • Test sessions clear inherited Git hook variables to prevent temporary repositories from detaching a worktree or marking it bare; fresh seeded template caches keep the hermetic subprocess checks offline.
  • Repository and inbox-root paths containing a double quote, dollar sign, backtick, or backslash are refused before shell interpolation.
  • The dry run exercises file coordination. Live host wake-up behavior was not tested end to end, and the enforced sandbox for independent claims-auditor execution was unavailable. The full implementation test gates passed.
  • The version bump and versioned release notes belong to a separate release PR.

Add a standard-library inbox watcher with persistent snapshots, multi-root polling, filtered role files, and flushed change notifications. Cover initialization, rewrites, ignored files, empty inboxes, multiple roots, invalid roots, and loop readiness with subprocess tests.
Add start, join, resume, and file-based review instructions with role protocols and handoff templates. Define host-specific waits, stable multi-root watches, checkpoint verification, authority boundaries, and command and template invariants.
Describe separate planning and building sessions, resuming the Conductor, and user decisions. Update command counts, the inventory assertion, the command-template placement rule, and the unreleased changelog.
Describe starting from an approved plan or joining an active build in the command guide.
Reserve the final checkpoint continuation for the push stop, reject paths unsafe for quoted shell commands, and cover corrupt state, invalid intervals, and filesystem failures.
@github-actions

Copy link
Copy Markdown

Codex Automated Code Review

Code Review Summary

PR: Adds /lp-conductor, Author and Implementer protocols and handoff templates, and a Python watcher for coordinating separate sessions.

Validation: Reviewed all 12 changed files. Targeted tests could not run because pytest is not installed.

P0 - Critical Issues (Must Fix)

None found.

P1 - High Priority Issues (Should Fix)

None found.

P2 - Medium Priority Issues (Consider Fixing)

  • Resolve pending Author stops before approving implementation. plugins/launchpad/commands/lp-conductor.md:82 processes deliveries before stops, and line 83 permits CLOSE and an Implementer kickoff immediately. Meanwhile, plugins/launchpad/templates/conductor/protocol-author.md:27 explicitly permits delivery with an unresolved, nonblocking stop. Consequently, a plan can enter implementation before the user answers a decision affecting it, after the Author has already terminated. Before CLOSE, require all plan-affecting stops to have rulings and confirm those rulings are reflected in the plan.

  • Verify the entire section’s changes, including every review fix commit. plugins/launchpad/commands/lp-conductor.md:84 directs verification through git show --stat "<head>", which covers only the last commit. The review section explicitly permits multiple fix: commits in plugins/launchpad/templates/conductor/protocol-implementer.md:11. Earlier fixes can therefore escape the Conductor’s changed-file test selection and checks for removed assertions or sensitive content. Compare the checkpoint head against the previous verified checkpoint head—or the base for the first checkpoint—and inspect that complete diff.

  • Extend shell-safe path handling beyond the Conductor root. plugins/launchpad/commands/lp-conductor.md:76 requires absolute, double-quoted paths in commands, but line 57 validates special characters only in the repository and Conductor root. Separately supplied worktree, source and plan paths remain unchecked. Double quotes still allow shell expansion of $() and backticks, so shell commands constructed from such paths can execute substitutions or address the wrong file. Pass paths as argument values where supported; otherwise apply proper shell escaping to every interpolated path, including the plugin root.

P3 - Low Priority Issues (Optional)

None found.

Positive Observations

  • Clear separation between planning, implementation and independent verification.
  • Explicit reservation of push, PR and merge decisions for the user.
  • Watcher coverage includes multiple roots, rewritten reports, temporary-file exclusion, corrupt state and readiness signaling.

Automated review by OpenAI Codex

Require answered Author decisions to be folded before approval, verify the complete checkpoint commit range, and validate every command and prompt path before use.
Remove inherited GIT_* settings from the Astro fixture Git subprocess environment so temporary repository operations cannot change the invoking repository.
@github-actions

Copy link
Copy Markdown

Codex Automated Code Review

Code Review Summary

PR: Adds /lp-conductor to coordinate separate planning and implementation sessions through handoffs, inbox reports, verdicts, and a Python watcher.

P0 - Critical Issues (Must Fix)

None found.

P1 - High Priority Issues (Should Fix)

None found.

P2 - Medium Priority Issues (Consider Fixing)

  • Unanswered stops can survive plan approval. plugins/launchpad/commands/lp-conductor.md:82 explicitly processes deliveries before stops. Meanwhile, plugins/launchpad/templates/conductor/protocol-author.md:27 permits the Author to continue planning with a pending ruling. When both files arrive together, the Conductor can CLOSE the delivery and print an Implementer kickoff before resolving a decision affecting that plan. Require all stops affecting the plan to be resolved and incorporated before CLOSE or Implementer handoff.

  • Checkpoint verification can test the wrong checkout. plugins/launchpad/commands/lp-conductor.md:84 instructs the Conductor to run git show and test suites without selecting the Implementer’s working directory, although setup explicitly supports separate worktrees. Tests run from the Conductor’s checkout can pass against different code; commits in a separate clone may also be unavailable. Require Git checks and suites to run in the recorded Implementer directory, and verify its HEAD matches the checkpoint before testing.

P3 - Low Priority Issues (Optional)

None found.

Positive Observations

  • Explicit authority boundaries reserve push, PR, and merge decisions for the user.
  • Watcher tests cover readiness, multiple roots, corrupt state, and ignored temporary files.
  • Codex router lint passes, and all changed Python files parse successfully.

Validation limitation: focused tests could not run because pytest is not installed.


Automated review by OpenAI Codex

Clear inherited Git settings for each test session and stamp seeded template caches with current UTC time. Temporary repositories stay isolated, and hermetic subprocess tests use fresh local cache entries.
Combine the remote dependency updates with the conductor protocol fixes and isolated test fixtures.
Run checkpoint Git checks and suites in the recorded implementation checkout, confirm its reported head and clean tracked state, and report mismatches without advancing the section.
@github-actions

Copy link
Copy Markdown

Codex Automated Code Review

Code Review Summary

PR: Adds /lp-conductor, role handoff protocols, an inbox watcher, and supporting tests and documentation.

P0 - Critical Issues (Must Fix)

None found.

P1 - High Priority Issues (Should Fix)

  • Failed checkpoints have no safe retry path. plugins/launchpad/commands/lp-conductor.md:90 requires reporting checkout mismatches without advancing, but permits only CONTINUE or PAUSE. plugins/launchpad/templates/conductor/protocol-implementer.md:33 makes CONTINUE advance after corrections, while PAUSE resumes at the next action. Neither requests another verification of the failed section; after the final checkpoint, corrections can proceed directly to the push stop. Add a RETRY verdict that keeps the current section active and requires a fresh checkpoint and successful verification before advancement.

P2 - Medium Priority Issues (Consider Fixing)

  • Mid-build joins can omit unfinished-section commits from verification. plugins/launchpad/commands/lp-conductor.md:78 sets the handoff base to the current branch head, even though setup collects the last finished section’s head. If the unfinished section already contains commits, the first checkpoint’s <base>..<head> range excludes those commits, bypassing the promised scope, assertion, and sensitive-content inspection. Use the verified last-finished-section head as the verification base, and record the current checkout head separately.

P3 - Low Priority Issues (Optional)

None found.

Positive Observations

  • Checkpoint verification explicitly binds Git checks and suites to the Implementer’s checkout.
  • The watcher excludes temporary files and Conductor responses.
  • Tests cover readiness, multiple roots, corrupt state, and invalid polling intervals.

Validation could not run because pytest, ruff, pyright, and pnpm are unavailable in this environment.


Automated review by OpenAI Codex

@github-actions

Copy link
Copy Markdown

Codex Automated Code Review

Code Review Summary

PR: Adds a Conductor workflow for coordinating planning, implementation, and review across separate sessions, plus a polling watcher and test-fixture updates.

P0 - Critical Issues (Must Fix)

None found.

P1 - High Priority Issues (Should Fix)

  • Failed checkpoints have no retry verdict. plugins/launchpad/commands/lp-conductor.md:90 requires reporting checkout mismatches without advancing, but offers only CONTINUE or PAUSE. Meanwhile, plugins/launchpad/templates/conductor/protocol-implementer.md:33 makes CONTINUE advance immediately, and PAUSE resumes at that same next action. A failed checkpoint therefore cannot be corrected and reverified through the defined protocol. Add a RETRY verdict that keeps the current section active, requires a fresh checkpoint after corrections, and permits advancement only after successful verification.

P2 - Medium Priority Issues (Consider Fixing)

  • Joining a build can exclude existing section commits from verification. plugins/launchpad/commands/lp-conductor.md:78 sets the handoff base to the current branch head, even for a mid-build join. If the unfinished section already contains commits after the last finished section’s head, the first checkpoint’s verification range excludes those commits. Use the verified last-finished-section head as the initial verification baseline; record the current checkout head separately.

P3 - Low Priority Issues (Optional)

None found.

Positive Observations

  • Checkpoint verification explicitly binds checks to the Implementer’s checkout and reported commit.
  • Atomic report writes and exclusion of temporary files reduce watcher races.
  • Push, PR, and merge authorization remain explicit user decisions.

Validation: All five changed Python files parse successfully. Tests and lint could not run because pytest and ruff are unavailable; filesystem restrictions also prevent write-dependent tests.


Automated review by OpenAI Codex

Keep failed implementation sections active with fresh retry report pairs and unchanged verification baselines. Include existing unfinished commits when joining a build.
@github-actions

Copy link
Copy Markdown

Codex Automated Code Review

Code Review Summary

PR: Adds /lp-conductor, role handoffs and protocols, an inbox watcher, and supporting tests and documentation.

P0 - Critical Issues (Must Fix)

None found.

P1 - High Priority Issues (Should Fix)

None found.

P2 - Medium Priority Issues (Consider Fixing)

  • Keep the whole-branch review base separate from the checkpoint verification base. plugins/launchpad/commands/lp-conductor.md:78 sets base_head to the last finished section’s commit when joining a build already underway. However, plugins/launchpad/templates/conductor/protocol-implementer.md:47 requests a whole-branch review using git diff "<base>...HEAD", and the handoff supplies only that verification base. Using it excludes all previously completed sections from the final review. Record the original implementation or PR base separately as review_base, retain base_head for checkpoint verification, and explicitly use review_base for the final review.

P3 - Low Priority Issues (Optional)

None found.

Positive Observations

  • Retry reports preserve earlier evidence and keep failed sections from advancing.
  • Checkpoint verification is explicitly bound to the Implementer’s checkout and reported commit.
  • Push, PR, and merge authorization remain reserved for the user.
  • All changed Python files passed syntax parsing. Runtime tests were not run in the read-only environment; Ruff was unavailable.

Automated review by OpenAI Codex

Track the original implementation or PR review base independently from checkpoint verification and carry it through handoffs, resume State, and final review instructions.
@github-actions

Copy link
Copy Markdown

Codex Automated Code Review

Code Review Summary

PR: Adds /lp-conductor, role handoff protocols, an inbox watcher, tests, and documentation.

P0 - Critical Issues (Must Fix)

None found

P1 - High Priority Issues (Should Fix)

  • plugins/launchpad/templates/conductor/protocol-implementer.md:47 — The final review cannot honor the recorded review base. This instructs the Implementer to run /lp-review against review_base, but that command hardcodes origin/main throughout scope detection and secret scanning (plugins/launchpad/commands/lp-review.md:41). It accepts no base override. With a different PR base, it reviews the wrong range; without origin/main, it reviews working-tree changes and can omit the entire committed implementation. Add an explicit base argument to /lp-review, apply it consistently to all scope-dependent checks, and pass the recorded base from the handoff.

P2 - Medium Priority Issues (Consider Fixing)

None found

P3 - Low Priority Issues (Optional)

None found

Positive Observations

  • Retry checkpoints preserve previous reports and require successful verification before advancement.
  • Verification explicitly checks the Implementer checkout and complete section range.
  • All changed Python files parse successfully. Tests could not run because pytest is unavailable; filesystem-writing tests also require a writable environment.

Automated review by OpenAI Codex

@foadshafighi
foadshafighi merged commit 1b11dfa into main Nov 13, 2026
10 checks passed
@foadshafighi
foadshafighi deleted the feat/conductor-command branch November 13, 2026 08:53
foadshafighi added a commit that referenced this pull request Nov 13, 2026
Add /lp-conductor, which sets up one session to review the work of a
planning session and a building session, answer their routine questions
and bring the user only the decisions that need them.

- Start, resume after compaction, and join work that already has an
  approved plan or a build in progress, with fresh inboxes and a log.
- Author and Implementer protocols and handoff templates with host-specific
  waits, compaction prompts and review instructions. Push, PR and merge
  always need the user's own go-ahead, and an Author cannot be closed while
  one of its questions is unanswered.
- Checkpoints are verified in the Implementer's checkout over the full range
  since the previous verified head. A failed checkpoint gets a RETRY verdict
  with its own report and answer files, and the final review keeps the
  whole-branch base.
- Refuse any path used in a command or prompt that contains a double quote,
  dollar sign, backtick or backslash.
- A standard-library inbox watcher with persistent snapshots and stable
  multi-root polling, covered for corrupt state, invalid intervals and
  filesystem errors.
- Tests no longer inherit a Git hook's environment, so nested git commands
  in temporary repositories cannot change the real repository, and the
  seeded template cache is stamped fresh so the hermetic tests stay offline.
- Document the command, update the inventory to 43 commands and add the
  unreleased changelog entry.
foadshafighi added a commit that referenced this pull request Nov 13, 2026
Release /lp-conductor (#235, #236), the worktree commit-msg hook fix
(#226), the move to the FrameworkedApp organization (#234) and the
dependency and CI updates merged since v2.2.2.

- Bump both plugin manifests to 2.3.0.
- Move the unreleased changelog entries under v2.3.0 and add the
  plugin-internal changes.
- Add docs/releases/v2.3.0.md.
- Point the README version and release-notes link at v2.3.0.
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