Branding System
Overview
Section titled “Overview”Nagare uses a centralized branding system to ensure consistent messaging across all CLI interactions. The system emphasizes the “flow” concept with water/river metaphors, reflecting the Japanese meaning of “Nagare” (流れ) - flow.
Brand Identity
Section titled “Brand Identity”Core Elements
Section titled “Core Elements”- Primary Emoji: 🌊 (represents flow/river)
- Brand Name: Nagare
- Japanese Meaning: 流れ (flow)
- Brand Prefix:
🌊 Nagare:
Brand Philosophy
Section titled “Brand Philosophy”The branding follows these principles:
- Flow-Focused: Emphasizes smooth, automated progression from commits to releases
- Water Metaphors: Uses river/flow imagery to represent the release process
- User-Centric: Messages are written from the user’s perspective
- Action-Oriented: Clear, actionable language with specific next steps
- Consistent: All messaging follows the same tone and format
Implementation
Section titled “Implementation”Branded Messages Module
Section titled “Branded Messages Module”The src/branded-messages.ts module provides the centralized branding system:
import { NagareBrand as Brand } from "./branded-messages.ts";
// Standard branded messageBrand.log("Setting up automated release flow...");
// Success confirmationBrand.success("Release v1.2.0 complete!");
// Error with actionable guidanceBrand.error("Can't find version file. Did you run 'init' first?");
// Progress with phase indicatorsBrand.progress("Analyzing commits...", "analyzing");Message Types
Section titled “Message Types”Standard Messages
Section titled “Standard Messages”Brand.log(message)- Major operations with full branding prefixBrand.info(message)- Neutral information without brandingBrand.debug(message)- Technical details (verbose mode only)
Status Messages
Section titled “Status Messages”Brand.success(message)- Positive confirmations (✅ prefix)Brand.error(message)- Errors with branding prefixBrand.warning(message)- Cautionary messages (⚠️ prefix)Brand.celebrate(message)- Major achievements (🎉 prefix)
Progress Messages
Section titled “Progress Messages”Brand.progress(message, phase?)- Ongoing operations with optional phase emoji- Flow phases:
analyzing🔍,building🔧,publishing📤,complete✨
Specialized Messages
Section titled “Specialized Messages”- File operations:
Brand.fileOperation("updated", "package.json") - Network operations:
Brand.networkOperation("uploading", "JSR registry") - Git operations:
Brand.gitOperation("tagging", "v1.2.0")
Pre-built Templates
Section titled “Pre-built Templates”The system includes pre-built message templates for common scenarios:
// InitializationBrand.welcome("1.0.0"); // "🌊 Nagare: Setting up automated release flow (v1.0.0)..."
// Version operationsBrand.analyzingCommits(); // "🌊 Nagare: Analyzing your commits since last release..."Brand.versionBump("1.0.0", "1.1.0", "minor"); // "🌊 Nagare: Flowing from v1.0.0 to v1.1.0 (minor)..."
// Release operationsBrand.creatingRelease("1.1.0"); // "🌊 Nagare: Creating release v1.1.0..."Brand.publishingToGitHub("1.1.0"); // "🌊 Nagare: Publishing v1.1.0 to GitHub..."Brand.publishingToJSR("1.1.0"); // "🌊 Nagare: Publishing v1.1.0 to JSR..."
// CompletionBrand.releaseComplete("1.1.0", 5); // "🎉 Release v1.1.0 complete! (5 commits included)"Usage Guidelines
Section titled “Usage Guidelines”When to Use Branded Messages
Section titled “When to Use Branded Messages”✅ Use Brand. methods for:*
- Major operations and status updates
- User-facing confirmations and errors
- Progress indicators during long operations
- Success/failure messages
- Warnings and advisory messages
❌ Don’t use Brand. methods for:*
- Debug logging (use
Brand.debug()instead) - Internal technical logs (use
loggerinstead) - Simple informational displays without context
- Error messages that will be caught and reformatted
Message Writing Guidelines
Section titled “Message Writing Guidelines”Tone and Voice
Section titled “Tone and Voice”- Present tense for ongoing actions: “Analyzing commits…”
- Past tense for completed actions: “Created release v1.2.0”
- Active voice: “Nagare creates…” not “Release created by…”
- User-focused: “Your release is ready” not “Release process complete”
Content Standards
Section titled “Content Standards”- Specific: “Updated package.json” not “Updated files”
- Actionable: Include next steps for errors
- Positive: “Setting up flow” not “Initializing system”
- Concise: One line when possible, max two lines
Examples
Section titled “Examples”// GoodBrand.log("Analyzing your commits since last release...");Brand.error("Can't find version file. Run 'nagare init' first.");Brand.success("Release v1.2.0 published to GitHub!");
// AvoidBrand.log("Performing commit analysis operation...");Brand.error("Error: version file not found");Brand.success("Success: GitHub release creation completed");Integration with Existing Systems
Section titled “Integration with Existing Systems”CLI Utils Integration
Section titled “CLI Utils Integration”The branded messages work alongside the existing cli-utils.ts i18n system:
// For standard messagingBrand.log("Setting up release flow...");
// For i18n-supported messagesprintSuccess("release.complete", { version: "1.2.0" });Logger Integration
Section titled “Logger Integration”Branded messages complement the structured logger:
// User-facing branded messageBrand.progress("Publishing to JSR...", "publishing");
// Internal technical logginglogger.info("JSR API response", { status: 200, version: "1.2.0" });Testing and Validation
Section titled “Testing and Validation”Message Consistency
Section titled “Message Consistency”Run this command to verify all branded messages are being used consistently:
# Check for direct console.log usage (should be minimal)grep -r "console\.log" src/ --exclude-dir=node_modules
# Verify Brand imports are presentgrep -r "Brand\." src/ --exclude-dir=node_modulesBrand Guidelines Compliance
Section titled “Brand Guidelines Compliance”- Prefix consistency: All major operations use
🌊 Nagare:prefix - Emoji usage: Appropriate emojis for different message types
- Tone consistency: Flow-focused, user-centric language
- Action clarity: Clear next steps for errors and warnings
Future Enhancements
Section titled “Future Enhancements”Planned Features
Section titled “Planned Features”- Color support - Terminal color coding for different message types
- Localization - Multi-language support for branded messages
- Configuration - User-customizable emoji and prefix preferences
- Analytics - Message effectiveness tracking and optimization
Extension Points
Section titled “Extension Points”The branding system is designed for easy extension:
// Adding new message typesstatic milestone(message: string): void { console.log(`🎯 ${message}`);}
// Adding new templatesstatic deploymentComplete(environment: string): string { return `${NagareBrand.PREFIX} Deployed to ${environment} successfully!`;}See Also
Section titled “See Also”- CLI Guidelines - Overall CLI design principles
- Error Handling - Error message standards
- Internationalization - Multi-language support