| name | gpd-decisions |
| description | Display and search the cumulative decision log |
| argument-hint | [phase number or keyword] |
| context_mode | project-required |
| requires | {"files":[".gpd/STATE.md"]} |
| allowed-tools | ["read_file","shell","grep","glob"] |
<codex_runtime_notes>
Codex shell compatibility:
- When shell steps call the GPD CLI, use /Users/charlie/.gpd/venv/bin/python -m gpd.runtime_cli --runtime codex --config-dir ./.codex --install-scope local instead of the ambient
gpd on PATH.
- If you intentionally need the repo environment, keep the runtime pin:
GPD_ACTIVE_RUNTIME=codex uv run gpd ....
</codex_runtime_notes>
Display the cumulative decision log from .gpd/DECISIONS.md with optional filtering by phase number or keyword search.
Routes to the decisions workflow which handles:
- Loading and parsing the decision log table
- Filtering by phase number (e.g.,
$gpd-decisions 3)
- Keyword search across all fields (e.g.,
$gpd-decisions regularization)
- Formatted display with summary statistics
<execution_context>
@.gpd/STATE.md
Display and search the cumulative decision log from .gpd/DECISIONS.md. Supports filtering by phase number or keyword, and presents formatted output with summary statistics.
<required_reading>
Read all files referenced by the invoking prompt's execution_context before starting.
</required_reading>
Check if the decision log exists:
cat .gpd/DECISIONS.md 2>/dev/null
If file doesn't exist or has no entries (only header row):
No decisions logged yet.
Decisions are recorded automatically during phase transitions ($gpd-progress).
You can also add entries manually to .gpd/DECISIONS.md.
---
Would you like to:
1. Check project progress ($gpd-progress)
2. View current phase ($gpd-show-phase)
Exit.
Determine filter mode from arguments:
$gpd-decisions -> show all entries
$gpd-decisions 3 (number) -> filter to Phase 3 only
$gpd-decisions regularization (text) -> keyword search across all fields
$gpd-decisions high -> filter by impact level
Detection logic:
- If argument is a number (integer or decimal like 2.1): phase filter
- If argument matches
high, medium, or low (case-insensitive): impact filter
- Otherwise: keyword search
Parse the markdown table from DECISIONS.md.
Extract each row into fields: ID, Decision, Rationale, Alternatives Considered, Phase, Date, Impact.
Skip the header row and separator row.
**Phase filter:** Keep rows where Phase field matches the requested phase number.
Keyword filter: Keep rows where any field contains the keyword (case-insensitive).
Impact filter: Keep rows where Impact field matches (case-insensitive).
No filter: Keep all rows.
**If filter returned results:**
Present filtered entries in a readable format:
## Decision Log{filter_suffix}
{filter_suffix examples: " — Phase 3", " — matching 'regularization'", " — High Impact"}
| ID | Decision | Phase | Date | Impact |
| --- | --- | --- | --- | --- |
| DEC-001 | Adopt (-,+,+,+) metric signature | 1 | 2026-03-15 | High |
| DEC-003 | Truncate series at 2-loop | 3 | 2026-03-15 | Medium |
---
**{N} decisions** shown{filter_note}. {M} total in log.
For the compact table, show ID, Decision, Phase, Date, Impact.
To see full details (rationale and alternatives) for a specific decision, the user can ask: "Show details for DEC-003".
If showing details for one decision:
## DEC-003: Truncate perturbative series at 2-loop
**Phase:** 3 | **Date:** 2026-03-15 | **Impact:** Medium
**Rationale:** 3-loop contribution estimated < 0.1% of leading order
**Alternatives Considered:** 1-loop only, 3-loop, resummation
If filter returned no results:
No decisions match {filter description}.
Try:
- `$gpd-decisions` — show all
- `$gpd-decisions <phase>` — filter by phase
- `$gpd-decisions <keyword>` — search by keyword
After the table, show a brief summary:
**Summary:** {total} decisions across {phase_count} phases | High: {h} | Medium: {m} | Low: {l}
Only show this for unfiltered or phase-filtered views (skip for keyword searches with few results).
<success_criteria>
</success_criteria>
</execution_context>
**Follow the decisions workflow** from `@./.codex/get-physics-done/workflows/decisions.md`.
The workflow handles all logic including:
- Decision log existence checking
- Argument parsing (phase number vs keyword)
- Table filtering and display
- Summary statistics