name: y-create-summary description: Create a concise provenance summary for a commit by reading commit metadata and Codex session context, then writing note.json with intent, constraints, and actions. Use when you need to mint commit-level summaries from commit.json, CODEX.md, and Codex session logs.
Inputs
- Accept a workspace path.
- Read
commit.jsonandCODEX.mdfrom the workspace root. - Read session logs from
~/.codex/sessions(or$CODEX_HOME/sessions).
Workflow
- Read
commit.jsonand extracthash,message,timestamp,repoPath, andchangedFileswhen present. - Read
CODEX.mdand identify referenced session paths. - Parse the referenced JSONL sessions and select evidence that supports summary construction:
- User requests that describe goals or problems.
- Tool calls and shell actions tied to implementation, testing, or git operations.
- Mentions of commit hash prefixes, commit message text, or changed file names.
- Messages close to the commit timestamp.
- Build
sessionSummaryfrom evidence:intent: the user goal.constraints: explicit requirements or limits.actions: concrete implementation and validation steps.
- Write
note.jsonin the workspace root. - If evidence is sparse, infer conservatively from
commit.jsonand mark uncertain details insummarywithout speculation.
Output
Write note.json with required fields:
hashmessageauthortimestampsummarysessionSummary.intentsessionSummary.constraintssessionSummary.actions
Optional fields:
sessions(relative paths under~/.codex/sessions)changedFilesagents(use"codex")decisionshighlights(brief redacted paraphrases only)
Safety
- Do not modify repository source files.
- Restrict writes to workspace output files.
- Do not copy raw session transcripts into
note.json. - Redact sensitive values and keep summaries minimal.
Quality Bar
- Make
summaryexplain why the change exists, not only what changed. - Keep
constraintsspecific and actionable. - Keep
actionschronological and concrete.