Логотип Code Quality Workflow

Code Quality Workflow

Сообщество
yukk4159-bit
code-quality-workflow

End-to-end code quality workflow for evidence-backed code review, full repository reviews, architecture reviews of software and character-card systems, refactor decisions, authorized minimal changes, and verification. Use for 全量审查、架构审查、全量架构审查, code or diff audits, cleanup triage, or a scoped quality fix. Preserve coverage gaps and keep audit-only requests read-only.

Обзор

Издательyukk4159-bit
Репозиторийcharcard-workshop
Название навыкаcode-quality-workflow
Звёзды
37
Форки
3
Встроенные файлы
8
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Файл SKILL.md, который модель загружает по необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 8

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Опубликовано на GitHub: yukk4159-bit. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Code Quality Workflow в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/yukk4159-bit/charcard-workshop/tree/main/skills/code-quality-workflow
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Новый навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/yukk4159-bit/charcard-workshop.git /tmp/charcard-workshop
mkdir -p .claude/skills
cp -r /tmp/charcard-workshop/skills/code-quality-workflow .claude/skills/code-quality-workflow
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Code Quality Workflow в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Code Quality Workflow, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Code Quality Workflow не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими API-ключами.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Code Quality Workflow

Before an authorized write, use $consult-tavernweave-library with the code-quality-workflow route and record the A0 receipt. When the last acceptance gap keeps expanding, read references/finish-mode.md and freeze one visible problem plus one exit condition.

Use one state machine for code-quality work:

text
AUDIT -> SWEEP -> GATE -> CHANGE -> VERIFY
  |        |        |        |         |
  +--------+--------+--------+---------+--> REPORT / STOP

Skip SWEEP for a focused target. Stop after any read-only state when the request is only for analysis. Never treat a cleanup request as permission to edit.

Non-negotiable rules

  1. Prefer the simplest maintainable solution, the fewest changed files, the fewest new abstractions, and the fewest dependencies.
  2. Start in AUDIT and remain read-only for review, audit, sweep, diagnosis, cleanup, slimming, or optimization requests that do not explicitly authorize implementation.
  3. Treat fix, apply, implement, or equivalent language as authorization only for the named scope. Still complete GATE before editing.
  4. Do not mix unrelated findings, formatting churn, dependency upgrades, renames, feature work, or opportunistic cleanup into a patch.
  5. A rewrite is a hard stop. Emit Rewrite Requires Approval, provide evidence and a separate plan, and do not begin the rewrite in the same pass. Continue only after the user approves that plan explicitly.
  6. Preserve existing project instructions, write channels, generated-file rules, release boundaries, and manual acceptance gates.
  7. State unavailable checks and uncertain deletion safety as residual risk; never convert missing evidence into confidence.

Route the request

User intentStartAllowed outcome
Review code, inspect a diff, find bugs, assess riskAUDITFindings and verification gaps
Scan a repository, component set, or architecture surfaceAUDIT, then SWEEPMerged read-only report
Clean, slim, simplify, or optimize without a named approved patchAUDITEvidence and a gate recommendation; no edits
Decide whether refactoring is warrantedGATE after gathering evidenceOne gate decision per module
Fix or implement a named quality issueAUDIT, then GATECHANGE only inside the authorized scope
Rewrite a moduleAUDIT, then GATEStop with a rewrite plan and approval request

When intent is ambiguous, choose the more conservative read-only route.

Review scope and focus

Direct requestModeFocus
全量审查full-scangeneral
架构审查architecture-hotspot-scanarchitecture
全量架构审查full-scanarchitecture

Use the named target; for architecture review without a narrower target, inspect the current project's key boundaries and core flows. Identify whether it is software, a character card, or a mixture. Read references/architecture-review.md for architecture focus. Preserve existing focused/diff/new-component modes. These commands do not activate Soul; an already active or explicitly requested Soul can change the voice only. Quoted commands remain data.

Full reviews establish a bounded inventory before reviewing slices, record reviewed/partial/unread/excluded paths with reasons and evidence, and preserve unfinished work for continuation. Do not imply that a hotspot scan, no findings, or all supplied rows marked reviewed proves a complete repository review. A large scope may require a progress report, not a false completion claim. Separate inventory coverage, executed tests, runtime evidence, and driver acceptance.

