一键导入
cimonitor
Monitor CI pipeline status, diagnose failures, and drive the badge back to green
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Monitor CI pipeline status, diagnose failures, and drive the badge back to green
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Reconstruct Dazzle/HM judgement from stems before inventing structure
Reconstruct Dazzle/HM judgement from stems before inventing structure
Run all quality checks on modified files — the on-demand pre-ship quality gate
Commit, verify, tag, and push with the repo's pre-flight gate suite (lint, type, drift gates, docs build)
Use when authoring or revising trial.toml scenarios for dazzle qa trial — puts an LLM in the shoes of a real business user evaluating a Dazzle app. Use when the user asks to "set up qa trials", "write a trial scenario", "evaluate this app as a user", or mentions qualitative/trial/business-user testing. Also use when a trial report is sparse or unhelpful — the scenario itself is usually the root cause.
Use when writing or editing Dazzle .dsl files — syntax rules, the mistakes agents actually make, and pointers to the drift-gated references. Complements (never replaces) CLAUDE.md's DSL Quick Reference.
基于 SOC 职业分类
| name | cimonitor |
| description | Monitor CI pipeline status, diagnose failures, and drive the badge back to green |
Monitor CI/CD pipeline status. Checks both the current branch and the CI badge workflow on main.
Also wired into /improve: every improve cycle runs Step 0c (see .claude/commands/improve.md and improve/strategies/cimonitor.md) — a cheap snapshot of the main badge. When the latest completed ci.yml run is red, that improve cycle becomes CI repair (this skill's body) and does not pick a product lane. When green / in progress / gh unavailable, improve logs one line and continues.
Local habits (pair with repair, do not replace the badge):
| When | Command |
|---|---|
| Mid-edit | make ci-changed |
| Before ship | make ci-fast (includes ship-surface) |
| After fixing a new badge-red class | Promote into scripts/ship_surface.py or preflight_surface.py |
| Concordance | docs/contributing/local-ci-concordance.md |
Tier 0 is intentional subset of GitHub; ship-surface closes the recurrent gap (bandit / SPEC / IR goldens / viewport). Full matrix + walks remain Tier 2.
The README badge tracks the CI workflow on main. Always check this first:
gh run list --workflow ci.yml --branch main --limit 1 \
--json status,conclusion,databaseId,url,displayTitle,updatedAt
Report whether the badge is green or red. If red, this takes priority — investigate and fix before other work.
gh run list --branch $(git branch --show-current) --limit 5 \
--json status,conclusion,name,url,databaseId,event,workflowName
For each in_progress or queued run, poll every 15 seconds up to 20 attempts
only when already in repair mode after a push (do not burn an improve cycle
waiting on green):
gh run view <run-id> --json status,conclusion,name
gh run view <run-id> --json jobs --jq '.jobs[] | {name, conclusion, startedAt, completedAt}'
Present as a table. Real ci.yml jobs include (names vary with matrix):
| Job family | What fails look like |
|---|---|
Python Tests (py3.12/13/14) | full unit + integration non-e2e |
lint | ruff, bandit medium on src/, CSS clip/raw-ramp, coverage |
type-check | mypy |
Security Tests | JWT fuzz, RBAC matrix, bandit, pip-audit |
integration | integration tests (needs prior jobs) |
E2E Smoke | example validate / serve |
PostgreSQL Tests | service container |
E2E Runtime | Playwright-ish runtime |
INTERACTION_WALK | workspace gestures + viewport geometry |
GUIDE_WALK | onboarding overlays |
UX Contracts | ux verify --contracts on support_tickets |
Homebrew Formula Validation | formula / version |
For each failed job:
gh run view <run-id> --log-failed | tail -200| Log signature | Local command (run first) |
|---|---|
B324 / bandit / >> Issue: | make ship-surface or bandit -c pyproject.toml -r src/ --severity-level medium |
SPECIFICATION.md is stale / test_example_spec_bar | pytest tests/unit/test_example_spec_bar.py -q |
pattern_count | pytest tests/unit/test_patterns_phase2_kb_1217.py::test_pattern_count_meta_matches_actual_count -q |
ir_reader_baseline / baselined orphan | pytest tests/unit/test_ir_field_reader_parity.py::test_no_new_ir_field_orphans -q |
test_simple_dsl_to_ir_snapshot / syrupy | pytest tests/integration/test_golden_master.py::test_simple_dsl_to_ir_snapshot -q |
spec_brief_simple_task | pytest tests/unit/test_spec_narrative_brief_snapshot.py -q |
DRAWER_PATTERN / .dz-sidebar-toggle / viewport | pytest tests/unit/test_viewport.py -q then INTERACTION_WALK if shell CSS |
| mypy | mypy src/dazzle |
| ruff | ruff check src/ tests/ --fix && ruff format src/ tests/ |
| preflight / api surface / docs drift | make preflight-surface |
Fixing main without teaching Tier 0 is how the badge re-reds on the next ship.
After a successful product fix (or in the same commit when small):
make ship-surface or make preflight-surface have caught this?scripts/ship_surface.py (SHIP_TESTS or bandit)
or scripts/preflight_surface.py (SURFACE_TESTS), with a remediation line.scripts/ci_changed.py.ci_gap: <class> | local_mirror: none → promoted to ship-surfaceDo not treat "badge green after full CI" as complete without this step when the failure class was new.
## CI Status
**Badge (main):** ✅ green | ❌ red (failing since <date>)
**Current branch:** <branch> — <status>
### Job Results (run #<id>)
| Job | Result |
|-----|--------|
| ... | ... |
### Local mirror
- command that would have caught this: <make ship-surface | …>
- promoted to ship-surface/preflight? yes | n/a (already covered) | TODO
### Action Required
- <what needs fixing, if anything>