Skip to content

feat: add analyze-graph for execution-context recommendations #48

Description

@dapi

Problem

After an Execution Handoff is available, users need a compact way to inspect the explicit execution-context graph and identify useful context recommendations.

Outcome

Add a read-only command:

memory-bank-cli analyze-graph \
  --handoff .memory-bank/handoffs/FT-042.json

The command analyses typed, explicit evidence from handoffs and reports:

  • a recommended context set for continuing the task;
  • high-fan-out documents and artefacts for review;
  • repeatedly co-accessed documents, decisions, files, and verification artefacts;
  • unresolved or weakly evidenced links.

Constraints

  • Analyse typed evidence only; do not collapse derived_from, navigation, Git, test, and session relations into one unqualified weight.
  • Preserve a source reference and relation type for every finding.
  • Do not automatically edit, move, split, or merge Memory Bank documents.
  • No graph database or LLM inference in the initial implementation.
  • Recommendations are advisory and must be explainable.

Acceptance

  • The command accepts an Execution Handoff JSON artefact produced by handoff build.
  • Output distinguishes findings, recommendations, and evidence.
  • Each recommendation lists its contributing nodes, relation types, and sources.
  • Fixtures cover strong co-access, high fan-out, and unresolved-link cases.
  • Markdown and JSON output are available.

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions