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) | | 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) | | 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) | | 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. 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 # 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 ## 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. * **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 interactive reflection, never from passive memory or auto-summarized activity narration. * **Grounding**: Derived from primary evidence (commit ledger, git history) and user reflection, never from auto-summarized activity narration or promotional praise.
* **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. * **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's assessment loop. This provides a deterministic, machine-readable boundary distinguishing processed history from unassessed ledger events. * **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: assessed_commits:
- 42927b9858c1b091bb6e78d3abcf6f9500bd7547 - 42927b9858c1b091bb6e78d3abcf6f9500bd7547
- fee7429a1064193c066b8c20bd6927977599a67f - fee7429a1064193c066b8c20bd6927977599a67f
status: draft | completed
revisit_after: YYYY-MM-DD # optional
--- ---
``` ```
@@ -36,25 +38,26 @@ assessed_commits:
### 1. Document Title ### 1. Document Title
`# Daily Journal: YYYY-MM-DD` `# Daily Journal: YYYY-MM-DD`
### 2. Wins (`## Wins`) ### 2. Facts (Agent) (`## Facts (Agent)`)
Subdivided by project or scope (`### <Project Name>`). Grouped by project (`### <Project Name>`).
Bullet points detailing concrete accomplishments, architectural boundaries established, and working implementations. Use plain, precise technical language. 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`) ### 3. Learning & Reasoning (User) (`## Learning & Reasoning (User)`)
Links to formal artifacts produced or updated during the day: Numbered prompts derived from substantive architectural changes, invariants, trade-offs, or bug diagnoses:
- Architectural Decision Records (`03-records/decisions/` or repo `docs/`) - `### 1. <Question prompt>`
- Implementation Plans & Roadmaps (`01-plans/`) - User's explanation in their own words.
- Debug Records & Post-mortems (`03-records/debug/`)
- Key commit SHAs or pull requests.
### 4. Mistakes, Gaps & Learning Edges (`## Mistakes, Gaps & Learning Edges`) ### 4. Feedback & Calibration (Agent) (`## Feedback & Calibration (Agent)`)
Organized by project/domain. Records the epistemic state of assessed learning objectives: Filled during review/curation after user answers:
- **Achieved**: The concept or invariant the user successfully demonstrated and explained. - **Assistance**: `independent` | `hints` | `substantial` | `shown-solution`
- **Unresolved**: Knowledge gaps where the user struggled or answered `Skip: I don't get it`. Includes the concrete code/evidence needed for follow-up. - **Rubric Checklist**:
- **Deferred**: Objectives skipped due to external constraints (e.g. `Skip: I'm exhausted`). - 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`) ### 5. Open / Gaps (`## Open / Gaps`)
Synthesized takeaways on system behavior, engineering discipline, trade-offs, and shifts in mental models. Unresolved uncertainties, deferred questions, or edge cases identified during review.
### 6. Next Objectives (`## Next Objectives`)
Optional forward-looking priorities for upcoming sessions.
+37 -43
View File
@@ -1,64 +1,58 @@
--- ---
name: journal-builder name: journal-builder
description: >- description: >-
Turn a day's accumulated engineering history into a structured journal through Turn a day's engineering history into a factual journal and learning scaffold.
collaborative reconstruction, locked learning objectives, and a closed assessment loop. Produces facts and question blanks for the user to answer, then evaluates them.
--- ---
# Journal Builder # Journal Builder
## Use when ## Use when
- `/journal-builder [YYYY-MM-DD]` or `/journal [YYYY-MM-DD]` (defaults to today). - `/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. - End of a workday or sprint to record facts and practice recalling key reasoning.
- Not for standalone changelogs; use git log directly. - Not for standalone changelogs: use git log directly.
- Not for deliberate coding practice drills; use `practice`. - Not for deliberate coding practice drills: use `practice`.
## Steps ## Steps
1. **Target the day and check history.** Establish the date window from argument or today. 1. **Target the day and check history.** Establish date from argument or today.
Read events from the ledger (e.g. `commit-log.csv`) or recent repository `git log`. Check if a draft scaffold exists for that date with filled answers; if so, skip to step 5.
- **Provenance check**: Read `assessed_commits` frontmatter across existing journals. Read events from commit ledger (e.g. `commit-log.csv`) or repository `git log`.
Only events whose full 40-character SHA is absent proceed as unassessed work. - **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 - **Backlog check**: If unassessed events exist from prior dates, surface them and ask
whether to process the older backlog chronologically first. whether to process the older backlog chronologically first.
- **Resolve locations**: Resolve project identities to local paths using the agent profile. - **Resolve locations**: Resolve project identities to local paths using agent profile.
2. **Reconstruct collaboratively.** Inspect resolved repositories (diffs, tests, docs). 2. **Reconstruct facts.** Inspect repositories (diffs, tests, docs). Group by project:
Formulate the reconstruction checkpoint (sources, narrative, domains, uncertainties). commit SHAs, files touched, passing/failing tests, and links to ADRs or plans.
Pause and confirm the context before formulating any questions. 3. **Formulate learning questions.** Follow the learning contract. Select 0-3 questions
3. **Lock learning objectives.** Once reconstruction is confirmed, select the smallest useful from substantive work (architectural decisions, invariants, trade-offs, hard bugs).
set of atomic learning objectives from substantive work. Formulate a hidden expected answer Skip routine work. Prepare hidden expected answers grounded in the diffs. Zero questions
and rubric before asking. Skip routine work. is a valid outcome if work was routine.
4. **Run the assessment loop.** Present one objective and question at a time. 4. **Author scaffold draft.**
Expect either `Answer: <explanation>` or `Skip: <reason>`. - **Learning mode** (session mode, see profile): write draft with `status: draft`. Include
After every answer, give concise formative feedback: what was correct, what is missing `assessed_commits`, `## Facts (Agent)` grouping commits and artifacts, `## Learning & Reasoning (User)`
or imprecise, and the decision. Never pass an answer that omitted material understanding. with question headers and blanks (`[Your answer / explanation]`), and an empty `## Open / Gaps`.
- **Demonstrated**: core understanding articulated -> mark Achieved, move to next. Stage draft in configured notes inbox (e.g. `00-inbox/`) and prompt me to fill the blanks.
- **Partially demonstrated**: material understanding missing -> targeted follow-up question. - **Delivery mode**: draft concise facts and brief summary without blanks, avoiding promotional
- **Incorrect / Unresolved**: provide smallest evidence (code line, diff, log) -> retry. praise ("masterfully", "expert").
- **Skip: I'm exhausted**: mark Deferred and move to next. 5. **Review completed scaffold.** When evaluating a filled draft:
- **Retries fail or Skip: I don't get it**: mark Unresolved (learning edge) and continue. - Check answers against code evidence and invariants.
5. **Synthesize the candidate journal.** Include `assessed_commits` in YAML frontmatter. - Fill `## Feedback & Calibration (Agent)`: label points (`correct`, `missing`, `wrong`,
Structure body with Wins by project, Decisions/Artifacts, Mistakes & Learning Edges `unsupported`) and provide calibration rubric checklist (Invariant, Edge cases, Trade-offs)
(with objective outcomes), and Technical Reflections. with assistance level.
6. **Hand off to `document`.** Pass the candidate journal to `document` to classify, - Keep my original wording intact; never overwrite my answers with AI summaries.
author, and stage the draft. Do not choose or prompt for storage destinations. - Move unresolved points to `## Open / Gaps`. Set `status: completed`.
6. **Hand off to `document` or `draft-curation`.** Pass completed journal to stage or relocate.
## 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?"
## Your call ## Your call
- **Backlog triage**: whether to process older unassessed work before today. - **Backlog triage**: whether to process older unassessed work before today.
- **Confirm reconstruction**: whether sources, narrative, and domains match your actual work. - **Review questions**: whether questions target the right decisions, or to skip any question.
- **Respond to objectives**: provide `Answer: ...` or `Skip: <reason>`. - **Save destination**: confirm final journal location (default: `03-records/journal/YYYY-MM-DD.md`).
## Done when ## 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 ## Hands off to
- `document`: to author and stage the candidate journal draft. - `draft-curation`: to curate and relocate completed journal from inbox to canonical archive.
- `practice`: if an unresolved learning edge warrants an isolated deliberate practice drill. - `practice`: if an unresolved gap warrants an isolated deliberate practice drill.
- `diagnose`: if reflection identified an active, unexplained system failure. - `diagnose`: if reflection identified an active, unexplained system failure.
+26 -27
View File
@@ -1,51 +1,50 @@
--- ---
name: practice name: practice
description: >- description: >-
Socratic tutoring mode. Use when the user types /practice, asks to learn or be taught Socratic tutoring and delayed retrieval practice. Use when typing /practice or
something, or wants guidance without the agent writing the solution. The learner writes /practice review to learn concepts, solve LeetCode algorithms, or review due topics.
all code and drives the analysis; the agent asks, points, explains, and reviews.
--- ---
# Practice # Practice
## Use when ## 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. - Works in any repo or as a pure concept question. No curriculum needed.
- Not for urgent production failures: use `diagnose`. - Not for urgent production failures: use `diagnose`.
- Always runs in learning mode, whatever the session mode, and follows the learning contract - Always runs in learning mode, whatever the session mode, and follows the learning contract
(see the profile's "Session mode"). (see the profile's "Session mode").
## Steps ## Steps
1. Ask what I want to understand or build, and what my current mental model is. 1. **Check overdue revisits.** If invoked as `/practice review` or with no topic given, scan
If no topic was given, ask: "What concept, mechanism, or problem do you want to explore?" for practice records with `revisit_after <= today` (inbox, learning, docs). If any exist,
2. Help at the lowest level that works, moving up only when I'm stuck or missing a prerequisite: 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. 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. 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). 4. A minimal demo in an unrelated example (never in working code).
3. Let me attempt it: code, prediction, explanation, or diagnosis. Ask me to read my own 4. **Let me attempt it**: code, prediction, explanation, diagnosis, or algorithm approach.
result before you comment. Ask me to read my own result before you comment.
4. Review what I produced: report calibration (rubric checklist + assistance level), 5. **Review what I produced**: report calibration (rubric checklist + assistance level),
label points (`correct`, `missing`, `wrong`, `unsupported`), then point at subtle gaps label points (`correct`, `missing`, `wrong`, `unsupported`), then point at gaps.
with a question. 6. **Direct answer on request**: give without resistance, then check with one follow-up.
5. If I explicitly ask for a direct answer, give it without resistance, then check it with one 7. **Wrap up and schedule**: what changed in understanding, primary sources, and offer
follow-up question about my case. a practice record with `revisit_after` interval per protocol.
6. Wrap up: what changed in my understanding, what to practice next, and primary sources
(official docs, specs, RFCs) rather than blog summaries.
Never edit files in my working repo or run implementation commands there, unless I explicitly Never edit files in working repo or run implementation commands unless explicitly asked.
say so. Keep each reply short and focused on the next step.
## Your call ## Your call
- **Did I understand it?** In deliberate practice, pose one transfer challenge (a changed context - **Revisit choice**: whether to review an overdue topic or start a new one.
or edge case) before calling a concept done. For a quick "how does X work?" question, offer it - **Did I understand it?**: solve one transfer challenge or unaided re-solve before calling done.
but don't require it. - **Save a practice record?**: template [references/practice-record.md](references/practice-record.md)
- **Save a practice record?** Offer at a real milestone, not after every question. with computed `revisit_after`.
Template: [references/practice-record.md](references/practice-record.md).
## Done when ## 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 ## Hands off to
- `document`: when a durable insight came out of the session. - `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.