Capture wrong assumptions you made about the codebase. TRIGGER when reality differs from expectation (e.g., "assumed Jest but it's Vitest", "assumed AbstractUseCase exists but found AbstractMemberUseCase", "assumed REST but it's GraphQL"). Log silently to .claude/assumption-corrections.yaml to identify CLAUDE.md documentation gaps. Key distinction - assumptions are corrected by reality, decisions are choices between valid options.
59
69%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.claude/skills/codebase-assumption-capture/SKILL.mdThis skill helps AI agents track assumptions they made about the codebase that turned out to be incorrect. The goal is to identify documentation gaps and create better onboarding context for future AI agent sessions.
TRIGGER THIS SKILL IMMEDIATELY WHEN:
TRIGGER THE MOMENT YOU REALIZE YOU WERE WRONG - don't wait. Log immediately, then continue with the corrected understanding.
MANDATORY SELF-CHECK: Whenever you realize "I assumed X, but it's actually Y" → trigger this skill.
KEY DISTINCTION FROM implicit-decision-capture:
User: "Add a new API endpoint"
AI: [Thinks: "Based on Express in dependencies, I'll create a REST endpoint"]
AI: [Explores src/api/ and finds GraphQL resolvers]
AI: [Thinks: "Oh, it's GraphQL, not REST"]
AI: [Implements GraphQL resolver but FORGETS to log the wrong assumption] ❌
CORRECT BEHAVIOR:
AI: [Realizes assumption was wrong]
AI: [Immediately triggers skill and logs to .claude/assumption-corrections.yaml]
AI: [Continues with corrected approach]
AI: [Responds to user]User: "Add a new UseCase to edit a standard"
AI: [Thinks: "UseCases probably follow a base class pattern like in most clean architecture codebases"]
AI: [Creates EditStandardUseCase extending a presumed AbstractUseCase]
AI: [Finds that AbstractUseCase doesn't exist - it's AbstractMemberUseCase with different requirements]
AI: [Adapts the code but FORGETS to log the wrong assumption] ❌
CORRECT BEHAVIOR:
AI: [Discovers base class is different than expected]
AI: [Triggers skill: "Assumed generic AbstractUseCase exists, but found AbstractMemberUseCase with member-scoping"]
AI: [Adjusts implementation to use correct base class]
AI: [Responds to user with correct implementation]User: "Add unit tests for this service"
AI: [Thinks: "I'll use Jest mocking patterns like jest.mock()"]
AI: [Writes tests with Jest patterns]
AI: [Tests fail because project uses Vitest with different mocking API]
AI: [Fixes tests but FORGETS to log the assumption] ❌
CORRECT BEHAVIOR:
AI: [Test failure reveals testing framework assumption was wrong]
AI: [Triggers skill: "Assumed Jest testing framework, but project uses Vitest"]
AI: [Rewrites tests with Vitest patterns]
AI: [Responds with working tests]User: "Add date formatting to the response"
AI: [Thinks: "There's probably a date formatting util in this codebase"]
AI: [Searches for formatDate or date utils]
AI: [Finds nothing - project uses raw Intl.DateTimeFormat everywhere]
AI: [Implements without util but FORGETS to log the assumption] ❌
CORRECT BEHAVIOR:
AI: [Realizes expected utility doesn't exist]
AI: [Triggers skill: "Assumed centralized date formatting utility exists, but found raw Intl.DateTimeFormat used directly"]
AI: [Suggests adding documentation about date handling approach OR follows existing pattern]
AI: [Responds to user]AI agents make assumptions when starting work on a codebase:
These incorrect assumptions:
By capturing them, developers can:
Use this skill proactively and silently when you (the AI agent):
Discover You Were Wrong
Find Unexpected Architecture
Encounter Misleading Names/Structures
Realize Context Was Missing
Don't capture:
During exploration or implementation, notice when your initial assumption about the codebase was incorrect.
Silently append the assumption to .claude/assumption-corrections.yaml:
- timestamp: 2026-01-09T10:30:00Z
category: 'architecture' # architecture|framework|testing|patterns|naming|structure|configuration|dependencies
assumption: 'Assumed the API uses REST with Express based on package.json having express dependency'
reality: 'API uses GraphQL with Apollo Server - Express is only used as middleware host'
discovery_point: 'Found schema.graphql and resolvers folder while exploring src/'
impact: 'high' # low|medium|high - how much time/effort was wasted
misleading_signals:
- 'Express listed in dependencies'
- 'src/api folder exists (but contains GraphQL resolvers)'
documentation_gap: 'CLAUDE.md should mention GraphQL architecture upfront'
files_explored:
- src/api/
- src/schema.graphql
- package.json
tags:
- 'graphql'
- 'api-architecture'
- 'express'Location: Always use .claude/assumption-corrections.yaml at the repository root.
Structure: Array of assumption entries, most recent last.
Format Rules:
timestamp: ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ)category: One of: architecture, framework, testing, patterns, naming, structure, configuration, dependenciesassumption: What you initially assumed and whyreality: What turned out to be truediscovery_point: How/when you discovered the truthimpact: How much this incorrect assumption affected your work
low: Quick correction, minimal wasted effortmedium: Some backtracking needed, moderate confusionhigh: Significant time wasted, major reorientation neededmisleading_signals: What led you to the wrong assumption (list)documentation_gap: What should be documented to prevent thisfiles_explored: Files that helped reveal the truthtags: Relevant keywords for filtering/searchingIMPORTANT: This is an automatic, non-interrupting operation:
.claude/assumption-corrections.yaml laterThis skill is MANDATORY when you realize an assumption was wrong - it's not optional.
Users can review .claude/assumption-corrections.yaml at any time to:
- timestamp: 2026-01-09T09:15:00Z
category: 'framework'
assumption: 'Assumed this is a Next.js app based on pages/ folder structure'
reality: 'This is a custom React app with file-based routing implemented manually'
discovery_point: 'Found custom router implementation in src/lib/router.ts with no next.config.js'
impact: 'medium'
misleading_signals:
- 'pages/ folder at root (Next.js convention)'
- 'React listed in dependencies'
- 'File naming follows Next.js patterns'
documentation_gap: 'README or CLAUDE.md should clarify this is NOT Next.js despite similar structure'
files_explored:
- pages/
- package.json
- src/lib/router.ts
tags:
- 'react'
- 'routing'
- 'framework'- timestamp: 2026-01-09T10:45:00Z
category: 'testing'
assumption: 'Assumed tests use Jest based on .spec.ts file naming convention'
reality: 'Tests use Vitest - similar API but different configuration and runner'
discovery_point: 'Found vitest.config.ts and vitest in devDependencies, no jest.config.js'
impact: 'low'
misleading_signals:
- '.spec.ts files (common in both Jest and Vitest)'
- 'describe/it/expect syntax (identical in both)'
documentation_gap: 'CLAUDE.md testing section should specify Vitest, not assume Jest knowledge transfers'
files_explored:
- vitest.config.ts
- package.json
- src/**/*.spec.ts
tags:
- 'testing'
- 'vitest'
- 'jest'- timestamp: 2026-01-09T11:30:00Z
category: 'architecture'
assumption: 'Assumed JWT-based authentication based on jsonwebtoken dependency'
reality: 'Primary auth is session-based with cookies - JWT only used for email verification tokens'
discovery_point: 'Found session middleware in src/middleware/auth.ts and cookie-session dependency'
impact: 'high'
misleading_signals:
- 'jsonwebtoken in dependencies'
- 'src/utils/jwt.ts exists'
- 'Token mentioned in auth-related files'
documentation_gap: 'CLAUDE.md should explicitly state session-based auth and clarify JWT is only for specific flows'
files_explored:
- src/middleware/auth.ts
- src/utils/jwt.ts
- package.json
tags:
- 'authentication'
- 'jwt'
- 'sessions'
- 'security'- timestamp: 2026-01-09T14:00:00Z
category: 'dependencies'
assumption: 'Assumed Prisma ORM based on prisma/ folder in root'
reality: 'Uses TypeORM - prisma folder contains unrelated data migration scripts'
discovery_point: 'Found TypeORM entities in src/domain/ and ormconfig.ts at root'
impact: 'medium'
misleading_signals:
- 'prisma/ folder at root'
- 'Some files mention "schema" (Prisma terminology)'
documentation_gap: 'Rename prisma/ folder to avoid confusion, add ORM section to CLAUDE.md'
files_explored:
- prisma/
- src/domain/
- ormconfig.ts
- package.json
tags:
- 'orm'
- 'typeorm'
- 'prisma'
- 'database'- timestamp: 2026-01-09T15:20:00Z
category: 'naming'
assumption: 'Assumed src/services/ contains business logic services'
reality: 'src/services/ contains infrastructure services (email, cache, etc.) - business logic is in src/domain/use-cases/'
discovery_point: 'Explored services folder and found only infrastructure concerns'
impact: 'low'
misleading_signals:
- 'services/ folder name (often contains business logic)'
- 'Similar naming to other projects'
documentation_gap: 'CLAUDE.md architecture section should explain the folder structure and where business logic lives'
files_explored:
- src/services/
- src/domain/use-cases/
tags:
- 'folder-structure'
- 'architecture'
- 'naming'- timestamp: 2026-01-09T16:10:00Z
category: 'structure'
assumption: 'Assumed src/index.ts is the application entry point'
reality: 'Entry point is src/main.ts - index.ts is just barrel exports for the library'
discovery_point: 'package.json main field points to dist/main.js, found bootstrap logic in main.ts'
impact: 'low'
misleading_signals:
- 'src/index.ts exists (common entry point name)'
- 'index.ts has exports at top level'
documentation_gap: 'CLAUDE.md should specify main.ts as entry point for application startup'
files_explored:
- src/index.ts
- src/main.ts
- package.json
tags:
- 'entry-point'
- 'project-structure'
- 'bootstrap'While exploring a new codebase:
While implementing features:
User: "Add a new API endpoint for user preferences"
[AI thinking: "Based on Express in dependencies, I'll create a REST endpoint"]
[AI explores src/api/ - finds GraphQL resolvers]
[AI thinking: "Wrong assumption - this is GraphQL, not REST"]
[AI silently logs assumption correction to .claude/assumption-corrections.yaml]
AI: "I see the API uses GraphQL with Apollo Server. I'll add a new
resolver for user preferences rather than a REST endpoint."User sees smooth adaptation. Later, they can review assumption-corrections.yaml to improve docs.
# .claude/assumption-corrections.yaml
- timestamp: string # ISO 8601: "2026-01-09T10:30:00Z"
category: string # architecture|framework|testing|patterns|naming|structure|configuration|dependencies
assumption: string # What you initially assumed and why
reality: string # What turned out to be true
discovery_point: string # How/when you discovered the truth
impact: string # low|medium|high
misleading_signals: array # What led to wrong assumption
- string
documentation_gap: string # What should be documented
files_explored: array # Files that revealed truth
- string
tags: array # Keywords
- stringOnce .claude/assumption-corrections.yaml accumulates entries, developers can:
implicit-decision-capture: Assumptions sometimes overlap with decisions/uncertainties
Uncertainty: "Is this Next.js?"
Assumption: "I assumed it was Next.js and was wrong"
Key difference: Assumption was acted upon before verification
Decision: "Used JWT for new endpoint" → Later found session auth → Log assumptionconsistency-violation-capture: Wrong assumptions may reveal inconsistencies
"Assumed all auth was JWT" → Found mixed auth approaches → Log bothREMEMBER: This skill is MANDATORY whenever you realize an assumption was wrong. You MUST log it - this is not optional. The logging happens automatically without user interaction. Every wrong assumption is a documentation gap that should be captured to improve future AI agent sessions.
e198635
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.