Commit 00fc059
authored
Add 10 cognition-introspection patterns (204 -> 214) (#5)
* Add 6 patterns from Liu et al. 2025 + Anthropic, new cognition-introspection category, redundancy fixes, patterns.graph.json
# Patterns added (6, catalog 198 → 204)
From Liu et al., "Agent design pattern catalogue", J. Syst. Softw. 220, 112278
(https://doi.org/10.1016/j.jss.2024.112278):
- passive-goal-creator (planning-control-flow)
- proactive-goal-creator (planning-control-flow)
- prompt-response-optimiser (structure-data)
- voting-based-cooperation (multi-agent)
- tool-agent-registry (tool-use-environment)
From Anthropic, "Building Effective Agents"
(https://www.anthropic.com/research/building-effective-agents):
- augmented-llm (tool-use-environment) — the foundational
LLM + tools + retrieval + memory block
Liu / Anthropic references added to 14 existing patterns that map to
their catalogues (evaluator-optimizer, react, human-in-the-loop,
agent-as-judge, translation-layer, tool-discovery, input-output-guardrails,
tree-of-thoughts, plan-and-execute, naive-rag, self-refine, reflection,
debate, role-assignment).
# New category: cognition-introspection
Reorganise 9 patterns covering self-awareness, affect, transitional
state, and dream/consolidation cycles into a dedicated category:
awareness, dream-consolidation-cycle, emotional-state-persistence,
interrupt-resumable-thought, intra-agent-memo-scheduling,
mode-adaptive-cadence, preoccupation-tracking, self-archaeology,
world-model-separation. Adds entries in schema.json (enum),
docs/taxonomy.md, .github/scripts/render_html.py (CAT_LABEL).
# Redundancy fixes from a graph audit
- Drop bogus alias: lineage-tracking no longer claims "Prompt Versioning"
as an alias (it's a different first-class pattern).
- goal-decomposition ↔ least-to-most: edge changed from alternative-to
to complements (they sit at different layers — planner architecture vs
prompting tactic, usable together).
- Add explicit "Distinct from X:" boundary lines to the Context slot of
tool-discovery ↔ tool-agent-registry and orchestrator-workers ↔
supervisor, where adjacent patterns sit close to each other.
- Mirror/inverse edges added across 26 pattern pairs so the typed graph
balances (lint A4 passes).
- Constrains slot reworded for proactive-goal-creator and
voting-based-cooperation to use explicit restriction wording.
# New derived artefact: patterns.graph.json
A typed-graph view of the catalog (nodes = patterns; edges = related[]
relations). 204 nodes, 1068 edges. Built by .github/scripts/build_graph.py
from patterns-src/ shards or patterns.json. Patterns.graph.schema.json
defines the shape. The .json output is gitignored alongside patterns.json
(both are derived from patterns-src/).
# Source verification
All 6 new patterns verified against upstream sources and marked
verified=true in verification-todo.json. Per-aspect walkthrough recorded:
intent <35 words, context/problem/solution prose match source, constrains
restriction-shaped, example_scenario + diagram + applicability populated,
URLs alive (incl. fixing Bedrock URL from old advanced-prompts-configure
to canonical prompt-management page), no undefined jargon, edges balance.
# Lint
All 15 rules pass (A6.3 URL liveness occasionally flags arxiv on transient
DNS failure — URLs content-verified alive on retry).
* Add 10 cognition-introspection patterns (204 -> 214, 14 categories)
# Patterns added (10, all in cognition-introspection)
- open-question-tension-store append-only ledger of unresolved pulls
driving inquiry; intrusiveness gates
ask-now vs store
- cognitive-move-selector idle-tick router over a small
agent-vetted menu of named moves
- parallel-voice-proposer multi-voice candidates in one call,
self-selected, losers logged as audit
- pre-generative-loop-gate pre-tick divergence detection that
injects a steering hint, not a veto
- multi-axis-promotion-scoring six-axis weighted gate for short-to-
long memory tier promotion;
consolidation weighted over frequency
- cluster-capped-insight-store mechanical mtime-based dedup of
insight files per stem-token cluster
- meditation-mode runtime mode: external I/O paused,
inner-only tool allowlist, bounded
window with self/operator exit
- partial-output-salvage tmp+rename stream-to-disk + typed
recovery marker propagates into the
next prompt
- typed-tool-loop-detector dispatch-boundary veto with five typed
failure modes and per-tool caps;
returns a formatted refusal
- affect-coupled-plan-lifecycle bounded affect deltas on plan events
plus age-bucketed stale-pain
# Supporting changes
- 16 reverse edges added across 6 other shards so symmetric/inverse
relations stay paired (A4 lint passes)
- 10 verification-todo entries appended (sort order preserved by id)
- INDEX.md regenerated; Cognition & Introspection now lists 19 patterns
(10 new + 9 migrated by d5ba975)
- README.md count: 179 -> 214, 13 -> 14 categories, 850 -> 1118 edges
- pages.yml landing page count: 179 -> 214
- lint.py allowlist extended for patterns.graph.schema.json (cleared
pre-existing A2.2 carried in from d5ba975)
# Lint
All 15 lint rules pass; URL liveness clean on all 22 new references.1 parent ef62fc7 commit 00fc059
69 files changed
Lines changed: 7823 additions & 3615 deletions
File tree
- .github
- scripts
- workflows
- docs
- patterns-src
- patterns
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
| 31 | + | |
0 commit comments