feat: tags field, critical-check prioritization, gc-watchdog skill

Closed
TH
3mo ago
+22796-3062

User description

Summary

Stacked on PR #19 (decouple Gas City harness). Three additions:

  • tags field on IR PlanOperation — optional readonly string[] for prioritization, filtering, categorization
  • Critical-check prioritization in runtime topoSort — critical-tagged ops scheduled first among ready siblings (stable sort, input order preserved within groups)
  • gc-watchdog skill — project-local skill at .agents/skills/gc-watchdog/ with standalone script and exit condition

Changes

FileChange
packages/ir/src/plan.tsAdd tags?: readonly string[] to PlanOperation
packages/sdk/src/convert.tsPass spec.tags through in convertOperation
packages/runtime/src/internal/topo.tssortReadyByPriority() — critical first among ready siblings
engdocs/adr/ADR-008-tags-and-critical-prioritization.mdArchitectural decision record
.agents/skills/gc-watchdog/SKILL.mdWatchdog skill documentation
.agents/skills/gc-watchdog/watchdog.shStandalone script with exit condition

Tests (TDD)

  • ir/validate.test.ts: 3 tests — accepts tags, accepts no tags, accepts empty tags
  • sdk/convert.test.ts: 2 tests — passes tags from spec, omits when absent
  • runtime/topo.test.ts: 2 tests — critical first among independents, critical first among siblings after dependency

gc-watchdog exit condition

Exits when ALL true:

  1. No open real tasks (wisp/nudge filtered out)
  2. No in-progress real tasks
  3. Mayor awake, city not suspended, controller running

Does NOT exit on failure — only on clean idle.

Test plan

  • npx vitest run packages/ir/src/__tests__/validate.test.ts -t "tags" — 3 pass
  • npx vitest run packages/sdk/src/__tests__/convert.test.ts -t "tags" — 2 pass
  • npx vitest run packages/runtime/src/__tests__/topo.test.ts — 11 pass
  • npx nx run ir, sdk, runtime: typecheck — clean
  • npx nx run ir, sdk, runtime: build — clean
  • bash .agents/skills/gc-watchdog/watchdog.sh 1 — reports IDLE and exits 0

Stacked on #19

Generated with Devin


Summary by cubic

Adds tags to IR operations, prioritizes "critical" checks among ready siblings, and adds a gc-watchdog skill/script to exit cleanly when Gas City is idle. Also brings in CLI, checks, compilers, and docs; addresses Linear sv-bni by delivering the deferred critical-check prioritization from ADR-007.

  • New Features
    • IR/SDK/Runtime: PlanOperation.tags?: readonly string[]; SDK propagates spec.tags; topoSort schedules "critical" first (stable within groups).
    • Agents: .agents/skills/gc-watchdog/ with watchdog.sh (filters wisp/nudge; exits only on clean idle with healthy mayor).
    • Platform: @sverka/checks (builtin resolver + SARIF extraction), @sverka/cli (init/inspect/plan/execute/validate/baseline/doctor), compilers @sverka/compiler-github and @sverka/compiler-gitlab.
    • Docs/Tooling: ADR-007/008 and architecture/user docs (waves 03–15); ESLint 9 flat config and Codacy config updates.

CodeAnt-AI Description

Add operation tags, prioritize critical work, and provide a Gas City watchdog

What Changed

  • Operations can now carry optional tags such as critical and security, including empty tag lists.
  • Critical-tagged operations run before non-critical operations when ready, while preserving order within each priority group.
  • Added a watchdog skill and standalone script that reports Gas City health and exits only when real work is complete and the city is healthy.
  • Added documentation describing the watchdog checks, reporting, and clean-idle exit conditions.

Impact

✅ Critical checks run sooner
✅ Tags remain available for operation filtering and categorization
✅ Clearer visibility into Gas City health and remaining work

🔄 Retrigger CodeAnt AI Review

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.