cognitive-quality-gate
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "cognitive-quality-gate" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-1d7322ea08559ee607edc3d5538ad42af3edf44a5dcfaffc76e17d18b7ca00a5. Verify the upstream source and version against https://skillhub.cn/skills/user_5735bd90/cognitive-quality-gate before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Cognitive quality gate: for complex tasks or scenarios that require ensuring outputs are stable, reliable, and executable, automatically guide the AI to apply first-principles reasoning and adversarial review and provide structured quality assurance of outputs. Trigger words include: quality assurance, first principles, adversarial review, quality gate, stability check, reliability verification, executability, cognitive quality gate, first principles review, adversarial review.
Introduction source: third_party · user_5735bd90 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- This skill provides a structured cognitive quality framework that automatically assesses task complexity and applies proportional depth of first-principles thinking and adversarial review before delivering output. The goal is to ensure every non-trivial output is stable, accurate, reliable, and executable — without adding unnecessary overhead to simple tasks.
- Inputs and outputs
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: cognitive-quality-gate
description: "认知质量门控——根据任务复杂度自动引导 AI 应用第一性原理思维和对抗性审查,对输出结果进行结构化质量保障。当任务涉及复杂分析、架构设计、代码实现、技术方案、多步骤流程、高风险决策、或任何需要确保输出稳定准确可靠可执行的场景时触发。触发词:质量保障、第一性原理、对抗性审查、质量门控、稳定性检查、可靠性验证、可执行性、cognitive quality gate、first principles review、adversarial review。"
agent_created: trueCognitive Quality Gate
Overview
This skill provides a structured cognitive quality framework that automatically assesses task complexity and applies proportional depth of first-principles thinking and adversarial review before delivering output. The goal is to ensure every non-trivial output is stable, accurate, reliable, and executable — without adding unnecessary overhead to simple tasks.
The framework operates as a four-phase pipeline applied internally before the final response is delivered to the user: Assess → Think → Review → Gate. The depth of each phase scales with the assessed complexity level.
When to Apply
Apply this skill proactively to ANY non-trivial task. Specifically:
- Multi-step implementation tasks (code, architecture, systems design)
- Analysis and decision-making tasks (technical evaluation, trade-off analysis, risk assessment)
- Document generation where accuracy matters (technical docs, plans, reports)
- Any task involving irreversible actions, external systems, or domain expertise
- Any task where the user explicitly asks for reliability, accuracy, or thoroughness
Do NOT apply to trivial tasks: greetings, simple lookups, single-line answers, formatting fixes, or tasks with fully deterministic and reversible outcomes (L1 complexity).
The Four-Phase Pipeline
Phase 1: Assess — Determine Complexity
Before starting work, assess the task's complexity across five dimensions. Load references/complexity-matrix.md for the full assessment framework.
Quick assessment signals:
| Dimension | What to Check |
|---|---|
| Interdependency | How many components/systems must coordinate? |
| Irreversibility | If wrong, how hard to recover? |
| Ambiguity | How well-defined is success? |
| Expertise | How much domain knowledge is needed? |
| Scope | How much surface area does the output cover? |
Determine the complexity level:
- L1 (Light) — All dimensions low. Quick self-check only.
- L2 (Standard) — Some medium dimensions. Standard first-principles + targeted adversarial review.
- L3 (Deep) — At least one high dimension. Full first-principles + comprehensive adversarial review.
- L4 (Critical) — Any critical dimension. Maximum rigor + red-team + risk disclosure.
Apply auto-escalation: if the task involves money, security, legal compliance, personal data, or the user explicitly flags it as important, escalate one level.
The assessment is internal — it informs review depth, not user-facing output.
Phase 2: Think — Apply First-Principles
Before generating the output, apply first-principles thinking at the depth appropriate to the complexity level. Load references/first-principles-guide.md for the full methodology.
L1: Skip. Verify the approach is standard for this task type.
L2: Run Steps 1-2 — inventory key assumptions, identify hard constraints, verify the hard constraints hold.
L3: Run the full 4-step process — inventory assumptions, identify constraints, reconstruct from ground up, verify foundation.
L4: Full 4-step process + independent re-derivation — attempt to derive the solution via a different path; if both paths agree, confidence is high. If they diverge, investigate the discrepancy before proceeding.
The key question at every level: "What must be true for this approach to work, and have I verified those things?"
Phase 3: Review — Adversarial Examination
After generating a draft output (but before delivering it), adopt a hostile reviewer mindset and systematically attack the output. Load references/adversarial-review-checklist.md for the full checklist.
L1: Quick correctness check — verify no obvious errors, check format matches expectation.
L2: Apply review categories 1 (Correctness), 4 (Executability), 5 (Completeness).
L3: Apply all 6 review categories — Correctness, Assumption Stress Test, Failure Mode Analysis, Executability, Completeness, Alternative Perspective.
L4: All 6 categories + active red-teaming — construct specific counterexamples, edge-case inputs, or failure scenarios and test the output against them.
Classify every defect found:
- Blocker — Output is wrong, dangerous, or non-executable. MUST fix before delivery.
- Major — Significant gap or risk. Fix if possible; if not, explicitly disclose to user.
- Minor — Correct but could be improved. Fix if quick; otherwise note.
- Nit — Cosmetic. Ignore unless trivial.
If any Blockers are found, do NOT deliver — fix them first and re-review.
Phase 4: Gate — Quality Verification
Before delivering the final output, verify it passes the quality gate. The gate has four criteria, each must be explicitly checked:
Stability (稳定)
- [ ] Does the output produce consistent results across reasonable input variations?
- [ ] Are there any race conditions, order-dependencies, or timing assumptions?
- [ ] Will the output remain valid if the environment changes slightly?
Accuracy (准确)
- [ ] Are all factual claims verifiable and correct?
- [ ] Are all calculations, references, and citations accurate?
- [ ] Is the logic sound — do conclusions follow from premises?
Reliability (可靠)
- [ ] Are failure modes handled? Does the output degrade gracefully?
- [ ] Are assumptions explicitly stated rather than hidden?
- [ ] Is there a recovery path if something goes wrong?
- [ ] For L3/L4: are risks and limitations disclosed?
Executability (可执行)
- [ ] Can the intended audience execute this without asking follow-up questions?
- [ ] Are all prerequisites, dependencies, and steps explicitly stated?
- [ ] Are there any vague instructions ("configure appropriately", "set up as needed")?
- [ ] Are success criteria defined for each step?
Gate decision:
- All criteria pass → Deliver.
- Stability/Accuracy/Executability fail → Fix and re-review. Do not deliver with failed core criteria.
- Reliability fails but cannot be fully resolved (e.g., inherent uncertainty) → Deliver with explicit risk disclosure. Tell the user what is uncertain and why.
Workflow Integration
This skill is not a separate step — it is integrated into the normal task execution flow:
User Request
│
▼
[Phase 1: Assess] ──→ Determine L1/L2/L3/L4
│
▼
[Normal task execution begins]
│
├─ [Phase 2: Think] ──→ First-principles applied during planning/design
│
├─ [Execute: generate draft output]
│
├─ [Phase 3: Review] ──→ Adversarial review of draft
│
├─ [Fix blockers/major issues found]
│
├─ [Phase 4: Gate] ──→ Quality verification
│
▼
[Deliver final output to user]
│
├─ (If L4 or unresolved major issues) Include risk disclosure
└─ (If L3/L4) Include brief note on confidence level and key assumptions
Output Disclosure Rules
The cognitive quality process is primarily internal — users should see better outputs, not process narration. However:
- L3/L4 tasks: Include a brief confidence note at the end of the response, e.g., "此方案经过第一性原理验证和对抗性审查,关键假设:[list]。主要风险:[list]。"
- Unresolved Major issues: Explicitly disclose what could not be fully resolved and why.
- L4 tasks: Recommend external verification for critical assumptions where possible.
- L1/L2 tasks: No disclosure needed unless something notable was found during review.
Common Pitfalls to Avoid
- Over-applying to L1 tasks — Not everything needs deep analysis. If the task is simple, do a quick check and move on. The framework scales down for a reason.
- Skipping Phase 2 to save time — First-principles thinking catches foundational errors that adversarial review alone cannot. Both phases are needed for L2+.
- Treating the gate as a formality — The gate is the last line of defense. If it fails, the output is not ready. Fix it.
- Hiding uncertainty — If something cannot be verified, say so. Hidden uncertainty is worse than disclosed uncertainty.
- Performing review but not fixing — Finding a Blocker and delivering anyway defeats the purpose. Fix first, then deliver.
Resources
references/
complexity-matrix.md— Full complexity assessment framework with five dimensions, four levels, auto-escalation rules, and example tasks for each level.first-principles-guide.md— Detailed four-step first-principles methodology with assumption categories, constraint identification techniques, ground-up reconstruction process, and common anti-patterns.adversarial-review-checklist.md— Comprehensive six-category adversarial review checklist with defect severity classification and integration with complexity levels.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供结构化认知质量保障框架,适用于复杂分析、架构设计、代码实现等高频刚需场景
- 四阶段流程(Assess→Think→Review→Gate)能有效提升输出结果的稳定性、准确性和可执行性
- 复杂度分级机制合理,能根据任务复杂度自动调整审查深度
Highlights
- 触发词覆盖全面,包含中英文关键词,边界清晰
- 能有效区分适用场景,避免误触或漏触
Areas to improve
-
文档过长 Reported severity: Minor
SKILL.md 文档约600行,超过建议的500行限制
Recommendation: 考虑将部分内容移至引用文件中,或精简描述
-
引用文件缺失 Reported severity: Minor
引用了 references/complexity-matrix.md、references/first-principles-guide.md、references/adversarial-review-checklist.md 三个文件,但未在传入内容中提供
Recommendation: 确保所有引用文件都包含在 Skill 包中,或提供完整的内联内容
Highlights
- 四阶段流程结构清晰,每阶段有详细步骤和出口条件
- frontmatter 完整,包含必要元数据
- 复杂度分级和审查清单设计合理
Areas to improve
-
引用文件内容不完整 Reported severity: Minor
Phase 1/2/3 中多次引用外部文件获取完整框架,但实际未提供这些文件
Recommendation: 将关键内容内联到主文档中,或确保引用文件完整包含在 Skill 包中
Highlights
- 框架设计合理,覆盖主要异常情况
- 有明确的缺陷分类和修复机制
- 质量门控标准明确,包含四个核心维度
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.