Skip to content

[P2.5-T13] Auto-codex in-skill hooks (no host hooks) #140

@firatcand

Description

@firatcand

Forge task ID: P2.5-T13
Phase: 2.5 — Closed-loop workflow control · Type: skill · Owner: backend-dev · Priority: P1 · Estimate: S
Depends on: none
Source: spec/SPEC.md §Auto-codex skill-level hooks (2026-05-17 simplification)

Extend existing skills with auto-codex suggestion at architectural decision points:

Skill Trigger point Suggested invocation
/plan-task After plan generated /codex review-plan
/update-spec --draft After ADR draft written /codex review-decision
/ship Before PR finalize /codex review-impl

All suggestions are printed lines at skill end: "💡 Suggested next: /codex review-decision (run with FORGE_AUTO_CODEX=0 to disable)". User types or skips — no automatic execution.

Bounded by codex.auto_codex_token_cap in settings.yaml (default 50000 tokens/session). When budget exceeded, remaining suggestions are skipped with a one-line warning. Env vars: FORGE_AUTO_CODEX=0 disables; FORGE_AUTO_CODEX_TOKEN_CAP=<n> overrides settings.

Acceptance:

  • /plan-task, /update-spec, /ship each emit auto-codex suggestion at appropriate point
  • Bounded by codex.auto_codex_token_cap (default 50000); skips with warning when exceeded
  • FORGE_AUTO_CODEX=0 cleanly disables; no behavior changes elsewhere
  • NO host-level SessionStart/Stop/UserPromptSubmit hook installation (sole-user decision)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions