Skip to content

Idea roll-up: explicit workflow between agent behaviors (autonomy, pipelines, memory tiers, work folders, remediation) #2390

Backlog

Description

@bradygaster

Why this issue exists

During 2.0 board triage, five older ideas (#799, #919, #600, #707, #1735) kept pointing at the same underlying question: should Squad make workflow between agent behaviors explicit, instead of leaving it implied by prompts, charters and convention? Rather than carry five stale issues, this roll-up evaluates each idea, records an opinion, and closes the originals. Nothing here is committed work; it is a decision record to plan from.

Common thread

Each idea is a different slice of one theme:

Idea Slice of the theme
#799 Tiered autonomy When may an agent proceed without a human gate
#919 Declarative pipelines Which agent/step runs next, enforced by code, not by an LLM's memory
#600 Tiered memory What context a step receives
#707 Task-scoped folders Where a step's outputs land so the next step can find them
#1735 Review remediation A human-triggered edge in the workflow with a separation-of-duties rule

The proposed principle: every handoff has an explicit contract (owner, inputs, outputs, gate, who may clear the gate), and transitions are deterministic code while the work inside a step is LLM. Today this is implied, which is why failures such as #1712 (no verification gate, success = exit code) and #1713 (no per-issue failure tracking) exist.

Prior art (checked)

  • Autonomy tiers are an industry norm. Claude Code ships permission modes (default, acceptEdits, plan, auto) with allow/deny rules and managed policy that overrides repo settings: https://code.claude.com/docs/en/permissions. A cross-vendor comparison (Claude Code, Cursor, Windsurf, Copilot agent mode) notes every vendor says allow-lists are not a security boundary and recommends OS sandboxing and scoped credentials for enforcement, and that repo files configure the agent (so a cloned repo can try to loosen them): https://nhimg.org/ai-ide-and-coding-agent-security-guide
  • Declarative vs imperative workflows have converged on hybrid. A 2026 comparison of LangGraph, CrewAI (YAML/Flows), Google ADK config and others concludes the practical end state is declarative topology with imperative node logic and an escalation path from config to code; the recurring complaint is the lack of a deterministic fan-in barrier and weaker pause/resume for human gates in declarative systems: https://zylos.ai/en/research/2026-07-01-declarative-vs-imperative-agent-workflow-orchestration/. LangGraph provides durable execution and human-in-the-loop interrupts: https://github.com/langchain-ai/langgraph
  • Tiered memory has academic precedent in MemGPT's hot/cold context paging (https://arxiv.org/abs/2310.08560), not re-verified here beyond the abstract.
  • Not verified: work-folder conventions and review-autofix bots in other stacks. I did not find primary sources in this pass, so no claim is made.

Opinions per issue

#799 Tiered autonomy: Adopt the core, change the mechanism (2.0 governance)

Declaring a mode (conservative default, optimistic, explicit) is sound and matches vendor norms. But the proposal implements it as markdown (repo-config.md, a skill) that agents are asked to follow. Prior art says that is advisory, and a repo-committed policy can be loosened by whoever edits the repo. Make the mode enforced by existing gates (review gate #1729/#1734, required checks, CODEOWNERS-style protection of the policy file) and keep conservative as default. Success measure: a test shows an agent attempting a Tier 2 action in conservative mode is blocked by a check, not by a prompt.

#919 Declarative skill pipelines: Adopt as the explicit-workflow substrate, but not as a new runtime (highest alignment with the owner's idea)

The step types (fresh-session copilot step, deterministic code step, context: different for reviewers) are exactly the hybrid shape the prior art converges on. Concerns: a bespoke JSON pipeline duplicates what gh-aw workflows already express, and it is unsafe to build before the watch loop has verification and failure tracking (#1712, #1713). Recommend: first land those two, then spike expressing one pipeline (issue, implement, review, merge-if-approved) in the existing workflow layer. Success measure: the spike pipeline runs end to end with a failing step halting it deterministically and a test proving the reviewer step never receives the implementer's context.

#600 Tiered memory: Fold into the memory decision, cut the wiki layer

The measured problem (history files 34-74KB, 82-96% stale) is real and hot/cold splitting has precedent. But it overlaps the unresolved memory-model cluster (#1243, #1268, #1269, #1270, #2321). Do not build a parallel scheme; make hot/cold a requirement of the single governed-memory decision. The GitHub Wiki layer adds an external write surface with no governance and should be cut. Success measure: token count at spawn before vs after on the same agents (baseline: the figures quoted in #600).

#707 Task-scoped work folders: Do not build as proposed

The problem (stray artifacts) is real, but a top-level .squad/work/ collides with state-backend work (#2229, #2231, #2320, #2378) and the issue itself says these are runtime artifacts, not state. Worktree isolation (#1717) is the better answer to "where do outputs go" and gives per-task isolation for free. Recommend revisiting only as a naming convention inside whatever #1717 produces. Success measure for revisit: a documented case where worktree isolation alone leaves artifacts unfindable.

#1735 Human-initiated review remediation: Keep deferred; this is the model for a human edge

Its own disposition is right: evidence-gated, not part of the review-gate train. It is a good template for the broader principle: explicit human trigger, separate identity from the rejected author, cannot clear its own verdict. Revisit trigger: hosted operational evidence that manual author revision is insufficient (measure: share of REQUEST_CHANGES verdicts needing more than one manual revision round, over a stated window). The original acceptance criteria are preserved in the closed issue.

Proposed next step (not committed)

  1. Land watch: no verification gate - round success is the child process exit code, nothing builds, tests, or lints the resulting work #1712 and watch: no per-issue failure tracking - a permanently failing issue is re-dispatched every round forever #1713 (prerequisites for any pipeline).
  2. Decide the memory model once (absorbing feat: Tiered agent memory — hot/cold/wiki layers for context management #600's hot/cold requirement).
  3. Spike one explicit pipeline (feat(watch): declarative skill-based pipelines for watch #919) with the handoff-contract principle above.
  4. Revisit feat: Tiered Autonomy Mode for Squad — repo-config.md, autonomy-policy.md, and autonomy-check skill #799 enforcement after the spike shows which gates are real.

Closed in favor of this issue

#799, #919, #600, #707, #1735 (see each issue for its closing note; original text stays readable there).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wave:3-laterWave 3 — backlog, future

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions