docs: add CLI AGENTS and unblock migration cli test task

This commit is contained in:
StellaOps Bot
2025-12-06 14:26:43 +00:00
parent e16d2b5224
commit 2b892ad1b2
2 changed files with 94 additions and 48 deletions

44
src/Cli/AGENTS.md Normal file
View File

@@ -0,0 +1,44 @@
# AGENTS · StellaOps CLI
## Roles
- **CLI engineer**: implement/maintain CLI verbs, wiring, migration tooling.
- **QA (CLI)**: add/maintain unit & golden-output tests; ensure determinism/offline readiness.
- **Docs/PM (CLI)**: keep sprint status in `docs/implplan/SPRINT_*` aligned; update guides when behaviors change.
## Working directory
- Primary: `src/Cli/**` (including `StellaOps.Cli`, `.Cli.Core`, `.Cli.Tests`, `plugins/cli/**`, `packaging/`).
- Shared libraries only if referenced by CLI projects (e.g., `src/__Libraries/StellaOps.Infrastructure.Postgres`).
- Do not edit other modules without explicit sprint linkage.
## Required reading (treat as read before DOING)
- `docs/modules/cli/architecture.md`
- `docs/implplan/AGENTS.md` (global planning rules)
- `docs/db/MIGRATION_STRATEGY.md` (for migration-related work)
- Sprint-specific file (e.g., `docs/implplan/SPRINT_3408_0001_0001_postgres_migration_lifecycle.md`)
## Coding standards
- Target **.NET 10**; prefer Native AOT where configured.
- Deterministic output: stable ordering, UTC timestamps, no env-dependent paths in tests.
- Avoid network calls in tests; use recorded fixtures/golden outputs.
## Testing
- Unit/golden tests: `dotnet test src/Cli/StellaOps.Cli.Tests`
- For migration CLI work: add/extend tests under `StellaOps.Cli.Tests` and keep golden outputs reproducible.
- Keep golden files small and ASCII; hash fixtures when practical.
## Offline/air-gap posture
- No runtime fetches during tests; rely on bundled fixtures.
- Packaging scripts must support offline kits (use pinned digests/checksums).
## Sprint/status discipline
- Mirror task state in the relevant `SPRINT_*` doc (TODO → DOING → DONE/BLOCKED).
- If scope/blocker is unclear, mark task BLOCKED in the sprint doc with a note; do not seek ad-hoc approvals.
## Determinism checklist for CLI changes
- Sort command outputs where order is not semantically required.
- Use invariant/globalization-invariant formatting; UTC times.
- Keep parser/serializer options fixed (e.g., `JsonSerializerDefaults.Web` + explicit naming policies).
## Contacts/ownership
- Module owner: CLI Guild
- Sprint owner (migration lifecycle): see `SPRINT_3408_0001_0001_postgres_migration_lifecycle.md` Action Tracker.