docs: plan workspace agent context#613
Conversation
Workspace-launched agents currently infer source context from branch names, paths, repo instructions, and UI metadata rather than from a generated local instruction file. Kata-backed workspaces need a more explicit path because their task identity is not a provider issue or pull request number. This plan records the current behavior and lays out a source-aware generated context design that can support PRs, provider issues, and Kata tasks without overwriting checked-in agent guidance. Validation: rg placeholder scan for the new plan. Generated with Codex Co-authored-by: Codex <codex@openai.com>
Workspace agent launches currently rely on ambient worktree and repo context rather than generated local instruction files. That was easy to assume incorrectly while planning Kata task support, so the workspace context now records the current boundary and points to the follow-up plan. Validation: scripts/context-sync --check; verified documented anchors with rg. Generated with Codex Co-authored-by: Codex <codex@openai.com>
Generating Claude-specific context only when the user launches Claude keeps workspace setup quiet and avoids creating files for unused agents. The plan now separates canonical workspace context from target-specific files and records the guardrail that repo-owned CLAUDE.md or AGENTS.md must never be overwritten. Validation: rg placeholder scan for the updated plan. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
Agent context generation needs to reflect workspace state at the moment an agent is launched, not just the state from workspace setup. The plan now requires regenerating context on every launcher-menu agent start and includes the issue-backed workspace case where an associated PR appears later. Validation: rg placeholder scan for the updated plan. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
Generated workspace guidance should orient the launched agent to the known source item without prescribing a provider-specific fetch workflow. The plan now makes that boundary explicit and adds an acceptance test for concise forge identity, URLs, and absence of CLI/API instructions. Validation: rg placeholder scan for the updated plan. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
Generated guidance files should never appear as untracked workspace noise or accidentally get committed with task work. The plan now requires middleman to verify generated context paths are ignored before writing them, append a narrow .gitignore block when needed, and avoid generated root instruction files that cannot be safely ignored. Validation: rg placeholder scan for the updated plan. Generated with Codex Co-authored-by: Codex <codex@openai.com>
Root-level .local.md files may be created by users, hooks, or other tools before middleman launches an agent. The plan now treats any existing AGENTS.local.md or CLAUDE.local.md as user-owned for this purpose: skip the companion file entirely, keep refreshing only the canonical .middleman context, and avoid warnings or ignore-rule edits for files middleman did not create. Validation: rg placeholder scan for the updated plan. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
|
If we don't add the gitignore changes it will be WORSE |
Workspace setup now writes an ignored canonical context file, and agent launches refresh it while preserving repo-owned and user-owned instruction files. The context model carries source item identity for PRs, provider issues, and Kata tasks without adding API surface.
roborev: Combined Review (
|
Workspace agents currently infer PR and issue context from branch names, paths, repo instructions, and UI state. That works surprisingly well for provider-backed items, but Kata task workspaces need an explicit source-aware context path because their task identity is not a provider issue or pull request number.
This draft captures the proposed generated-context design, including a canonical workspace context file, launch-scoped agent-specific files, and guardrails against overwriting repo-owned AGENTS.md or CLAUDE.md.
generated by a clanker