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
/gokay-sweepruns across the default repo set:cati,loom,psync,goto,gokayunder/home/uwe/projects/./gokay-sweep <repo1> <repo2> ...runs across explicitly specified repositories./gokay-sweep --check-onlyruns gokay checks and files issues without automatically dispatching sprints.
Workflow
1. Target Repository Discovery & Hygiene
For each repository in the target list (default: /home/uwe/projects/{cati,loom,psync,goto,gokay}):
- Confirm the repository directory exists and is a valid Git worktree (
git -C <repo> rev-parse --is-inside-work-tree). - 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:
- Pipeline Check:
Evaluates:gokay check --all --jsonfmt: 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.
- Structural Assessment:
Flags untested packages (gokay assess --json[UNTESTED]), low test ratios, and extreme architectural hotspots. - Flake & Regression Query:
Checks historical execution ledger for known flaky tests or duration creep.gokay test --all --flakes
3. Issue Intake & Deduplication
If gokay reports failures, drift, or actionable defects:
- Query active issues in the repository:
harnez find -d <repo> issues -a status:active - If an active ticket already covers the defect, update the ticket with new baseline output.
- If no ticket exists, allocate a new issue:
harnez issues new -d <repo> "<clear-actionable-title>"- Set Category (
Bug,Quality,Reliability). - Set Priority (
P1for build/test breaks;P2for lint/spec/format defects). - Document:
- Failing gokay step and exact command.
- Raw error/diagnostic output.
- Affected files and line numbers.
- Expected fix criteria.
- Set Category (
- Regenerate index and commit the ticket immediately:
harnez index -d <repo> git -C <repo> add issues/ && git -C <repo> commit -m "docs(issues): file ticket for gokay finding"
4. Remediation via Lean Sprint (/lean-sprint)
For each newly filed or active defect ticket:
- Execute the 5-phase
lean-sprintloop:- 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, ensuresmake test-q1passes. - Pre-Commit Review: Verifies diff against ticket acceptance criteria.
- Commit changes with conventional commit referencing the ticket.
- 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
- Assert that the previously failing step (
fmt,vet,lint,spec,test) is now green (ok/skipped-empty). - Verify that no regressions were introduced in surrounding packages.
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