Skip to content

Implement FR-CTX-01..05 knowledge-grounded context digest #368

Description

@linhdmn

PRD §20.1 states it directly: "KG context digest specified (FR-CTX-01..05) but not yet implemented." It is the last unstruck Phase 4 sub-bullet (§17 line 641) and the largest specced feature left.

Spec: two-layer digest at COMPACT_CONTEXT_MARKER — (1) always-on local markdown baseline (.devagent/context/*.md, zero dependencies, commitable); (2) opt-in LeanKG layer (Postgres-backed KG MCP) with retrieval/freshness provenance stamps, degradation handled inside LeanKG's tool ladder, ratchet-capped at the lessonsMaxChars budget. Q28 is already resolved (freshness-gated KG evidence → lessons).

Current state: the only consumer of context.kg/context.agentsMd config is internal/pipeline/implstage.go:125-146; the skill://leankg-routing routing skill "is not materialized — create the skill at implementation time" (PRD §19). Q28's Go counterpart for captureKgEvidence/recordMergedKgEvidence needs porting alongside.

Done when: FR-CTX-01..05 each have a Go implementation + test, the markdown baseline works with zero LeanKG attached, and the §17 Phase 4 line + §20.1 note are struck.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:P2Backlog — later iterations

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions