diff --git a/.vale.ini b/.vale.ini index 7eb835582..c0b92d9d3 100644 --- a/.vale.ini +++ b/.vale.ini @@ -87,3 +87,22 @@ Archie.UILabelFormat = NO # Never lint generated Go files (protobuf, sqlc). [*.{pb,sql}.go] BasedOnStyles = + +# Scratch checkouts, installed skills and generated output are not Archie's +# prose: a run over the repository must report on what the repository holds. +[tmp/**] +BasedOnStyles = +[.local/**] +BasedOnStyles = +[.agents/**] +BasedOnStyles = +[archipelago/**] +BasedOnStyles = +[ui/node_modules/**] +BasedOnStyles = +[ui/dist/**] +BasedOnStyles = +[.agents-run/**] +BasedOnStyles = +[.impeccable/**] +BasedOnStyles = diff --git a/.vale/styles/Archie/EmDash.yml b/.vale/styles/Archie/EmDash.yml new file mode 100644 index 000000000..3dc5f6eb6 --- /dev/null +++ b/.vale/styles/Archie/EmDash.yml @@ -0,0 +1,7 @@ +extends: existence +message: "No em dashes. Use a comma, brackets, a colon, or a second sentence." +level: error +nonword: true +scope: raw +tokens: + - '\u2014' diff --git a/WORKFLOWS.md b/WORKFLOWS.md index 0431097d5..d117fb121 100644 --- a/WORKFLOWS.md +++ b/WORKFLOWS.md @@ -185,7 +185,7 @@ _needs a repository._ _needs a repository._ No settings. It runs the repository policy's `tooling` commands, in order, in -the task worktree — the installs a gate needs and the container does not ship +the task worktree: the installs a gate needs and the container does not ship (protoc plugins, linters, generators). A repository that declares none installs nothing and the step succeeds. Place it after `repo.prepare` and before any `gate.*` step. A failing install fails the step with the command and its output, diff --git a/deployments/INSTRUCTIONS.md b/deployments/INSTRUCTIONS.md index 7e34ccc76..fd02eb0cc 100644 --- a/deployments/INSTRUCTIONS.md +++ b/deployments/INSTRUCTIONS.md @@ -28,7 +28,7 @@ login -- see 1. Pick a starting configuration. The full set of annotated templates lives in this repository's `deployments/` directory on GitHub - () — + (): `standalone.toml` (no forge, the simplest start), `single-forge-github.toml` and `docker-nats-stack.toml` cover the common cases. Every one needs PostgreSQL 18 with the `archie_migrator` and `archie_runtime` roles created diff --git a/docs/github-token.md b/docs/github-token.md index 749ee19c4..03ee23bc6 100644 --- a/docs/github-token.md +++ b/docs/github-token.md @@ -31,9 +31,9 @@ Archie Core uses the GitHub API to: 4. Choose an **Expiration** (e.g. 90 days, 1 year, or No expiration for dedicated bot accounts). 5. Select the required scope: - - **`repo`** (Full control of private repositories — required for polling, + - **`repo`** (Full control of private repositories: required for polling, commenting, pushing branches, and opening PRs). - - **`workflow`** (Optional — required if Archie needs to update GitHub + - **`workflow`** (Optional, required if Archie needs to update GitHub Actions workflows). 6. Scroll to the bottom and select **Generate token**. 7. **Copy your token immediately** (starts with `ghp_...`). You won't be able to diff --git a/internal/agentexec/modelloop/toolset.go b/internal/agentexec/modelloop/toolset.go index 01566a2c1..d385d5655 100644 --- a/internal/agentexec/modelloop/toolset.go +++ b/internal/agentexec/modelloop/toolset.go @@ -65,7 +65,7 @@ type ToolSetOptions struct { ExcludeToolsets []string // Approval is the operator-consent gate for tools marked RequiresApproval. - // Nil means no approver is configured — such tools are omitted from the + // Nil means no approver is configured, so such tools are omitted from the // built set rather than failing at call time. Approval tools.ApprovalRequester diff --git a/internal/container/pool.go b/internal/container/pool.go index 15d9ccdb5..ebe807fdf 100644 --- a/internal/container/pool.go +++ b/internal/container/pool.go @@ -753,16 +753,16 @@ func selfNetwork(ctx context.Context, cli *client.Client, log *slog.Logger) stri } hostname, err := os.Hostname() if err != nil { - log.WarnContext(ctx, "container network auto-detect: os.Hostname failed, spawned containers will use the default bridge network and won't resolve sibling services by name — set containers.network explicitly", "err", err) + log.WarnContext(ctx, "container network auto-detect: os.Hostname failed, spawned containers will use the default bridge network and won't resolve sibling services by name. Set containers.network explicitly", "err", err) return "" } self, err := cli.ContainerInspect(ctx, hostname, client.ContainerInspectOptions{}) if err != nil { - log.WarnContext(ctx, "container network auto-detect: could not inspect self by hostname, spawned containers will use the default bridge network and won't resolve sibling services by name — set containers.network explicitly", "hostname", hostname, "err", err) + log.WarnContext(ctx, "container network auto-detect: could not inspect self by hostname, spawned containers will use the default bridge network and won't resolve sibling services by name. Set containers.network explicitly", "hostname", hostname, "err", err) return "" } if self.Container.NetworkSettings == nil { - log.WarnContext(ctx, "container network auto-detect: self container has no NetworkSettings, spawned containers will use the default bridge network — set containers.network explicitly", "hostname", hostname) + log.WarnContext(ctx, "container network auto-detect: self container has no NetworkSettings, spawned containers will use the default bridge network. Set containers.network explicitly", "hostname", hostname) return "" } for name := range self.Container.NetworkSettings.Networks { diff --git a/internal/domain/audit/retention.go b/internal/domain/audit/retention.go index 9e807a26c..12c18a089 100644 --- a/internal/domain/audit/retention.go +++ b/internal/domain/audit/retention.go @@ -8,7 +8,7 @@ import ( // The audit retention policy: which runtime event kinds the sweep may delete, // and which it must keep no matter what an instance setting says. The lists are -// code, not settings — a stored document chooses a window for a prunable kind +// code, not settings: a stored document chooses a window for a prunable kind // but can never widen this boundary, and a security record is never deleted. // observabilityEventKinds is the high-volume observability trail the sweep may diff --git a/internal/domain/curator/contract.go b/internal/domain/curator/contract.go index e4c0ad9d5..bfc3ed4c2 100644 --- a/internal/domain/curator/contract.go +++ b/internal/domain/curator/contract.go @@ -40,7 +40,7 @@ type Manifest struct { // state read at pass time. OnInput bool // Tools is the declared tool set: the only tools a pass may reach. - // Enforcement is mechanical — the pass's tool set is built from this + // Enforcement is mechanical: the pass's tool set is built from this // list, never from a broader registry. Tools []string // Skills declares the skill-maintenance capability. The registrar must diff --git a/internal/domain/curator/registry.go b/internal/domain/curator/registry.go index 70825fe08..6b7252baf 100644 --- a/internal/domain/curator/registry.go +++ b/internal/domain/curator/registry.go @@ -73,7 +73,7 @@ func (r *Registry) Host() Registrar { // validateDeclared enforces "only the host services a curator's declared // shape requires": a declared capability must have a host service behind it. -// A curator can never discover the daemon or an untyped hook map here — the +// A curator can never discover the daemon or an untyped hook map here: the // registrar is the only channel. func (r *Registry) validateDeclared(m Manifest) error { if len(m.Tools) > 0 && r.host.Tools == nil { diff --git a/internal/domain/curator/runtime.go b/internal/domain/curator/runtime.go index 7c8d0b5c9..0d62844b3 100644 --- a/internal/domain/curator/runtime.go +++ b/internal/domain/curator/runtime.go @@ -202,7 +202,7 @@ func waitLoops(ctx context.Context, loops ...*loop) error { // Nudge is a best-effort wake: input-driven curators check their trigger // early instead of waiting for the next interval. A full channel or an -// unknown name drops the nudge — waking is an acceleration, never the +// unknown name drops the nudge: waking is an acceleration, never the // source of truth. An empty curator name nudges every input-driven curator. func (rt *Runtime) Nudge(curator string) { rt.mu.Lock() @@ -317,8 +317,8 @@ func (rt *Runtime) runLoop(ctx context.Context, name string, c CuratorEngine, wa } // waitNext blocks until a nudge, the sleep timer, or shutdown. woke means -// a nudge fired — re-check the trigger now; done means the context was -// cancelled — exit the loop. +// a nudge fired: re-check the trigger now; done means the context was +// cancelled, so exit the loop. func waitNext(ctx context.Context, wakeCh <-chan struct{}, timer <-chan time.Time) (woke, done bool) { select { case <-ctx.Done(): diff --git a/internal/domain/memory/contract.go b/internal/domain/memory/contract.go index 5773104e8..81bc1c61b 100644 --- a/internal/domain/memory/contract.go +++ b/internal/domain/memory/contract.go @@ -83,8 +83,8 @@ type Scope struct { Org org.OrgID } -// Validate rejects an unknown kind, a missing component, and — just as -// importantly — a component present where it is not required, so no two +// Validate rejects an unknown kind, a missing component, and (just as +// importantly) a component present where it is not required, so no two // spellings address the same region. func (s Scope) Validate() error { switch s.Kind { @@ -159,7 +159,7 @@ type Subject struct { // AgentID simply yields no agent-addressed scopes. AgentID AgentID // UserID is the initiating user's identity. Empty when the channel - // carries no per-person identity (the dashboard, a webhook) — which + // carries no per-person identity (the dashboard, a webhook), which // means "show none of it", never "fall back to a wider scope". UserID IdentityID // Org is the org the turn runs in; every scope it reads or writes @@ -173,7 +173,7 @@ func (s Subject) Scopes() []Scope { return append(s.WritableScopes(), Scope{Kind: ScopeGlobal, Org: s.Org}) } -// WritableScopes returns the scopes a write for this subject may name — +// WritableScopes returns the scopes a write for this subject may name, // Scopes() minus global, which is never model-writable. A component the // subject does not carry removes every scope that requires it. func (s Subject) WritableScopes() []Scope { @@ -250,7 +250,7 @@ type NewRecord struct { Scope Scope Kind string Content string - // Author is the acting identity that wrote the record — an agent id, or + // Author is the acting identity that wrote the record: an agent id, or // a producer's own name ("operator", "session-memory curator"). Free // text: the engine retains it, it does not interpret it. Author string @@ -286,7 +286,7 @@ type Query struct { // the prompt path; ranked retrieval is a deliberately open question. Text string // Limit bounds the number of records returned. Zero lets the engine - // choose a default; there is no way to request "unlimited" — List + // choose a default; there is no way to request "unlimited". List // exists for that. Limit int } diff --git a/internal/domain/memory/registrar.go b/internal/domain/memory/registrar.go index 62f054657..086860784 100644 --- a/internal/domain/memory/registrar.go +++ b/internal/domain/memory/registrar.go @@ -6,7 +6,7 @@ import ( ) // Registrar is the narrow typed host access an engine receives at -// registration. Fields are typed contracts declared here — this package +// registration. Fields are typed contracts declared here: this package // never names who implements them, and the daemon itself is never part of // it. type Registrar struct { diff --git a/internal/domain/messaging/message.go b/internal/domain/messaging/message.go index f8a895dfd..e75eb4c7d 100644 --- a/internal/domain/messaging/message.go +++ b/internal/domain/messaging/message.go @@ -26,7 +26,7 @@ func Origin(platform string, c ConversationID) string { } // MessageID is the canonical, immutable identifier for a Message. Once -// assigned it never changes, including across branch and fork operations — +// assigned it never changes, including across branch and fork operations, // a forked transcript references the original MessageID it branched from // rather than minting a new one for shared history. type MessageID string diff --git a/internal/domain/messaging/settings.go b/internal/domain/messaging/settings.go index 2078589bd..ff6b39278 100644 --- a/internal/domain/messaging/settings.go +++ b/internal/domain/messaging/settings.go @@ -228,7 +228,7 @@ func (c *SettingsCommand) list(ctx context.Context, args []string) string { sort.Slice(descriptors, func(i, j int) bool { return descriptors[i].Kind < descriptors[j].Kind }) lines := []string{"Settings:"} for _, descriptor := range descriptors { - lines = append(lines, fmt.Sprintf("- %s — %s", descriptor.Kind, descriptor.Title)) + lines = append(lines, fmt.Sprintf("- %s: %s", descriptor.Kind, descriptor.Title)) } return strings.Join(lines, "\n") } diff --git a/internal/domain/scheduling/contract.go b/internal/domain/scheduling/contract.go index 3b7df16a0..456c267b6 100644 --- a/internal/domain/scheduling/contract.go +++ b/internal/domain/scheduling/contract.go @@ -97,7 +97,7 @@ func (systemClock) Now() time.Time { return time.Now() } func (systemClock) After(d time.Duration) <-chan time.Time { return time.After(d) } // Sink is the narrow event contract the engine needs. It matches -// events.Bus's emitter shape without importing it — the domain declares what +// events.Bus's emitter shape without importing it: the domain declares what // it needs and app wires the implementation in. type Sink interface { Emit(kind, detail string, data map[string]any) diff --git a/internal/domain/workflow/vocabulary.go b/internal/domain/workflow/vocabulary.go index 5cbadb3cf..3148e3afb 100644 --- a/internal/domain/workflow/vocabulary.go +++ b/internal/domain/workflow/vocabulary.go @@ -25,8 +25,8 @@ type StepType struct { // StepTypeProvider is the typed extension point through which a plugin // contributes workflow step types. StepTypes is the capability-specific -// operation — a provider exposing identity metadata alone would be a metadata -// entry, not a step-type provider — and it is the only method the family calls. +// operation: a provider exposing identity metadata alone would be a metadata +// entry, not a step-type provider, and it is the only method the family calls. type StepTypeProvider interface { // Name identifies the provider in registration diagnostics. Name() string diff --git a/internal/gateway/gateway.go b/internal/gateway/gateway.go index 64ffcde9d..852226f99 100644 --- a/internal/gateway/gateway.go +++ b/internal/gateway/gateway.go @@ -1068,7 +1068,7 @@ func (r *Router) handleAgents(ctx context.Context) (string, error) { var b strings.Builder b.WriteString("Active agents:\n") for _, a := range agents { - fmt.Fprintf(&b, " #%d %s — %s (%s)\n", a.ID, listingTitle(a.Title), a.Status, a.Identity) + fmt.Fprintf(&b, " #%d %s: %s (%s)\n", a.ID, listingTitle(a.Title), a.Status, a.Identity) } return strings.TrimSpace(b.String()), nil } diff --git a/internal/gateway/session_commands.go b/internal/gateway/session_commands.go index f5c38aa1d..160e90da3 100644 --- a/internal/gateway/session_commands.go +++ b/internal/gateway/session_commands.go @@ -321,9 +321,9 @@ func (r *Router) handleTopic(ctx context.Context, msg messaging.Message, platfor func topicHelpText() string { return "Usage: /topic [off|help|]\n" + - " off — disable topic routing\n" + - " help — show this help\n" + - " — switch to a session by the ID shown in /topic" + " off disable topic routing\n" + + " help show this help\n" + + " switch to a session by the ID shown in /topic" } func (r *Router) topicListSessions(ctx context.Context, msg messaging.Message, platform string) (string, error) { @@ -340,7 +340,7 @@ func (r *Router) topicListSessions(ctx context.Context, msg messaging.Message, p if s.SessionID == active { marker = "*" } - fmt.Fprintf(&b, " %s %s — %s", marker, shortSessionID(s.SessionID), sessionDisplayTitle(s)) + fmt.Fprintf(&b, " %s %s: %s", marker, shortSessionID(s.SessionID), sessionDisplayTitle(s)) if s.BranchName != "" { fmt.Fprintf(&b, " [branch: %s]", s.BranchName) } @@ -384,7 +384,7 @@ func (r *Router) handleRetry(ctx context.Context, msg messaging.Message) (string return "", fmt.Errorf("retry: %w", err) } if deleted == 0 { - return "Nothing to retry — no messages in this session.", nil + return "Nothing to retry: no messages in this session.", nil } // Retrieve the last user message and replay it. @@ -393,7 +393,7 @@ func (r *Router) handleRetry(ctx context.Context, msg messaging.Message) (string return "", fmt.Errorf("retry load messages: %w", err) } if len(msgs) == 0 { - return "Nothing to retry — no messages remain.", nil + return "Nothing to retry: no messages remain.", nil } if r.LLM == nil { @@ -425,7 +425,7 @@ func (r *Router) handleUndo(ctx context.Context, msg messaging.Message, rest str if rest != "" { parsed, ok := parsePositiveInt(strings.TrimSpace(rest)) if !ok { - return "Usage: /undo [N] — N must be a positive number (default: 1)", nil + return "Usage: /undo [N], where N must be a positive number (default: 1)", nil } n = parsed } @@ -436,7 +436,7 @@ func (r *Router) handleUndo(ctx context.Context, msg messaging.Message, rest str } if deleted == 0 { - return "Nothing to undo — no messages in this session.", nil + return "Nothing to undo: no messages in this session.", nil } if deleted == 1 { return "Removed 1 message.", nil @@ -587,11 +587,11 @@ func (r *Router) handleCompress(ctx context.Context, msg messaging.Message, rest case "here": if len(fields) < 2 { - return "Usage: /compress here — keep the last N messages", nil + return "Usage: /compress here , keeping the last N messages", nil } n, ok := parsePositiveInt(fields[1]) if !ok { - return "Usage: /compress here — N must be a positive number", nil + return "Usage: /compress here , where N must be a positive number", nil } cfg.ProtectLast = n return r.applyCompress(ctx, sessionID, cfg) @@ -604,7 +604,7 @@ func (r *Router) handleCompress(ctx context.Context, msg messaging.Message, rest // field for it, so this used to discard the topic and silently run a // full default compression instead. Rewriting history is not // something to do as a side effect of an unimplemented option. - return "Focused compression is not supported yet — /compress summarises " + + return "Focused compression is not supported yet: /compress summarises " + "the whole history. Use /compress here to keep the last N messages.", nil default: diff --git a/internal/gateway/session_delete.go b/internal/gateway/session_delete.go index 3406b08f8..086a36a5e 100644 --- a/internal/gateway/session_delete.go +++ b/internal/gateway/session_delete.go @@ -19,7 +19,7 @@ func (r *Router) handleDelete(ctx context.Context, msg messaging.Message, rest s // No bare form. Deleting "the current conversation" on an // unqualified command is one keystroke away from destroying a // history nobody meant to touch; the session must be named. - return "Usage: /delete — permanently removes a conversation and its history. Run /sessions to see the ids.", nil + return "Usage: /delete , which permanently removes a conversation and its history. Run /sessions to see the ids.", nil } if r.Sessions == nil { return "Session management is not configured.", nil @@ -37,7 +37,7 @@ func (r *Router) handleDelete(ctx context.Context, msg messaging.Message, rest s return fmt.Sprintf("No session matching %q.", ref), nil case target.SessionID != ref && len([]rune(ref)) < minDeleteRefLen: return fmt.Sprintf( - "Refusing to delete on %d characters — this cannot be undone. "+ + "Refusing to delete on %d characters: this cannot be undone. "+ "Give at least %d characters of the session id, or its full id.", len([]rune(ref)), minDeleteRefLen, ), nil