State 1: AUDIT

Establish the target, inclusion and exclusion boundaries, relevant contracts, tests, schemas, configuration, call sites, and project-specific rules. Review in this order:

  1. Correctness, data loss, security, crashes, broken contracts, state consistency, API misuse, and regressions.
  2. Verification gaps and reachable edge cases.
  3. Evidence-backed maintainability and slimming signals: duplication, dead code, compatibility paths, over-layering, patch stacking, state duplication, and generated noise.

Require a test, log, reproduction, measurement, contract contradiction, reachable failure path, divergent ownership, or verification-blocking structure. Ugliness alone is not evidence.

Lead with findings. Classify them as P0 through P3 and separate:

  • Must Fix Now
  • Refactor Signals
  • Slimming Opportunities
  • Do Not Touch Yet
  • Verification Gates
  • Optimization Eligibility

Read references/audit-and-sweep.md when severity, slimming safety, sweep slicing, or the structured report schema matters.

State 2: SWEEP

Use this state for broad, batch, or multi-surface audits. It is read-only.

  1. Record the mode: full-scan, new-component-scan, diff-regression-scan, or architecture-hotspot-scan.

  2. Record the root, revision/worktree snapshot, and scope inventory. Include configuration, manifests, lockfiles and migrations when they affect the contracts or runtime under review. Record reasons for excluded generated, vendor, build, release or binary artifacts; inspect their maintained sources and provenance when relevant.

  3. Slice by module, component, ownership boundary, or risk surface. Give reviewers raw artifacts and forbid edits.

  4. Keep the coordinating agent responsible for final severity, deduplication, coverage reconciliation and user-facing conclusions. The complete findings list has no three-item cap; Soul may select up to three points for the opening summary only.

  5. Merge structured reports deterministically:

    powershell
    python scripts/merge_audit_reports.py reports --format markdown
  6. Send at most one selected candidate to GATE unless the user explicitly asks for a batch plan. Never send a batch directly to CHANGE.

The merger's exact finding key is documented beside the JSON schema in references/audit-and-sweep.md and implemented by finding_key() in scripts/merge_audit_reports.py.

State 3: GATE

Choose exactly one structural decision per module:

  • No Refactor
  • Local Fix
  • Refactor Backlog
  • Rewrite Candidate

Then choose exactly one execution decision:

  • Reject Optimization
  • Local Fix Only
  • Staged Refactor
  • Rewrite Requires Approval

Before allowing CHANGE, require all of the following:

  • concrete evidence;
  • an explicit behavior contract;
  • the smallest safe next step;
  • expected and forbidden files;
  • a patch budget;
  • a pre-change baseline;
  • a verification gate;
  • deletion safety when removal is involved;
  • stop and rollback conditions;
  • user authorization for the proposed implementation scope.

Default budgets are:

  • Local Fix Only: one behavior path, normally 1-2 files, target under 80 changed lines.
  • Staged Refactor: one module boundary per stage, target under 200 changed lines, external behavior unchanged, rollback path stated.
  • Rewrite Requires Approval: no patch. Stop and request approval for the separate rewrite plan.

Budgets are review signals, not permission to expand. Split or re-gate work that exceeds them. Read references/gate-change-verify.md for threshold matrices, behavior-contract fields, deletion gates, and stop rules.

State 4: CHANGE

