feat(mentor): dismiss & decay Learnings (#27)
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
Dismissed patterns fade instead of haunting. Dismissing a Learning stamps decay state into its own frontmatter (dismissed date, dismiss_count, dismissed_at_pass — every other line preserved verbatim, hand-editable, git-diffable) and hides it from every pass: query_learnings serves only visible learnings. Resurfacing is an output clock, not a calendar — a per-type counter under <home>/learnings/pass-counts.json, ticked by every completed pass (cancels and refusals never advance, so never tick), returns the Learning after 10 subsequent passes of its content type; each re-dismiss doubles the interval (10→20→40…), and a per-Learning resurface_after frontmatter key overrides the base. Hand-edited decay state reads leniently: garbage means visible, absurd values clamp, a hand-edit can never trap the pane or the rail. The Learnings pane rows dismiss (no confirm — low-stakes, self-healing), dim while hidden with a resurfaces-in-N countdown, and foreign unclocked type dirs neither offer Dismiss nor show a verdict — their clock can never advance. Two review waves (two-axis implement review + three-reviewer finish-audit: security clean) produced five fixes, each pinned or noted in the session log. Closes #27
This commit is contained in:
1 parent
0e5c28ad95
commit
78c8844184
15 files changed
+911
-66
No files matched your search
@@ -601,6 +601,10 @@ nonisolated extension PostStore {
|
||||
let advanced = higherState(piece.passState, kind.doneState)
|
||||
try stamped(body: piece.body, passState: advanced, origin: piece.origin, type: piece.type)
|
||||
.write(to: piece.dir.appendingPathComponent("post.md"), atomically: true, encoding: .utf8)
|
||||
// The decay clock counts completed passes per content type (#27).
|
||||
// try?: a failed clock bump must never fail a completed pass, and
|
||||
// a lagging clock only delays resurfacing (safe direction).
|
||||
try? LearningDecay.recordPass(home: home, type: piece.type)
|
||||
return advanced
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user