Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 5.87 KB

AGENTS.md

File metadata and controls

23 lines (14 loc) · 5.87 KB

Agent Instructions

This is an implementation-stage project driven by top-level design documents and .ai/ project memory. Production code exists under apps/api/, packages/python-sdk/, packages/ts-sdk/, and packages/mcp-server/; do not invent unsupported requirements beyond the current plans.

Before non-trivial work, read:

  • .ai/PROJECT_BRIEF.md
  • .ai/MVP_SCOPE.md
  • .ai/ARCHITECTURE_SUMMARY.md
  • .ai/PROJECT_STATE.md

The MVP (P0+P1+P2) is complete. For what remains to be done (future work, deferred features, tech debt, open decisions), read docs/design/ROADMAP.md — it is the authoritative backlog and maps every item back to docs/design/architecture.md / docs/design/draft.md / .ai/ sources.

Context Compaction (ROADMAP §9) is complete through C5 per docs/design/CONTEXT_COMPACTION_PLAN.md: PackResult, budget-aware compacted_constraints + compaction_notice, durable ContextCompactionLog with observability/replay wiring, rule/LLM SummarizerProvider, config-gated rolling history summary, and retention-quality benchmark/report/replay sync. Failure-aware Negative Memory Injection is complete through I7 per docs/design/FAILURE_AWARE_NEGATIVE_MEMORY_PLAN.md and docs/design/I7_COMPACTION_NEGATIVE_RETENTION_PLAN.md: the gate supports three-way accept / degrade / reject; NegativeEvidence DTO + shared retrieval/negative_evidence.py builder + packer avoided_attempts are wired through controller/inspect/replay; observability exposes explicit negative-evidence metrics; benchmark includes case_10 safe failure learning + case_11 sanitized destructive failure with evaluator positive/negative block split. I7 compaction-negative retained facts is also complete: RetainedNegativeEvidence, to_retained_negative_evidence(...), dedicated compaction-log retained_negative_evidence, SQL JSONB migration/mapping, trace-bundle redaction, packer metadata retention for dropped avoided_attempts blocks, replay/metrics/reports/trace-bundle/dashboard surfacing, benchmark case_13_compaction_retains_negative_lesson, and acceptance variant_2_retains_negative_lesson_under_compaction are in place; current benchmark is 16 cases × 6 strategies = 96 rows and reproducibility acceptance is 16/16 (the original 13 deterministic cases plus LoCoMo/MemoryArena-style case_14_long_horizon_recall / case_15_temporal_knowledge_update / case_16_multi_hop_recall). Phase 3.5 SDK/LangGraph adapter/CLI is complete through S6 per docs/design/SDK_ADAPTER_PLAN.md: S1 event_source passthrough, S0 packaging/workspace skeleton, S2a in-process SDK backend, S2b HTTP backend + route/isomorphism, S3 LangGraph adapter, S4 examples, S5 CLI, and S6 README/project-memory finalization are done. ROADMAP §7 "完整 6 策略对比 + benchmark 落库" is complete through Task 11 per docs/design/SIX_STRATEGY_BENCHMARK_PLAN.md: six strategies, case_12_reflection_retention, eval-table persistence, persisted-run workspace isolation, dashboard summary surfacing, docs sync, and full reproducibility closeout. A full six-module code review (2026-06-13) fixed four security/consistency defects; ROADMAP §13 Security & Consistency Hardening is complete through H18, including H15 migration policy, H16 redacted trace bundle export/validation, H17 deterministic dogfood harnesses, and H18 docs/project-memory closeout. ROADMAP §10/§11 Provider Registry / Controlled Memory Key Ontology is complete through P10 per docs/design/PROVIDER_REGISTRY_KEY_ONTOLOGY_PLAN.md: provider registry/factory/DI, runtime/retrieval/replay embedding provider integration, retrieval-policy-v2 provider snapshots, benchmark deterministic registry isolation, controlled key ontology, writer/resolver/runtime ontology migration, LLM extraction normalization, final review hardening, and full regression/reproducibility closeout are done. Current status / selected plan: none in progress. The entire deferred/candidate ROADMAP backlog was implemented in the 2026-06-30 "finish-all-deferred" /loop (9 slices), all default-off / degrade-safe: §4 advanced retrieval (query-planner full mode, multi-hop iterative retrieval, optional ES/OpenSearch hybrid BM25, optional Neo4j provenance graph + neighbor expansion, multi-path RRF fusion + task_intent ranking_profiles, multi-store eventual consistency); §5 full node_type + subgoal auto-inference + MAGE Grow/Compress/Maintain/Revise planner (the §9 summary-node × lifecycle-decay coordination point); §3.4 full multi-tenant governance (JWT/OIDC bearer auth, workspace membership table + migration 0013, distributed scheduler lease, Celery beat, encrypted raw-payload store); §6 dedicated VS Code extension + scale-only Go trace collector / Rust profile analyzer. All gated off by default so benchmark/reproduce stay 16/16 and replay snapshots are unchanged. docs/design/ROADMAP.md §8 "明确不做" (multimodal/community-detection/MemGate-training/full-leaderboard/multi-agent-platform) intentionally remains out of scope. Dedicated IDE/Go/Rust components are thin over /v1 and excluded from default CI build; integrations never duplicate Python runtime semantics.

Before coding, also read .ai/REQUIREMENTS.md and confirm the current task is concrete enough to implement.

After meaningful work, update .ai/PROJECT_STATE.md with current state, changed files, and next recommended action. When you complete a docs/design/ROADMAP.md item or discover new future work, update docs/design/ROADMAP.md too.

Git workflow: commits should land on main. If you commit on a side branch (e.g. after branching off main to do the work), then once the commit is made, integrate it back onto main (fast-forward / rebase) and delete the side branch, so no stray branches remain. Do not push unless the user asks.

Keep AGENTS.md concise and stable. Do not put transient task state, task checklists, or session notes here; use .ai/PROJECT_STATE.md, .ai/OPEN_QUESTIONS.md, or task-specific notes instead.