算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
context-infrastructure【设计与创意】Design, audit, or improve durable context and memory systems for AI agents using layered observations, reflection, conservative promotion, progressive disclosure, and replayable boundary artifacts. Use when building long-running agent memory, deciding what belongs in sessions versus rules or skills, preventing context bloat, or turning repeated corre…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Treat context as a compounding system, not a giant prompt. Route, filter, test, and promote experience so future agents receive the smallest useful context.
This AX adaptation is inspired by the public
grapeot/context-infrastructure
reference implementation and the Observer/Reflector pattern described by
Mastra Observational Memory.
Reuse the architecture, not another person's accumulated axioms, preferences,
or private data.
| Layer | Purpose | Typical contents |
|---|---|---|
| L0 Session | Execute the current task | Prompt, active diff, command output, current plan |
| L1 Observations | Preserve selected raw signals | User corrections, repeated friction, notable failures, explicit preferences |
| L2 Reflection | Distill and discard | Deduplicated patterns, contradictions, counterexamples, promotion proposals |
| L3 Durable assets | Change future behavior | Axioms, reusable skills, global methodology, technical knowledge, project memory |
Do not skip layers. Keep a new signal in L1 until reflection shows that it is repeated, stable, useful outside the original task, and routed to the right scope.
Make the Observer append concise evidence. Make the Reflector merge, discard, or propose promotion.
This split prevents one intense session from rewriting long-term behavior.
| Repeated signal | Durable target |
|---|---|
| Stable personal preference | Personal axiom or preference profile |
| Repeated cross-project workflow | Reusable skill |
| Global operating methodology | Focused rule or policy |
| Reusable technical lesson | Knowledge entry |
| Project-specific decision or constraint | Project memory or source-of-truth documentation |
| One-off task fact | Keep ephemeral or discard |
Promote only claims that change future decisions. Preserve dissent and edge conditions; a rule without boundaries is usually too broad.
Do not add another agent when a fixed-contract parser, index, or API call can route the context deterministically.
For every context-producing workflow, define:
Store AI-facing inputs and AI-produced intermediate outputs when they affect visible or durable behavior. Debug bad output by inspecting freshness, timestamps, filters, ordering, and fallbacks before changing the model or prompt.
Test the parts that future agents rely on:
Minimize collection. Do not inspect private stores, upload records, or broaden retention without authorization. Redact secrets before an observation becomes a shared or durable artifact.
Return a compact system design or audit containing:
Complete only when a new observation can be traced from source to consumption without silent promotion or an uninspectable context jump.