Add 10 cognition-introspection patterns (204 -> 214)#5
Merged
Conversation
…pection 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).
# 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 10 new patterns to the
cognition-introspectionregion (now 19 patterns: 10 new + 9 migrated by d5ba975). Brings the catalog to 214 patterns across 14 categories.New patterns
open-question-tension-store— append-only ledger of unresolved pulls driving inquirycognitive-move-selector— idle-tick router over an agent-vetted menu of named cognitive movesparallel-voice-proposer— multi-voice candidates in one call, self-selected, losers loggedpre-generative-loop-gate— pre-tick divergence detection that injects a steering hint, not a vetomulti-axis-promotion-scoring— six-axis weighted gate for short-to-long memory tier promotioncluster-capped-insight-store— mechanical mtime-based dedup of insight files per stem-token clustermeditation-mode— runtime mode: external I/O paused, inner-only allowlist, bounded windowpartial-output-salvage— tmp+rename stream-to-disk plus typed recovery marker in next prompttyped-tool-loop-detector— dispatch-boundary veto with five typed failure modes and per-tool capsaffect-coupled-plan-lifecycle— bounded affect deltas on plan events plus age-bucketed stale-painSupporting changes
Test plan