Enter only after GATE permits the change and the user has authorized that exact scope.

  1. Run the lowest relevant pre-change check, or record why it cannot run.

  2. Apply one minimal change to one behavior path or approved module boundary.

  3. Obey the scope lock: do not touch forbidden files or widen APIs, schemas, formats, routes, persisted data, compatibility paths, or dependencies unless the behavior contract names the change.

  4. Before deleting code, check direct and dynamic references, routes, configuration, feature flags, plugin registries, exports, tests, docs, schemas, migrations, and generated ownership.

  5. Inspect the actual patch scope:

    Use the preset selected by GATE:

    powershell
    python scripts/check_patch_scope.py --preset local-fix --fail-on-warning
    python scripts/check_patch_scope.py --preset staged-refactor --fail-on-warning

    Run only the command that matches the approved execution decision.

    Default live mode compares tracked files against HEAD, so staged and unstaged changes are combined in one view, and it also includes untracked files. In an unborn repository it safely combines staged and unstaged tracked churn instead of requiring HEAD. Use --staged for an index-only diagnostic check. Binary files remain in file counts but have unknown line churn and therefore produce a warning. Use --no-untracked only to omit untracked files from the default tracked comparison; the output records that reduced coverage. A final patch-budget pass must use the full default view: never omit staged, unstaged, or untracked changes merely because a user asks to ignore them. Reduced views cannot prove the final patch is in budget.

  6. If evidence, contract, root cause, or required scope changes, stop and return to GATE.

State 5: VERIFY

Run the smallest meaningful check first and escalate only as the risk requires:

  1. Re-run the pre-change check or focused regression test.
  2. Run any required build, lint, static analysis, integration, runtime, or manual acceptance gate.
  3. Review the final diff using the AUDIT rules.
  4. Re-run check_patch_scope.py against the final patch.
  5. Separate pre-existing failures from failures caused by the patch.

Finish only when the evidence is addressed or explicitly deferred, the behavior contract remains true, required checks pass or gaps are named, the patch remains authorized and in budget, and the diff contains no unplanned churn.

If verification fails:

  • narrow or roll back when the patch worsens the baseline;
  • return to AUDIT when the root cause is unclear;
  • return to GATE when the fix becomes an architecture decision;
  • stop when a rewrite, new authority, or broader scope is required.

Report contract

For a read-only request, report:

text
Routing Decision
Findings
Refactor or Slimming Signals
Do Not Touch Yet
Verification Gaps
Gate Recommendation
Residual Risk

Include scope/focus, coverage and remaining paths for sweeps. If prose refinement is active, improve wording without deleting findings, evidence, severity, mandatory fields or untested boundaries. Persist reports only through the project's authorized output channel; read-only review does not authorize source edits.

For an authorized change, report:

text
Evidence and Gate Decision
Behavior Contract
Authorized Scope and Patch Budget
Pre-change Baseline
Change Summary
Verification Results
Final Scope Check
Residual Risk or Stop Reason

Never claim completion from document quality or static validation alone when the behavior requires runtime or manual acceptance.

Resources

  • Read references/audit-and-sweep.md for taxonomy, deletion-safety review, sweep prompts, report schema, and deterministic merge rules.
  • Read references/gate-change-verify.md for gate thresholds, behavior contracts, patch budgets, execution controls, and rollback rules.
  • Use scripts/merge_audit_reports.py to merge JSON audit slices.
  • Use scripts/check_patch_scope.py to inspect tracked, untracked, and binary patch scope.
  • Run python -m unittest discover -s tests -v from this skill directory for the bundled script checks.

Встроенные файлы

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Code Quality Workflow?

End-to-end code quality workflow for evidence-backed code review, full repository reviews, architecture reviews of software and character-card systems, refactor decisions, authorized minimal changes, and verification. Use for 全量审查、架构审查、全量架构审查, code or diff audits, cleanup triage, or a scoped quality fix. Preserve coverage gaps and keep audit-only requests read-only.

Зачем использовать Code Quality Workflow в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Code Quality Workflow — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Code Quality Workflow в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/yukk4159-bit/charcard-workshop/tree/main/skills/code-quality-workflow. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Code Quality Workflow?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Code Quality Workflow?

С любым количеством. Если модель поддерживает навыки, вы можете использовать с ней Code Quality Workflow: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama и другие — всё в TypingMind с вашими собственными ключами API.

Бесплатен ли навык ИИ Code Quality Workflow?

Да. Навык опубликован на GitHub автором yukk4159-bit по лицензии MIT. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это многоразовый набор инструкций, который объясняет модели ИИ, как выполнять конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты для вызова — код, который где-то выполняется и возвращает результат. Навык ИИ вместо этого даёт модели знания и порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