File size: 4,498 Bytes
7a5c442
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Command registry

Every discoverable command in `icat_app`, what it does, and where it runs. If a command is not on this list, it is either undocumented (open an issue) or not part of the supported surface.

## Run the app

| Command                                  | Purpose                       | Where it runs                                            |
|------------------------------------------|-------------------------------|----------------------------------------------------------|
| `pip install -r requirements.txt`        | Install dependencies          | Local + HF Space build                                   |
| `streamlit run app.py`                   | Start the Streamlit dev server| Local (`http://localhost:8501`) + HF Space runtime       |

## Structural verification

| Command                                  | Purpose                                                                                              | Where it runs                                  |
|------------------------------------------|------------------------------------------------------------------------------------------------------|------------------------------------------------|
| `python scripts/repo_validate.py`        | Non-interactive structural check: `py_compile` over every `*.py`, `requirements.txt` parseable, README HF frontmatter sanity. Exits non-zero on first failure. | Local + `.github/workflows/repo_validate.yml` (PR only) |

This is the one-command proof. Run it before pushing.

## Lint (via DECODE gate)

| Command                                  | Purpose                                                  | Where it runs                                                                       |
|------------------------------------------|----------------------------------------------------------|-------------------------------------------------------------------------------------|
| `bash scripts/language-gate.sh`          | Ruff lint over staged or supplied files (Python).        | `.githooks/pre-commit` (when `core.hooksPath = .githooks`) + `.github/workflows/gate.yml` (PR + push to main) |
| `bash scripts/setup.sh`                  | Wire `core.hooksPath = .githooks`. Idempotent.           | Local one-time bootstrap (SessionStart hook in Claude Code does this automatically) |
| `bash scripts/reviewer-hash.sh`          | Compute the diff+untracked hash that the reviewer marker binds to. | Called by `.claude/hooks/reviewer-stop.sh`, `.githooks/commit-msg`, and the reviewer subagent. |

## Deploy

| Command                                  | Purpose                                       | Where it runs                                       |
|------------------------------------------|-----------------------------------------------|-----------------------------------------------------|
| (none — automatic)                       | `.github/workflows/main.yml` pushes the working tree to the HF Space. Trigger: push to `main` or manual `workflow_dispatch`. | GitHub Actions on `implicitdiagnosticsandsolutions/icat_app`. Uses `HF_TOKEN`. |

There is no manual deploy script. Do not invent one. See `docs/guides/protected-boundary-policy.md`.

## Reviewer flow (in Claude Code)

In a Claude Code session, the reviewer procedure is:

1. `git diff HEAD` (read the change).
2. Dispatch the `feature-dev:code-reviewer` subagent via the Agent tool.
3. If no blocking findings, write `.decode-reviewer-clean` with one line: `<HEAD-SHA> <DIFF-HASH> <ISO-8601-UTC-timestamp>`, where `<DIFF-HASH>` comes from `bash scripts/reviewer-hash.sh`.
4. If blocking findings, write `.decode-reviewer-findings.md` instead. The Stop hook will continue to block until the next clean review.

See `docs/guides/review-workflow.md` for the contract and override semantics.

## Commit override (audit-logged)

| Command                                                                          | Purpose                                                                            |
|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------|
| `git commit -m "... [override-reviewer: <reason>]"`                              | Bypass the reviewer-marker check in `.githooks/commit-msg`. Logged forever in git history; visible via `git log --grep="override-reviewer"`. |

Use only for genuinely trivial changes (typo, comment), and always with a real reason.