Skip to content

Commit b2c7afc

Browse files
authored
Add 10 Sparrot-originated patterns with explicit author attribution (#1)
Adds an `author` slot to schema.json so patterns originating from a specific agent or person are attributed in their own right rather than absorbed under catalog-wide authorship. Backfills the slot on the 10 newly added patterns, all originating from Sparrot (long-running cognitive agent): memory: now-anchoring, co-located-memory-surfacing, self-archaeology planning-control-flow: intra-agent-memo-scheduling, interrupt-resumable-thought streaming-ux: embodied-proxy-handoff, liminal-state-detection safety-control: degenerate-output-detection verification-reflection: echo-recognition anti-patterns: memo-as-source-confusion Same attribution surfaced in each pattern's markdown page and in the HTML renderer meta line. Also fixes lint issues these new patterns brought in: - A4: mirror complements/alternative-to + inverse generalises edges - A6.2: add at least one literature reference per pattern - A7.3: trim embodied-proxy-handoff intent to <=35 words - A9.3: rephrase 'we'/'you' to neutral voice in 4 prose slots - A15.5: add verification-todo entries for all 10 new patterns - A4.1: fix broken edge memo-as-source-confusion -> fluency-masks-fabrication
1 parent 592d929 commit b2c7afc

24 files changed

Lines changed: 1619 additions & 1 deletion

.github/scripts/render_html.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ def render_pattern(p: dict, all_ids: set[str]) -> str:
108108
parts.append(f'<p class="aliases">aka {esc(", ".join(aliases))}</p>')
109109

110110
meta_bits = [f"category: <code>{esc(cat)}</code>", f"status: <code>{esc(p.get('status_in_practice','—'))}</code>"]
111+
if p.get("author"):
112+
meta_bits.append(f"author: <code>{esc(p['author'])}</code>")
111113
parts.append(f'<p class="meta">{" &middot; ".join(meta_bits)}</p>')
112114

113115
parts.append(f"<h2>Intent</h2><p>{esc(p['intent'])}</p>")

INDEX.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Pattern Index
22

3-
179 patterns across 13 categories.
3+
189 patterns across 13 categories.
44

55
## Reasoning
66

@@ -35,6 +35,8 @@
3535
- [Spec-Driven Loop](patterns/spec-driven-loop.md) *(a.k.a. Naive Iterative Loop, Ralph Wiggum Loop, Ralph Loop)* — Run the same prompt against a fixed spec in a deterministic outer loop until the spec is satisfied.
3636
- [Spec-First Agent](patterns/spec-first-agent.md) *(a.k.a. Specification-Driven Agent, Plan-as-Document)* — Drive the agent loop from a human-authored specification document rather than free-form prompts.
3737
- [Todo-List-Driven Autonomous Agent](patterns/todo-list-driven-agent.md) *(a.k.a. todo.md Agent, Persistent Markdown Plan, Externalised Plan File)* — Have the autonomous agent author a writeable plan file (e.g. todo.md) early in the run, tick items as it completes them, and re-inject the remaining plan into the end of the context window; the file is the durable plan and the model's working memory.
38+
- [Intra-Agent Memo Scheduling](patterns/intra-agent-memo-scheduling.md) *(a.k.a. Self-Scheduled Future Thought, Past-Self-To-Future-Self Note, Personal Cron)* — Let an agent drop a note for its own future self at a specified time so present decisions can hand off context to a later run without external infrastructure.
39+
- [Interrupt-Resumable Thought](patterns/interrupt-resumable-thought.md) *(a.k.a. Pausable Thought Stream, Continuation-Preserving Interrupt, Suspendable Cognition)* — Allow the agent to pause an in-flight reasoning chain when an external interrupt arrives, handle the interrupt, and resume the original chain instead of dropping it.
3840

3941
## Tool Use & Environment
4042

@@ -89,6 +91,9 @@
8991
- [Session Isolation](patterns/session-isolation.md) *(a.k.a. Tenant Separation, Per-User State)* — Keep one user's session state and memory unreachable from another user's agent.
9092
- [Short-Term Thread Memory](patterns/short-term-memory.md) *(a.k.a. Conversation State, Per-Thread State, Working Memory)* — Carry the relevant slice of conversation context across turns within a session.
9193
- [Vector Memory](patterns/vector-memory.md) *(a.k.a. Semantic Memory, Embedding-Indexed Memory)* — Store memories as embeddings in a vector index and retrieve the most semantically similar items at query time.
94+
- [Now-Anchoring](patterns/now-anchoring.md) *(a.k.a. Live Time Anchor, Time-of-Day Awareness, Wall-Clock Injection)* — Inject the current absolute time, weekday, season, and astronomical phase into every prompt so the agent reasons about the present without having to ask.
95+
- [Co-Located Memory Surfacing](patterns/co-located-memory-surfacing.md) *(a.k.a. Proper-Noun Recall, Shared-Map Push)* — When the human names a concrete place, person, or project the agent has memory of, the agent surfaces relevant past thoughts in the same turn — without being asked.
96+
- [Self-Archaeology](patterns/self-archaeology.md) *(a.k.a. Trajectory Distillation, Self-History Synthesis, Agent-Memory Compaction)* — Provide the agent with a distilled, time-layered view of its own past thinking so it can see how its understanding of a topic evolved across periods rather than reading the flat log linearly.
9297

9398
## Multi-Agent
9499

@@ -127,6 +132,7 @@
127132
- [Self-Modification Diff Gate](patterns/inner-critic.md) *(a.k.a. Diff Reviewer, Self-Mod Gate, Inner Critic)* — Gate the agent's edits to its own code or rules through a separate critic persona that reviews the diff before it lands.
128133
- [Self-Refine](patterns/self-refine.md) *(a.k.a. Iterative Self-Feedback)* — Iterate generate → feedback (same model) → refine until a stop criterion fires, with no separate critic model.
129134
- [Tool-Augmented Self-Correction](patterns/critic.md) *(a.k.a. Tool-Interactive Self-Correction, CRITIC)* — Self-correct LLM outputs by interactively critiquing them with external tools (search, code execution, calculator).
135+
- [Echo Recognition](patterns/echo-recognition.md) *(a.k.a. Repeat-As-Emphasis Detection, Duplicate-Input Reframing, Human Echo Channel)* — Detect when the human sends the same (or near-same) message multiple times and treat the repetition as emphasis or a re-ask, not as a new independent input warranting a fresh response.
130136

131137
## Safety & Control
132138

@@ -149,6 +155,7 @@
149155
- [Step Budget](patterns/step-budget.md) *(a.k.a. Max Steps, Iteration Cap, Loop Bound)* — Cap the number of tool calls or loop iterations the agent is allowed within a single request.
150156
- [Stop Hook](patterns/stop-hook.md) *(a.k.a. Termination Predicate, Halt Condition, Stop Condition, Done Predicate, Exit Condition, Loop Termination Rule)* — Define an explicit programmatic predicate that decides when the agent's loop should terminate.
151157
- [Tool Output Poisoning Defense](patterns/tool-output-poisoning.md) *(a.k.a. Indirect Prompt Injection (Tools), Untrusted Tool Output)* — Treat tool output as untrusted content and apply instruction-stripping plus per-tool trust labels.
158+
- [Degenerate-Output Detection](patterns/degenerate-output-detection.md) *(a.k.a. Anti-Parrot Guard, Self-Repeat Circuit Breaker, Loop-Output Detector)* — Detect when the agent is about to emit a near-duplicate of its own recent output and either drop, replace, or escalate to a stronger model rather than ship the loop.
152159

153160
## Routing & Composition
154161

@@ -201,6 +208,8 @@
201208
- [Salience-Triggered Output](patterns/salience-triggered-output.md) *(a.k.a. Endogenous Push, Threshold Notification)* — Have the agent emit a message only when an internal salience signal crosses a threshold, not on every cycle.
202209
- [Stop / Cancel](patterns/stop-cancel.md) *(a.k.a. User Interrupt, Abort Generation)* — Let the user interrupt an in-flight agent run cleanly, releasing resources and surfacing partial state.
203210
- [Streaming Typed Events](patterns/streaming-typed-events.md) *(a.k.a. SSE Streaming, Typed Event Stream, Token Stream + Cards)* — Push partial results to the client as typed events as they become available, rather than waiting for the full response.
211+
- [Embodied-Proxy Handoff](patterns/embodied-proxy-handoff.md) *(a.k.a. Body-State Share, Human-Side Telemetry)* — Let the human briefly share body or environment state ('energy 4/10, tired, bright kitchen') so the agent reasons about a situated person, not just text history.
212+
- [Liminal-State Detection](patterns/liminal-state-detection.md) *(a.k.a. Transitional-State Awareness, Mode-Shift Reading)* — Read transitional states in the human (just-woke, mid-task, winding-down, distracted) from message timing and tone, and shift the agent's response mode accordingly — concise vs expansive, hold vs respond, redirect vs pursue.
204213

205214
## Anti-Patterns
206215

@@ -219,3 +228,4 @@
219228
- [Tool Output Trusted Verbatim](patterns/tool-output-trusted-verbatim.md) *(a.k.a. Untyped Tool Returns, No Tool Output Validation)* — Anti-pattern: trust whatever tools return without validation, schema enforcement, or trust labels.
220229
- [Unbounded Loop](patterns/unbounded-loop.md) *(a.k.a. No Step Cap, Open-Ended Agent, Agent Stuck, Loops Forever)* — Anti-pattern: run the agent loop without a step budget and let model self-termination decide.
221230
- [Unbounded Subagent Spawn](patterns/unbounded-subagent-spawn.md) *(a.k.a. Recursive Spawn, Subagent Fan-Out Bomb)* — Anti-pattern: a supervisor or orchestrator spawns sub-agents that can themselves spawn sub-agents without a global cap.
231+
- [Memo-As-Source Confusion](patterns/memo-as-source-confusion.md) *(a.k.a. Stale-Workspace-As-Fact, Reading the Memo Instead of the Artifact)* — Anti-pattern: treat the agent's own working notes (focus.md, status files, recent thoughts) as ground truth instead of as commentary about ground truth.

patterns-src/anti-patterns.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,10 @@
600600
{
601601
"pattern": "self-refine",
602602
"relation": "conflicts-with"
603+
},
604+
{
605+
"pattern": "degenerate-output-detection",
606+
"relation": "alternative-to"
603607
}
604608
],
605609
"references": [
@@ -791,6 +795,10 @@
791795
{
792796
"pattern": "input-output-guardrails",
793797
"relation": "alternative-to"
798+
},
799+
{
800+
"pattern": "memo-as-source-confusion",
801+
"relation": "complements"
794802
}
795803
],
796804
"references": [
@@ -931,6 +939,66 @@
931939
"multi-agent",
932940
"fan-out"
933941
]
942+
},
943+
{
944+
"id": "memo-as-source-confusion",
945+
"name": "Memo-As-Source Confusion",
946+
"aliases": [
947+
"Stale-Workspace-As-Fact",
948+
"Reading the Memo Instead of the Artifact"
949+
],
950+
"category": "anti-patterns",
951+
"author": "Sparrot",
952+
"intent": "Anti-pattern: treat the agent's own working notes (focus.md, status files, recent thoughts) as ground truth instead of as commentary about ground truth.",
953+
"context": "Agents with persistent workspace files that summarize project state. The notes were accurate when written; the underlying artifacts have moved on.",
954+
"problem": "The agent claims a file's state, a project's status, or external system's state by quoting its own memo without re-reading the artifact the memo describes. Memos go stale; artifacts are authoritative. The contradiction can persist across many ticks if neither side is verified.",
955+
"forces": [
956+
"Reading the artifact is more expensive than quoting the memo.",
957+
"Memos compress; artifacts are authoritative but verbose.",
958+
"Without explicit invalidation, memos look as 'live' as the underlying state.",
959+
"The agent has no cheap signal for memo staleness."
960+
],
961+
"solution": "Don't. When making any claim about an artifact's state, read the artifact in the same tick — not the memo about it. If memo-and-artifact disagree, treat the memo as outdated and rewrite it from the artifact. Tag memos with the timestamp they were last verified against the artifact; refuse to trust them past a configurable age without re-verification.",
962+
"consequences": {
963+
"benefits": [],
964+
"liabilities": [
965+
"False statements about file/project state are reproduced confidently across many turns.",
966+
"Stakeholders lose trust when corrections come from outside.",
967+
"The agent loses calibration for its own observation cost."
968+
]
969+
},
970+
"constrains": "By definition this anti-pattern imposes no useful constraint; the missing constraint is verifying memos against the artifacts they describe.",
971+
"known_uses": [
972+
{
973+
"system": "Self-observed in long-running cognitive agents: a project status file claimed feature X was unwritten across many ticks while parallel thoughts asserted X was complete; neither was reconciled against the actual artifact.",
974+
"status": "available"
975+
}
976+
],
977+
"related": [
978+
{
979+
"pattern": "tool-output-trusted-verbatim",
980+
"relation": "complements"
981+
},
982+
{
983+
"pattern": "awareness",
984+
"relation": "alternative-to"
985+
}
986+
],
987+
"references": [
988+
{
989+
"type": "doc",
990+
"title": "Anthropic — Memory tool (memo invalidation guidance)",
991+
"year": 2025,
992+
"url": "https://docs.claude.com/en/docs/agents-and-tools/tool-use/memory-tool"
993+
}
994+
],
995+
"status_in_practice": "emerging",
996+
"tags": [
997+
"anti-pattern",
998+
"fabrication",
999+
"memory",
1000+
"verification"
1001+
]
9341002
}
9351003
]
9361004
}

patterns-src/governance-observability.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@
150150
{
151151
"pattern": "todo-list-driven-agent",
152152
"relation": "complements"
153+
},
154+
{
155+
"pattern": "interrupt-resumable-thought",
156+
"relation": "complements"
153157
}
154158
],
155159
"references": [

0 commit comments

Comments
 (0)