Stack Workflow Grill Log
Stack Workflow Grill Log
Initial Situation
Harness currently works epic by epic, often with one PR per epic. Some PRs are dependent, but the default operating model is to merge one PR and then start the next task from the updated trunk. kitlangton/stack introduces a stack-aware PR workflow where dependent PRs can be opened before their parents merge, with GitHub PR bases encoding branch dependencies and stack sync repairing descendants after squash merges.
Issue
The team needs to decide where stack usage becomes mandatory, where it remains advisory, and which Harness phase entrypoints should enforce stack-aware behavior. The main candidate is implement-spec, because it creates implementation work from a dependency graph and can choose whether dependent tasks become a stacked PR chain instead of serial merge waits.
Solution Direction Under Grill
Use stack as a mandatory tool in the Harness capability pack, then define stack-aware gates across planning, implementation, review, delivery, and docs/runbook surfaces. Treat stack sync --dry-run as the default inspection entrypoint and stack sync as the mutation entrypoint once the preview is correct.
Branch: Tool Availability
Q1
Question:
Should stack be treated as a mandatory pack tool for Harness PR workflows?
Accepted answer:
- Yes.
stackis a mandatory default workflow tool for Harness planning and delivery workspaces.stack sync --dry-runis the required inspection gate, andstack syncis the approved mutation gate when the preview is correct.
Branch: Enforcement Entrypoints
Q2
Question: Which Harness flow entrypoints must become stack-aware?
Accepted answer:
- Primary enforcement belongs in
create-spec, notimplement-spec. When a new spec begins from backlog context,create-specmust detect whether the target epic/story depends on open PR work and decide whether the new branch/spec should be based on that still-open PR branch.
Q3
Question:
Should create-plan turn task-level depends_on relationships into stacked PRs?
Accepted answer:
- No. Dependent tasks inside one epic/plan are part of the same epic delivery and therefore the same PR. Task-level
depends_ononly controls implementation ordering inside that PR.
Branch: Implementation Branching Policy
Q4
Question:
When implement-spec executes dependent tasks, should it create branches from still-open parent branches instead of waiting for merge?
Accepted answer:
- No, not because of task-level dependencies.
implement-specshould honor branch/base intent already decided bycreate-specandcreate-plan; it should not reinterpret intra-epic task dependencies as separate stacked PRs.
Branch: Backlog Dependency Policy
Q5
Question:
When a new epic/spec depends on backlog work currently represented by an open PR, should Harness create the new PR from the still-open branch and use stack sync?
Accepted answer:
- Yes.
create-specmust detect stack intent from backlog dependency metadata plus live open PRs. If the target epic/story depends on another story/epic with an open PR,create-specrecords a required Branch/Base Intent section inSPEC.md: parent PR, parent branch, intended child branch, and requiredstack sync --dry-rungate.
Q6
Question:
Should create-spec create or switch git branches immediately when it finds an open parent PR?
Accepted answer:
- No.
create-specstays in requirements/spec space. It records branch/base intent, but actual branch creation or switching belongs to delivery/implementation execution unless the user explicitly asks for branch setup during the spec turn.
Q7
Question: When backlog says the new spec depends on another epic/story, but no open parent PR is found, should missing PR evidence block spec creation?
Accepted answer:
- Yes. Missing parent PR evidence blocks spec creation when the dependency is not already proven implemented. If the dependency is already merged,
create-specrecords No Stack Required, then verifies dependency readiness by checking that the depending code actually exists and that related spec/plan artifacts exist. If the dependency is not implemented or cannot be proven, execution must block immediately.
Q8
Question:
Is the dependency-readiness gate part of stack implementation?
Accepted answer:
- No. Dependency-readiness validation is a
create-speccapability.stackonly handles open-PR branch/base relationships aftercreate-spechas determined that the dependency is represented by an open parent PR.
Q9
Question:
What evidence is required for create-spec to treat a backlog dependency as proven implemented?
Accepted answer:
create-spectrusts existingIMPLEMENTATION-NOTES.mdor an equivalent implemented-status artifact as sufficient proof of implemented dependency readiness. If implemented-status artifact evidence is absent, it falls back to checking local code paths/behavior or merged PR evidence.SPEC.mdandPLAN.mdalone prove intent, not implementation.
Q10
Question:
Should create-plan decide stack topology, or only preserve and validate the stack/dependency decisions from create-spec?
Accepted answer:
create-planis a preservation and validation gate only. It must read theSPEC.mdDependency Readiness / Branch/Base Intent section and preserve it intoPLAN.md, but it must not decide stack topology itself.
Q11
Question:
Should implement-spec create or switch branches automatically from recorded Branch/Base Intent?
Accepted answer:
- Yes.
implement-specmust enforce branch/base intent before coding. IfPLAN.mdcontains Branch/Base Intent,implement-specverifies the current branch is based on the intended parent branch or automatically creates/switches to the intended child branch before implementation begins. It runsstack sync --dry-runafter PR creation/update, not necessarily before coding.
Q12
Question:
Should implement-spec require a PR before coding, or create/update the PR after implementation?
Accepted answer:
- Harness defaults to PR-after-implementation.
implement-speccreates/switches the intended branch, implements, commits, pushes, creates or updates the PR with the recorded base, then runsstack sync --dry-runandstack syncwhen the preview is correct. Early draft PRs are optional only when explicitly requested.
Q13
Question: How should delivery and review split stack closeout responsibility?
Accepted answer:
delivery-phaseowns stack cleanliness and mutation before closeout. Whenever a PR exists, delivery must runstack statusandstack sync --dry-run. If the PR is stack-dependent and dry-run shows pending changes, delivery must runstack syncbefore closeout.review-phasestays readonly: it uses the actual PR base and includes stack status as review evidence, but does not mutate stack state.
Q14
Question:
Where should stack live as a mandatory Harness tool, and what happens when it is unavailable?
Accepted answer:
- Add
stackas a required external tool for the planning/delivery/default workflow surface, not as a framework-specific pack. Add a localstackskill copied from or adapted fromkitlangton/stackso agents know exact commands. Missingstackblocks stacked-PR workflows, but does not block independent trunk-based work.
Q15
Question:
What section shape should create-spec write and create-plan preserve for dependency readiness and stack intent?
Accepted answer:
- Use
Dependency Readinesswhenever backlog dependencies exist. Its fields areStatus,Dependency,Evidence, andReason.Statusis one ofNo Stack Required,Branch/Base Intent, orBlocked. - Include
Branch/Base Intentonly for stack-dependent work. Its fields areParent PR,Parent branch,Child branch,PR base, andRequired gate.
Example:
## Dependency Readiness
- Status: No Stack Required | Branch/Base Intent | Blocked
- Dependency: <epic/story/pr/link>
- Evidence: <implementation notes path | merged PR | parent PR>
- Reason: <why this status was chosen>
## Branch/Base Intent
- Parent PR: #123
- Parent branch: team/stefan/parent
- Child branch: team/stefan/child
- PR base: team/stefan/parent
- Required gate: stack sync --dry-run after PR creation/updateGlossary Decisions
Glossary Q1
Question: What is the canonical distinction between task dependencies and PR stack dependencies?
Accepted answer:
- Canonical term: Task Dependency — an implementation ordering relationship inside one epic/plan and normally inside one PR.
- Canonical term: Backlog Dependency — an epic/story dependency that may require a new spec or PR to build on work from another open PR.
- Avoid: using
depends_onalone to mean stacked PR dependency. - Axiom: Intra-epic task dependencies do not create separate PRs by default.
- Axiom:
create-specrecords stack intent; it does not mutate git state by default. - Axiom: Dependency readiness is a
create-specgate, not astackfeature. - Axiom: If a backlog dependency is neither proven implemented nor represented by an open parent PR, spec creation blocks.
- Axiom:
IMPLEMENTATION-NOTES.mdor an equivalent implemented-status artifact is trusted as sufficient readiness proof. - Axiom:
SPEC.mdandPLAN.mdprove intent, not implementation. - Axiom:
create-planpreserves and validates stack/dependency decisions; it does not decide stack topology. - Axiom:
implement-specmay create or switch branches automatically when Branch/Base Intent is recorded. - Axiom: PR creation defaults to after implementation; early draft PRs are opt-in.
- Axiom:
stack syncruns after PR base metadata exists. - Axiom: Delivery owns stack mutation and cleanliness; review reports stack evidence only.
- Axiom: Missing
stackblocks stack-dependent workflows, not independent trunk-based work. - Axiom:
Dependency Readinessis present whenever backlog dependencies exist;Branch/Base Intentappears only for stack-dependent work.
Branch: Documentation And Runbooks
Q16
Question:
Should stack workflow behavior be repeated in root AGENTS.md or scaffolded prompt guidance?
Accepted answer:
- No. Root
AGENTS.md/ scaffolded prompt repetition is not useful when the behavior is already pinned in the relevant phase skills. The phase skills are the enforcement source of truth; duplicated standing-rule prose risks drift.
Q17
Question: Should Harness add a standalone human-facing stack workflow runbook now?
Accepted answer:
- No. Do not add a standalone human runbook for now. The local
stackskill plus phase skill instructions are canonical. Add human docs only later if implementation changes visible operator workflow or users are expected to run stack manually outside the phase skills.
Final Axioms
- Stack workflow docs are skills-first; no standalone human runbook is needed initially.