원클릭으로
ai-assistant-protocol
Core execution protocol governing code quality, testing, scope management, and approval gates for AI coding assistants.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Core execution protocol governing code quality, testing, scope management, and approval gates for AI coding assistants.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
End-of-session routine. Ensures test coverage, performs self-review, runs validation, and commits cleanly. Use when finishing a unit of work.
Full feature implementation workflow with explore, plan, code, test, validate, and commit phases. Use for new features, enhancements, or significant code changes.
Iterate on an open PR until CI passes and all review feedback is addressed. Fetches status, categorizes findings by severity, applies fixes, and loops until clean.
Create a detailed implementation plan without writing code. Read-only analysis and planning with user approval gate. Use before implementing features or making significant changes.
Systematic security audit with confidence-based reporting. Analyzes attack surfaces, checks against OWASP categories, and reports only confirmed or likely vulnerabilities. Use for pre-merge security review or periodic audits.
Run validation checks to ensure code quality, security, and correctness. Supports quick (scoped), full (CI pipeline), fix (auto-correct), and CI mirror modes.
| name | ai-assistant-protocol |
| description | Core execution protocol governing code quality, testing, scope management, and approval gates for AI coding assistants. |
| category | protocol |
| user-invocable | false |
Core rules that apply to all files and all roles.
These are absolute rules. No rationalization, no exceptions, no "just this once."
When multiple skills are active, their iron laws compose as follows:
/tdd adds "no production code without a failing test")Universal rule: No claims without fresh evidence.
Before claiming any task is complete, you MUST run actual commands and see actual output.
Code change verification:
Bug fix verification:
Refactor verification:
Build verification:
| The Excuse | The Rebuttal |
|---|---|
| "This is too simple to need tests" | Simple code becomes complex. Untested code breaks silently. Test it. |
| "The test just ran, no need to re-run" | Stale results are not evidence. You may have changed something since. Run it again. |
| "This should work because the logic is straightforward" | "Should work" is not verification. Run the command. Read the output. |
| "I already read this file, I know what it does" | Context degrades. If you're making changes, re-verify the current state. |
| "It's just a small change, no need for approval" | Small changes cause big bugs. Follow the gate. |
| "The user probably means yes" | "Probably" is not explicit approval. Ask clearly. |
| "I can fix this while I'm here" | Out of scope. Create a todo instead. Scope creep compounds. |
| "Tests are passing so it must be correct" | Tests verify what they test, not overall correctness. Think about what's NOT tested. |
| "I'll add tests later" | Later never comes. Write tests with the code or before the code. |
| "This error is unrelated, I can ignore it" | Investigate first. "Unrelated" errors are often symptoms of the same root cause. |
Write comments for:
Avoid comments for:
console.log)debug, info, warn, errorThese rules apply to all code written or modified. Violations are blockers — fix before proceeding.
| Pattern | Risk | Alternative |
|---|---|---|
eval(userInput) / new Function(userInput) | Code injection | Avoid dynamic code execution; use a safe parser |
element.innerHTML = userInput | XSS | Use textContent or framework escaping ({variable} in JSX) |
dangerouslySetInnerHTML={{__html: userInput}} | XSS | Sanitize with DOMPurify first, or avoid entirely |
`SELECT * FROM x WHERE id = '${id}'` | SQL injection | Use parameterized queries or ORM |
exec(userInput) / execSync(userInput) | Command injection | Use execFile() with explicit argument array |
const KEY = 'sk_live_abc123' | Secret exposure | Use process.env.KEY with validation |
rejectUnauthorized: false | TLS bypass | Fix certificates; never disable in production |
--no-verify on git hooks | Bypasses safety | Fix the hook failure instead |
helmet or equivalentIf any of these appear in changed code, flag them for the user even if they look safe:
child_process usage (any variant)Always scope tests to changed components only. Avoid full test suite unless explicitly requested.
# Commands below use npm as default — adapt to project package manager (see Project Commands)
npm run test -- ComponentName
npm run test -- "src/components/"
All test files MUST include a test plan comment in Gherkin format:
/**
* Test Plan: ComponentName
*
* Scenario: Brief description
* Given [initial state]
* When [action]
* Then [expected outcome]
*/
Skills reference commands generically (e.g., "run the project's test command"). Resolve the actual command as follows:
.ai-project/project/commands.md exists, use the commands defined therepnpm-lock.yaml → use pnpmyarn.lock → use yarnbun.lockb → use bunnpm| Task | Generic Reference | npm Example |
|---|---|---|
| Type check | project typecheck command | npm run typecheck |
| Lint | project lint command | npm run lint |
| Test (scoped) | project test command | npm run test -- [pattern] |
| Test (full) | project test command | npm run test |
| Build | project build command | npm run build |
| Dev server | project dev command | npm run dev |
| Format | project format command | npm run format |
Command examples throughout skills use npm run as the default. Adapt to the detected package manager.
For documentation standards (when to comment, JSDoc, README guidelines), see documentation-guidelines.
Create freely: Config files, stories, specs, tests, source code, entries in project todos and file lists.
Require user approval: README.md, documentation files, API documentation, architecture diagrams, CHANGELOG.md.
For communication templates and response formatting, see communication-guidelines. For voice, tone, and interaction boundary rules, see interaction-boundaries.
Use task tracking for complex tasks (3+ steps). Skip for trivial tasks.
in_progress BEFORE starting (one at a time)completed IMMEDIATELY after finishing| Scope | Files | Action |
|---|---|---|
| Small | 1-5 | Proceed directly |
| Medium | 6-15 | Confirm with user, suggest /refactor if structural |
| Large | 16+ | Must use refactor workflow |
Workflows with approval gates require explicit approval before proceeding.
Valid approval: yes, y, approved, proceed, lgtm, looks good, go ahead
Invalid (NOT approval): Silence, questions, "I see", "okay", "hmm"
Individual skills may accept domain-specific terms (e.g., commit in the commit workflow). These supplement — never replace — the list above.
These skills include their own validation and commit phases. Do not chain additional validation or commit skills after them:
| Skill | Includes |
|---|---|
/implement | explore + plan + code + self-review + test + validate + commit |
/finish | test + validate + review + commit |
/debug | reproduce + analyze + fix + verify + commit |
/refactor | context + analysis + plan + execute + validate + commit |
/hotfix | triage + fix + verify + commit |
/migrate | assess + plan + generate + review + apply + validate + commit |
/release | prepare + version + validate + tag |
/deps | audit + plan + update + validate + commit |
Do NOT chain: /finish after /implement, /validate after /finish, /commit after /debug. The enclosing workflow already performs these steps.
These skills perform a single concern and are designed to be called independently or referenced within larger workflows:
| Skill | Purpose |
|---|---|
/validate | Run quality checks only |
/test-coverage | Add missing tests only |
/commit | Stage and commit only |
/review | Read-only code analysis |
/explore | Read-only investigation |
/plan | Design approach only |
/track-files | Track file batches for large-scale work |
/implement/refactor/plan, then /implement or /tdd/debug/hotfix/test-coverage/tdd/finish (only if work was not done via a self-contained workflow)