Skip to content

Implement scripts/issue-context.sh — per-issue focused context #22

@infraax

Description

@infraax

Task: Issue Context Script

Parent epic: #13 (Infrastructure)

What to do

Create scripts/issue-context.sh N — given a GitHub issue number, output everything an agent needs to work on it: issue body, related files, relevant recent commits, dependencies.

Usage

./scripts/issue-context.sh 16    # ConnectionManager task
./scripts/issue-context.sh 9     # Mind Loop epic

Output format

=== ISSUE #16 — Implement ConnectionManager ===
Type: task | Size: s | Cap: go | Status: ready
Parent: #4 (M1 — Robot Connection)
Depends on: #14 ✓ (done), #15 ✓ (done)

ISSUE BODY:
[full issue body]

RELATED FILES (grep for relevant symbols):
  internal/brain/registry.go      — BrainRegistry (context for this task)
  internal/config/config.go:41    — RobotConfig (ESN + IP source)
  pkg/api/types.go:28             — RobotState (state struct to populate)

RECENT COMMITS TOUCHING THESE FILES:
  (none yet — new files)

RELEVANT MACHINA_ANIMA EXCERPT:
  [extracted section on connection management / RESERVE_BEHAVIORS]

TESTS TO RUN AFTER:
  GOMODCACHE=.gomodcache go test ./internal/brain/...
  make build

Implementation notes

  • Uses GITHUB_TOKEN for issue fetch + dependency resolution
  • Uses git grep to find files containing symbols mentioned in the issue title
  • Extracts relevant MACHINA_ANIMA section by keyword matching
  • Fast: under 3 seconds

Definition of done

./scripts/issue-context.sh 16 outputs a complete, focused brief for the ConnectionManager task with related file paths and dependency status.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions