diff --git a/openspec/changes/agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28/.openspec.yaml b/openspec/changes/agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28/.openspec.yaml new file mode 100644 index 0000000..4b8c565 --- /dev/null +++ b/openspec/changes/agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-04-21 diff --git a/openspec/changes/agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28/proposal.md b/openspec/changes/agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28/proposal.md new file mode 100644 index 0000000..6b25f79 --- /dev/null +++ b/openspec/changes/agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28/proposal.md @@ -0,0 +1,14 @@ +## Why + +- `codex-agent` currently skips auto-finish whenever `origin` is a local-path remote, even when tests intentionally inject a working fake `gh` binary through `GUARDEX_GH_BIN`. +- Nested recursive-doctor tests create a fresh git repo under `frontend/` and call `seedCommit()` before any local identity exists, which now fails on CI runners without a global git identity. + +## What Changes + +- Allow the codex auto-finish path to use PR flow when the caller explicitly overrides the GitHub CLI binary via `GUARDEX_GH_BIN`, even if the repo remote is a local bare path. +- Ensure shared install-test helpers seed a local git identity before `seedCommit()` so nested repos can commit deterministically in CI. + +## Impact + +- Affects `scripts/codex-agent.sh`, `templates/scripts/codex-agent.sh`, and `test/install.test.js`. +- Keeps the existing skip behavior for local-path remotes when no explicit `GUARDEX_GH_BIN` override is provided. diff --git a/openspec/changes/agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28/specs/codex-agent-autofinish/spec.md b/openspec/changes/agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28/specs/codex-agent-autofinish/spec.md new file mode 100644 index 0000000..2690479 --- /dev/null +++ b/openspec/changes/agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28/specs/codex-agent-autofinish/spec.md @@ -0,0 +1,19 @@ +## ADDED Requirements + +### Requirement: codex-agent auto-finish respects explicit GitHub CLI overrides +`codex-agent` SHALL allow the PR-based auto-finish path to run when the caller explicitly sets `GUARDEX_GH_BIN`, even if the repo's `origin` URL is a local-path remote used by tests. + +#### Scenario: Local-path origin with explicit GitHub CLI override +- **GIVEN** a repo whose `origin` remote is a local bare path +- **AND** `GUARDEX_GH_BIN` points to an executable CLI shim +- **WHEN** `codex-agent` runs with auto-finish enabled +- **THEN** it SHALL invoke the PR-based finish flow instead of skipping auto-finish because of the local-path remote. + +### Requirement: shared install-test helpers seed local git identity +Shared install-test helpers SHALL configure a local git author identity before creating seed commits in ad hoc nested repos. + +#### Scenario: Nested frontend repo seed commit +- **GIVEN** a nested git repo created directly inside an install test +- **WHEN** `seedCommit()` prepares the initial commit +- **THEN** the helper SHALL configure local `user.name` and `user.email` first +- **AND** the seed commit SHALL not depend on any global git identity on the runner. diff --git a/openspec/changes/agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28/tasks.md b/openspec/changes/agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28/tasks.md new file mode 100644 index 0000000..86c2aee --- /dev/null +++ b/openspec/changes/agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28/tasks.md @@ -0,0 +1,21 @@ +## 1. Specification + +- [x] 1.1 Finalize proposal scope and acceptance criteria for `agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28`. +- [x] 1.2 Define normative requirements in `specs/codex-agent-autofinish/spec.md`. + +## 2. Implementation + +- [x] 2.1 Implement scoped behavior changes. +- [x] 2.2 Add/update focused regression coverage. + +## 3. Verification + +- [x] 3.1 Run targeted project verification commands. +- [x] 3.2 Run `openspec validate agent-codex-fix-codex-agent-autofinish-and-nested-gi-2026-04-21-13-28 --type change --strict`. +- [x] 3.3 Run `openspec validate --specs`. + +## 4. Completion + +- [ ] 4.1 Finish the agent branch via PR merge + cleanup (`gx finish --via-pr --wait-for-merge --cleanup` or `bash scripts/agent-branch-finish.sh --branch --base --via-pr --wait-for-merge --cleanup`). +- [ ] 4.2 Record PR URL + final `MERGED` state in the completion handoff. +- [ ] 4.3 Confirm sandbox cleanup (`git worktree list`, `git branch -a`) or capture a `BLOCKED:` handoff if merge/cleanup is pending. diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/README.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/README.md new file mode 100644 index 0000000..0c7de25 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/README.md @@ -0,0 +1,9 @@ +# Plan Workspace: agent-codex-info-recodee-com-bump-version-plus-one + +Durable pre-implementation planning workspace. + +Use this command to update checkpoints: + +```bash +/opsx:checkpoint agent-codex-info-recodee-com-bump-version-plus-one +``` diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/architect/README.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/architect/README.md new file mode 100644 index 0000000..0e5c0c4 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/architect/README.md @@ -0,0 +1,3 @@ +# architect + +Role workspace for `architect`. diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/architect/tasks.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/architect/tasks.md new file mode 100644 index 0000000..be76e85 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/architect/tasks.md @@ -0,0 +1,20 @@ +# architect tasks + +## 1. Spec + +- [ ] Define requirements and scope for architect +- [ ] Confirm acceptance criteria are explicit and testable + +## 2. Tests + +- [ ] Define verification approach and evidence requirements +- [ ] List concrete commands for verification + +## 3. Implementation + +- [ ] Execute role-specific deliverables +- [ ] Capture decisions, risks, and handoff notes + +## 4. Checkpoints + +- [ ] Publish checkpoint update for this role diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/checkpoints.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/checkpoints.md new file mode 100644 index 0000000..b5ae88a --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/checkpoints.md @@ -0,0 +1,14 @@ +# Plan Checkpoints: agent-codex-info-recodee-com-bump-version-plus-one + +Chronological checkpoint log for all roles. + +- 2026-04-15T06:52:17Z | role=executor | checkpoint=session-start | state=in_progress + - plan/change: bump-version-plus-one + - owned files/scope: `package.json`, `package-lock.json`, `README.md`, `openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/checkpoints.md` + - intended action: bump package/CLI version one patch higher and align README release notes to the new version + +- 2026-04-15T06:56:30Z | role=executor | checkpoint=implementation-complete | state=completed + - files changed: `package.json`, `package-lock.json`, `README.md` + - behavior touched: package/CLI version advanced by one patch; release notes include `v5.0.12` + - verification: `npm test` (100/100 pass), `node --check bin/multiagent-safety.js` (pass), `npm pack --dry-run` (pass), `node bin/multiagent-safety.js --version` => `5.0.12` + - risks/follow-ups: npm registry currently reports `5.0.11`; publish/release step still required to make `5.0.12` live diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/critic/README.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/critic/README.md new file mode 100644 index 0000000..8bf6164 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/critic/README.md @@ -0,0 +1,3 @@ +# critic + +Role workspace for `critic`. diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/critic/tasks.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/critic/tasks.md new file mode 100644 index 0000000..7345d08 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/critic/tasks.md @@ -0,0 +1,20 @@ +# critic tasks + +## 1. Spec + +- [ ] Define requirements and scope for critic +- [ ] Confirm acceptance criteria are explicit and testable + +## 2. Tests + +- [ ] Define verification approach and evidence requirements +- [ ] List concrete commands for verification + +## 3. Implementation + +- [ ] Execute role-specific deliverables +- [ ] Capture decisions, risks, and handoff notes + +## 4. Checkpoints + +- [ ] Publish checkpoint update for this role diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/executor/README.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/executor/README.md new file mode 100644 index 0000000..7892ee0 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/executor/README.md @@ -0,0 +1,3 @@ +# executor + +Role workspace for `executor`. diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/executor/tasks.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/executor/tasks.md new file mode 100644 index 0000000..5f2d503 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/executor/tasks.md @@ -0,0 +1,20 @@ +# executor tasks + +## 1. Spec + +- [ ] Define requirements and scope for executor +- [ ] Confirm acceptance criteria are explicit and testable + +## 2. Tests + +- [ ] Define verification approach and evidence requirements +- [ ] List concrete commands for verification + +## 3. Implementation + +- [ ] Execute role-specific deliverables +- [ ] Capture decisions, risks, and handoff notes + +## 4. Checkpoints + +- [ ] Publish checkpoint update for this role diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/planner/README.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/planner/README.md new file mode 100644 index 0000000..7455cb0 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/planner/README.md @@ -0,0 +1,3 @@ +# planner + +Role workspace for `planner`. diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/planner/plan.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/planner/plan.md new file mode 100644 index 0000000..9922c38 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/planner/plan.md @@ -0,0 +1,19 @@ +# ExecPlan: agent-codex-info-recodee-com-bump-version-plus-one + +This document is a living plan. Keep progress and decisions current. + +## Purpose / Big Picture + +## Progress + +- [ ] Initial draft +- [ ] Review + iterate +- [ ] Approved for execution + +## Surprises & Discoveries + +## Decision Log + +## Outcomes & Retrospective + +## Validation and Acceptance diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/planner/tasks.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/planner/tasks.md new file mode 100644 index 0000000..f151fa2 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/planner/tasks.md @@ -0,0 +1,20 @@ +# planner tasks + +## 1. Spec + +- [ ] Define requirements and scope for planner +- [ ] Confirm acceptance criteria are explicit and testable + +## 2. Tests + +- [ ] Define verification approach and evidence requirements +- [ ] List concrete commands for verification + +## 3. Implementation + +- [ ] Execute role-specific deliverables +- [ ] Capture decisions, risks, and handoff notes + +## 4. Checkpoints + +- [ ] Publish checkpoint update for this role diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/summary.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/summary.md new file mode 100644 index 0000000..5c41a30 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/summary.md @@ -0,0 +1,8 @@ +# Plan Summary: agent-codex-info-recodee-com-bump-version-plus-one + +- **Mode:** ralplan +- **Status:** draft + +## Context + +Describe the problem, constraints, and intended outcomes. diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/verifier/README.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/verifier/README.md new file mode 100644 index 0000000..c0e72d7 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/verifier/README.md @@ -0,0 +1,3 @@ +# verifier + +Role workspace for `verifier`. diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/verifier/tasks.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/verifier/tasks.md new file mode 100644 index 0000000..ab56beb --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/verifier/tasks.md @@ -0,0 +1,20 @@ +# verifier tasks + +## 1. Spec + +- [ ] Define requirements and scope for verifier +- [ ] Confirm acceptance criteria are explicit and testable + +## 2. Tests + +- [ ] Define verification approach and evidence requirements +- [ ] List concrete commands for verification + +## 3. Implementation + +- [ ] Execute role-specific deliverables +- [ ] Capture decisions, risks, and handoff notes + +## 4. Checkpoints + +- [ ] Publish checkpoint update for this role diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/writer/README.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/writer/README.md new file mode 100644 index 0000000..64ea46b --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/writer/README.md @@ -0,0 +1,3 @@ +# writer + +Role workspace for `writer`. diff --git a/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/writer/tasks.md b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/writer/tasks.md new file mode 100644 index 0000000..55a3072 --- /dev/null +++ b/openspec/plan/agent-codex-info-recodee-com-bump-version-plus-one/writer/tasks.md @@ -0,0 +1,20 @@ +# writer tasks + +## 1. Spec + +- [ ] Define requirements and scope for writer +- [ ] Confirm acceptance criteria are explicit and testable + +## 2. Tests + +- [ ] Define verification approach and evidence requirements +- [ ] List concrete commands for verification + +## 3. Implementation + +- [ ] Execute role-specific deliverables +- [ ] Capture decisions, risks, and handoff notes + +## 4. Checkpoints + +- [ ] Publish checkpoint update for this role diff --git a/scripts/agent-file-locks.py b/scripts/agent-file-locks.py index 06cdd7a..53c2d2f 100755 --- a/scripts/agent-file-locks.py +++ b/scripts/agent-file-locks.py @@ -27,6 +27,7 @@ 'AGENTS.md', '.githooks/pre-commit', '.githooks/pre-push', + '.githooks/post-merge', 'scripts/agent-branch-start.sh', 'scripts/agent-branch-finish.sh', 'scripts/agent-file-locks.py',