GitNexus/.claude/skills/gitnexus-plan/references/context-pack.md
Gergo Magyar 830a045911 perf(skills): cost-optimize the workflow from measured ground base
Every optimization targets a measured fixed-cost component
(eval/workflow_bench ground base: workflow arm −211% to −333% vs baseline,
all tasks resolved):

- Plan form is category-priced: compact form (core sections w/ § anchors
  preserved, ≤80 lines excl. pack, mini-pack subset of the context pack)
  for narrow/default categories; the full 13 sections only for deep work
  (refactor/security/performance/concurrency/architecture). A compact plan
  outgrowing its cap reclassifies to full rather than overflowing.
- Freshness gate is category-priced: compact categories default to accept
  (source-weighted, refresh only when a graph claim becomes load-bearing);
  strict stays the default for full-plan categories — the rebuild+re-index
  was the largest single fixed cost.
- Turn economy: per-category tool-call budgets (~10 to ~45; architecture
  uncapped); budget exhaustion routes open questions to §12 instead of
  more digging.
- gitnexus-work fast path: HEAD == evidence pin → skip all citation
  re-reading (the pin's entire point); mini-pack fields tolerated.
- lfg Lane 1 boundary triage: tasks below the measured ~35-turn boundary
  get offered gitnexus-work direct mode before the plan lane is spent.

Copies re-synced (npm skills/, plugin, ~/.agents); steering + sync guards
green. Re-measurement of the workflow arm follows to verify the numbers
actually improve.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 10:22:20 +00:00

2.8 KiB

Implementation context pack

Section 11 of the plan. The stable, machine-readable contract a follow-up implementation agent (gitnexus-work, or any executor) consumes to start work without repeating the investigation. Distilled from the ledger; every entry traceable to verified evidence.

Compact plans emit the mini-pack — only: task_summary, files_to_modify, tests, verification_commands, pdg_constraints (only when a slice actually ran), assumptions, open_questions, avoid. Full plans emit every field. Field semantics are identical in both; gitnexus-work treats absent optional fields as empty, not as errors.

Schema

implementation_context:
  task_summary: ""
  acceptance_criteria: []

  primary_symbols:
    - symbol: ""
      file: ""
      lines: ""
      role: ""

  related_symbols:
    - symbol: ""
      relationship: ""           # CALLS / IMPORTS / EXTENDS / test-of / ...
      relevance: ""

  execution_path: []             # ordered prose steps, from §2/§5

  pdg_constraints:               # from the PDG slice; empty + note if no layer
    - description: ""
      affected_statements: []    # "<file>:<line>" refs
      implementation_consequence: ""

  architectural_patterns:
    - pattern: ""
      example_location: ""       # repo-relative file (+ symbol)
      usage_guidance: ""

  files_to_modify:
    - file: ""
      symbols: []
      intended_change: ""

  tests:
    - file: ""                   # existing file to update, or new path to create
      scenarios: []              # input → action → expected outcome

  verification_commands: []      # real commands verified to exist AND be runnable —
                                 # prefer npm/CI scripts that carry their pre-hooks

  risks: []
  assumptions: []                # faithful condensation of plan §12 assumptions;
                                 # each entry names WHAT to check and HOW —
                                 # gitnexus-work re-verifies them before executing
  open_questions: []             # faithful condensation of plan §12 open questions

  avoid:
    - "Do not repeat full repository discovery"
    - "Do not replace established patterns without evidence"
    # + task-specific prohibitions discovered during planning

Must not contain

  • full files;
  • large raw GitNexus responses;
  • unfiltered PDG dumps;
  • duplicate code excerpts (cite file:line, don't re-quote);
  • speculative implementation details presented as facts.

Stability contract

Field names above are the interface consumed by gitnexus-work (fields it does not act on directly travel as executor context). Add fields freely; do not rename or repurpose existing ones. assumptions and avoid are load-bearing: an executor treats assumptions as things to re-verify cheaply before relying on them, and avoid as hard constraints.