End-to-end smoke testing of `init` and `adopt` (plan -> approve -> apply -> verify) via subprocess surfaced a real portability bug: on Windows, sys.stdout defaults to the console codepage rather than UTF-8 when not attached to a UTF-8 terminal, so machine YAML/JSON output containing non-ASCII characters (an em dash in generated skill/docstring text) could fail to decode for downstream consumers. repoctl now reconfigures stdout/stderr to UTF-8 unconditionally in main(), and the offending em dashes are replaced with ASCII hyphens so generated file content is unaffected either way. Verified via manual CLI smoke tests: full init and adopt flows (including baseline re-check, plan-hash approval, collision rejection on re-apply, and preservation of profiles-source/, profiles/ and legacy kdb.yaml) work end to end. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
20 lines
868 B
Markdown
20 lines
868 B
Markdown
---
|
|
name: repo-handoff
|
|
description: Produce a minimal, intent-scoped context handoff for a repository using repoctl context. Use when another agent, session or teammate needs just enough context to work on one task in a repository.
|
|
---
|
|
|
|
# repo-handoff
|
|
|
|
Thin wrapper around `repoctl context`. Do not read the full repository or the full KDB
|
|
by hand when this skill applies - let `repoctl` perform the selection.
|
|
|
|
## Procedure
|
|
|
|
1. Turn the user's request into an `intent` id (e.g. `container.deploy`,
|
|
`repository.adopt`), not a literal command.
|
|
2. Run `repoctl context --repo <name-or-path> --intent <intent> --output json`.
|
|
3. If the bundle looks incomplete, retry with `--include-related` or `--materialize`
|
|
and an explicit `--budget-bytes`.
|
|
4. Hand the resulting `ContextBundle` (and any `warnings`) to the requester instead of
|
|
pasting raw repository files.
|