Commit graph

317 commits

Author SHA1 Message Date
Snider
e1be5bf01c ci: add dependabot configuration 2026-01-31 20:03:46 +00:00
Snider
778ce64e4b refactor(plugin): rename plugin files and update command structure 2026-01-31 11:39:19 +00:00
Snider
a93cc3540a feat(plugin): add Claude Code plugin for host-uk framework
Core plugin providing:
- Skills: core CLI reference, PHP patterns, Go patterns
- Commands: /core:remember for context persistence
- Hooks:
  - PreToolUse: block dangerous commands (rm -rf, sed -i, grep -l |)
  - PreToolUse: enforce core CLI over raw go/php commands
  - PostToolUse: auto-format Go/PHP, check for debug statements
  - PostToolUse: warn about uncommitted work after git commit
  - PreCompact: save state to prevent amnesia after auto-compact
  - SessionStart: restore context from recent sessions (<3h)
- MCP: core CLI server integration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 10:27:04 +00:00
Snider
96eaed507c refactor(i18n): migrate all pkg/* to grammar engine
Replace verbose map-based translation calls with concise grammar
engine helpers across all command packages:

- i18n.T("common.label.xxx") → i18n.Label("xxx")
- i18n.T("common.error.failed", map) → i18n.T("i18n.fail.verb", subj)
- i18n.T("common.progress.running", map) → i18n.ProgressSubject()
- i18n.T("common.count.xxx", map) → i18n.T("i18n.count.xxx", n)

Packages updated: ai, ci, dev, docs, php, pkgcmd, sdk, setup, test, vm

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 23:09:45 +00:00
Snider
3dd61b5ac7 refactor(go): use i18n grammar engine instead of translation keys
Replace hardcoded i18n.T() key lookups with grammar helpers:
- i18n.Label("test") → "Test:"
- i18n.Progress("install") → "Installing..."
- i18n.ProgressSubject("run", "tests") → "Running tests..."
- i18n.T("i18n.done.pass") → "Passed"
- i18n.T("i18n.fail.install", "binary") → "Failed to install binary"
- i18n.T("i18n.count.check", n) → "5 checks"

The grammar engine computes verb forms (past tense, gerund) and
noun forms (plurals) automatically from built-in tables, eliminating
the need for hundreds of individual translation keys.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 22:43:39 +00:00
Snider
0fd76d86b4 feat(go): add QA command with subcommands for code quality checks
Add `core go qa` command with subcommands:
- fmt: check/fix code formatting (gofmt)
- vet: run go vet
- lint: run golangci-lint
- test: run tests
- race: run tests with race detector
- vuln: check for vulnerabilities (govulncheck)
- sec: run security scanner (gosec)
- quick: fmt, vet, lint only
- full: all checks

Default (no subcommand) runs fmt, vet, lint, test.
All commands support --fix flag where applicable.

Also update Taskfile.yml to use core CLI commands throughout.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 22:29:20 +00:00
Snider
6b76b4d37f refactor(cli): add Fatal() and simplify main entry point
- Add cli.Fatal(err) that prints styled error and exits
- Change cli.Main() to handle errors internally via Fatal()
- Simplify main.go to just: cli.Main()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 22:16:34 +00:00
Snider
5b2c4eef75 refactor: move CLI entry point to pkg/cli, remove cmd/
Consolidate CLI code into pkg/cli:
- Add pkg/cli/app.go with Main() entry point and completionCmd
- Move build variants to internal/variants/ (avoids import cycle)
- Move i18n-validate tool to internal/tools/
- Update main.go to call cli.Main()
- Remove cmd/ directory entirely

Structure:
- main.go imports internal/variants (triggers command registration)
- main.go calls cli.Main() which runs the CLI
- Build variants: go build, go build -tags ci/php/minimal

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 22:11:35 +00:00
Snider
629141e279 feat(pkg): add standalone log and errors packages
Extract logging to pkg/log for use outside CLI:
- Logger with Debug/Info/Warn/Error levels
- Key-value pairs for structured logging
- Customisable styling and output
- Optional Core framework integration via Service

Enhance pkg/errors with:
- Wrap() and WrapCode() helpers
- Code() for error codes
- Op(), ErrCode(), Message(), Root() extractors
- Standard library wrappers (Is, As, New, Join)

Update pkg/cli/log.go to use pkg/log with CLI styling.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 22:02:40 +00:00
Snider
9931593f9d refactor(cli): move commands from cmd/ to pkg/ with self-registration
Implements defence in depth through build variants - only compiled code
exists in the binary. Commands now self-register via cli.RegisterCommands()
in their init() functions, mirroring the i18n.RegisterLocales() pattern.

Structure changes:
- cmd/{ai,build,ci,dev,docs,doctor,go,php,pkg,sdk,setup,test,vm}/ → pkg/*/cmd_*.go
- cmd/core_dev.go, cmd/core_ci.go → cmd/variants/{full,ci,php,minimal}.go
- Added pkg/cli/commands.go with RegisterCommands API
- Updated pkg/cli/runtime.go to attach registered commands

Build variants:
- go build           → full (21MB, all 13 command groups)
- go build -tags ci  → ci (18MB, build/ci/sdk/doctor)
- go build -tags php → php (14MB, php/doctor)
- go build -tags minimal → minimal (11MB, doctor only)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 21:55:55 +00:00
Snider
f2f7e27e77 docs(cli): add CLI commands registration design
Design for moving cmd/ into self-registering packages in pkg/:
- RegisterCommands() pattern like RegisterLocales()
- rootCmd stored in core.App
- Build variants via import files with build tags
- Smaller attack surface through selective compilation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 21:18:54 +00:00
Snider
71e15236e2 feat(i18n): add RegisterLocales for package locale registration
- Add i18n.RegisterLocales(fsys, dir) for packages to register translations
- Locales are automatically loaded when i18n.Init() is called
- Fix gram.word.* loading bug (strings were in wrong switch case)
- Fix loadJSON to merge messages instead of replacing
- Add common.* keys to base locale (labels, flags, progress, etc.)
- Add pkg/php/locales with PHP-specific translations
- pkg/php/i18n.go registers locales via init()

This enables the idiomatic pattern where packages register their
locale files and they're automatically loaded by the i18n system.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:51:32 +00:00
Snider
415e558c19 refactor(i18n): use grammar system for PHP QA messages
- Add i18n.SetDefault() in CLI service for global i18n.T() access
- Replace explicit cmd.php.qa.* keys with grammar-based composition
- Use i18n.Label(), i18n.ProgressSubject() for structured messages
- Use i18n.done.*, i18n.fail.*, i18n.count.* magic namespaces
- Simplify GetIssueMessage() to use grammar patterns

This reduces translation key explosion by composing messages from
grammar primitives rather than defining explicit keys for every phrase.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:23:28 +00:00
Snider
edfb84cf1d chore(php): remove analyse alias for stan command
No backwards compatibility - use `core php stan` directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:08:34 +00:00
Snider
9aaaa0ad26 refactor(php): rename analyse to stan
- Rename "analyse" check to "stan" (PHPStan is commonly called "stan")
- Command: `core php stan` (with "analyse" alias for compatibility)
- Update QA pipeline to use "stan" for check name
- Update dependency chain: fmt → stan → psalm → test

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:06:51 +00:00
Snider
8c32539958 refactor(php): use pkg/process for QA pipeline
- Add QARunner that wraps process.Service and process.Runner
- Replace sequential runQACheck() with dependency-ordered execution
- Checks run in proper sequence: audit → fmt → analyse → psalm → test → rector/infection
- Process events broadcast via Core ACTION() messages
- Display results with stage grouping and duration tracking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:02:03 +00:00
Snider
c145d64891 test(process): add concurrency tests and global function wrappers
Address code review findings:

- Add global wrappers: StartWithOptions, RunWithOptions, Running
- Add global_test.go with concurrent access tests for Default(),
  SetDefault(), and concurrent operations
- Add process_test.go with dedicated Process struct method tests
- All tests pass with race detector

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:55:37 +00:00
Snider
41270b2904 feat(process): add process management package with Core IPC
Add pkg/process for spawning, monitoring, and orchestrating external
processes with Core ACTION integration:

- Service with framework.ServiceRuntime integration
- ACTION messages: ProcessStarted, ProcessOutput, ProcessExited
- RingBuffer for output capture
- Runner for orchestration (RunAll, RunSequential, RunParallel)
- Dependency graph support for QA pipelines
- Global convenience functions following i18n patterns

Also add docs/pkg/PACKAGE_STANDARDS.md defining how to create Core
packages, using pkg/i18n as the reference implementation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:48:28 +00:00
Snider
6062853649 feat(cli): add daemon mode support
Add comprehensive daemon mode support to pkg/cli:

- Mode detection (Interactive/Pipe/Daemon) based on TTY and CORE_DAEMON env
- TTY helpers using golang.org/x/term (IsTTY, IsStdinTTY, IsStderrTTY)
- PIDFile for single-instance enforcement with stale PID detection
- HealthServer with /health and /ready endpoints for orchestration
- Daemon lifecycle manager combining PID, health, and graceful shutdown
- SIGHUP support for configuration reloading in runtime.go
- Fix i18n.go type references (MissingKey, OnMissingKey)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:28:50 +00:00
Snider
e9be13bcd3 docs(i18n): add comprehensive package documentation
- README.md: Quick start, all features, configuration options
- GRAMMAR.md: Verb conjugation, pluralisation, articles, templates
- EXTENDING.md: Custom loaders, handlers, framework integration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:18:43 +00:00
Snider
f4e52417ef fix(i18n): address additional code review findings
- LoadFS: Use path.Join instead of filepath.Join for fs.FS compatibility
- AddHandler: Document handler chain lock behavior
- getEffectiveFormality: Support string values ("formal", "informal")

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:14:10 +00:00
Snider
7f4682ab17 fix(i18n): address remaining code review issues
- service.go: Simplify Default() to just call Init() (sync.Once handles idempotency)
- service.go: Add nil check to SetDefault() with panic
- service.go: Add documentation for ModeStrict panic behavior
- loader.go: Add LanguagesErr() to expose directory scan errors
- loader.go: Use path.Join instead of filepath.Join for fs.FS compatibility
- transform.go: Add uint, uint8-64, int8, int16 support to type converters
- grammar.go: Replace deprecated strings.Title with unicode-aware implementation
- i18n_test.go: Add comprehensive concurrency tests with race detector

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:10:28 +00:00
Snider
285a4582b0 fix(i18n): address thread-safety issues from code review
- hooks.go: Use atomic.Value for missingKeyHandler global
- loader.go: Use sync.Once for FSLoader.Languages() caching
- service.go: Use atomic.Pointer[Service] for defaultService

All globals that could race between goroutines now use proper
synchronization primitives.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:02:30 +00:00
Snider
3daa0c34db feat(i18n): wire TranslationContext into formality resolution
- getEffectiveFormality() now checks *TranslationContext for formality
- Priority: TranslationContext > Subject > map["Formality"] > Service
- Add tests for context formality override behavior
- Update FUTURE_PROOFING.md: Context Integration now IMPLEMENTED
- Update REVIEW.md: Context wiring recommendation addressed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:56:09 +00:00
Snider
945db09966 feat(i18n): add options pattern and NewWithLoader constructor
- Add NewWithLoader(loader, opts...) for custom storage backends
- Add Option type with WithFallback, WithFormality, WithHandlers,
  WithDefaultHandlers, WithMode, WithDebug options
- Update New() and NewWithFS() to accept options
- Add loader field to Service struct
- Remove NewSubject() alias (use S() instead)
- Add tests for new options and NewWithLoader

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:47:11 +00:00
Snider
67e7e552f3 refactor(i18n): implement extensible handler chain architecture
Refactor the i18n package for extensibility without breaking changes:

- Add KeyHandler interface for pluggable namespace handlers
- Add Loader interface for format-agnostic translation loading
- Add TranslationContext for translation disambiguation
- Implement 6 built-in handlers (Label, Progress, Count, Done, Fail, Numeric)
- Update T() to use handler chain instead of hardcoded logic
- Add handler management methods (AddHandler, PrependHandler, ClearHandlers)

File reorganisation:
- types.go: all type definitions
- loader.go: Loader interface + FSLoader (from mutate.go, checks.go)
- handler.go: KeyHandler interface + built-in handlers
- context.go: TranslationContext + C() builder
- hooks.go: renamed from actions.go
- service.go: merged interfaces.go content

Deleted: interfaces.go, mode.go, mutate.go, checks.go

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:42:41 +00:00
Snider
c47c2905a8 refactor(i18n): consistent empty input handling and add doc comment
- Article("") now returns "" for consistency with other grammar
  functions (PastTense, Gerund, PluralForm, Label all return "")
- Add doc comment to getMessage() for consistency with other
  internal helpers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:15:28 +00:00
Snider
1f9321b34b docs(i18n): clarify Set* behaviour and fix CurrentLanguage default
- CurrentLanguage() now returns "en-GB" (fallback) instead of "" when
  service is nil, consistent with other getters returning defaults
- Document why SetLanguage returns error (validates language tag) while
  SetMode, SetFormality, SetDebug do not (just set values)
- Add "Does nothing if service not initialized" to Set* doc comments

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:11:03 +00:00
Snider
e59f7f8cfd refactor(i18n): final code standards cleanup
- Add explicit nil checks to toInt, toInt64, toFloat64 for consistency
- Standardize error messages to use %q for user-provided strings
- Export GetGrammarData for symmetry with SetGrammarData
- Standardize String() doc comments to "the TypeName" pattern

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:08:33 +00:00
Snider
892be17ef8 refactor(i18n): fix type coverage and remove unusable function
- Add int32 and float32 handling to toInt() for consistency with
  toInt64() and toFloat64()
- Remove unusable _() function (can't be called as i18n._())
- SetLanguage() now returns ErrServiceNotInitialized when service
  is nil instead of silently succeeding

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:03:38 +00:00
Snider
b75dd0ae58 refactor(i18n): fix doc comments and add package-level wrappers
- Remove incorrect "Panics if called on nil receiver" from chainable
  Subject methods (they actually return nil safely)
- Add Raw() as named alias for _() matching Service.Raw()
- Add package-level wrappers: SetLanguage(), CurrentLanguage(),
  SetMode(), CurrentMode()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:01:02 +00:00
Snider
e11b6dc2cf feat(i18n): add CountString and fix FormalityString return type
- Add CountString() to return count as string
- Fix FormalityString() to return string instead of Formality type
- Both Int and String getters now available for count field

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:56:56 +00:00
Snider
9645cea7d6 refactor(i18n): standardise code patterns and naming
- Add nil safety to chainable Subject methods (Count, Gender, In, Formal, Informal, Formality)
- Rename getters to use return type suffix pattern:
  - CountValue → CountInt
  - GenderValue → GenderString
  - Location → LocationString
  - NounValue → NounString
  - FormalityValue → FormalityString
- Fix comment style for plural rule functions to follow Go doc conventions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:53:11 +00:00
Snider
1c7ff0511b refactor(i18n): rename getters to idiomatic Go and add tests
Rename Subject getters from GetX() to idiomatic Go naming:
- GetCount → CountValue
- GetGender → GenderValue
- GetLocation → Location
- GetNoun → NounValue
- GetFormality → FormalityValue

Add comprehensive tests for checks.go and mutate.go functions
that will be useful for future CLDR plural category support.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:44:22 +00:00
Snider
f10a2b4bdb refactor(i18n): remove legacy i18n.{format} shortcuts
Use i18n.numeric.* namespace consistently:
- i18n.numeric.number
- i18n.numeric.decimal
- i18n.numeric.percent
- i18n.numeric.bytes
- i18n.numeric.ordinal
- i18n.numeric.ago

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:34:45 +00:00
Snider
8f977ed635 feat(i18n): add N() helper for numeric formatting
N(format, value) wraps T("i18n.numeric.{format}", value).

Supported formats:
- N("number", 1234567)  → "1,234,567"
- N("decimal", 1234.5)  → "1,234.5"
- N("percent", 0.85)    → "85%"
- N("bytes", 1536000)   → "1.5 MB"
- N("ordinal", 1)       → "1st"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:33:18 +00:00
Snider
7b9f23dd9e refactor(i18n): remove deprecated backwards-compat code
Remove since this is a new package with no external users:
- SetActionHandler() - use OnMissingKey() instead
- MissingKeyAction type alias - use MissingKey instead

Update tests to use current API.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:27:47 +00:00
Snider
650c7b1c5a refactor(i18n): consolidate types into interfaces.go
Move all exported types to interfaces.go for consistent organisation.
Rename interface.go → interfaces.go.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:24:24 +00:00
Snider
a7e404c9d0 refactor(i18n): remove unused keys.go
IntentCore* constants were for the removed C() function.
Key* constants were never adopted.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:14:31 +00:00
Snider
b04b2a70dc feat(i18n): implement formality-based message selection
Add support for formal/informal translation variants using suffix convention:
- key._formal for formal address (Sie, vous, usted)
- key._informal for informal address (du, tu, tú)

Formality priority: Subject.Formal() > Service.SetFormality() > neutral

Example locale file:
  "greeting": "Hello",
  "greeting._formal": "Good morning, sir",
  "greeting._informal": "Hey there"

Usage:
  svc.SetFormality(FormalityFormal)
  svc.T("greeting")  // "Good morning, sir"

  svc.T("greeting", S("user", name).Informal())  // "Hey there"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:13:12 +00:00
Snider
b4ed8a09f1 fix(i18n): multi-syllable verb doubling and template caching
1. Add stressed-final-syllable verbs to irregularVerbs:
   - submit, permit, admit, omit, commit, transmit
   - prefer, refer, transfer, defer, confer, infer
   - occur, recur, incur, deter, control, patrol
   - compel, expel, propel, repel, rebel, excel

2. Add UK English -l doubling (cancel→cancelled, travel→travelled)

3. Add template caching to applyTemplate() matching executeIntentTemplate()
   for consistent performance.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:10:22 +00:00
Snider
002f8c7813 refactor(i18n): extract action handlers to actions.go
Move handler functions from mode.go to actions.go:
- OnMissingKey, SetActionHandler, dispatchMissingKey

mode.go now contains only Mode type and constants.
interface.go keeps all types/interfaces.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:04:21 +00:00
Snider
c78f1d9df1 refactor(i18n): move ForCategory to interface.go
Keep Message method with its type definition.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:00:05 +00:00
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