v1.12.0
[1.12.0] — 2026-05-31
Theme: Proactive Awareness
nyann shifts from purely reactive (nothing fires unless a skill is triggered) to proactively surfacing drift, validating preconditions, and watching CI state — quiet unless something actually changed.
Features
- Mandatory setup gate + interactive settings menu (S0) — every skill now requires
~/.claude/nyann/preferences.json._lib.sh::nyann::require_setupreturns rc 2 with a clear hint when it's missing; in CI /NYANN_NONINTERACTIVE=truemode it synthesizes a defaults-only file automatically. Newbin/settings.sh+/nyann:settingsskill render and update individual preferences without rerunning the full wizard (settings.sh --set <key> <value>). Preferences schema bumps to v2 withgit_identity,session_triage,guard_default_severity, andnotifications.{sentinel, staleness_alerts}fields. Incremental upgrade path preserves existing values when adding new ones. - Session-start triage (P1) —
bin/session-triage.shis a quiet UserPromptSubmit-hook wrapper that runssession-check.sh --flow=session-startwith a 2s hard cap and a fingerprint-based dedup cache under~/.claude/nyann/cache/<repo-hash>.session-check. Repeat sessions with the same drift state are silent; new drift surfaces a single notification line. Registered in the plugin'shooks/hooks.jsonas a UserPromptSubmit hook — fires automatically on every prompt; opt out viapreferences.session_triage = false. - Pre-action guards (P2) —
bin/pre-action-guard.shorchestrates per-flow checks (commit/pr/release/ship) before the mutating action runs. Built-in guards underbin/guards/:staged-files-exist,merge-conflict-markers,branch-pushed,wip-commits,clean-tree. Profiles can override the active set viaguards.<flow> = [{name, severity}]and promoteadvisory → confirm/critical.--skip-guardsalways works as an override. Wired into thecommit,pr,release, andshipskills — exit-code-driven (0/3/4) so AskUserQuestion confirms appear on critical/confirm guard failure. Newguard-result.schema.json. - Documentation staleness detector (P4) —
bin/docs-staleness.shflags docs whose correlated sources have churned (≥5 commits) since the doc was last touched, or whose doc-age exceeds 30 days while correlated sources have changed at least once. Thresholds configurable viadocumentation.staleness_threshold_commits/.staleness_threshold_days. Probed bybin/doctor.sh; surfaced as a DOC STALENESS section. Newdocs-staleness.schema.json. - Proactive commit hygiene (P5) —
bin/commit-hygiene.shruns three checks on the staged diff before the commit message is generated: (1) scope suggestion from staged paths, (2) incomplete-staging detection (source↔test pairings, package.json↔lockfile drift), (3) debug-artifact scan withconsole.log|debugger|print(|TODO|FIXME|XXXdefaults (profile-overridable viaconventions.commit_hygiene_patterns[]). Dead-code findings (P6) are folded in under.dead_code. Wired into thecommitskill at step 1.5 alongside the pre-action guard; the suggested scope pre-fills the CC scope in step 3. Newcommit-hygiene.schema.json. - Dead-code / unused-import detection (P6) —
bin/dead-code-scan.shscans the staged diff with per-stack rules inbin/dead-code-rules/{js,python,go,rust}.sh. High-confidence findings only by default (single-file imports clearly not referenced elsewhere in the same file). Opt out viaconventions.dead_code_scan = false. Folded into commit-hygiene above. Newdead-code-scan.schema.json. - Public-doc governance (P7) —
bin/docs-drift-scan.shorchestrates four detectors underbin/docs-drift/: version-refs (semver older than latest git tag — skips CHANGELOG.md), file-refs (broken markdown link targets), script-refs (npm run X/make Xreferenced but missing from package.json / Makefile), count-claims (opt-in numeric claims like "1318 tests" cross-referenced against a filesystem-glob source). Respects<!-- drift-ignore -->markers per line. Profile block:documentation.drift_check.{enabled, scanned_files, version_refs, file_refs, script_refs, count_claims}. Probed bybin/doctor.sh; surfaced as a PUBLIC-DOC DRIFT section. Critical/high findings escalate doctor's exit code (mirrors gh-protection). Newdocs-drift-report.schema.json. - README SVG toolkit (C3) —
bin/gen-readme-badges.shemits a marker-bracketed shields.io badge block (license, ci, release, tests, health, package-manager — each independently togglable).bin/gen-readme-stack-icons.shemits askillicons.devblock usingtemplates/stack-icon-map.jsonto translate detected stack signals into slugs.--applywrites the block into README.md; reruns are idempotent. Master + per-badge flags underdocumentation.readme_badges/documentation.readme_stack_icons. Newreadme-badge-block.schema.json. - CI sentinel + notifications (P3) —
bin/ci-sentinel.sh --repo <owner/repo> [--pr <N>]polls open PRs viaghand emits state-transition notifications (checks: pending → failure/success,review: → changes-requested/approved,merged).bin/read-notifications.shreads + clears the per-repo notification queue (~/.claude/nyann/notifications/<repo-hash>.jsonl).--stopkills the per-repo pid file. New/nyann:watchskill wraps the sentinel for ad-hoc starts. Newsentinel-state.schema.json+notification.schema.json. - IaC minimal (I1) — new
infraarchetype +hclprimary language inprofiles/_schema.json.bin/detect-stack/detect-iac.shrecognizes*.tf,cdk.json,Pulumi.yaml,Chart.yaml,kustomization.yaml. Newprofiles/terraform-monorepo.jsonstarter wiresterraform-fmt,terraform-validate,tflint,tfsec,terraform-docs(each soft-skips when the underlying tool isn't installed). Hook templates undertemplates/hooks/iac/; newtemplates/pre-commit-configs/iac.yamlconfig +install-hooks.sh --iacphase materializes them into.nyann/hooks/iac/and writes.pre-commit-config.yaml.bootstrap.shauto-selects the IaC phase when the detected language ishclOR the profile's archetype isinfra/ framework isterraform. Archetype scaffold map addsinfra → architecture/runbook/deployment/adrs/glossary. Full IaC coverage (CDK, Pulumi, K8s as first-class profiles) deferred to v1.13.0.
Schema additions
preferences.schema.json— bumps tov2withgit_identity,session_triage,guard_default_severity,notifications.profiles/_schema.json— addsguards,documentation.staleness_threshold_commits,documentation.staleness_threshold_days,documentation.drift_check,documentation.readme_badges,documentation.readme_stack_icons, archetypeinfra, primary_languagehcl.- New:
guard-result,dead-code-scan,commit-hygiene,docs-staleness,docs-drift-report,readme-badge-block,sentinel-state,notification,session-triage.
Stats
- Skills: 35 → 37 (added
settings,watch) - Commands: 35 → 37
- Starter profiles: 26 → 27 (added
terraform-monorepo) - Schemas: 53 → 62
- New test files: 12 (test-setup-gate, test-settings, test-session-triage, test-pre-action-guards, test-dead-code-scan, test-commit-hygiene, test-docs-staleness, test-docs-drift, test-gen-readme-badges, test-gen-readme-stack-icons, test-detect-iac, test-ci-sentinel)
- Test count: 1431 → 1449 (regression coverage for the IaC install phase, deep monorepo Terraform layout detection, gen-readme orphaned-marker refusal, terraform-docs partial-staging restriction, ci-sentinel --pr integer validation, TypeScript type-only imports, Python imports with trailing comments; plus pre-action guard demotion-refusal, pre-release semver comparison, Helm corroboration, and docs-drift false-positive suppression for parenthesised prose / fenced code / historical version refs)
Deferred to v1.13.0
- Full IaC coverage (
aws-cdk-app,pulumi-app,kubernetes-app,helm-chart,ansible-playbookprofiles + per-module versioning + plan/apply workflow). - External notification delivery (Slack/Discord/email webhooks for P3 sentinel).
- Multi-repo sentinel aggregation.
- Coverage-delta guard for the PR flow (stack-aware integration with jest/coverage.py/go test/tarpaulin).
- True backgrounded sentinel daemon (the current
bin/ci-sentinel.shis one-shot per call; daemonize via the caller'snohupor launchd wrapper).