Record a project-specific learning or pattern to the insights ledger
Codex shell compatibility:
gpd on PATH.GPD_ACTIVE_RUNTIME=codex uv run gpd ....
</codex_runtime_notes>Routes to the record-insight workflow which handles:
Typical insights include:
<execution_context>
<required_reading> Read all files referenced by the invoking prompt's execution_context before starting. </required_reading>
test -f .gpd/INSIGHTS.md && echo "EXISTS" || echo "MISSING"
If MISSING: Create from template:
mkdir -p .gpd
Write .gpd/INSIGHTS.md:
# Project Insights
Accumulated project-specific lessons discovered during research. Agents consult this file to avoid repeating mistakes and to apply learned patterns.
## Debugging Patterns
| Date | Phase | Category | Confidence | Description | Prevention |
| ---- | ----- | -------- | ---------- | ----------- | ---------- |
## Verification Lessons
| Date | Phase | Category | Confidence | Description | Prevention |
| ---- | ----- | -------- | ---------- | ----------- | ---------- |
## Consistency Issues
| Date | Phase | Category | Confidence | Description | Prevention |
| ---- | ----- | -------- | ---------- | ----------- | ---------- |
## Execution Deviations
| Date | Phase | Category | Confidence | Description | Prevention |
| ---- | ----- | -------- | ---------- | ----------- | ---------- |
grep -i "{brief_description_keyword}" .gpd/INSIGHTS.md 2>/dev/null
If found: Do not duplicate. Report: "Insight already recorded." If not found: Proceed to append. </step>
| Category | Section |
|---|---|
| error-pattern | Debugging Patterns |
| debugging-pattern | Debugging Patterns |
| convention-pitfall | Consistency Issues |
| approximation-lesson | Verification Lessons |
| computational-insight | Execution Deviations |
| verification-lesson | Verification Lessons |
Row format:
| {YYYY-MM-DD} | {phase-id} | {category} | {high/medium/low} | {concise description of the lesson} | {how to prevent recurrence} |
Field guidelines:
03-numerics)error-pattern, convention-pitfall, approximation-lesson, computational-insight, debugging-pattern, verification-lessonhigh (confirmed with evidence), medium (likely based on investigation), low (suspected pattern, needs more data)PRE_CHECK=$(/home/qol/.gpd/venv/bin/python -m gpd.runtime_cli --runtime codex --config-dir ./.codex --install-scope local pre-commit-check --files .gpd/INSIGHTS.md 2>&1) || true
echo "$PRE_CHECK"
/home/qol/.gpd/venv/bin/python -m gpd.runtime_cli --runtime codex --config-dir ./.codex --install-scope local commit "docs: record project insight - {brief description}" --files .gpd/INSIGHTS.md
Confirm: "Recorded insight: {brief description}" </step>
<success_criteria>
.gpd/INSIGHTS.md exists (created if needed)Lifecycle note: High-confidence insights confirmed across 2+ phases are candidates for promotion to the global pattern library at milestone completion ($gpd-complete-milestone → promote_patterns step). Set confidence accurately — it determines promotion eligibility.
</success_criteria>
</execution_context>
The workflow handles all logic including:
.gpd/INSIGHTS.md