Skip to content

Conversation

semikolon
Copy link

@semikolon semikolon commented Aug 22, 2025

Add Development Workflow Scripts Documentation

🎯 Purpose

Documents the convenience scripts that automate the yalc-based development workflow for rapid iteration between LLMS and CCR repositories.

📝 What's Added

  • Automated Script Section: Highlights 🔧 Starting development workflow...
    📦 Building package...

@musistudio/[email protected] build
tsx scripts/build.ts

Building CJS and ESM versions...
✅ Build completed successfully!

  • CJS: dist/cjs/server.cjs
  • ESM: dist/esm/server.mjs
    📤 Publishing to yalc...
    @musistudio/[email protected] published in store.
    🚀 Pushing updates to linked projects...
    @musistudio/[email protected] published in store.
    Pushing @musistudio/[email protected] in /Users/fredrikbranstrom/ccr-dev
    Package @musistudio/[email protected] added ==> /Users/fredrikbranstrom/ccr-dev/node_modules/@musistudio/llms
    ✅ Development workflow complete!

📋 Next steps:

  1. Go to ccr-dev: cd /Users/fredrikbranstrom/ccr-dev
  2. Build CCR: npm run build
  3. Test your changes

🔄 For subsequent changes, just run: ./dev-workflow.sh as the recommended approach

  • Manual Steps Reference: Preserves existing manual workflow documentation
  • Convenience Scripts Reference: Documents both LLMS and CCR workflow scripts
  • Clear Workflow Guidance: Shows users the fastest path for development iteration

🔧 Scripts Documented

  • **🔧 Starting development workflow...
    📦 Building package...

@musistudio/[email protected] build
tsx scripts/build.ts

Building CJS and ESM versions...
✅ Build completed successfully!

  • CJS: dist/cjs/server.cjs
  • ESM: dist/esm/server.mjs
    📤 Publishing to yalc...
    @musistudio/[email protected] published in store.
    🚀 Pushing updates to linked projects...
    @musistudio/[email protected] published in store.
    Pushing @musistudio/[email protected] in /Users/fredrikbranstrom/ccr-dev
    Package @musistudio/[email protected] added ==> /Users/fredrikbranstrom/ccr-dev/node_modules/@musistudio/llms
    ✅ Development workflow complete!

📋 Next steps:

  1. Go to ccr-dev: cd /Users/fredrikbranstrom/ccr-dev
  2. Build CCR: npm run build
  3. Test your changes

🔄 For subsequent changes, just run: ./dev-workflow.sh (LLMS)**: Complete build → yalc publish → push workflow

  • ** (CCR)**: Build CCR with updated LLMS package and show status

💡 Why This Matters

  • Developer Experience: Makes the yalc workflow more discoverable and user-friendly
  • Prevents npm Cache Issues: Guides users toward the recommended yalc approach
  • Rapid Iteration: Documents the fastest way to test LLMS changes in CCR
  • Knowledge Preservation: Ensures workflow scripts don't become "hidden gems"

🎮 User Impact

Before: Developers had to manually run 3-4 commands for each iteration
After: Single 🔧 Starting development workflow...
📦 Building package...

@musistudio/[email protected] build
tsx scripts/build.ts

Building CJS and ESM versions...
✅ Build completed successfully!

  • CJS: dist/cjs/server.cjs
  • ESM: dist/esm/server.mjs
    📤 Publishing to yalc...
    @musistudio/[email protected] published in store.
    🚀 Pushing updates to linked projects...
    @musistudio/[email protected] published in store.
    Pushing @musistudio/[email protected] in /Users/fredrikbranstrom/ccr-dev
    Package @musistudio/[email protected] added ==> /Users/fredrikbranstrom/ccr-dev/node_modules/@musistudio/llms
    ✅ Development workflow complete!

📋 Next steps:

  1. Go to ccr-dev: cd /Users/fredrikbranstrom/ccr-dev
  2. Build CCR: npm run build
  3. Test your changes

🔄 For subsequent changes, just run: ./dev-workflow.sh command handles complete workflow

📋 Documentation Structure

🔗 Relationship to Other PRs

This is a standalone documentation improvement that complements the GPT-5 integration work from PRs #28-29 and CCR PRs #677-678. It improves the development experience for future work on the codebase.

✅ Testing

  • ✅ Scripts exist and are executable in both repositories
  • ✅ Documentation formatting is consistent with existing CLAUDE.md style
  • ✅ Instructions are clear and actionable

Related PRs (complete series)

semikolon and others added 17 commits August 13, 2025 09:59
- Add service layer architecture details
- Include build system configuration info
- Add environment configuration guidance
- Document enhanced transformer implementation
- Include code style guidelines and development workflow

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

Co-Authored-By: Claude <[email protected]>
- Add env-resolver utility with comprehensive error handling
- Resolve $OPENAI_API_KEY and other env vars in provider config
- Add comprehensive test suite with 21 passing tests
- Fix authentication issues where API keys were stored as literal strings
- Add API key redaction for secure logging

This resolves the core authentication problem where llms service
was storing '$OPENAI_API_KEY' literally instead of resolving it
to the actual environment variable value.
Prevent local Claude Code settings from being committed to repository.
These files contain personal development tool preferences that should
remain local to each developer.
- Convert Anthropic tool format to OpenAI function format
- Handle tools parameter transformation for OpenAI Chat Completions API
- Enable GPT-5 compatibility through CCR direct routing
✅ Successfully tested GPT-5 through CCR with tools working
✅ OpenAI transformer converts Anthropic→OpenAI tool formats
✅ Parameter mapping handles max_tokens→max_completion_tokens
✅ Clean architecture using Chat Completions API (not Responses)
✅ Resolved npm caching issues and phantom process problems

- Add comprehensive npm troubleshooting section to CLAUDE.md
- Document the week-long debugging journey and solutions
- GPT-5 now works smoothly in Claude Code via CCR

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

Co-Authored-By: Claude <[email protected]>
- Document Chat Completions API vs Responses API performance comparison
- Explain technical architecture and transformation flow
- Add production-ready configuration examples
- Clarify reasoning token support and limitations

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

Co-Authored-By: Claude <[email protected]>
- Add support for reasoning content in JSON responses
- Convert OpenAI reasoning field to Anthropic thinking format
- Handle both streaming and non-streaming GPT-5 reasoning output
- Maintain backward compatibility with existing reasoning logic

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

Co-Authored-By: Claude <[email protected]>
- Add comprehensive Reasoning Transformer section to CLAUDE.md documenting:
  * Parameter conversion capabilities (thinking → reasoning_effort)
  * Inline token processing integration with CCR
  * Token-to-parameter mapping reference table
  * Proper transformer chain ordering guidance

- Remove debug console.log statements from reasoning transformer:
  * Clean up parameter conversion logging
  * Remove token processing debug output
  * Maintain structured Fastify logger for production use

- Improve code maintainability by keeping only essential logging
  while preserving debugging capabilities through proper logger interface

Documentation now clearly explains reasoning transformer's dual role
in both parameter conversion and CCR integration scenarios.

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

Co-Authored-By: Claude <[email protected]>
Document critical GPT-5 API differences and working solutions:

Parameter Compatibility Issues:
- max_tokens → max_completion_tokens requirement
- Temperature restrictions (only supports default value 1)
- Reasoning format validation (only accepts effort strings)
- Verbosity strict validation (low/medium/high only)
- Tool schema metadata rejection ($schema, additionalProperties)

API Response Differences:
- Significant reasoning token usage (1000+ vs 300 for GPT-4)
- Inline reasoning_content during streaming responses
- Stricter validation causing more "Unknown parameter" errors
- 50% fewer tool calling errors but stricter input requirements

All issues resolved via transformer implementations:
- OpenAI transformer handles parameter conversions
- Reasoning transformer manages format compatibility
- Tool format cleaning prevents schema errors
- Parameter validation ensures API compliance

Critical knowledge for developers migrating from GPT-4 to GPT-5.

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

Co-Authored-By: Claude <[email protected]>
Update documentation to reflect current 2025 OpenAI model ecosystem:

- Replace GPT-4 references with o3/o4-mini comparisons (current generation)
- Reasoning tokens: GPT-5 2000+ vs o3/o4-mini 500 (realistic current usage)
- Architecture differences: GPT-5 unified vs o3/o4 specialized reasoning
- Performance metrics: 50-80% efficiency gains, 6x hallucination reduction
- Tool integration evolution: GPT-5 agentic capabilities vs o3 limitations

Aligns documentation with Aug 2025 GPT-5 release timeline and
current competitive landscape rather than legacy model comparisons.

🤖 Generated with [Claude Code](https://claude.ai/code)
Remove temporary file logging to /tmp/gpt5-response-debug.log.
Maintains structured Fastify logger for production debugging.

🤖 Generated with [Claude Code](https://claude.ai/code)
semikolon added a commit to semikolon/llms that referenced this pull request Aug 23, 2025
…l documentation

✅ MERGED ALL 6 PRs SUCCESSFULLY:
- PR musistudio#28: GPT-5 Core API Compatibility (normalization + tool conversion)
- PR musistudio#29: 2025 Documentation & API Guide (enhanced parameter handling)
- PR musistudio#30: Development Workflow Scripts (automated build processes)

🔧 COMPLETE OPENAI TRANSFORMER:
- Parameter transformations (max_tokens → max_completion_tokens)
- Reasoning parameter handling + verbosity validation
- CRITICAL: normalizeImageContent() + normalizeToolMessages()
- Usage format conversion (OpenAI → Claude Code format)
- Complete tool format conversion with JSON schema cleaning
- Enhanced logging and debugging capabilities

📚 COMPLETE DOCUMENTATION:
- Dev workflow automation scripts
- Comprehensive GPT-5 API compatibility guide
- Local development best practices with yalc

This branch now contains ALL functionality from all 6 PRs!
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.

1 participant