- cli.Success(), cli.Error(), etc. now print directly
- String-returning versions renamed to cli.FmtSuccess(), etc.
- Removes App() from common usage path
- Usage: cli.Success("done") instead of fmt.Println(cli.Success("done"))
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Moves shared utilities (styles, utils) from cmd/shared to pkg/cli.
Adds CLI runtime with global singleton pattern:
- cli.Init() initialises the runtime
- cli.App() returns the global instance
- OutputService for styled terminal printing
- SignalService for graceful shutdown handling
All cmd/ packages now import pkg/cli instead of cmd/shared.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements the Core IPC design with four dispatch patterns:
- ACTION: fire-and-forget broadcast (existing)
- QUERY: first responder returns data
- QUERYALL: all responders return data
- PERFORM: first responder executes task
Updates git and agentic services to use Query/Task patterns.
Adds dev service for workflow orchestration.
Refactors dev work command to use worker bundles.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Documents the four dispatch patterns (ACTION, QUERY, QUERYALL, PERFORM),
worker bundle architecture, and permissions-through-presence model.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Aligns package name with directory structure (pkg/framework/core).
Fixes doc comment in e.go and adds core binary to gitignore.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add pkg/framework/framework.go for cleaner imports
- Add pkg/git/service.go with Core service wrapper
- Add pkg/agentic/service.go with AI/Claude service wrapper
- Services use IPC pattern with ACTION() dispatch
Usage:
import "github.com/host-uk/core/pkg/framework"
app, _ := framework.New(
framework.WithService(git.NewService(git.ServiceOptions{})),
framework.WithServiceLock(),
)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add pkg/framework/core with GUI-agnostic DI/service framework
(extracted from core-gui, Wails dependencies removed)
- Add pkg/agentic/prompts with embedded commit instructions
- Improve dev push: detect uncommitted changes, offer Claude commit
- Add claudeEditCommit for cases needing Write/Edit permissions
- Add i18n keys for diverged branches and uncommitted changes
- Fix infinite loop when only untracked files remain after commit
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add pull-and-retry logic for diverged branches in dev_work command,
matching the behaviour already present in dev_push. Also removes the
debug logging added during non-fast-forward detection development.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When push fails due to non-fast-forward rejection (local and remote
have diverged), offer to pull with rebase and retry the push instead
of just failing.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Introduces gitInteractive() that connects stdin/stdout to the terminal,
allowing SSH to prompt for passphrases. Also adds GitError type to
improve error messages by including stderr output.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename en.json to en_GB.json (British English)
- Add en_US.json with American spellings (color, analyze, etc.)
- Add en_AU.json for Australian English
- Set BritishEnglish as the bundle default language
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace hardcoded strings with i18n.T() calls across all cmd/* packages:
- ai, build, ci, dev, docs, doctor, go, php, pkg, sdk, setup, test, vm
Adds 500+ translation keys to en.json for command descriptions,
flag descriptions, labels, messages, and error strings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Service with embedded locale files (en, de)
- Auto-detect system language from LANG/LC_* env vars
- Template support for interpolation and pluralization
- Extensible: GUI can load additional translations via LoadFS()
- Global default service with T() shorthand
- Thread-safe with sync.RWMutex
Designed to be extended by core-gui which can import this
package and add GUI-specific translations on top.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ai: Replace task styles with shared TitleStyle, ValueStyle, AccentLabelStyle
- php: Use shared.StageStyle for QA stage headers
- setup: Use shared.TitleStyle instead of hardcoded colour
- shared: Add AccentLabelStyle and StageStyle
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- dev: Replace hardcoded colours in ci, issues, reviews, impact, work
- php: Use shared colour constants and deploy styles
- sdk: Replace local styles with shared aliases
- shared: Add Yellow500, Emerald500, Purple500 colours
- shared: Add PrNumberStyle and deploy status styles
Removes 111 lines of duplicate style definitions.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ai: Replace local task priority/status styles with shared equivalents
- go: Use FormatCoverage() and ProgressLabel() helpers in test output
- vm: Use shared colour constants instead of hardcoded values
- shared: Add FormatTaskStatus(), StatusPrefix(), ProgressLabel() helpers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add to shared package:
- Git status styles (dirty/ahead/behind/clean/conflict)
- CheckMark() helper for presence indicators (✓/—)
- Label() helper for key-value labels
- CheckResult() helper for environment check output
Update packages to use new shared utilities:
- cmd/dev: use shared git styles for table cells
- cmd/docs: use CheckMark() and Label() helpers
- cmd/doctor: use CheckResult() and Success()/Error() helpers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add reusable styles and helpers to shared package:
- Coverage styles (high/med/low) with FormatCoverage() helper
- Priority styles (high/medium/low) with FormatPriority() helper
- Severity styles (critical/high/medium/low) with FormatSeverity() helper
Update packages to use shared styles:
- cmd/test: use shared coverage styles and FormatCoverage()
- cmd/php: use shared status, QA, and severity styles
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive styling system for consistent DX across commands:
- Tailwind colour palette as named constants (30+ colours)
- Unicode symbols for status indicators, arrows, tree chars
- New styles: InfoStyle, AccentStyle, CodeStyle, NumberStyle, etc.
- Box styles with rounded borders for panels
- Helper functions: Success(), Error(), StatusLine(), KeyValue(), etc.
- Table struct with auto-width column rendering
Also:
- Fix cmd/build to use shared styles instead of duplicating
- Update cmd/dev/dev_health to use StatusLine() helper
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace leaanthony/clir with spf13/cobra across all command packages.
This provides better subcommand handling, built-in shell completion,
and a more widely-used CLI framework.
Changes:
- Update cmd/core.go with cobra root command and completion support
- Convert all subcommand packages to use *cobra.Command
- Use init() functions for flag registration instead of inline setup
- Maintain all existing functionality and flag behaviors
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
PHPUnit 11 returns exit code 1 when xdebug coverage mode isn't set,
even if all tests pass. This caused false failures in the QA pipeline.
Setting XDEBUG_MODE=coverage in the test environment resolves the
warning and ensures tests return exit code 0 on success.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove inline YAML from all index.md files
- Add fragment links to corresponding example.md sections
- Create ai/example.md for workflow examples
- Add missing configs to example.md files (test.yaml, php.yaml, etc)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- php: comprehensive rewrite with all 20+ subcommands documented
- pkg: added full documentation with flags and examples
- vm: added examples and detail for all commands
- TODO.md: updated to show current coverage (12/13 at 100%)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create docs/cmd/ai/index.md with full task management documentation
- Add ai command to main docs/cmd/index.md command list
- Update docs/cmd/dev/index.md to point to ai for task commands
- Update TODO.md to reflect current documentation state
Task commands (tasks, task, task:update, task:complete, task:commit, task:pr)
have moved from dev to ai package.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive package-level documentation to all CLI command packages:
- cmd/core.go, core_ci.go, core_dev.go: Main CLI entry points
- cmd/shared: Lipgloss styles and utility functions
- cmd/ai: AI agent task management and Claude integration
- cmd/dev: Multi-repo git workflows and GitHub integration
- cmd/build, cmd/ci: Build and release automation
- cmd/sdk: OpenAPI validation and compatibility
- cmd/go: Go development tools with enhanced output
- cmd/php: Laravel development, build, and deployment
- cmd/docs: Documentation sync across repos
- cmd/doctor: Environment validation
- cmd/test: Test runner with coverage
- cmd/pkg: GitHub package management
- cmd/setup: Workspace initialisation
- cmd/vm: LinuxKit VM management
Each docblock now describes:
- Package purpose and commands
- Key features and configuration
- Package naming notes where relevant (gocmd, testcmd)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move cmd/core/cmd/* to cmd/* (flatten directory structure)
- Update module path from github.com/host-uk/core/cmd/core to github.com/host-uk/core
- Remove go.mod files from pkg/* (single module now)
- Simplify pkg/mcp to file operations only (no GUI deps)
- GUI features (display, webview, process) stay in core-gui/pkg/mcp
- Fix import aliases (sdkpkg) for package name conflicts
- Remove old backup directory (cmdbk)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move CLI commands into subdirectories matching command hierarchy:
dev/, go/, php/, build/, ci/, sdk/, pkg/, vm/, docs/, setup/, doctor/, test/, ai/
- Create shared/ package for common styles and utilities
- Add new `core ai` root command with claude subcommand
- Update package declarations and imports across all files
- Create commands.go entry points for each package
- Remove GUI-related files (moved to core-gui repo)
This makes the filesystem structure match the CLI command structure,
improving context capture and code organization.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- php: add serve flags, packages subcommands, all commands
- pkg: fix description (GitHub repos not Go modules), add --add flag
- setup: replace --path/--ssh with --dry-run/--only
- doctor: add --verbose flag
- test: full documentation with all flags and JSON output
- Cleaned up TODO.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Generated by comparing `core --help` output against docs.
Lists missing commands, flags, and discrepancies.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>