[PR #46] [CLOSED] feat(codex): add notify hook auto-injection templates #55

Closed
opened 2026-03-03 15:47:31 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mindfold-ai/Trellis/pull/46
Author: @lapse12
Created: 2/25/2026
Status: Closed

Base: mainHead: codex/codex-hook-auto-inject


📝 Commits (1)

  • 6a8c88c feat(codex): inject notify hook and project config templates

📊 Changes

12 files changed (+322 additions, -13 deletions)

View changed files

📝 scripts/copy-templates.js (+1 -1)
📝 src/configurators/codex.ts (+23 -1)
📝 src/configurators/index.ts (+23 -3)
src/templates/codex/config.toml (+6 -0)
src/templates/codex/hooks/notify.py (+169 -0)
📝 src/templates/codex/index.ts (+36 -2)
📝 src/templates/markdown/agents.md (+2 -0)
📝 src/types/ai-tools.ts (+4 -1)
📝 test/commands/init.integration.test.ts (+2 -0)
📝 test/configurators/index.test.ts (+17 -4)
📝 test/configurators/platforms.test.ts (+15 -0)
📝 test/templates/codex.test.ts (+24 -1)

📄 Description

Summary

  • add Codex managed config templates under .codex/:
    • .codex/config.toml
    • .codex/hooks/notify.py
  • make Codex configurator write both skill templates (.agents/skills/*) and hook/config templates (.codex/*)
  • include .codex in Trellis managed directories for update tracking and path protection
  • update AGENTS template to read .codex/context/trellis-context.md when present
  • add test coverage for Codex hook/config generation and managed directory behavior

Docs Cross-check

Validation

  • pnpm test
  • pnpm lint
  • pnpm typecheck
  • pnpm build
  • Hook payload runtime test (real script execution with JSON payload):
    • python3 .codex/hooks/notify.py '<payload-json>'
    • confirmed outputs:
      • .codex/context/trellis-context.md
      • .codex/context/last-notify-event.json

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mindfold-ai/Trellis/pull/46 **Author:** [@lapse12](https://github.com/lapse12) **Created:** 2/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/codex-hook-auto-inject` --- ### 📝 Commits (1) - [`6a8c88c`](https://github.com/mindfold-ai/Trellis/commit/6a8c88c27aaa015b36b3484364942269505d132a) feat(codex): inject notify hook and project config templates ### 📊 Changes **12 files changed** (+322 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `scripts/copy-templates.js` (+1 -1) 📝 `src/configurators/codex.ts` (+23 -1) 📝 `src/configurators/index.ts` (+23 -3) ➕ `src/templates/codex/config.toml` (+6 -0) ➕ `src/templates/codex/hooks/notify.py` (+169 -0) 📝 `src/templates/codex/index.ts` (+36 -2) 📝 `src/templates/markdown/agents.md` (+2 -0) 📝 `src/types/ai-tools.ts` (+4 -1) 📝 `test/commands/init.integration.test.ts` (+2 -0) 📝 `test/configurators/index.test.ts` (+17 -4) 📝 `test/configurators/platforms.test.ts` (+15 -0) 📝 `test/templates/codex.test.ts` (+24 -1) </details> ### 📄 Description ## Summary - add Codex managed config templates under `.codex/`: - `.codex/config.toml` - `.codex/hooks/notify.py` - make Codex configurator write both skill templates (`.agents/skills/*`) and hook/config templates (`.codex/*`) - include `.codex` in Trellis managed directories for update tracking and path protection - update AGENTS template to read `.codex/context/trellis-context.md` when present - add test coverage for Codex hook/config generation and managed directory behavior ## Docs Cross-check - Verified Codex supports `notify` command config and passes JSON payload to the command: - https://developers.openai.com/codex/config-reference/ - Verified trusted-project loading and project config lookup locations (`.codex/config.toml` and repo root fallback): - https://developers.openai.com/codex/config-basic/ - Verified project-config relative path behavior note and sample config patterns: - https://developers.openai.com/codex/config-advanced/ - https://developers.openai.com/codex/sample-config/ ## Validation - `pnpm test` - `pnpm lint` - `pnpm typecheck` - `pnpm build` - Hook payload runtime test (real script execution with JSON payload): - `python3 .codex/hooks/notify.py '<payload-json>'` - confirmed outputs: - `.codex/context/trellis-context.md` - `.codex/context/last-notify-event.json` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 15:47:31 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Trellis#55
No description provided.