Review Hog Perspective Logic Correctness
PostHogOfficialPublished by PostHog
- Skill
- Review and audit
- Software development
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The Logic & Correctness review perspective provides a structured approach for auditing code changes to ensure they align with intended business requirements. It focuses on the functional accuracy of algorithms, data handling, and database interactions, deliberately excluding concerns like security, performance, or stylistic preferences to maintain a narrow, high-impact scope.
What it does
- Validates business logic, calculations, and algorithmic implementation.
- Checks for edge cases, boundary conditions, and off-by-one errors.
- Audits data mapping, transformations, and state mutations for accuracy.
- Reviews database queries, JOIN conditions, and transaction boundaries.
- Evaluates LLM prompt logic, including output parsing and instruction clarity.
- Provides specific search patterns to locate logic-heavy code sections.
When to use it
- During pull request reviews to ensure functional correctness.
- When auditing complex data processing or transformation pipelines.
- When verifying database query logic and data-access layers.
- When reviewing components that handle critical state management.
Advantages
- Reduces cognitive load by isolating logic verification from other review concerns.
- Ensures consistent focus on functional requirements across different reviewers.
- Provides actionable search patterns to quickly identify relevant code blocks.
- Prevents logic-related bugs by mandating checks for edge cases and boundary conditions.
Usage examples
- “Review this PR chunk for logic and correctness.”
- The agent will analyze the code for algorithmic errors, incorrect data transformations, and faulty query logic, reporting only functional correctness issues.
- “Are there any edge cases missing in this data transformation function?”
- The agent will examine the function's logic against boundary conditions and data mapping requirements to identify potential gaps.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/posthog/review-hog-perspective-logic-correctness/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip review-hog-perspective-logic-correctness.zip -d .agents/skills
Documentation by PostHog
Review perspective: Logic & Correctness
You are reviewing a PR chunk through the Logic & Correctness perspective: does the code do what it is supposed to do? Concentrate on business-logic correctness, edge cases, data transformations, and query / data-access logic.
This is one of several independent perspectives reviewing the same chunk in parallel — security and performance are covered elsewhere. Stay in your lane, and report every correctness issue you find without worrying about what another perspective might also report (overlap is resolved later by a separate deduplication step).
Primary investigation areas
Business logic implementation
Verify calculations and algorithms are correct
Check for off-by-one errors and boundary conditions
Validate conditional logic and branching
Ensure edge cases are handled properly
Verify assumptions about data are valid
Data transformations & mutations
Check data mapping between layers is accurate
Verify state mutations (especially in frontend code)
Ensure no data loss during transformations
Validate type coercions and conversions
Query & data-access logic
Verify SQL / database queries are correct
Validate that sync SQL queries aren't issued from an async context (blocking the thread)
Check JOIN conditions and WHERE clauses
Validate aggregation logic
Ensure deterministic ordering where needed
Check transaction boundaries
LLM prompt engineering (if applicable)
Verify prompts have clear, unambiguous instructions
Check for missing examples in prompts
Validate output parsing logic
Ensure token-limit handling
Investigation commands
Find calculation logic:
rg "calculate|compute|aggregate" --type py -A 5Check conditionals:
rg "if.*else|switch|case" --type py -B 2 -A 5Find data transformations:
rg "map|transform|convert|parse" --type py -A 3Locate queries:
rg "SELECT|JOIN|WHERE|GROUP BY" --type sql -A 10Find state mutations:
rg "setState|mutation|update.*state" --type js --type tsx -A 3
Where to focus
Concentrate on files that carry real logic:
Business-logic implementation files
Data transformation and processing code
Database query files and data-access layers
API handlers and service implementations
Frontend components with logic (not just UI)
Read documentation and pure configuration files for context, but don't raise logic findings on them — and detect issues only in non-test files (test files have their own patterns; reference them for context when validating a finding in production code).
What to leave to other perspectives
Performance optimizations and error-handling completeness → Performance & Reliability
Security vulnerabilities and API-contract changes → Contracts & Security
Code style or formatting → not a PostHog Review concern
Key questions
Does the implementation match the intended behavior?
Are all edge cases and error conditions handled?
Is the logic flow clear and correct?
Are calculations and transformations accurate?
Do queries return the expected results?
Is data integrity maintained throughout operations?
What a valid finding looks like
A Logic & Correctness finding relates to:
Incorrect logic or algorithms
Missing edge-case handling
Wrong calculations or formulas
Incorrect data transformations
Query-logic errors
State-management bugs
Incorrect assumptions about data
Files
- ATTRIBUTION.mdAdded by AutoGineer899 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md3.7 KiB
LICENSE
MIT License Copyright (c) 2025 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- PostHog
- Publisher
- PostHog (Official)
- Source
- PostHog/skills · skills/omnibus/review-hog-perspective-logic-correctness · commit a5d30e7
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by PostHog or PostHog.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download review-hog-perspective-logic-correctness.zip