Skip to content

Add agent handoff report bundle for issue-backed work #1562

Description

@codeforester

Goal

Add a local report bundle that packages the Base context an implementer or coding agent needs before starting issue-backed work.

Background

Base already has .ai-context, basectl export-context, basectl history --report, logs, check/doctor JSON, and GitHub issue/worktree helpers. These are useful individually, but agentic coding benefits from a single handoff artifact that says: what issue is being worked, what repo/workspace context applies, what validation commands are expected, what the recent local state says, and where the canonical instructions live.

Scope

  • Add a command such as basectl report --agent-handoff or a narrower basectl gh issue handoff <number> if that better fits existing command ownership.
  • Include links or embedded summaries for AGENTS.md, .ai-context/INDEX.md, exported context files, recent history report, check/doctor status, and issue metadata when available.
  • Support a deterministic Markdown output path and an optional JSON descriptor if useful for automation.
  • Redact or omit secrets, tokens, private env values, and excessive command output.
  • Keep the artifact local by default; provider upload remains separate and covered by existing provider-adapter evaluation work.

Acceptance Criteria

  • The command can produce a handoff Markdown report for the current Base repository and a specified issue number or local-only task label.
  • The report lists canonical instructions, current branch/worktree state, issue metadata if supplied, validation guidance, and available context exports.
  • The command fails closed or warns clearly when GitHub metadata cannot be fetched.
  • Output is deterministic enough for tests after replacing timestamps or paths with fixtures.
  • Documentation explains that the report is local and provider-neutral.

Validation

  • Focused tests for report construction and redaction behavior.
  • GitHub metadata failure fixture if the command reads issues.
  • git diff --check.

Non-Goals

  • Do not upload context to ChatGPT, Claude, Copilot, or another provider.
  • Do not start an agent session.
  • Do not include secrets, tokens, full logs by default, or private local notes.
  • Do not replace basectl export-context or basectl history --report; compose them where appropriate.

Project Fields

  • Priority: P2
  • Status: Backlog
  • Size: M
  • Area: CLI
  • Initiative: Adoption Polish

Agent Assignment

Human first. This issue crosses several existing context/report surfaces and should get a narrow design decision before implementation.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or product improvement

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Backlog

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions