SP Engineering Cheat Sheet

Tactical Lookups · Quick Reference
The recipes, not the creed. Tape this next to your monitor. For the why behind any of these → Playbook.

Branching

Format: <type>/SPPLT-XXXXX
feature/New capability
enhancement/Improve existing feature
bugfix/Prod bug
defect/In-sprint, pre-prod
hotfix/Urgent prod fix
techdebt/Debt repayment
maintenance/Short-lived cleanup
Commit: [SPPLT-XXXXX] message in English

PR Size Tiers

TierLOCFailure rate
Elite< 225< 1%
Good225–3701–4%
Fair371–6985–17%
Needs Focus> 698> 17%
90-min rule: if a reviewer can't finish in < 90 min, decompose first.

Endpoint Test Matrix

200Success — happy path payload
401Unauthorized — no/invalid auth
403Forbidden — auth'd but no permission
422Validation — bad input rejected
Plus tests for any Actions, Jobs, Mailables, Notifications. System tests < 2s.

Decomposition Techniques

  • SPIDR Slicing — Spike · Paths · Interface · Data · Rules
  • Hamburger Method — thinnest end-to-end slice first
  • Walking Skeleton — full path with stubs, fill in later
  • One Concern Rule — if you'd describe it with "and", split it

Code Review Lenses

Pick 3–4. Each lens = focus + explicit exclusions.
CodeCorrectness · Security · Maintainability
ArchitectureFailure modes · Migration risk · Operational complexity
ConfigSecurity · Blast radius · Drift
Output: Critical · Warnings · Suggestions. Pint owns formatting.

Bug Fix Workflow

  1. Reproduce — get it failing locally
  2. Red — failing test for the right reason
  3. Diagnose — Route → FormRequest → Controller → Service → Model
  4. Green — minimal fix, run domain tests, check nearby
Don't refactor while fixing. Fix forward — no hotfix branches; flag if needed.

Common Bug Root Causes

  • Missing eager loading (N+1) — esp. Library relationships
  • Wrong account scope, missing tenant filter
  • FormRequest authorize() gap
  • Race conditions on shared state
  • Type / null handling, implicit casts
  • Queue job timeouts / memory from loading too much

Feature Flag Stages

  1. Create — LaunchDarkly, camelCaseKey
  2. Develop — wire with safe fallback
  3. Test — local → preview → prod
  4. Rollout — canary, then % of prod
  5. Cleanupthe stage that gets skipped

Semantic Versioning

PlatformsPackages
MAJORStart of yearBreaking change
MINOREnd of sprintBC feature
PATCHWithin sprintBug fix
Packages release: npm run release:patch|minor|major

Database Changes

  • Schema change → Laravel migration (up() + down())
  • Prod data change → OneTimeOperation class
  • Modify column → repeat ALL attributes (else dropped)
  • OTO files → keep after running. Audit trail.
  • Never raw SQL against production

Backend Merge Gates

  • 1 approval
  • Passing tests + endpoint matrix
  • System tests < 2 seconds
  • ./vendor/bin/pint --dirty before finalizing
  • New business logic → Service (not new Action)
  • New models → explicit $fillable
  • Auth: prefer $user->can() over hasRole()

Build vs. Adopt

Default to adopt. Build only for differentiation.
70%+of TCO is maintenance
40%of IT budget is tech debt
35%of large custom IT projects abandoned
4–5×revenue growth, top-quartile dev velocity
Always document what you're choosing not to build.

Value Streams

Product Streams
  • Library · Learning Experience · Organized Learning
  • Platform Access · VAR · Live-Training
  • Performance Management · Talent Marketplace
Capability Teams
  • Skills Validation · Core Platform Team · SP Admin
SPENG Confluence parent: page 2200535044. Use the /value-stream skill to load all pages.

Trio Decision Rights

What problemPM — business value
How to solve (UX)Designer — UX integrity
How to buildEngineer — sustainability
Default: consensus through evidence. Unlock question: "What evidence would change your mind?"

Engineer-Mode Behaviors

  • Boy Scout Rule — leave it cleaner than you found it
  • Beyoncé Rule — if you liked it, put a CI test on it
  • "What if we could…?" — expand the option space in discovery
  • "What evidence would change your mind?" — unlock stalled debate
  • Document non-builds — opportunity cost stays visible
  • 1-on-1 question — "what did you make easier to change?"

Types of Work

FeatureNew capability
EnhancementImprove existing
BugFound in production
DefectFound before production
Tech DebtQuality, no new user value
SpikeTime-boxed research → recommendation
SupportMigrations, conversions, localization
RewritePlanned redesign — Feature or Enhancement

Install Claude Skills

User-level (recommended):
# Available in every working directory
git clone git@github.com:solidprofessorhub/sp-claude-skills.git \
  ~/.claude/skills/sp
Per-repo (locked version):
git submodule add \
  git@github.com:solidprofessorhub/sp-claude-skills.git \
  .claude/skills/sp