Skip to content

Add skill documentation for football engine, TypeScript audit, canvas, and undo/redo#34

Open
DigitalBlueprint239 wants to merge 4 commits intomasterfrom
claude/coach-core-ai-setup-aXvti
Open

Add skill documentation for football engine, TypeScript audit, canvas, and undo/redo#34
DigitalBlueprint239 wants to merge 4 commits intomasterfrom
claude/coach-core-ai-setup-aXvti

Conversation

@DigitalBlueprint239
Copy link
Owner

Summary

This PR adds comprehensive skill documentation for Coach Core AI development. Five new skill guides have been created to establish patterns, constraints, and pre/post-flight checklists for future development sessions.

Changes

  • skills/football-engine-expansion/SKILL.md — Documents the football engine expansion roadmap: current state (4 formations, 7 routes, 0 concepts), target state (53 formations, 18 routes, 15 concepts), file locations, and correct patterns for adding formations, routes, and concepts. Includes pre-session verification commands and expansion priority order.

  • skills/typescript-audit-coach-core/SKILL.md — Establishes TypeScript audit patterns and forbidden shortcuts. Documents correct fix patterns for unknown property access, Firebase SDK types, and React component props. Includes pre-session audit sequence and post-audit verification checks.

  • skills/konva-field-canvas/SKILL.md — Documents the Konva-based field canvas architecture: component paths, coordinate system rules, touch interaction requirements, rendering layer structure, and forbidden patterns (hardcoded field center, pixel values in state, preview data in persistent state).

  • skills/coach-core-agent-session/SKILL.md — Provides the mandatory pre-flight → work → post-flight protocol for any AI agent session. Includes codebase overview, directory structure, Phase 1 pre-flight audit checklist, Phase 2 architecture rules, Phase 3 post-session verification, and known debt items.

  • skills/undo-redo-history/SKILL.md — Documents the target hook-based undo/redo architecture (not yet implemented). Specifies the useHistory hook API, state flow, when to use commit: false, keyboard shortcuts, forbidden patterns, and testing requirements.

Implementation Details

  • All skills follow a consistent structure: Purpose, Current State, File Locations, Patterns, Pre-Session Checks, and Forbidden Patterns
  • Skills are designed to be referenced during development sessions to maintain consistency and prevent regressions
  • Each skill includes bash commands for verification (grep counts, file existence checks, test baselines)
  • Known debt items are explicitly documented with risk levels and actions (e.g., Firebase any types, AI proxy not deployed)
  • Skills establish non-negotiable invariants: zero @ts-nocheck in active code, test count never decreases, addToOfflineQueue integrity checks

These skills serve as the foundation for the verified-clean codebase established across 8 prior merge sessions.

https://claude.ai/code/session_01DtcUNwEFNQeVgfR7i5inko

Rewrote skill documentation to accurately reflect the actual codebase
state after exploration and verification. Each skill now documents
correct file paths, current counts, patterns, and pre-session checks.

- coach-core-agent-session: Updated paths, added AI proxy warning (debt #5),
  added Firebase auth pre-flight, documented known debt items
- football-engine-expansion: Updated to actual counts (4 formations, 7 routes,
  0 concepts), listed missing targets, marked unbuilt files as TO BUILD
- konva-field-canvas: Verified component paths, added touch interaction section,
  documented coordinate system and preview layer rules
- typescript-audit-coach-core: Added extractJSON pattern, firestore integrity
  check, removed solved issues, documented audit sequence
- undo-redo-history: Complete rewrite from reducer to hook architecture,
  documented target API, commit:false pattern, localStorage exclusion

https://claude.ai/code/session_01DtcUNwEFNQeVgfR7i5inko
@netlify
Copy link

netlify bot commented Mar 14, 2026

Deploy Preview for magical-starlight-0c1207 failed.

Name Link
🔨 Latest commit d4bc254
🔍 Latest deploy log https://app.netlify.com/projects/magical-starlight-0c1207/deploys/69b5d10c5c34c2000843de83

claude added 3 commits March 14, 2026 16:21
Session 5 redo — previous version was written against the wrong repo
(coach-core-ai/CRA). This version uses verified facts from the merged
Coach-Core-Smart-Playbook- codebase (Vite/React/TypeScript/Konva).

Corrected facts across all 5 skills:
- Build tool: Vite (not CRA/react-scripts)
- Test framework: Vitest (not Jest)
- State: PlaybookContext + useHistory hook (not a reducer)
- Routes: 13 in src/services/routeDefinitions.ts (5 missing to reach 18)
- Concepts: 7 in src/services/conceptService.ts (8 missing to reach 15)
- Formations: 53 in src/services/formationService.ts (complete)
- Tests: 60 passing (7 suites)
- TS errors: 0
- @ts-nocheck: 0
- addToOfflineQueue: src/services/firebase/firestore.ts (1 def + 6 calls)
- useHistory: FULLY BUILT with 11 tests (not TO BUILD)
- styled.d.ts: permanent fix for 185 theme errors

https://claude.ai/code/session_01DtcUNwEFNQeVgfR7i5inko
Foundation:
- useHistory.ts: Generic undo/redo hook with commit control
- PlaybookContext.tsx: Playbook state management wrapping useHistory
- fieldConfig.ts: Field dimensions (53.333yd) + yard/pixel conversions
- playbook.ts types: EnginePlay, FootballRouteId, ConceptDefinition, etc.

Session 6 — Flip/Mirror Play:
- mirrorPlay() reflects X coordinates across field center
- Wired to PlaybookContext as undoable flipCurrentPlay()

Session 7 — Concept Detection Engine:
- detectConcepts() with priority-based disambiguation (Mesh→Drive→Dagger→Smash→...)
- useConceptDetection hook for UI consumption

Session 8 — Wristband PDF Export:
- exportWristbandPDF() with dynamic jsPDF import (not in main bundle)
- Supports 8/12/16 plays per card, color/B&W, team name

Session 9 — Route + Concept Expansion:
- Routes: 13 → 18 (added seam, shallow_cross, option, bubble_screen, streak)
- Concepts: 7 → 15 (added spacing, stick, y_cross, mills, four_verticals, curl_flat, sail, snag)

Session 10 — Coverage Beater Recommendations:
- getPlaysVsCoverage() ranks plays against 8 coverage shells
- 100% offline — no AI proxy required

Session 11 — Firebase Bundle Optimization:
- Lazy init via getFirebaseServices() with dynamic imports
- Main bundle: 214.83 kB (was ~966 kB with eager Firebase)

191 tests passing, 0 TS errors in new code, build PASS.

https://claude.ai/code/session_01DtcUNwEFNQeVgfR7i5inko
Surface 1: Flip button in toolbar with FlipHorizontal2 icon, mirrors
all player/route X coordinates, undoable via Cmd+Z.

Surface 2: ConceptBanner component auto-detects passing concepts
(Smash, Mesh, Flood, etc.) from assigned routes in real time.

Surface 3: WristbandExportModal with play selection, color/B&W mode,
multi-card warning, and PDF download via dynamic jsPDF.

Surface 4: CoverageBeaterPanel ranks saved plays against 8 defensive
coverage shells, 100% offline with star ratings and coaching cues.

Bridge utility (playbookBridge.ts) maps SmartPlaybook's pixel-based
local state to EnginePlay types for the detection engines.

209 tests passing, build 220.46 kB, 0 new TS errors.

https://claude.ai/code/session_01DtcUNwEFNQeVgfR7i5inko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants