Skip to content

GitHub issue content ingestion into planning substrate invariant graph (in-59) #417

@mikemol

Description

@mikemol

Summary

GitHub issue content (body, comments, open/closed state) is not currently ingested
into the planning substrate. The only GH API touchpoint is sppf_sync_core.py,
which pushes outbound (commit trailers → issue comments/labels) and reads issue
state live for lifecycle validation only. No persistent local mirror exists.

The invariant graph has no github_issue node type. sppf_status_audit.py
cannot see whether a checklist item's GH issue is open or closed. The
project-manager view cannot surface issue-level acceptance criteria or discussion
context. In context-compacted LLM sessions, planning context in GH discussions
is invisible.

Scope

  • New scripts/github/issue_snapshot.py — fetches gh issue list --json +
    per-issue comments, writes out/github_issues_snapshot.json
  • github_issue ingress adapter in src/gabion/tooling/policy_substrate/invariant_graph.py
  • Optional --gh-snapshot axis in scripts/sppf/sppf_status_audit.py (warnings only)
  • CI step to generate snapshot before invariant graph build (continue-on-error: true)
  • in/in-59.md — inbox planning document anchoring this work in the governance graph

Acceptance Criteria

  • out/github_issues_snapshot.json produced by issue_snapshot.py contains
    body and comments fields for each issue
  • artifacts/out/invariant_graph.json includes github_issue nodes when snapshot
    is present; builds cleanly without snapshot (graceful degradation)
  • sppf_status_audit.py --gh-snapshot runs without hard failures; emits warnings
    for open/closed state drift against checklist state
  • CI snapshot step uses continue-on-error: true to avoid blocking on GH API outage

Out of scope

  • Write-back (updating GH issue body from registry declarations)
  • Milestone/project board ingestion
  • Replacing sppf_checklist.md with invariant-graph equivalents

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions