Commit graph

133 commits

Author SHA1 Message Date
Snider
e4b2675d99 refactor(i18n): merge compose_intents_test.go into compose_test.go
Consolidate all compose-related tests into a single file for better
organisation. The grammar composition tests that verify intent templates
now live alongside the Subject tests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:57:47 +00:00
Snider
bb6aa034e4 refactor(i18n): rename check.go to checks.go, move IsPlural
- Rename check.go → checks.go (fix typo)
- Move Message.IsPlural() from i18n.go to checks.go

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:54:30 +00:00
Snider
56afd4b97f refactor(i18n): rename intents_test.go to compose_data_test.go
The "intents" concept is gone - this is now just test data for
verifying the grammar composition functions produce correct strings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:52:30 +00:00
Snider
04d8772cba refactor(i18n): remove C() and move intents to test-only
Breaking change: Remove C() semantic intent composition API.

- Remove C() global function and Service.C() method
- Remove IntentBuilder fluent API (I(), For(), Compose(), etc.)
- Move coreIntents from intents.go to intents_test.go (test data only)
- Remove C() from Translator interface

Replace intent-based CLI helpers with grammar composition:
- ConfirmIntent → ConfirmAction(verb, subject)
- ConfirmDangerous → ConfirmDangerousAction(verb, subject)
- QuestionIntent → QuestionAction(verb, subject)
- ChooseIntent → ChooseAction(verb, subject, items)
- ChooseMultiIntent → ChooseMultiAction(verb, subject, items)

The intent definitions now serve purely as test data to verify
the grammar engine can compose identical strings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:50:08 +00:00
Snider
106a751511 test(i18n): convert intents to grammar composition tests
- Add compose_intents_test.go with comprehensive tests that verify
  the grammar engine can compose the same strings as intent templates
- Add irregular verbs: overwrite, reset, reboot
- Fix PastTense for words ending in -eed (proceed, succeed, exceed)
  that were incorrectly treated as already being past tense
- Tests verify ActionResult, ActionFailed, Progress work for all
  43 core intent verbs
- Demonstrates that semantic intents can be replaced by grammar
  composition functions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 15:21:04 +00:00
Snider
e8cdb31a98 refactor(i18n): remove redundant P, PS, L shorthand functions
These are now redundant with the i18n.* namespace magic:
- P("fetch") → T("i18n.progress.fetch")
- PS("build", "x") → T("i18n.progress.build", "x")
- L("status") → T("i18n.label.status")

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 15:05:24 +00:00
Snider
fe2fe7b425 refactor(i18n): extract locale functions to localise.go
Move detectLanguage, SetFormality, Direction, IsRTL to dedicated file.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 15:02:20 +00:00
Snider
0955847661 refactor(i18n): move Message struct to interface.go
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:59:33 +00:00
Snider
1477bceb95 refactor(i18n): consolidate interfaces in interface.go
Move MissingKeyHandler, MissingKey, MissingKeyAction, and PluralRule
function types to interface.go for better discoverability.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:57:57 +00:00
Snider
b2448fa5f2 refactor(i18n): extract JSON flattening to mutate.go
Move flatten and flattenWithGrammar functions to dedicated file.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:54:03 +00:00
Snider
c331c29c05 refactor(i18n): extract type checks to check.go
Move isVerbFormObject, isNounFormObject, hasPluralCategories,
isPluralObject to dedicated file.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:51:46 +00:00
Snider
2d1dbcc473 refactor(i18n): extract Service to service.go
Move Service struct, methods, constructors, and singleton management
to dedicated file for better code organization.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:50:25 +00:00
Snider
12a77a63cb refactor(i18n): extract type conversions to transform.go
Move getCount, toInt, toInt64, toFloat64 helpers to dedicated file.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:46:49 +00:00
Snider
282be9c7bc feat(i18n): add localized time formatting helpers
- Add TimeAgo(t time.Time) for relative time strings
- Add FormatAgo(count, unit) for "N units ago" composition
- Add i18n.ago namespace pattern: T("i18n.ago", 5, "minute")
- Uses existing time.ago.{unit} keys with CLDR pluralization
- Remove local formatTimeAgo from cmd/php in favor of i18n.TimeAgo

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:44:42 +00:00
Snider
7d1b1809cb feat(i18n): add localized number formatting helpers
New i18n.* namespace patterns for number formatting:
- T("i18n.number", 1234567) → "1,234,567" (en) / "1.234.567" (de)
- T("i18n.decimal", 1234.56) → "1,234.56" (en) / "1.234,56" (de)
- T("i18n.percent", 0.85) → "85%" (en) / "85 %" (de)
- T("i18n.bytes", 1536000) → "1.5 MB" (en) / "1,5 MB" (de)
- T("i18n.ordinal", 3) → "3rd" (en) / "3." (de)

Also available as direct functions:
- FormatNumber(n), FormatDecimal(f), FormatPercent(f)
- FormatBytes(n), FormatOrdinal(n)

Language-aware formatting for en, de, fr, es, zh.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:39:15 +00:00
Snider
5e55f66de9 refactor(i18n): rename core.* namespace to i18n.*
More self-documenting: when you see T("i18n.label.status") it's
immediately clear the i18n package is composing it, not looking up a key.

- T("i18n.label.status") → "Status:"
- T("i18n.progress.build") → "Building..."
- T("i18n.count.file", 5) → "5 files"
- T("i18n.done.delete", "file") → "File deleted"
- T("i18n.fail.delete", "file") → "Failed to delete file"

Intent keys (core.delete, core.install, etc.) remain unchanged -
they're semantic intent names, not i18n namespace patterns.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:32:08 +00:00
Snider
39de3c2836 refactor(i18n): slim locale files using composable grammar
Reduce locale files from ~4600 to 338 total lines (93% reduction):
- en_GB.json: 1520 → 262 lines (83% reduction)
- en_US.json: ~1500 → 10 lines (US spelling overrides only)
- en_AU.json: ~1500 → 2 lines (inherits from en_GB)
- de.json: 120 → 64 lines

Removed redundant entries that can now be composed via core.* patterns:
- Labels: T("core.label.status") → "Status:"
- Counts: T("core.count.item", 5) → "5 items"
- Progress: T("core.progress.build") → "Building..."
- Done/Fail: T("core.done.build", subj) → "Build completed"

Updated tests to use new key patterns.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:24:23 +00:00
Snider
621540433b test(i18n): add core.* namespace tests
Tests for core.label, core.progress, core.count, core.done, core.fail
patterns. Also tests Raw() bypasses core.* magic.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:58:37 +00:00
Snider
cbe44d28f0 feat(i18n): add core.* namespace magic in T()
T() now auto-composes grammar patterns for core.* keys:
- core.label.{word} → "Status:"
- core.progress.{verb} → "Building..."
- core.count.{noun}, n → "5 files"
- core.done.{verb}, subj → "File deleted"
- core.fail.{verb}, subj → "Failed to delete file"

_() and Raw() do direct key lookup without magic.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:57:34 +00:00
Snider
62e5b0b75a feat(i18n): add composable grammar for minimal locale files
Extend grammar system to support base words and punctuation rules:
- gram.word.* for base word translations
- gram.punct.label for language-specific label suffix (FR: " :")
- gram.punct.progress for progress suffix

Label() and Progress() are now language-aware:
- L("status") → EN: "Status:" / FR: "Statut :"
- P("build")  → EN: "Building..." / FR: "Construction..."

This enables ~80% reduction in locale file size by composing
phrases at runtime instead of storing every variant.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:43:52 +00:00
Snider
92f734e756 refactor(i18n): simplify missing key handler API
Rename MissingKeyAction to MissingKey and add OnMissingKey() handler.
Keeps focus on missing keys only for QA - no unnecessary trace overhead.

- MissingKey: dispatched when T()/C() can't find a key in ModeCollect
- OnMissingKey(): register handler for missing key events
- SetActionHandler(): deprecated, use OnMissingKey()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:36:55 +00:00
Snider
8ea2bdf716 refactor(i18n): extract debug functionality to debug.go
Move debug mode code to dedicated file for better code comprehension.
Go's package-level file globbing allows splitting functionality
across files while maintaining a single cohesive package.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:31:52 +00:00
Snider
4a8db3bcbc refactor(i18n): rename common.{verb,noun,article} to gram.*
Move grammar data (verbs, nouns, articles) from "common" to "gram"
namespace - a tribute to Gram (grandmother) and short for grammar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:28:29 +00:00
Snider
94723454a8 feat(i18n): add compile-time key validation tool
Adds cmd/i18n-validate that scans Go source files for i18n key usage
and validates them against locale JSON files and registered intents.

Features:
- Scans T(), C(), I(), and qualified i18n.* calls
- Expands ./... pattern to find all Go packages
- Validates message keys against locale JSON files
- Validates intent keys against registered core.* intents
- Reports missing keys with file:line locations
- Skips constant references (type-safe usage)

Usage:
  go run ./cmd/i18n-validate ./...
  task i18n:validate

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:18:58 +00:00
Snider
829be45fcc feat(i18n): add remaining API features for stability
Implements the final features from the semantic i18n plan:

- Template caching: sync.Map cache for compiled templates
- Translator interface: enables mocking for tests
- Custom intent registration: thread-safe RegisterIntents(), UnregisterIntent()
- JSON-based grammar: verb/noun forms in locale files, checked before computed
- Fallback chain: T() tries common.action.{verb} and common.{verb}
- CLI enhancements: Timeout(), Filter(), Multi() options, ChooseMulti()
- Intent key constants: type-safe IntentCore* and Key* constants

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:11:58 +00:00
Snider
46f6d4c5fe feat(i18n): add Phase 4 extended language support
Fluent Intent Builder API:
- I("core.delete").For(S("file", path)).Question()
- I("core.delete").With(subject).Compose()
- Convenience methods: Question(), Success(), Failure(), Meta(), IsDangerous()

Formality Levels (for Sie/du, vous/tu languages):
- FormalityNeutral, FormalityInformal, FormalityFormal constants
- Subject.Formal(), Subject.Informal(), Subject.Formality()
- Service.SetFormality(), Service.Formality()
- Package-level SetFormality()

CLDR Plural Categories:
- PluralZero, PluralOne, PluralTwo, PluralFew, PluralMany, PluralOther
- Language-specific plural rules: English, German, French, Spanish, Russian, Polish, Arabic, Chinese, Japanese, Korean
- Message.ForCategory() for proper plural selection
- Service.PluralCategory() for getting category by count

RTL Text Direction Support:
- TextDirection type (DirLTR, DirRTL)
- IsRTLLanguage() for language detection
- Service.Direction(), Service.IsRTL()
- Package-level Direction(), IsRTL()

GrammaticalGender type:
- GenderNeuter, GenderMasculine, GenderFeminine, GenderCommon
- For future gender agreement in gendered languages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:55:41 +00:00
Snider
fa6d62e385 feat(i18n): add debug mode and NewSubject alias
- Add SetDebug()/Debug() methods for showing key prefixes in output
- Debug mode shows: "[cli.success] Success" instead of "Success"
- Add NewSubject() as alias for S() for readability
- Both T() and C() respect debug mode

Debug mode is useful for:
- Identifying which translation keys are used where
- Verifying correct key usage during development
- QA testing of translation coverage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:47:28 +00:00
Snider
fc74d4df9c refactor(i18n): use grammar engine for progress messages
- Replace cli.progress.* keys with i18n.P() dynamic generation
- Remove 7 static progress keys from en_GB.json (building, checking, etc.)
- Add additional core.* intents (format, analyse, link, unlink, fetch, etc.)
- Add grammar helpers: Progress(), ProgressSubject(), ActionResult(), Label()
- Add package-level convenience functions: P(), PS(), L()
- Update commands to use common.prompt.abort instead of cli.confirm.abort

The grammar engine now generates progress messages dynamically:
  i18n.P("check")  → "Checking..."
  i18n.P("fetch")  → "Fetching..."

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:43:03 +00:00
Snider
f85064a954 feat(i18n): implement semantic i18n system with grammar engine
Add semantic intent system for natural language CLI interactions:

- Mode system (Normal/Strict/Collect) for missing key handling
- Subject type with fluent builder for typed subjects
- Composed type with Question/Confirm/Success/Failure forms
- 30+ core.* intents (delete, create, commit, push, etc.)
- Grammar engine: verb conjugation, noun pluralization, articles
- Template functions: title, lower, upper, past, plural, article
- Enhanced CLI: Confirm with options, Question, Choose functions
- Collect mode handler for QA testing

Usage:
  i18n.T("core.delete", i18n.S("file", "config.yaml"))
  result := i18n.C("core.delete", subject)
  cli.ConfirmIntent("core.delete", subject)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:29:44 +00:00
Snider
6f6ee99008 refactor(i18n): consolidate 85 keys into reusable templates
Replace specific messages with parameterized templates:

- 60 "failed to X" errors -> common.error.failed + Action
- 10 "Running X" messages -> common.progress.running + Task
- 4 "Checking X" messages -> common.progress.checking + Item
- 13 "X successfully" messages -> common.success.completed + Action

This reduces translation maintenance - translators only need to
translate 3 templates instead of 85 individual messages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:44:45 +00:00
Snider
bcf74fe84e refactor(i18n): use common.error.failed template for all error messages
Replace specific error keys with the generic template:
- common.error.working_dir -> common.error.failed + Action
- common.error.load_config -> common.error.failed + Action
- common.error.build_failed -> common.error.failed + Action
- common.error.get_logs -> common.error.failed + Action
- common.error.tests_failed -> common.error.failed + Action

This reduces 5 duplicate error keys to 1 reusable template:
"Failed to {{.Action}}"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:35:38 +00:00
Snider
3169728d3a refactor(i18n): consolidate duplicate translation keys into common section
Add common.* keys for reusable translations:
- common.label.* - UI labels (error, done, status, version, etc.)
- common.status.* - status words (running, stopped, dirty, synced)
- common.error.* - error messages (failed, not_found, working_dir)
- common.flag.* - CLI flag descriptions (registry, verbose, etc.)
- common.count.* - count templates (failed, passed, skipped)
- common.result.* - result messages (all_passed, no_issues)
- common.progress.* - progress messages (running, checking)
- common.hint.* - help hints (install_with, fix_deps)

Update all cmd/* files to use common keys instead of duplicated
command-specific keys. Reduces translation maintenance burden
and ensures consistency across the CLI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:32:25 +00:00
Snider
a00a3240a6 refactor(i18n): use nested JSON format for translation files
- Rewrite i18n package to handle nested JSON natively
- Remove go-i18n dependency in favour of simple custom implementation
- Flatten nested keys to dot notation internally (cli.confirm.yes)
- Support pluralisation with one/other keys
- Template interpolation with {{.Var}} syntax
- Update tests for new API and nested structure

Nested JSON is the standard format for translation tools,
making it easier to manage with external translation services.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:11:07 +00:00
Snider
5e2d058b26 feat(cli): wire Core runtime with i18n and log services
- Add i18n service wrapping pkg/i18n for translations via cli.T()
- Add log service with levels (quiet/error/warn/info/debug)
- Wire cli.Init() in cmd.Execute() with explicit service names
- Fix main.go to print errors to stderr and exit with code 1
- Update runtime.go to accept additional services via Options

Services use WithName() to avoid name collision since both are
defined in pkg/cli (WithService would auto-name both "cli").

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:55:30 +00:00
Snider
22aa1df30a refactor(cli): clean DX with direct function calls
- 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>
2026-01-30 10:41:35 +00:00
Snider
23d399407c refactor(cli): move cmd/shared to pkg/cli with runtime
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>
2026-01-30 10:32:05 +00:00
Snider
6ed025d3e6 feat(framework): add QUERY/QUERYALL/PERFORM dispatch patterns
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>
2026-01-30 10:18:54 +00:00
Snider
f4da42d095 refactor(framework): rename package from framework to core
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>
2026-01-30 09:45:18 +00:00
Snider
c21a271dcf feat(framework): add service layer to git and agentic packages
- 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>
2026-01-30 09:19:20 +00:00
Snider
a0f4baafad feat(framework): add core DI framework and improve dev commands
- 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>
2026-01-30 09:02:16 +00:00
Snider
58596ea00e feat(push): handle diverged branches with pull-and-retry
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>
2026-01-30 08:02:27 +00:00
Snider
dcb0871b61 feat(git): add interactive push mode for SSH passphrase support
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>
2026-01-30 08:02:27 +00:00
Snider
2252d6bda1 feat(i18n): add regional English variants with en_GB as default
- 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>
2026-01-30 02:48:36 +00:00
Snider
e8e48127c2 feat(i18n): add translation keys to all CLI commands
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>
2026-01-30 02:37:57 +00:00
Snider
0c3bccfceb feat(i18n): add internationalization package for CLI
- 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>
2026-01-30 01:42:53 +00:00
Snider
6d8edeb89c fix(php): set XDEBUG_MODE=coverage for PHPUnit 11 compatibility
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>
2026-01-30 00:28:47 +00:00
Snider
e4d79ce952 feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing

Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands

QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
Snider
d2c0553b6d refactor: flatten CLI to root, simplify pkg/mcp for CLI-only use
- 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>
2026-01-29 18:13:51 +00:00
Snider
9add6cf2ee refactor(cli): restructure cmd packages into subdirectories
- 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>
2026-01-29 18:02:43 +00:00
Snider
c9ebb7c781 test: increase coverage to 63.8% across packages
Coverage improvements:
- pkg/build: 89.4%
- pkg/release: 86.7% (from 36.7%)
- pkg/container: 85.7%
- pkg/php: 62.1% (from 26%)
- pkg/devops: 56.7% (from 33.1%)
- pkg/release/publishers: 54.7%

Also:
- Add GEMINI.md for Gemini agent guidance
- Update .gitignore to exclude coverage files
- Remove stray core.go at root
- Add core go cov command for coverage reports

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:28:23 +00:00