Compare commits

..
2 Commits
Author SHA1 Message Date
kiskaadee 4bc004da6d feat(extensions): update draft-curation with journal reconciliation and fix commit-logger parent-sha
- Add Unique Daily Journal & Reconciliation invariant to draft-curation skill.
- Establish Atomic Curation Boundary: draft-curation relocates/reconciles and hands off to git-commit without mutating git history directly.
- Add journal and decision types to draft-curation classification table.
- Fix commit-logger parent SHA resolution using rev-parse --verify.
2026-10-05 06:17:02 -05:00
kiskaadee de43014c0c feat(journal-builder): add journal-builder skill and document authoring spec
- Implement journal-builder with evidence-based reconstruction, locked atomic learning objectives, hidden rubrics, and 3-part formative feedback.
- Add historical backlog checks to preserve temporal fidelity and explicit commit-reference provenance boundaries for incremental runs.
- Add journal authoring reference to document skill with reconcilable date-scoped contract.
- Register journal-builder in install.sh and active portable skills table.
2026-10-05 06:15:47 -05:00
7 changed files with 139 additions and 16 deletions

No files matched your search

+2 -1
View File
@@ -66,6 +66,7 @@ Every skill features an explicit **"Your call"** checkpoint where the agent paus
| **[`diagnose`](skills/diagnose/SKILL.md)** | `/diagnose [symptom]` | Evidence-first troubleshooting. Progresses from raw logs to proven root cause and minimal, reversible fixes. | 49 lines |
| **[`git-commit`](skills/git-commit/SKILL.md)** | `/git-commit` | Working-tree inspection, atomic slice decomposition, and Conventional Commit drafting. Human approves every commit. | 54 lines |
| **[`document`](skills/document/SKILL.md)** | `/document` | Second-order knowledge classifier (Discussion, ADR, Plan, Debug Record, Knowledge). User confirms type and provides core insight. | 49 lines |
| **[`journal-builder`](skills/journal-builder/SKILL.md)** | `/journal-builder` or `/journal` | Retrospective inquiry from engineering history. Probes understanding and discovers learning edges. | 56 lines |
| **[`build-skill`](skills/build-skill/SKILL.md)** | `/build-skill [topic]` | Interactive design, sizing, authoring, and empirical dogfooding of agent skills. Enforces design review gate before file creation. | 48 lines |
### Vault Extensions (`extensions/`)
@@ -73,7 +74,7 @@ Every skill features an explicit **"Your call"** checkpoint where the agent paus
| Skill | Status | Purpose |
| :--- | :--- | :--- |
| **[`draft-curation`](extensions/draft-curation/SKILL.md)** | Active | Triages, classifies, and commits incoming notes from an inbox/staging directory into structured lifecycle directories. |
| **[`commit-logger`](extensions/commit-logger/SKILL.md)** | Standby | Immutable Git commit event capture script into a machine-readable CSV ledger (planned consumer of future `journal-builder`). |
| **[`commit-logger`](extensions/commit-logger/SKILL.md)** | Active | Immutable Git commit event capture script into a machine-readable CSV ledger (consumed by `journal-builder`). |
---
@@ -37,7 +37,7 @@ fi
# 3. Extract Immutable Git Metadata
COMMIT_SHA="$(git rev-parse "${TARGET_REF}")"
PARENT_SHA="$(git rev-parse "${COMMIT_SHA}^" 2>/dev/null || echo "")"
PARENT_SHA="$(git rev-parse --verify "${COMMIT_SHA}^" 2>/dev/null || echo "")"
COMMITTED_AT="$(git show -s --format=%cI "${COMMIT_SHA}")"
SUBJECT="$(git show -s --format=%s "${COMMIT_SHA}")"
BRANCH="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "detached")"
+18 -9
View File
@@ -19,13 +19,16 @@ This extension skill governs the systematic ingestion and curation of unprocesse
1. **Epistemic Classification over Chronology**: Content is sorted by its epistemic nature, never simply by when it was created:
- Roadmaps, milestones, phased execution $\to$ `01-plans/<project>/` (`type: plan`)
- Exploratory debates, trade-offs, architecture options $\to$ `02-discussions/<project>/` (`type: discussion`)
- Daily logs & reflections $\to$ `03-records/journal/` (`type: journal`)
- Incidents, regressions, root-cause analyses $\to$ `03-records/debug/` (`type: debug`)
- Architectural decisions $\to$ `03-records/decisions/` (`type: decision`)
- General knowledge, concepts, languages $\to$ `04-learning/knowledge/` (`type: knowledge`)
- Practical SOPs, runbooks, operation walkthroughs $\to$ `04-learning/guides/<project>/` (`type: guide`)
2. **The Validation Gate**: If the vault has an automated validator (e.g. `python scripts/validate-brain.py`), a curated document MUST pass before any commit is made.
3. **Zero Dangling Drafts**: Once a draft is curated and committed to its destination, the original file in the staging directory must be deleted.
3. **Zero Dangling Drafts**: Once a draft is curated and relocated to its destination, the original file in the staging directory must be deleted.
4. **Interactive Checkpoint**: The agent must present the proposed destination, frontmatter, and rationale to the user before relocating files, unless explicitly instructed to process autonomously.
5. **Atomic Commit Boundary**: Each curated document or cohesive bundle must be committed separately with conventional or vault-specific semantic commit types (`plan`, `discussion`, `knowledge`, `guide`, `debug`).
5. **Atomic Curation Boundary**: Each curated document or cohesive bundle is relocated and validated as an independent unit. Git history is mutated only through `git-commit`.
6. **Unique Daily Journal & Reconciliation**: A daily journal (`03-records/journal/YYYY-MM-DD.md`) is a unique daily artifact. When a curated draft targets a date whose journal already exists, reconcile it with the existing record rather than creating a duplicate file (`-2.md`) or blindly overwriting. Reconciliation must preserve existing human edits and integrate genuinely new wins, artifacts, objectives, and reflections while avoiding duplicate entries.
---
@@ -36,9 +39,9 @@ flowchart TD
S1["1. Preflight Gate<br/>python scripts/validate-brain.py"] --> S2["2. Inventory & Inspection<br/>Scan 00-inbox/ for pending drafts"]
S2 --> S3["3. Epistemic Classification<br/>Determine target directory & metadata"]
S3 --> S4{"4. Interactive Checkpoint<br/>Present target path & frontmatter"}
S4 -->|Approved| S5["5. Transform & Relocate<br/>Write formatted file, delete from inbox"]
S4 -->|Approved| S5["5. Transform & Relocate<br/>Write/reconcile file, delete from inbox"]
S5 --> S6["6. Validate Integrity<br/>python scripts/validate-brain.py"]
S6 --> S7["7. Atomic Semantic Commit<br/>Commit with brain semantic type"]
S6 --> S7["7. Hand Off to git-commit<br/>Ready for user review & commit"]
```
### Step 1: Preflight Verification
@@ -61,7 +64,9 @@ Select the target directory according to the repository's Directory Contracts:
| :--- | :--- | :--- | :--- |
| **Phased Roadmap / Blueprint** | `01-plans/<project>/` | `plan` | `<slug>.md` |
| **Exploratory Trade-off / Why** | `02-discussions/<project>/` | `discussion` | `<slug>.md` |
| **Daily Log / Journal** | `03-records/journal/` | `journal` | `YYYY-MM-DD.md` |
| **Incident Root Cause / Bug** | `03-records/debug/` | `debug` | `YYYY-MM-DD-<slug>.md` |
| **Architectural Decision (ADR)** | `03-records/decisions/` | `decision` | `<slug>.md` |
| **Theoretical / Disciplinary Concept** | `04-learning/knowledge/concepts/` | `knowledge` | `<slug>.md` |
| **Tool / Language Reference** | `04-learning/knowledge/technologies/` | `knowledge` | `<slug>.md` |
| **Engineering Best Practice** | `04-learning/knowledge/methods/` | `knowledge` | `<slug>.md` |
@@ -78,13 +83,15 @@ Present a 4-point curation checkpoint to the user:
*If the user confirms or if operating in approved autonomous mode, proceed to Step 5.*
### Step 5: Transformation, Relocation & Cleanup
### Step 5: Transformation, Relocation & Reconciliation
1. **Format Content**:
- Prepend valid YAML frontmatter.
- Ensure title is an H1 heading matching document purpose.
- Convert any Obsidian `[[double-bracket]]` links to standard relative Markdown links (`[label](../path.md)`).
- Ensure external code links use forge Git URLs (never machine-specific `file:///` URIs).
2. **Write Target File**: Write the transformed document to the destination path.
2. **Write or Reconcile Target File**:
- *New document*: Write the transformed document directly to the destination path.
- *Existing daily journal*: Perform journal-aware reconciliation. Preserve existing human-authored edits, append new project sections/wins, append new decisions/artifacts, and record new learning edge outcomes without duplicating entries.
3. **Remove Staging File**: Delete the original file from `00-inbox/`.
### Step 6: Validation Pass
@@ -95,12 +102,14 @@ python scripts/test_validator.py
```
Ensure all checks pass cleanly: frontmatter validation, link resolution, code fences, Mermaid syntax, Ruff linting, and Pyright typing.
### Step 7: Atomic Semantic Commit
Package the curated file using conventional or vault semantic commit taxonomy:
### Step 7: Hand Off to `git-commit`
With the staging draft removed and repository validation passing cleanly, hand off to `/git-commit` for inspection and explicit user approval. Propose the conventional or vault-specific semantic commit type:
- `plan(<project>): <description>`
- `discussion(<project>): <description>`
- `journal: record daily log for YYYY-MM-DD`
- `debug(<project>): <description>`
- `decision(<project>): <description>`
- `knowledge(<topic>): <description>`
- `guide(<project>): <description>`
Commit message must reflect the newly curated document, cleanly isolated from unrelated working-tree changes.
Do not commit working-tree mutations directly; mutation of Git history belongs strictly to `git-commit`.
+3 -4
View File
@@ -32,12 +32,11 @@ while [[ $# -gt 0 ]]; do
done
# Active skills to install
ACTIVE_PORTABLE_SKILLS=(build-skill diagnose document git-commit practice)
ACTIVE_EXTENSION_SKILLS=(draft-curation)
# Note: commit-logger is NOT installed (planned consumer of journal-builder)
ACTIVE_PORTABLE_SKILLS=(build-skill diagnose document git-commit journal-builder practice)
ACTIVE_EXTENSION_SKILLS=(draft-curation commit-logger)
# Legacy / deprecated skills to clean up or back up if found in target
OBSOLETE_SKILLS=(engineering-tutor engineering-investigation skill-builder documentation-router commit-logger inbox-curation)
OBSOLETE_SKILLS=(engineering-tutor engineering-investigation skill-builder documentation-router inbox-curation)
echo "=== Target: $TARGET_DIR (mode: $MODE) ==="
+3 -1
View File
@@ -25,6 +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) |
A rich session may justify more than one (e.g. Debug Record + Discussion). Split them; don't write one hybrid document.
@@ -48,4 +49,5 @@ A rich session may justify more than one (e.g. Debug Record + Discussion). Split
- The file exists at the chosen location, or we agreed no document is needed.
## Hands off to
- `git-commit`: to commit the document if it lives in a repo.
- `draft-curation`: to review and curate drafts staged into an inbox into lifecycle destinations.
- `git-commit`: to commit the document if it lives directly in a repo.
@@ -0,0 +1,56 @@
# 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.
---
## 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.
---
## 2. Frontmatter Contract
```yaml
---
type: journal
project: brain # or primary project scope
date: YYYY-MM-DD
tags:
- project-name
- technology-or-topic
---
```
---
## 3. Structural Sections
### 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.
### 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.
### 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`).
### 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.
+56
View File
@@ -0,0 +1,56 @@
---
name: journal-builder
description: >-
Turn a day's accumulated engineering history into a structured journal through
evidence-based reconstruction, locked learning objectives, and a closed assessment loop.
---
# 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`.
## Steps
1. **Target the day and check history.** Establish the date window from argument or current day.
Read events from the ledger (e.g. `commit-log.csv`) or recent repository `git log`.
- **Provenance boundary**: A journal records the commit events incorporated into its
reconstruction (under Decisions & Artifacts). These references serve as the durable boundary
distinguishing previously assessed work from new ledger events.
- **Backlog check**: If older ledger events exist that are not yet incorporated in any journal
record, surface them and ask whether to process the older date first (preserve temporal fidelity).
- **Incremental run**: If a journal record already exists for the target date, compare ledger
events against incorporated commits. Only new substantive work proceeds to assessment.
2. **Reconstruct by project and domain.** Group new unassessed commits by project, then by
technical domain (e.g. auth, deployment, architecture). Summarize what changed.
3. **Lock learning objectives.** Select the smallest useful set of independently assessable
learning objectives from substantive work. Objectives must be atomic (one independently
testable understanding). Formulate a hidden expected answer 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.** Structure the entry 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.
## Your call
- **Backlog triage**: whether to process older unassessed work before today.
- **Confirm the day's scope**: whether the detected projects and domains match the day's work.
- **Respond to objectives**: provide `Answer: ...` or `Skip: <reason>`.
## Done when
- All locked learning objectives are assessed and the candidate journal is handed off to `document`.
## Hands off to
- `document`: to author and stage the candidate journal draft.
- `practice`: if an unresolved learning edge warrants an isolated deliberate practice drill.
- `diagnose`: if reflection identified an active, unexplained system failure.