Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .agents
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-04-20
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Why

- Claude/Codex hooks are configured to execute under `.agents/hooks/*`.
- This repository ships hook implementations under `.codex/hooks` and `.claude/hooks`, but `.agents/` can be missing.
- When `.agents/` is absent, `UserPromptSubmit` fails with `[Errno 2] No such file or directory` and blocks Claude prompt submission.

## What Changes

- Add a repository-root compatibility alias `.agents -> .codex`.
- Keep existing hook settings unchanged so both Claude and Codex continue to resolve the same path contract.
- Verify `skill_activation.py` and `skill_guard.py` execute successfully via the `.agents/hooks` path.

## Impact

- Affected surface is limited to hook path resolution in local agent sessions.
- No runtime package behavior changes, no dependency changes.
- Low risk: symlink is reversible and only routes existing files.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## ADDED Requirements

### Requirement: restore-agents-hook-bridge behavior
The repository SHALL provide a valid `.agents/hooks/*` resolution path for local hook execution.

#### Scenario: Hook path compatibility is present
- **WHEN** a local hook command invokes `python3 <repo>/.agents/hooks/skill_activation.py`
- **THEN** the file path SHALL resolve without `ENOENT`
- **AND** the hook process SHALL exit successfully for empty stdin.

#### Scenario: Existing guard hook remains callable through `.agents`
- **WHEN** a local hook command invokes `python3 <repo>/.agents/hooks/skill_guard.py`
- **THEN** the file path SHALL resolve without `ENOENT`
- **AND** the hook process SHALL exit successfully for empty stdin.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## 1. Specification

- [x] 1.1 Finalize proposal scope and acceptance criteria for `agent-codex-restore-agents-hook-bridge-2026-04-20-08-45`.
- [x] 1.2 Define normative requirements in `specs/restore-agents-hook-bridge/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-restore-agents-hook-bridge-2026-04-20-08-45 --type change --strict`.
- [x] 3.3 Run `openspec validate --specs`.

## 4. Cleanup

- [x] 4.1 Confirm branch is ready for finish.
- [ ] 4.2 After successful merge, run `bash scripts/agent-worktree-prune.sh --base <base> --delete-branches --delete-remote-branches` so merged agent branch/worktree sandboxes are removed from local and `origin`.