Skip to content

Skill chain state detection broken: cross-branch JSONL isolation + /review not logging #280

Closed

Description

@chancheuklap

Problem

Skills in the gstack workflow chain cannot detect outputs from previous skills. This breaks the intended workflow state machine where each skill feeds into the next.

Three reported failures:

Upstream Skill Downstream Skill Expected Actual
/office-hours /plan-ceo-review Finds design doc ❌ Branch-scoped filename mismatch
/plan-ceo-review /plan-eng-review Finds CEO plan + review log ❌ No discovery code for ceo-plans/ + JSONL is branch-isolated
/review /ship Review Readiness Dashboard shows CLEAR ❌ /review writes no JSONL entry; dashboard doesn't recognize it

Root Cause

1. JSONL review log is branch-scoped but workflow is cross-branch

gstack-review-log writes to $BRANCH-reviews.jsonl. When skills run on different branches (e.g., /office-hours on main, then /plan-eng-review on feat/my-feature), all prior review signals are invisible because gstack-review-read only reads the current branch's file.

2. /review skill never writes to the review log

The /review skill (pre-landing code review) does NOT write a "skill":"review" or "skill":"plan-eng-review" entry to the JSONL. It only conditionally writes design-review-lite and codex-review.

The /ship Review Readiness Dashboard only looks for: plan-ceo-review, plan-eng-review, plan-design-review, design-review-lite, codex-review. Running /review leaves zero trace that /ship can parse → dashboard shows "Eng Review: 0 runs / NOT CLEARED" even after a full review.

3. plan-eng-review has no CEO plan discovery code

plan-eng-review only globs for *-design-*.md (office-hours output). It has zero code to read ~/.gstack/projects/$SLUG/ceo-plans/ where /plan-ceo-review writes its output.

4. File naming uses branch name, breaking cross-branch discovery

office-hours writes files named {user}-{branch}-design-{datetime}.md. Downstream skills glob with *-$CURRENT_BRANCH-design-*.md. When branches differ, the glob fails. The fallback (*-design-*.md sorted by mtime) is non-deterministic.

Impact

Users must manually override the Review Readiness Dashboard gate on every /ship run, even when all reviews have been completed. The workflow state machine described in documentation doesn't actually work — each skill is effectively stateless with respect to its predecessors.

Suggested Fix

  1. Make JSONL project-scoped, not branch-scoped (or add cross-branch query capability to gstack-review-read)
  2. Add a review log entry to /review — e.g., {"skill":"pre-landing-review", ...} and have /ship recognize it as satisfying the Eng Review gate
  3. Add CEO plan discovery to /plan-eng-review — glob ceo-plans/ directory
  4. Consider a unified skill handoff protocol — each skill writes a standardized completion record, downstream skills query via a common API rather than ad-hoc file discovery

Environment

  • gstack version: 0.9.4.1
  • Observed across multiple workflow runs on the agentflow project

Activity

  1. malikrohail commented on Mar 22, 2026

    @malikrohail
    Contributor

    Tested on March 22, 2026 against current main. I opened PR #338 for the narrow same-branch /review -> /ship readiness bug.

    This PR fixes only the false NOT CLEARED dashboard state after a real /review run:

    • /review now persists a top-level {"skill":"review", ...} readiness entry
    • /ship now treats review and plan-eng-review as valid Eng Review sources
    • /ship now tells the user to run /review or /plan-eng-review when the gate is missing

    It does not attempt to solve the broader cross-branch JSONL isolation or CEO-plan discovery parts of #280.

    PR: #338

  2. sevastyanovio commented on Mar 23, 2026

    @sevastyanovio

    Part of this is addressed in PR #405 (/meditate). The meditation scanner reads session history across all branches and all AI tools, so it naturally discovers cross-branch skill outputs — design docs, review logs, CEO plans — regardless of branch-scoped JSONL isolation.

    The "Watch These Next" section in .gstack/context.md surfaces these for downstream skills. It's not a direct fix for the JSONL isolation bug (that should still be fixed at the source), but it provides a workaround layer that makes the chain more resilient.

  3. time-attack commented on Jul 15, 2026

    @time-attack
    Contributor

    @chancheuklap Cross-branch review eligibility and discovery of design and CEO artifacts remain incomplete after the prior fix.

  4. added 18 commits that reference this issue on Oct 15, 2026
  5. capy-ai commented on Oct 16, 2026

    @capy-ai
    Contributor

    Fixed in v1.91.106.0 (main 3e8b34d, wave PR #3209). /plan-eng-review now finds the /plan-ceo-review plan for the branch with gstack-ceo-plan-find and reads its scope as data; a plan from another branch is disclosed and interactive reviewers are asked first. Adopted from #3159 by @szsunyuan.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions