gokay-sweep

Run gokay across common repositories (cati, loom, psync, goto, gokay), collect findings into per-repo issues, dispatch lean-sprints to fix them, and re-verify with gokay.

Gokay Cross-Repository Sweep & Fix Loop

Run gokay diagnostics across target repositories, collect detected defects and formatting/lint drift into tracked issues, execute lean sprints to repair them, and re-verify with gokay to prove resolution.

Reference Practices: @docs/AgenticLoop.md, lean-sprint

Invocation


Workflow

1. Target Repository Discovery & Hygiene

For each repository in the target list (default: /home/uwe/projects/{cati,loom,psync,goto,gokay}):

  1. Confirm the repository directory exists and is a valid Git worktree (git -C <repo> rev-parse --is-inside-work-tree).
  2. Verify tree hygiene (git -C <repo> status --porcelain). If untracked or unstaged changes exist that are not from this run, warn or park them to ensure a clean baseline.

2. Gokay Diagnostic Run (Baseline)

Execute gokay commands from the repository root:

  1. Pipeline Check:
    gokay check --all --json
    
    Evaluates:
    • fmt: Go source formatting and import organization drift.
    • vet: Standard Go vet invariants.
    • lint: Agent-first golangci-lint analysis on changed/tracked code.
    • spec: Syntax and schema validity of embedded/spec files (spec/**/*.{yaml,yml,json,toml,ini}).
    • test: Test suite execution across all packages.
  2. Structural Assessment:
    gokay assess --json
    
    Flags untested packages ([UNTESTED]), low test ratios, and extreme architectural hotspots.
  3. Flake & Regression Query:
    gokay test --all --flakes
    
    Checks historical execution ledger for known flaky tests or duration creep.

3. Issue Intake & Deduplication

If gokay reports failures, drift, or actionable defects:

  1. Query active issues in the repository:
    harnez find -d &lt;repo&gt; issues -a status:active
    
  2. If an active ticket already covers the defect, update the ticket with new baseline output.
  3. If no ticket exists, allocate a new issue:
    harnez issues new -d &lt;repo&gt; "&lt;clear-actionable-title&gt;"
    
    • Set Category (Bug, Quality, Reliability).
    • Set Priority (P1 for build/test breaks; P2 for lint/spec/format defects).
    • Document:
      • Failing gokay step and exact command.
      • Raw error/diagnostic output.
      • Affected files and line numbers.
      • Expected fix criteria.
  4. Regenerate index and commit the ticket immediately:
    harnez index -d &lt;repo&gt;
    git -C &lt;repo&gt; add issues/ && git -C &lt;repo&gt; commit -m "docs(issues): file ticket for gokay finding"
    

4. Remediation via Lean Sprint (/lean-sprint)

For each newly filed or active defect ticket:

  1. Execute the 5-phase lean-sprint loop:
    • Host Orchestrator: Coordinates, adheres to zero direct coding on the target repo, and diff-first review.
    • Searcher (luna:low / luna-search, read-only): Locates exact root causes and establishes baseline repro.
    • Developer (luna:high / sol:low, single-threaded): Applies code fixes, updates tests, ensures make test-q1 passes.
    • Pre-Commit Review: Verifies diff against ticket acceptance criteria.
  2. Commit changes with conventional commit referencing the ticket.
  3. Close the ticket using harnez issues close -d <repo> <n> "<resolution-summary>".

5. Gokay Re-Verification (Post-Fix Validation Gate)

After fixes are committed, run gokay again to ensure the issue is resolved or demonstrably improved:

gokay check --all

6. Sweep Reporting

Summarize findings and remediation outcomes across all examined repositories: | Repository | Initial Gokay Status | Tickets Filed / Addressed | Outcome / Final Status | |---|---|---|---| | cati | ... | ... | ... | | loom | ... | ... | ... | | psync | ... | ... | ... | | goto | ... | ... | ... | | gokay | ... | ... | ... |

Content
file-backed
License:
AGPL-3.0-or-later
Origin
gokay
Source:
.agents/skills/gokay-sweep/SKILL.md
Source revision
f712038f99181bbaf8443eb326f889d149ba05dc
Requires
Targets
Invocation

Related skills

Browse all skills