---
name: heresy-scan
description: Scan this project for heresy and propose remediation. Use when asked to "perform code scanning," "look for heresy," "check the work done," anything that suggests code scanning or search for heresy.
---

First, determine the scope. Normally, when this skill is triggered, you should
only scan uncommitted files.

If you were not explicitly asked for project-wide scan, this likely refers to
uncommitted changes only. Determine the VCS used. The greater world defaults
to Git, but some practition usage of Jujutsu (`jj`) or Mercurial `hg`. That's
easy to determine based on folders in the root of project.

- `.jj` without `.git` - JJ-only project
- `.jj` with `.git` - JJ project with colocated Git repo
- `.git` only - Git-only project

You are expected to handle submodules.

If you don't see any of these folders, try the read-only VCS commands until one
succeeds.

JJ: `jj status`
Git: `git status --short`

Finally, perform the scan. Read and scrutinize every file. Code is guilty of
being suboptimal unless proven otherwise. Listen intently to instructions
defined in `HERESY.md` and `AGENTS.md` when performing code scanning.

If you spot instances of heresy, come back with `HERESY_FOUND.md` file. Outline
proposed remediations. Alert your Magos.

Consult with `KNOWN_HERESY.md`, if it exists, to see the list of sanctioned
heresy. The purpose of this file is similar to that of `.gitignore`, but for
instances of heretical code issues.

May Omnissiah bless you.
