framework/core/skills/maintenance/SKILL.md
Use when the user asks for a project health audit, maintenance sweep, or multi-category lead-engineer scan followed by interactive issue-by-issue resolution with user approval. Do NOT trigger on routine lint/test runs, single-file cleanups, or standard "check project" requests.
npx skillsauth add korchasa/flowai maintenanceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Execute a rigorous multi-category maintenance sweep, then walk the user through each finding interactively. The process has two distinct phases:
Categories checked:
[x] FRs, orphan FRs, SRS↔SDS contradictions, resolved index drift.For the per-finding Apply / Skip / Edit verdict in Step 15 (Interactive Resolution Loop):
1., 2., …) — not a heading, bold-only line, or paragraph.FR-UNIVERSAL.QA-FORMAT.<step_by_step>
Collect all findings into an internal list. Each finding has: category, file/symbol, problem description, proposed fix, severity (Critical | High | Medium | Low — pick per references/severity-rubric.md; when in doubt between two tiers, pick the lower one).
Initialize & Plan
todo_write, todowrite) to create a plan covering all scan categories below.Category 1: Structural Integrity
src/, lib/, scripts/). Flag files at wrong levels.deno.json, package.json, etc.) are at expected locations.Category 2: Code Hygiene & Dependencies
*.test.*, *_test.*,
test_*.py). Flag tests that:
expect(true).toBe(true), assert True).SDS from AGENTS.md, then extract SHOULD/MUST clauses from AGENTS.md, CLAUDE.md, and the resolved SDS. Grep test descriptors (it, Deno.test, def test_, func Test) for matching coverage; flag invariants with zero matching test names. (Deeper analysis — stub-only tests, hand-curated lists without cross-reference tests — lives in Category 15.)Category 3: Complexity & Hotspots
AGENTS.md / CLAUDE.md and pick the LOC bucket BEFORE flagging files. Buckets: thin wrapper / facade (declared "wrapper", "adapter", "bindings", "SDK") → 300 lines; service / framework / tool (default) → 500 lines; monolithic app / migration target → 800 lines. State the bucket and quote the source phrase in the finding.Category 4: Technical Debt Aggregation
TODO, FIXME, HACK, XXX tags in the codebase.Category 5: Consistency (Docs vs. Code)
README.md and documents/. Check
if code uses different synonyms (e.g., "User" in docs vs "Customer" in
code).documents/*.md (e.g., "The system
handles X asynchronously"). Verify if the code actually does that.Category 6: Code Documentation Coverage
Category 7: Instruction Coherence
CLAUDE.md (root and nested), AGENTS.md files, resolved SRS,
resolved SDS, and any rules/conventions files.subdir/CLAUDE.md)
don't silently override root-level rules without explicit justification.Category 8: Tooling Relevance
.claude/skills/, .cursor/skills/),
agents/subagents (.claude/agents/, .cursor/agents/), hooks (.claude/hooks/,
.cursor/hooks/, .husky/), and rules files.AGENTS.md or CLAUDE.md) and actual source files. Flag items designed
for a different tech stack (e.g., Django skill in a TypeScript project, Python
linting hook in a Deno project).flake8 when no
Python files exist).Category 9: Documentation Health (FR-DOC-LINT)
Audit the project's documentation system for broken or stale cross-references. This category is DISTINCT from Category 6 "Documentation Coverage" — coverage is about JSDoc / comments per code symbol; health is about cross-link integrity, FR-status freshness, and SRS↔SDS alignment.
In the Resolution Phase summary (step 10), findings from THIS category MUST appear under their OWN dedicated header. The header text MUST literally contain the English token Documentation Health (case-insensitive, may be followed by a translation in parentheses if the rest of the report is in another language — e.g. Documentation Health (Здоровье документации)). Do NOT translate the header outright; do NOT fold these findings into Documentation Coverage, Consistency, or any other existing category — the dedicated header is what makes the audit's doc-system focus visible to FR-DOC-LINT consumers.
documents/*.md, README.md, AGENTS.md) and source-code comments for links of the form [text](path.md#anchor). Flag any link where (a) the target file does not exist or (b) the anchor does not match a heading's GFM auto-slug in the target file.[x] FRs: read the resolved SRS. For each ### FR-<ID> block whose **Status:** is [x], verify the **Acceptance:** reference resolves — test path / benchmark id / command exists. Flag mismatches.[x] FR in SRS, search source code for any GFM-link reference of the form [FR-<ID>](.../requirements.md#…). Flag FRs with zero references in code.SRS and SDS for paired statements about the same component or behavior with mutually exclusive constraints (e.g., SRS says required, SDS says removed). Flag concrete pairs.index drift: if the resolved index exists, compare its FR rows against the resolved SRS — flag rows whose status, summary, or anchor disagree with the SRS, and SRS FRs missing a row.Categories 10–16: Architectural Review — Architectural Integrity (cycles, layer leakage), Conceptual Duplication, API Contract Review, Cross-Implementation Symmetry, Defensive-Programming Smell, Invariant ↔ Test Pairing, Public-Surface Quality. Full sub-check details, patterns, thresholds, and verdict shape live in references/architectural-categories.md. READ THAT FILE before running these checks. Each finding follows the same line shape as Cats 1–9.
Verify Findings + Severity (mandatory gate)
[verified false] <site>: <original claim> — actually <observed> so the user can see the gate ran and what it caught. [verified false] lines do NOT receive a severity tag — they are dropped findings, not graded ones.severity-rubric.md#cat-14-silent-swallow). If you cannot point at the anchor, drop one tier (anti-inflation tie-breaker) or refine the finding so it matches a row.Present Summary
# headings). Skip empty categories.Structural Integrity, Code Hygiene, Complexity & Hotspots, Technical Debt, Consistency (Docs vs Code), Documentation Coverage, Instruction Coherence, Tooling Relevance, Documentation Health, then Cats 10–16 per their Context names). In non-English reports every label MUST be a unique tag for that category — do not collapse two categories to one word and do not omit Documentation Health (FR-DOC-LINT: required dedicated header whenever step 10 produced any finding; DOC-to-DOC integrity, distinct from #5 and #6). When in doubt, keep the English label.- [N] [Severity] <file/symbol>: <problem>. (Fix: <proposed fix>). Grammar: severity is one of the four literal English strings [Critical], [High], [Medium], [Low] (stays English regardless of report language), placed IMMEDIATELY after the bracketed number and BEFORE the site path; never in the category header. [verified false] drop lines from the gate are emitted WITHOUT a severity tag.Total: N findings — Critical: a, High: b, Medium: c, Low: d (per category: <Cat>: x, <Cat>: y, …).Structural Integrity
- [1] [Medium] src/oldfile.ts: in root, should be in src/utils/. (Fix: move)
Code Hygiene
- [2] [Medium] utils.ts: unused export `myFunc`. (Fix: delete)
Documentation Health
- [3] [High] FR-AUTH marked [x] in SRS, acceptance test path does not exist. (Fix: create the test file or revert to [ ])
Total: 3 findings — Critical: 0, High: 1, Medium: 2, Low: 0 (per category: Structural Integrity: 1, Code Hygiene: 1, Documentation Health: 1).
Ask User How to Proceed
1, 3, 4) — only those findingsHygiene) — that categorycritical, high, medium, low — case-insensitive) — that tiercritical+high) — union of listed tiersall — every finding one by oneagent's choice — pick the most impactful subset yourself with a one-line justification, proceed without re-askingdone — stop, no fixesInteractive Resolution Loop
</step_by_step>
development
Use when the user asks to add TypeScript strict-mode code-style rules to AGENTS.md for a TypeScript project using strict mode. Do NOT trigger for Deno projects (use setup-agent-code-style-deno) or non-strict TS configurations.
development
Use when the user asks to add Deno/TypeScript code-style rules to AGENTS.md, or during initial Deno project setup when code-style guidelines need to be established. Do NOT trigger for non-Deno TypeScript projects (use setup-agent-code-style-strict), or for runtime-agnostic style advice.
testing
Use when the user provides a source (URL, file path, or free text) to save into the project's memex — a long-term knowledge bank for AI agents. Stores the raw source, extracts entities into cross-linked pages, runs a backlink audit, and updates the index and activity log. Do NOT trigger on casual reads; only when the intent is to persist a source into the memex.
development
Use when the user asks to audit a memex (long-term knowledge bank for AI agents) for orphans, dead SALP REFs, missing sections, contradictions, or index drift. Runs a deterministic structural check, layers LLM-judgement findings, optionally auto-fixes trivial issues with `--fix`. Do NOT trigger on general code linting.