원클릭으로
audit-branch
Pre-PR audit of the current branch — dead code, duplicate symbols, contract drift, leftover artifacts, import gaps.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Pre-PR audit of the current branch — dead code, duplicate symbols, contract drift, leftover artifacts, import gaps.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Author a new Fred agent capability (manifest + middleware) built on fred-sdk. Picks the right authoring lane, maps each runtime need to a middleware hook, wires entry-point registration, and enforces the capability boundary (never hand-edit union/registry hotspots, no capability code in control-plane, no runtime info in LLM tool signatures).
Query OpenFGA authorization tuples and explain why a user has (or doesn't have) a permission on an object
Safety-first review of an external pull request from an untrusted fork. Fetches the diff read-only into an isolated worktree, scans for supply-chain / exfiltration / CI-tampering threats, checks scope, then delegates correctness review. Never builds or runs the fork's code.
Post-merge validation — check that both sides of a merge were fully integrated, nothing was silently dropped, and quality still passes.
Run make code-quality from the monorepo root, covering all modules. Never run it per-module.
Identify new code paths added in the current branch that have no test coverage. Reports gaps; does not write tests.
SOC 직업 분류 기준
| name | audit-branch |
| description | Pre-PR audit of the current branch — dead code, duplicate symbols, contract drift, leftover artifacts, import gaps. |
| user-invocable | true |
| argument-hint | [{"optional":"focus area"},"e.g. \"python\" | \"frontend\" | \"contracts\""] |
A structured pre-PR audit. Run this before opening any pull request. It catches the class of
problems that make code-quality misses: logic regressions from merges, dead artifacts from
iteration, and drift between implementation and documented contracts.
git diff --name-only origin/develop...HEAD
Group changed files by module:
libs/fred-core/**libs/fred-sdk/**, libs/fred-runtime/**, libs/fred-agents/**apps/control-plane-backend/**apps/knowledge-flow-backend/**apps/frontend/**If $ARGUMENTS names a focus area (python, frontend, contracts), narrow the audit to that
group and note that the rest was skipped.
Open team decision — frontend scope: By default this audit skips deep TypeScript analysis (it is slow and tsc already runs in
quality-root). Should/audit-branchinclude a pass over new.tsx/.tsfiles for dead exports and missing$ARGUMENTS-style prop types? Decide before the first team-wide rollout.
For each changed Python file, look for:
variable = ... never read after assignment — ruff F841 catches runtime,
but also check variables only used in a removed call).# noqa: F401 intentional ones).c1d2e3f4, b2c3d4e5), TODO / FIXME comments added in this branch.@field_validator,
@property, or @model_validator decorators targeting the same field name.For each changed Alembic directory, verify the migration chain:
# In the app directory:
uv run alembic history
Check that down_revision values form a linear chain with no orphaned scripts.
For any module referenced by a changed file that does not exist on disk, flag it — even if a
# type: ignore suppresses the static error. These are silent runtime bombs.
Pattern to grep:
grep -rn "from fred_core\." <changed_python_files> | grep -v "^#"
Then verify each referenced module path exists under libs/fred-core/fred_core/.
Read docs/swift/design/RUNTIME-EXECUTION-CONTRACT.md and
docs/swift/design/CONTROL-PLANE-PRODUCT-CONTRACT.md.
For each new or changed API endpoint, request/response model, or ORM model in the branch:
Open team decision — undocumented endpoints: Should undocumented endpoints block the PR (hard stop) or produce a warning (advisory)? This is a policy call — the team should agree before enforcing it via CI.
If the branch has a merge commit (git log --merges -1), also run the checks from /merge-review
inline. Do not duplicate the output — summarise any merge-related findings in a single section.
## Branch audit — <branch> — <date>
### Summary
- Files changed: N (Python: X, Frontend: Y, Alembic: Z, Docs: W)
- Merge commits: 0 | 1 (see Merge section)
### 🔴 Must fix before PR
- <file>:<line> — <description>
### 🟡 Should review
- <file>:<line> — <description>
### ℹ️ Team decisions needed
- <description of open policy choice>
### ✅ Clean areas
- Contract alignment: OK
- Alembic chain: linear, no orphans
Do not auto-fix anything. Report only. The developer decides what to act on.