# Diary Digest

> Periodic reflective harvest of an append-only engineering journal (discipline/DIARY.md or any long log/changelog/postmortem). Reads the WHOLE journal via parallel diary-miner subagents, performs a k0-k4 metacognitive reflection over the mistakes and successes, turns every recurring mistake into a proposed mechanical gate, and saves the consolidated learning to Mycorrhiza. Use when the user asks f…

- **Type:** Skill
- **Install:** `agentstack add skill-sfaustodev-discipline-diary-digest`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [sfaustodev](https://agentstack.voostack.com/s/sfaustodev)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [sfaustodev](https://github.com/sfaustodev)
- **Source:** https://github.com/sfaustodev/discipline/tree/main/skills/diary-digest

## Install

```sh
agentstack add skill-sfaustodev-discipline-diary-digest
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# diary-digest

Turn a fat append-only journal into durable automation. The journal already paid for the mistakes; this skill makes sure each one is paid for **once**. It is the repeatable version of a manual harvest — profile, mine in parallel, reflect, propose gates, persist.

Principle (see global rule on mechanical gates): a lesson that lives only as prose in the log will be skipped again under pressure. The harvest is not done until each recurring mistake has a *proposed mechanical gate* (hook / script / lint / test / checklist), not just a paragraph.

## Steps

### 1. Locate & profile
Find the journal (default `discipline/DIARY.md`; accept a path arg). Profile it cheaply before reading — this sizes the fan-out and surfaces the penalty taxonomy:

```bash
F="${1:-discipline/DIARY.md}"
wc -l "$F"
grep -Ec '^## ' "$F"                 # entry count
grep -Eo '\[[a-z][a-z-]+\]' "$F" | sort | uniq -c | sort -rn | head -30   # penalty taxonomy, by frequency
```

The penalty histogram is the single highest-signal artifact. Any label with count ≥2 is a **recurring** mistake and MUST end the harvest with a proposed gate.

Then read the **digest watermark** so you don't re-mine what a prior digest already covered:
```bash
grep -n '
EOF
```
`digested_through_line` is cumulative (prior runs + this one); `next_start_line` is where the next digest begins. Each run appends its own marker; `grep … | tail -1` always finds the active one.

### 7. Report & propose — do NOT auto-edit the constitution
Output: the k0-k4 reflection + the family table (family → frequency → proposed gate → status). Then propose deliverables:
- new **skills/subagents** for repeated manual work (SKILL-CANDIDATES with 2+ hits) → can create directly under `~/.claude/skills/` or project `.claude/skills/`
- new **discipline rules** → **PROPOSE and confirm** before editing any global `~/.claude/CLAUDE.md` (the constitution is human-ratified; "propor" ≠ "editar").
- project-specific technical gold → the project's `ETERNAL.md` (on-demand, per rule #19), not here.

## Guardrails
- Read-only on the journal's **content**. The only write allowed is appending a watermark marker at EOF (step 6) — never edit or "clean up" existing entries; the journal is append-only (rule #5).
- Don't fabricate gates. If a mistake has no clean mechanical gate, say so and route it to a checklist/HUMAN.md instead of inventing a brittle hook.
- Cross-project safe: hardcode nothing about a specific company/stack. Read the journal's own taxonomy.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [sfaustodev](https://github.com/sfaustodev)
- **Source:** [sfaustodev/discipline](https://github.com/sfaustodev/discipline)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-sfaustodev-discipline-diary-digest
- Seller: https://agentstack.voostack.com/s/sfaustodev
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
