Compare commits

..
2 Commits
Author SHA1 Message Date
kiskaadee 45973bb0ef feat(practice): add delayed retrieval protocol and overdue revisit checks
- Surface overdue practice records on /practice invocation with recall-before-reveal
- Add revisit-protocol reference detailing 3-stage spacing intervals
- Adapt practice workflow for algorithm and LeetCode problem solving
2026-10-18 09:43:04 -05:00
kiskaadee 3ab9dbd5ca feat(journal-builder): convert daily journal to two-phase scaffolding workflow
- Refactor journal-builder to stage fact skeleton with question blanks in learning mode
- Add evaluation step populating diagnostic feedback and calibration rubric
- Update journal-authoring spec to replace AI-written narrative with user reasoning structure
2026-10-18 08:36:46 -05:00
5 changed files with 144 additions and 95 deletions

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ description: >-
| How to build it: phases, constraints, done-definition | Plan | [plan](references/plan-authoring.md) |
| What broke and why (root cause) | Debug Record | [debug](references/debug-record-authoring.md) |
| A general mental model or technique | Knowledge | [knowledge](references/knowledge-authoring.md) |
| Daily synthesis: gains, lessons, learning edges | Journal | [journal](references/journal-authoring.md) |
| Daily synthesis: facts, reasoning, calibration | Journal | [journal](references/journal-authoring.md) |
A rich session may justify more than one (e.g. Debug Record + Discussion). Split them; don't write one hybrid document.
+27 -24
View File
@@ -1,15 +1,15 @@
# Journal Authoring Specification
A Daily Journal is a durable, evidence-grounded record of a day's engineering accomplishments, architectural decisions, and the learning edges identified through retrospective reflection.
A Daily Journal is an evidence-grounded record of a day's engineering accomplishments, architectural decisions, and human-authored reasoning on key concepts.
---
## 1. Epistemic Role
* **Purpose**: Capture the terminal state of a day's work across projects, record verified mental models, and preserve active learning edges for future study.
* **Grounding**: Derived from primary evidence (commit ledger, git history) and interactive reflection, never from passive memory or auto-summarized activity narration.
* **Mutability**: Journals are date-scoped historical records. Once curated, existing human-authored content must be preserved; subsequent journal runs may extend the same day's record with genuinely new work, learning, and reflections.
* **Assessment Provenance**: The `assessed_commits` list in YAML frontmatter contains the full 40-character Git commit SHAs incorporated into the journal's assessment loop. This provides a deterministic, machine-readable boundary distinguishing processed history from unassessed ledger events.
* **Purpose**: Capture the terminal state of a day's work across projects, record human-authored mental models, and preserve active learning edges for future study.
* **Grounding**: Derived from primary evidence (commit ledger, git history) and user reflection, never from auto-summarized activity narration or promotional praise.
* **Scaffolding vs Review**: In learning mode, the journal begins as an agent-generated scaffold with facts and question blanks. The engineer completes the blanks, and curation adds diagnostic feedback and calibration.
* **Assessment Provenance**: The `assessed_commits` list in YAML frontmatter contains the full 40-character Git commit SHAs incorporated into the journal. This provides a deterministic boundary distinguishing processed history from unassessed ledger events.
---
@@ -26,6 +26,8 @@ tags:
assessed_commits:
- 42927b9858c1b091bb6e78d3abcf6f9500bd7547
- fee7429a1064193c066b8c20bd6927977599a67f
status: draft | completed
revisit_after: YYYY-MM-DD # optional
---
```
@@ -36,25 +38,26 @@ assessed_commits:
### 1. Document Title
`# Daily Journal: YYYY-MM-DD`
### 2. Wins (`## Wins`)
Subdivided by project or scope (`### <Project Name>`).
Bullet points detailing concrete accomplishments, architectural boundaries established, and working implementations. Use plain, precise technical language.
### 2. Facts (Agent) (`## Facts (Agent)`)
Grouped by project (`### <Project Name>`).
Plain, concise technical facts without promotional adjectives:
- **Commits**: `<short-sha>` description of change.
- **Artifacts**: links to ADRs, plans, debug records.
- **Evidence**: key files touched, test results.
### 3. Decisions, Incidents & Artifacts (`## Decisions, Incidents & Artifacts`)
Links to formal artifacts produced or updated during the day:
- Architectural Decision Records (`03-records/decisions/` or repo `docs/`)
- Implementation Plans & Roadmaps (`01-plans/`)
- Debug Records & Post-mortems (`03-records/debug/`)
- Key commit SHAs or pull requests.
### 3. Learning & Reasoning (User) (`## Learning & Reasoning (User)`)
Numbered prompts derived from substantive architectural changes, invariants, trade-offs, or bug diagnoses:
- `### 1. <Question prompt>`
- User's explanation in their own words.
### 4. Mistakes, Gaps & Learning Edges (`## Mistakes, Gaps & Learning Edges`)
Organized by project/domain. Records the epistemic state of assessed learning objectives:
- **Achieved**: The concept or invariant the user successfully demonstrated and explained.
- **Unresolved**: Knowledge gaps where the user struggled or answered `Skip: I don't get it`. Includes the concrete code/evidence needed for follow-up.
- **Deferred**: Objectives skipped due to external constraints (e.g. `Skip: I'm exhausted`).
### 4. Feedback & Calibration (Agent) (`## Feedback & Calibration (Agent)`)
Filled during review/curation after user answers:
- **Assistance**: `independent` | `hints` | `substantial` | `shown-solution`
- **Rubric Checklist**:
- Invariant / Mechanism: [✓ | ✗ | ~] <note>
- Edge cases / Failure modes: [✓ | ✗ | ~] <note>
- Trade-offs / Constraints: [✓ | ✗ | ~] <note>
- **Diagnostic Feedback**: points labeled `correct`, `missing`, `wrong`, or `unsupported`.
### 5. Technical & Personal Reflections (`## Technical & Personal Reflections`)
Synthesized takeaways on system behavior, engineering discipline, trade-offs, and shifts in mental models.
### 6. Next Objectives (`## Next Objectives`)
Optional forward-looking priorities for upcoming sessions.
### 5. Open / Gaps (`## Open / Gaps`)
Unresolved uncertainties, deferred questions, or edge cases identified during review.
+37 -43
View File
@@ -1,64 +1,58 @@
---
name: journal-builder
description: >-
Turn a day's accumulated engineering history into a structured journal through
collaborative reconstruction, locked learning objectives, and a closed assessment loop.
Turn a day's engineering history into a factual journal and learning scaffold.
Produces facts and question blanks for the user to answer, then evaluates them.
---
# Journal Builder
## Use when
- `/journal-builder [YYYY-MM-DD]` or `/journal [YYYY-MM-DD]` (defaults to today).
- End of a workday or sprint to review history, test understanding, and record learning edges.
- Not for standalone changelogs; use git log directly.
- Not for deliberate coding practice drills; use `practice`.
- End of a workday or sprint to record facts and practice recalling key reasoning.
- Not for standalone changelogs: use git log directly.
- Not for deliberate coding practice drills: use `practice`.
## Steps
1. **Target the day and check history.** Establish the date window from argument or today.
Read events from the ledger (e.g. `commit-log.csv`) or recent repository `git log`.
- **Provenance check**: Read `assessed_commits` frontmatter across existing journals.
Only events whose full 40-character SHA is absent proceed as unassessed work.
1. **Target the day and check history.** Establish date from argument or today.
Check if a draft scaffold exists for that date with filled answers; if so, skip to step 5.
Read events from commit ledger (e.g. `commit-log.csv`) or repository `git log`.
- **Provenance check**: Read `assessed_commits` across existing journals. Only events
whose full 40-character SHA is absent proceed as unassessed work.
- **Backlog check**: If unassessed events exist from prior dates, surface them and ask
whether to process the older backlog chronologically first.
- **Resolve locations**: Resolve project identities to local paths using the agent profile.
2. **Reconstruct collaboratively.** Inspect resolved repositories (diffs, tests, docs).
Formulate the reconstruction checkpoint (sources, narrative, domains, uncertainties).
Pause and confirm the context before formulating any questions.
3. **Lock learning objectives.** Once reconstruction is confirmed, select the smallest useful
set of atomic learning objectives from substantive work. Formulate a hidden expected answer
and rubric before asking. Skip routine work.
4. **Run the assessment loop.** Present one objective and question at a time.
Expect either `Answer: <explanation>` or `Skip: <reason>`.
After every answer, give concise formative feedback: what was correct, what is missing
or imprecise, and the decision. Never pass an answer that omitted material understanding.
- **Demonstrated**: core understanding articulated -> mark Achieved, move to next.
- **Partially demonstrated**: material understanding missing -> targeted follow-up question.
- **Incorrect / Unresolved**: provide smallest evidence (code line, diff, log) -> retry.
- **Skip: I'm exhausted**: mark Deferred and move to next.
- **Retries fail or Skip: I don't get it**: mark Unresolved (learning edge) and continue.
5. **Synthesize the candidate journal.** Include `assessed_commits` in YAML frontmatter.
Structure body with Wins by project, Decisions/Artifacts, Mistakes & Learning Edges
(with objective outcomes), and Technical Reflections.
6. **Hand off to `document`.** Pass the candidate journal to `document` to classify,
author, and stage the draft. Do not choose or prompt for storage destinations.
## Reconstruction checkpoint
Before locking objectives, present the reconstructed context:
- **Sources**: Inspected repos, commit SHAs, related docs or notes.
- **Narrative**: What was built, refactored, or tested, and observed results.
- **Domains**: Technical concepts involved (e.g. auth flows, token dynamics).
- **Uncertainties**: Missing context, unstated rationale, or ambiguous intent.
Pause for confirmation: "Does this reconstruction match the work you want to review?"
- **Resolve locations**: Resolve project identities to local paths using agent profile.
2. **Reconstruct facts.** Inspect repositories (diffs, tests, docs). Group by project:
commit SHAs, files touched, passing/failing tests, and links to ADRs or plans.
3. **Formulate learning questions.** Follow the learning contract. Select 0-3 questions
from substantive work (architectural decisions, invariants, trade-offs, hard bugs).
Skip routine work. Prepare hidden expected answers grounded in the diffs. Zero questions
is a valid outcome if work was routine.
4. **Author scaffold draft.**
- **Learning mode** (session mode, see profile): write draft with `status: draft`. Include
`assessed_commits`, `## Facts (Agent)` grouping commits and artifacts, `## Learning & Reasoning (User)`
with question headers and blanks (`[Your answer / explanation]`), and an empty `## Open / Gaps`.
Stage draft in configured notes inbox (e.g. `00-inbox/`) and prompt me to fill the blanks.
- **Delivery mode**: draft concise facts and brief summary without blanks, avoiding promotional
praise ("masterfully", "expert").
5. **Review completed scaffold.** When evaluating a filled draft:
- Check answers against code evidence and invariants.
- Fill `## Feedback & Calibration (Agent)`: label points (`correct`, `missing`, `wrong`,
`unsupported`) and provide calibration rubric checklist (Invariant, Edge cases, Trade-offs)
with assistance level.
- Keep my original wording intact; never overwrite my answers with AI summaries.
- Move unresolved points to `## Open / Gaps`. Set `status: completed`.
6. **Hand off to `document` or `draft-curation`.** Pass completed journal to stage or relocate.
## Your call
- **Backlog triage**: whether to process older unassessed work before today.
- **Confirm reconstruction**: whether sources, narrative, and domains match your actual work.
- **Respond to objectives**: provide `Answer: ...` or `Skip: <reason>`.
- **Review questions**: whether questions target the right decisions, or to skip any question.
- **Save destination**: confirm final journal location (default: `03-records/journal/YYYY-MM-DD.md`).
## Done when
- All locked learning objectives are assessed and candidate journal is handed off to `document`.
- Scaffold draft is staged with blanks (Phase 1), or filled scaffold is evaluated and completed (Phase 2).
## Hands off to
- `document`: to author and stage the candidate journal draft.
- `practice`: if an unresolved learning edge warrants an isolated deliberate practice drill.
- `draft-curation`: to curate and relocate completed journal from inbox to canonical archive.
- `practice`: if an unresolved gap warrants an isolated deliberate practice drill.
- `diagnose`: if reflection identified an active, unexplained system failure.
+26 -27
View File
@@ -1,51 +1,50 @@
---
name: practice
description: >-
Socratic tutoring mode. Use when the user types /practice, asks to learn or be taught
something, or wants guidance without the agent writing the solution. The learner writes
all code and drives the analysis; the agent asks, points, explains, and reviews.
Socratic tutoring and delayed retrieval practice. Use when typing /practice or
/practice review to learn concepts, solve LeetCode algorithms, or review due topics.
---
# Practice
## Use when
- `/practice [topic or problem]`, "teach me", "help me understand", "don't write it for me".
- `/practice [topic or problem]`, `/practice review`, LeetCode practice, "teach me".
- Works in any repo or as a pure concept question. No curriculum needed.
- Not for urgent production failures: use `diagnose`.
- Always runs in learning mode, whatever the session mode, and follows the learning contract
(see the profile's "Session mode").
## Steps
1. Ask what I want to understand or build, and what my current mental model is.
If no topic was given, ask: "What concept, mechanism, or problem do you want to explore?"
2. Help at the lowest level that works, moving up only when I'm stuck or missing a prerequisite:
1. **Check overdue revisits.** If invoked as `/practice review` or with no topic given, scan
for practice records with `revisit_after <= today` (inbox, learning, docs). If any exist,
surface up to 3 and ask whether to review one or start a new topic. When reviewing,
execute recall-before-reveal per [references/revisit-protocol.md](references/revisit-protocol.md).
2. **Establish target.** For a new topic or algorithm problem, ask what I want to understand
or build, and what my current mental model is.
3. **Help at lowest level that works**, moving up only when I am stuck:
1. A question that makes me check my own assumption.
2. Where to look: a file and line range, a docs section, a tool (debugger, `EXPLAIN ANALYZE`, logs).
2. Where to look: file/line range, docs section, or inspection tool.
3. A short first-principles explanation of the missing concept, then hand control back.
4. A minimal demo in an unrelated example (never in my working code).
3. Let me attempt it: code, prediction, explanation, or diagnosis. Ask me to read my own
result before you comment.
4. Review what I produced: report calibration (rubric checklist + assistance level),
label points (`correct`, `missing`, `wrong`, `unsupported`), then point at subtle gaps
with a question.
5. If I explicitly ask for a direct answer, give it without resistance, then check it with one
follow-up question about my case.
6. Wrap up: what changed in my understanding, what to practice next, and primary sources
(official docs, specs, RFCs) rather than blog summaries.
4. A minimal demo in an unrelated example (never in working code).
4. **Let me attempt it**: code, prediction, explanation, diagnosis, or algorithm approach.
Ask me to read my own result before you comment.
5. **Review what I produced**: report calibration (rubric checklist + assistance level),
label points (`correct`, `missing`, `wrong`, `unsupported`), then point at gaps.
6. **Direct answer on request**: give without resistance, then check with one follow-up.
7. **Wrap up and schedule**: what changed in understanding, primary sources, and offer
a practice record with `revisit_after` interval per protocol.
Never edit files in my working repo or run implementation commands there, unless I explicitly
say so. Keep each reply short and focused on the next step.
Never edit files in working repo or run implementation commands unless explicitly asked.
## Your call
- **Did I understand it?** In deliberate practice, pose one transfer challenge (a changed context
or edge case) before calling a concept done. For a quick "how does X work?" question, offer it
but don't require it.
- **Save a practice record?** Offer at a real milestone, not after every question.
Template: [references/practice-record.md](references/practice-record.md).
- **Revisit choice**: whether to review an overdue topic or start a new one.
- **Did I understand it?**: solve one transfer challenge or unaided re-solve before calling done.
- **Save a practice record?**: template [references/practice-record.md](references/practice-record.md)
with computed `revisit_after`.
## Done when
- I solve the transfer challenge, or I close the topic.
- I solve the transfer challenge, complete the unaided revisit, or close the topic.
## Hands off to
- `document`: when a durable insight came out of the session.
- `git-commit`: it proposes slices and lists the facts; I write the message and type the commit.
- `git-commit`: it proposes slices and lists facts; I write the message and type the commit.
@@ -0,0 +1,53 @@
# Revisit & Delayed Retrieval Protocol
Protocol for spacing and successive relearning in `practice`. Implements recall-before-reveal and graduated spacing intervals without external databases or background schedulers.
---
## 1. Discovery
When `/practice` runs without arguments, or with `/practice review`, scan for existing practice records in:
- Notes inbox (e.g. `00-inbox/` or configured vault inbox)
- Learning guides (e.g. `04-learning/`)
- Project-local documentation (e.g. `docs/`)
Filter for markdown files where frontmatter has `type: practice` and `revisit_after` is on or before today's date (`YYYY-MM-DD`). If matches exist, surface up to 3 due topics and ask whether to review one or start a new topic.
---
## 2. Recall-Before-Reveal Sequence
1. **State the prompt**: Present the original topic or problem statement and any starting constraints. Never show the previous answer, code solution, or explanation.
2. **Elicit unaided retrieval**:
- For concepts: "Explain the mechanism and core invariant in your own words."
- For algorithms / LeetCode: "State the pattern, time/space complexity, and solve the problem without assistance."
- For architecture: "Why was this choice made, and what trade-off did we accept?"
3. **Calibrate attempt**: Label feedback (`correct`, `missing`, `wrong`, `unsupported`) and record assistance level (`independent`, `hints`, etc.).
4. **Reveal and compare**: Open the previous practice record and compare. Highlight what held, what decayed, and what changed.
5. **Update record**: Record the new attempt, update calibration, and compute the next `revisit_after` date.
---
## 3. Spacing Interval Progression
Spacing expands as recall becomes more independent and durable:
| Stage | Trigger / Evidence | Next Revisit | Action |
|---|---|---|---|
| **Initial** | Solved with hints or shown-solution | `+2-3 days` | Scheduled for an unaided re-solve |
| **Stage 1** | Recalled with minor hint or prompt | `+7 days` | Reinforces decaying memory |
| **Stage 2** | Demonstrated independently without hints | `+21-30 days` | Long-term consolidation check |
| **Stage 3** | Succeeded independently on Stage 2 or solved transfer challenge | None | Remove `revisit_after`, set `status: retained` |
| **Regression** | Struggled, incorrect, or needed full solution | `+2-3 days` | Reset interval back to Initial |
---
## 4. LeetCode & Algorithm Practice Adaptation
1. **Independent attempt**: Read constraints, predict time and space complexity, and write initial approach before asking for guidance.
2. **Graduated hints**: If stuck, escalate through the hint ladder (syntax check -> directional hint -> invariant/pattern hint -> code example). Record assistance level.
3. **Post-acceptance invariant**: After submission is accepted, formulate:
- Pattern name (e.g. Two Pointers, Monotonic Stack, Sliding Window).
- Core invariant (what condition holds on each iteration/state transition).
- Time and space complexity rationale.
4. **Revisit rule**: Any problem solved with `hints` or `shown-solution` gets `revisit_after: +2-3 days` for an unaided re-solve.