Skip to content

Implement adm check — state validation#23

Merged
sigent-ai-dev merged 1 commit into
mainfrom
feature/5-adm-check
May 21, 2026
Merged

Implement adm check — state validation#23
sigent-ai-dev merged 1 commit into
mainfrom
feature/5-adm-check

Conversation

@sigent-ai-dev

Copy link
Copy Markdown
Owner

Summary

Implements adm check — validates project state integrity, artefact directory existence, CLR resolution status, and optionally runs the invariant pytest suite. Rich-formatted output with severity colours and reliable exit codes for CI integration.

Changes

  • src/adm_cli/check.py — check command with Severity enum, CheckFinding, CheckReport, validation logic, invariant subprocess runner
  • src/adm_cli/__init__.py — wired check command with --domain option
  • tests/test_check.py — 13 tests covering all acceptance criteria
  • specs/005-adm-check/ — full Spec Kit workflow artefacts (spec, plan, data-model, tasks, checklist)

Linked Issues

Closes #5

Test Plan

  • 41 tests pass (uv run --group dev pytest -v)
  • Valid project exits 0
  • Missing artefact dir exits 1
  • Missing/corrupt state file exits 1
  • Open CLRs reported as warnings (don't block)
  • Invariant failures reported as warnings (don't block)
  • Invariants skipped for Phase <3
  • Multi-domain checks all domains
  • --domain flag restricts to single domain

Checklist

  • Spec followed: specs/005-adm-check/spec.md
  • No secrets or credentials committed
  • Self-review completed

Working `adm check` that:
- Validates .adm/project.json against Pydantic schema
- Checks artefact directories exist for completed phases
- Reports open CLR-NNN clarifications per domain
- Runs invariant pytest suite (subprocess) for Phase 3+ domains
- Rich-formatted output with severity colours
- Exits 0 on pass, 1 on errors (warnings don't block)
- Supports --domain flag for single-domain check
- Multi-domain iteration with aggregated findings

Full Spec Kit workflow: specify → clarify → plan → tasks → analyze → implement.
41 tests pass (13 new for check).

Closes #5
@sigent-ai-dev
sigent-ai-dev merged commit eb25a4b into main May 21, 2026
2 checks passed
@sigent-ai-dev
sigent-ai-dev deleted the feature/5-adm-check branch May 21, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement adm check — state validation

1 participant