Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

docs: improve documentation with JSDoc and reorganized README for v0.1.3#44

Merged
roottool merged 2 commits intomainfrom
docs/improve-documentation
Dec 31, 2025
Merged

docs: improve documentation with JSDoc and reorganized README for v0.1.3#44
roottool merged 2 commits intomainfrom
docs/improve-documentation

Conversation

@roottool
Copy link
Copy Markdown
Owner

Description

This PR improves the documentation for v0.1.3 release with comprehensive JSDoc comments and a reorganized README structure. The changes focus on better onboarding experience, IDE integration, and clearer communication of the boundary-focused philosophy.

Changes:

  • Add comprehensive JSDoc to all type definitions (IssueCode, ParseIssue, ParseResult)
  • Reorganize README with "philosophy-first" structure
  • Add Installation and Quick Start sections to README
  • Update AGENTS.md type definitions to match actual implementation
  • Add Type Safety section to CLAUDE.md

Benefits:

  • Improved IDE autocomplete and hover tooltips
  • Better onboarding: new users can start in 5 minutes
  • Clearer type narrowing patterns (data !== null)
  • Reduced misuse by emphasizing boundary-focused philosophy upfront

Boundary Checklist (Required)

This PR is documentation-only and does not modify the parser implementation or API. The boundary checklist applies to implementation changes, not documentation improvements.

  • Documentation change only - No code logic changes
  • Boundary rules preserved - Documentation accurately reflects existing boundary-focused design
  • No new features - Only improves explanation of existing behavior

Type of Change

  • Documentation

Testing

Documentation verification:

  • TypeScript type checking passes (bun run check:type:source)
  • All tests pass (bun run test)
  • Example type checking passes (bun run check:type:example)
  • Build succeeds (bun run build)
  • Markdown linting passes (via lefthook pre-commit)

Manual verification:

  • JSDoc appears correctly in IDE hover tooltips
  • README Table of Contents links work correctly
  • Installation instructions are accurate for all package managers
  • Quick Start example compiles and runs successfully

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

roottool and others added 2 commits December 31, 2025 16:20
Add detailed JSDoc comments to all TypeScript type definitions for better
IDE integration and developer experience.

Changes:
- src/types/IssueCode.ts: Add security rationale for each issue code with
  practical examples
- src/types/ParseIssue.ts: Add property-level explanations and usage examples
- src/types/ParseResult.ts: Add discriminated union documentation with
  type narrowing patterns

Benefits:
- Improved IDE autocomplete with inline documentation
- Better hover tooltips showing security implications
- Clear examples of type narrowing with 'data !== null'
- Reduced need to context-switch to external documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Reorganize README.md with "philosophy-first" approach:
- Add Table of Contents for easier navigation
- Add Installation section (npm, yarn, pnpm, bun)
- Add Quick Start section with minimal working example
- Reorganize sections: Overview → Design principles → Security scope
  → Design decisions → Installation → Quick Start → API

This new structure ensures users understand the boundary-focused philosophy
before writing code, reducing potential misuse.

Update AGENTS.md (implementation guide):
- Update API contract section with accurate discriminated union types
- Add type narrowing pattern documentation (data !== null)
- Add references to JSDoc in type definition files

Update CLAUDE.md (Claude Code guidance):
- Add README's philosophy-first structure explanation
- Add new "Type Safety and IDE Integration" section
- Document type narrowing patterns and common mistakes
- Clarify that .ok property does not exist (use data !== null)

Benefits:
- Better onboarding: new users can start in 5 minutes
- Reduced misuse: philosophy explained before API usage
- Accurate technical docs: matches actual implementation
- Improved Claude Code assistance: clear guidance on type safety

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@roottool roottool self-assigned this Dec 31, 2025
@roottool roottool added the documentation Improvements or additions to documentation label Dec 31, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (497439e) to head (79121dd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #44   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           22        22           
  Branches         6         6           
=========================================
  Hits            22        22           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@roottool roottool merged commit 5a28687 into main Dec 31, 2025
12 checks passed
@roottool roottool deleted the docs/improve-documentation branch December 31, 2025 07:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant