🐛 Fix ES module import issues and add comprehensive style guide#7
Merged
AdaInTheLab merged 1 commit intomainfrom Jan 28, 2026
Merged
🐛 Fix ES module import issues and add comprehensive style guide#7AdaInTheLab merged 1 commit intomainfrom
AdaInTheLab merged 1 commit intomainfrom
Conversation
|
😼🔥 Carmel Chaos Stamp™
|
Fix critical ES module import errors and establish comprehensive style guide to prevent future issues. Import Fixes: - Add .js extension to schema import in capabilities.ts - Fix package.json path from ../../ to ../../../ (for compiled code) - TypeScript doesn't auto-add extensions for ES Modules Style Guide: - Add STYLE_GUIDE.md with complete development conventions - Add QUICK_REFERENCE.md as one-page cheat sheet - Cover import rules, commit format, common gotchas - Include VS Code settings for auto-adding .js extensions Testing: - CLI builds successfully (npm run build) - Global install works (npm install -g .) - All commands functional (hpl version, capabilities, health) These guides will help future contributors (biological and digital) avoid common ES module pitfalls and maintain consistency. Co-authored-by: Sage <sage@thehumanpatternlab.com>
3b3d6bd to
d0b622e
Compare
|
😼✨ Carmel Approval Stamp™
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix critical ES module import errors that prevented the CLI from running, and establish comprehensive style guides to prevent future issues.
Changes
Bug Fixes
capabilities.ts: Add missing .js extension
version.ts: Fix package.json path for compiled code
Style Guide
Added two comprehensive documentation files:
STYLE_GUIDE.md (Full guide)
QUICK_REFERENCE.md (One-page cheat sheet)
Why This Matters
Node.js ES Modules require explicit
.jsextensions for relative imports. TypeScript doesn't add them automatically, so they must be written in source files even though the actual files are.ts.The style guide prevents this and other common issues by documenting:
Testing
npm run buildnpm install -g .hpl version- Shows versionhpl capabilities- Lists capabilitieshpl health- Checks API healthhpl version --json- JSON output worksBreaking Changes
None - all changes are bug fixes and documentation.
Impact
Before: CLI unusable due to ES module errors
After: CLI fully functional + guides to prevent future issues
Time saved: ~2-4 hours per new contributor who would have hit these issues
Related
Checklist
These guides will help future contributors (and AI assistants) avoid the same pitfalls!
Co-authored-by: Sage sage@thehumanpatternlab.com