intended-vs-implemented
phuryn/pm-skills
코드베이스에서 문서화된 의도와 실제 구현 간의 불일치를 찾아내며, 의도 모델이 부족하여 일반적인 스캐너가 놓치는 버그를 포착합니다.
...모든 것을 확장하십시오계획 대비 실제: 격차 감사
목적
린터는 고립된 환경에서 코드를 스캔합니다. 린터는 코드가 내부적으로 일관성이 있는지 알려줄 수는 있지만, 개발자의 의도를 반영한 모델이 없기 때문에 코드가 의도한 대로 동작하는지 여부는 판단할 수 없습니다. 가장 심각한 보안 및 정확성 결함은 바로 그 격차 속에 존재합니다. 문서화되었으나 결코 적용되지 않은 권한, 누구나 호출할 수 있는 “cron 전용” 엔드포인트, 비공개 데이터를 유출하는 public 전용으로 표시된 필드 등이 그 예입니다.
이 기술은 바로 그 격차를 찾아내는 방법입니다. 이것이 차별화 요소입니다: 이 기술은 의도가 먼저 문서화되었을 때만 작동하며(‘배포 아티팩트’ 기술 참조), 바로 그 이유 때문에 일반적인 도구로는 이를 재현할 수 없습니다.
배경
문서화된 의도가 존재할 때 이 기술을 사용하십시오 — permissions.md, architecture.md, variables.md등. 해당 문서가 없거나 오래되었다면, 그 부재 자체가 첫 번째 발견 사항입니다: 기록된 적이 없는 의도를 감사할 수는 없습니다. 먼저 문서를 작성한 다음 감사를 수행할 것을 권장합니다.
방법
의도를 확립하십시오.
/documentation/*.md설정을 ‘누가 무엇에 접근할 수 있는지’, ‘어떤 경계가 신뢰할 수 있는지’, ‘어떤 데이터가 공개되는지’와 같은 사실에 대한 ‘진실의 원천’으로 삼으십시오. 문서를 증거가 아닌 검증해야 할 주장으로 취급하십시오.구현 증거를 수집하십시오. 각 주장을 적용(또는 적용하지 못함)하는 코드를 검토하십시오. 증거란 인용된 파일과 줄 번호, 즉 실제 권한 확인, 실제 쿼리 필터, 실제 데이터 정제 기능을 의미합니다. “아마도 상위 단계에서 처리될 것”이라는 말은 증거가 아니며, 코드 경로 자체가 증거입니다.
주장과 코드를 경계 하나씩 비교하십시오. 문서화된 각 규칙에 대해 다음과 같이 질문하십시오: 서버에서, 모든 경로에서, 실제로 이를 적용하는 지점이 존재합니까? “내부 전용”, “관리자 전용” 또는 “다른 곳에서 검증됨”과 같은 주석은 신뢰하지 말고, 코드에서 직접 검증하십시오.
각 불일치를 그 중요도에 따라 분류하십시오. 불일치는 이를 넘어설 경우 실제 공격자가 접근해서는 안 되는 데이터, 자금, 인프라 또는 다른 테넌트에 도달할 수 있게 될 때 중요합니다. 영향을 받는 대상이 공격자 본인이며 자신의 데이터에만 국한될 때는 중요하지 않습니다. 표면적인 편차는 무시하고, 경계를 넘는 편차는 기록하십시오.
모호한 발견 사항은 피하십시오. 모든 발견 사항에는 다음이 명시되어야 합니다: 문서화된 의도(문서 인용), 구현된 현실(코드 인용), 공격자와 피해자, 그리고 구체적인 수정 방안. 격차의 양쪽 측면을 모두 인용할 수 없다면, 이는 보고해야 할 발견 사항이 아니라 조사해야 할 문제입니다.
중요 사항
- 의도: 문서화된 규칙, 경계, 범위, 또는 공개/비공개 분류.
- 구현 증거: 코드 내 인용된 강제 적용 지점(또는 그 부재가 증명 가능한 경우).
- 중요한 불일치: 문서는 한 가지를 말하지만 코드는 다른 행동을 하며, 그 차이가 신뢰, 비용, 데이터 또는 테넌트 경계를 넘어서는 경우.
참고 사항
- ‘문서화되었으나 시행되지 않은’ 사항은 그 자체로 발견 사항입니다 — 이 격차로 인해 노출되는 위험의 정도에 따라 우선순위를 매기십시오.
- 문서화되었으나 시행되지 않은 경우는 대개 문제가 없으나, 이를 표시해 두어야 합니다. 문서가 현재 구식이므로 다음 감사 시 신뢰도가 약화될 수 있습니다.
- 이 방법은 보안 및 성능 감사에 정보를 제공하지만, 해당 감사의 심층 분석을 대체하는 것은 아닙니다. 이 방법은 감사에 부족한 ‘의도’라는 차원을 추가할 뿐입니다.
- 결함을 인위적으로 만들기 위해 의도를 조작해서는 안 됩니다. 문서에 언급이 없다면, 문서에 언급이 없다고 명시하십시오.
---
name: intended-vs-implemented
description: Finds gaps between documented intent and actual implementation in codebases, catching bugs that generic scanners miss because they lack a model of intent.
---
# Intended vs. Implemented: Auditing the Gap
## Purpose
A linter scans code in a vacuum. It can tell you the code is *internally* consistent; it cannot tell you the code does what you *meant*, because it has no model of your intent. The highest-value security and correctness bugs live in that gap — a permission documented but never enforced, a "cron-only" endpoint anyone can call, a field marked public-only that leaks private data.
This skill is the method for finding that gap. It is the differentiator: it only works when intent has been written down first (see the **shipping-artifacts** skill), and that's exactly why commodity tools can't replicate it.
## Context
Use this when documented intent exists — `permissions.md`, `architecture.md`, `variables.md`, etc. If those docs are absent or stale, that absence is itself the first finding: you cannot audit intent you never recorded. Recommend documenting first, then auditing.
## Method
1. **Establish intent.** Read the `/documentation/*.md` set as the source of truth for what *should* be true: who may access what, which boundaries are trusted, which data is public. Treat the docs as claims to verify, not as proof.
2. **Gather implementation evidence.** Read the code that enforces (or fails to enforce) each claim. Evidence is a cited file and line — the actual authorization check, the actual query filter, the actual sanitizer. "It's probably handled upstream" is not evidence; the code path is.
3. **Compare claim to code, one boundary at a time.** For each documented rule, ask: does an enforcement point actually implement it, on the server, on every path? Distrust comments like "internal only," "admin only," or "validated elsewhere" — verify them in code.
4. **Classify each mismatch by whether it matters.** A mismatch matters when crossing it lets a real actor reach data, money, infrastructure, or another tenant they shouldn't. It does not matter when the only person affected is the actor themselves on their own data. Drop cosmetic drift; keep boundary-crossing drift.
5. **Avoid hand-wavy findings.** Every finding names: the **documented intent** (quote the doc), the **implemented reality** (cite the code), the **attacker and victim**, and the **concrete fix**. If you cannot cite both sides of the gap, it is a question to investigate, not a finding to report.
## What counts
- **Intent:** a documented rule, boundary, scope, or public/private classification.
- **Implementation evidence:** a cited enforcement point (or its provable absence) in the code.
- **A mismatch that matters:** doc says one thing, code does another, and the difference crosses a trust, cost, data, or tenant boundary.
## Notes
- Documented-but-unenforced is a finding on its own — rank it by what crossing the gap exposes.
- Undocumented-but-enforced is usually fine, but flag it: the docs are now stale, which weakens the next audit.
- This method feeds the security and performance audits; it does not replace their sink-level analysis — it adds the intent axis they lack.
- Never fabricate intent to manufacture a gap. If the docs are silent, say the docs are silent.
모든 파일
1개 파일intended-vs-implemented 설치
스킬 파일을 다운로드한 후 .claude/skills/ 디렉터리에 압축을 풀어주세요.
ZIP 다운로드저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.
git clone https://github.com/phuryn/pm-skills/tree/main/pm-ai-shipping/skills/intended-vs-implemented # Copy SKILL.md to your .claude/skills/ directory
복사





집
