Audience: anyone evaluating or onboarding to serv8. This file is the overview (what the extension is, why it exists, how it fits the platform). For wire-level and table-level detail read
DESIGN.md; for the business functionality and the BR-* requirement traceability readBUSINESS.md.
serv8 is the Sentin8 Extension for AI-driven IT service management. It implements the fourteen FitSM processes - service portfolio, service level, reporting, availability and continuity, capacity, customer relationship, supplier, incident and service request, problem, configuration, change, release, information security, and continual improvement - as eleven Rust services on the Sentin8 platform.
The extension's distinguishing property is that every process is executed by AI agents that are bound to a named human process owner. An agent proposes, correlates, drafts, and executes within a declared autonomy level; a human owns the process, approves the risky step, and remains accountable for the outcome. The system is a system of record first (API-first, RLS-isolated, event-driven) and an automation layer second.
Three problems drive the design.
Process tooling is not machine-readable. Conventional ITSM suites store tickets, assets, and SLAs in a schema that is optimised for forms. An agent cannot reason over "which service does this ticket belong to, what SLA covers it, which CIs does it depend on, who approved the last change to those CIs" without a purpose-built join for each question. serv8 puts the catalogue, the contracts, the CMDB graph, and the change history in one queryable domain with a stable public API and an MCP surface.
Automation without accountability is unshippable. An agent that closes tickets, rotates credentials, or approves a production change without a named human in the chain cannot pass an audit. The vertical therefore models the owner, the executor, the autonomy level, and the approval record as first-class data - not as a checkbox on a workflow definition.
The platform already provides the hard parts. Identity, least-privilege machine credentials, tamper-evident audit, durable event delivery, workflow orchestration, scheduling, and human-approval state all exist in the Sentin8 plane. serv8 must not reimplement any of them; it contributes the ITSM domain model and the process bindings only.
| Document | Scope |
|---|---|
README.md |
This file - vertical overview, architecture, trade-offs |
DESIGN.md |
Vertical Detailed Design Document: cross-service flows, the database, the registration contract, failure and recovery |
BUSINESS.md |
Business Requirements Document: every capability, the business rules, the BR-* traceability matrix |
BACKLOG.md |
Delivery backlog: every open story for every service, with priority, estimate, status, and the design section it implements |
{service}/DESIGN.md |
Per-service Detailed Design Document (tables, endpoints, invariants) |
{service}/BUSINESS.md |
Per-service business functionality |
{service}/README.md |
Per-service overview |
{service}/service-registration.json |
The runtime registration contract (service type, M2M grants, event triggers, admin scopes, admin UI) |
serv8-{desk,portal,admin,board,approvals}/ |
The five operator apps: each an independent Flutter web repo with its own PRODUCT.md, README.md, DESIGN.md, BUSINESS.md, and a service-registration.json declaring its apps[] listing and scope set |
serv8-e2e/ |
The end-to-end suite: Playwright + TypeScript over the UI and BFF proxy only. docs/SCENARIOS.md is the scenario catalogue (19 groups, all 11 services + 5 apps); scripts/guard-no-backdoor.ts proves no spec reaches past the proxy |
The vertical owns exactly one PostgreSQL database, serv8, created by
sentin8-cli vertical init. Each service owns one schema inside it and
reaches no other schema except through an explicitly declared
cross_schema_grants entry. There is no shared table and no service-to-service
SQL join.
graph TD
subgraph platform["sentin8/ platform (no vertical knowledge)"]
AUTH["Sentin8:Auth<br/>single identity plane"]
SYS["Sentin8:Sys<br/>org/env lifecycle + audit ingest"]
BUS["Sentin8:Bus<br/>outbox -> produce -> stream"]
FLOW["Sentin8:Flow<br/>approval workflows"]
CRON["Sentin8:Cron<br/>scheduled agents"]
AI["Sentin8:AI<br/>agent plane: runs, tools, approvals"]
BFF["Sentin8:BFF<br/>token-holding proxy"]
DASH["Sentin8:Dash<br/>SDUI rendering host"]
DB[("sentin8 database")]
end
subgraph vertical["serv8/ (this vertical)"]
CAT["Serv8:Catalog<br/>SPM + SLM"]
TKT["Serv8:Ticket<br/>ISRM"]
PRB["Serv8:Problem<br/>PM + KEDB"]
CMDB["Serv8:CMDB<br/>CONFM"]
CHG["Serv8:Change<br/>CHM + REL"]
SEC["Serv8:SecOps<br/>ISM"]
OPS["Serv8:Ops<br/>SACM + CAPM + SRM"]
SUP["Serv8:Supplier<br/>SUPP + CRM"]
CSI["Serv8:CSI<br/>CSI"]
AGT["Serv8:Agent<br/>governance: owners, binds, autonomy"]
MCP["Serv8:MCP<br/>MCP surface"]
PG[("serv8 database<br/>schemas: catalog · ticket · problem ·<br/>cmdb · change · secops · ops ·<br/>supplier · csi · agent")]
end
BFF -->|"user token"| CAT
BFF --> TKT
BFF --> CMDB
BFF --> CHG
BFF --> AGT
AI -->|"M2M + tool dispatch"| TKT
AI --> CMDB
AI --> CHG
AI --> AGT
AGT -->|"owner + autonomy policy read"| AI
CAT & TKT & PRB & CMDB & CHG & SEC & OPS & SUP & CSI & AGT <--> PG
TKT & CMDB & CHG & SEC & OPS & SUP & CSI & AGT -->|"outbox -> produce"| BUS
BUS -->|"SSE consume"| TKT
BUS --> PRB
BUS --> CHG
BUS --> OPS
BUS --> CSI
TKT & SEC & CHG -->|"approval workflow"| FLOW
CRON -->|"scheduled agent entry"| AI
AGT & TKT & CMDB & CHG -->|"audit journal -> POST /v1/audit"| SYS
MCP -->|"public query API only"| CAT
MCP --> TKT
MCP --> CMDB
MCP --> CHG
AUTH -.->|"JWKS + M2M DCR"| vertical
Five Flutter web apps sit in front of the fleet, one per kind of person serv8 serves. Each reads only through the BFF proxy and holds no token.
graph LR
DESK["Serv8:Desk"] -->|"/proxy/*"| BFF
PORTAL["Serv8:Portal"] -->|"/proxy/*"| BFF
ADMIN["Serv8:Admin"] -->|"/proxy/*"| BFF
BOARD["Serv8:Board"] -->|"/proxy/ops"| BFF
APPR["Serv8:Approvals"] -->|"/proxy/agent"| BFF
BFF["Sentin8:BFF"]
| App | Serves | Reads |
|---|---|---|
| Serv8:Desk | staff workbench | ticket, problem, cmdb, change, secops, catalog, agent |
| Serv8:Portal | requesters | ticket, catalog, problem |
| Serv8:Admin | definition + governance | catalog, agent |
| Serv8:Board | operations | ops |
| Serv8:Approvals | gate decisions | agent |
The vertical's central abstraction. A process (one of the fourteen FitSM
processes) has exactly one human owner recorded in agent.process_owners. An
agent is bound to a process, and therefore to that owner, and declares an
autonomy level.
graph LR
PROC["Process<br/>e.g. ISRM"] -->|"owned by (human, mandatory)"| OWNER["Process Owner<br/>serv8.agent.process_owners"]
PROC -->|"executed by"| AGENT["Agent<br/>ai.agents + serv8.agent.agent_bindings"]
AGENT -->|"declares"| LEVEL["Autonomy level<br/>shadow · advise · execute_gated · execute_auto"]
LEVEL -->|"gated levels call"| FLOW["Sentin8:Flow approval step"]
FLOW -->|"approver is"| OWNER
AGENT -->|"every decision"| AUDIT["ai.runs + ai.tool_calls + audit_journal"]
| Autonomy level | Behavior | Write access |
|---|---|---|
shadow |
Agent produces its recommendation and records it; nothing is written to the domain | None |
advise |
Recommendation is surfaced to the owner as a suggestion on the record | None |
execute_gated |
Agent performs the action behind an approval gate for the declared risk classes | Scoped write, approval-gated |
execute_auto |
Agent performs the action directly within its declared scope allowlist | Scoped write, post-hoc audited |
Promotion is one-way and explicit: shadow -> advise -> execute_gated ->
execute_auto, each step a recorded owner decision. Demotion is immediate and
requires no approval.
graph TD
subgraph definition["Service definition and planning"]
SPM["SPM<br/>Service Portfolio"] --> CAT
SLM["SLM<br/>Service Level"] --> CAT
SRM["SRM<br/>Service Reporting"] --> OPS
SACM["SACM<br/>Availability & Continuity"] --> OPS
CAPM["CAPM<br/>Capacity"] --> OPS
end
subgraph interface["Customer and supplier interface"]
CRM["CRM<br/>Customer Relationship"] --> SUP
SUPP["SUPP<br/>Supplier"] --> SUP
end
subgraph execution["Operational execution"]
ISRM["ISRM<br/>Incident & Service Request"] --> TKT
PM["PM<br/>Problem"] --> PRB
end
subgraph control["Control, security and improvement"]
CONFM["CONFM<br/>Configuration"] --> CMDB
CHM["CHM<br/>Change"] --> CHG
REL["REL<br/>Release & Deployment"] --> CHG
ISM["ISM<br/>Information Security"] --> SEC
CSI["CSI<br/>Continual Improvement"] --> CSI_S["Serv8:CSI"]
end
CAT["Serv8:Catalog"]
TKT["Serv8:Ticket"]
PRB["Serv8:Problem"]
CMDB["Serv8:CMDB"]
CHG["Serv8:Change"]
SEC["Serv8:SecOps"]
OPS["Serv8:Ops"]
SUP["Serv8:Supplier"]
CSI_S["Serv8:CSI"]
CatalogueItem: the single row that answers "what service is this". Carries lifecycle state (pipeline,live,retired), the owning group, the eligibility rule, and the request workflow it fronts. Every ticket, SLA, change, and CI ultimately resolves to a catalogue item.ServiceLevel: one table with akinddiscriminator covering customer SLA, internal OLA, and supplier underpinning contract. It holds the commercial binding only - counterparty, item, calendar - and no time value.ServiceTarget: the timing plane. Metric (ttoorttr), request type, priority, value, unit. This is what a ticket actually resolves its deadlines against, so one commitment can promise different numbers at different priorities.Ticket: the ISRM record. Carries type (incident or request), state, the resolved catalogue item, two commitments (TTO and TTR, either may be absent), the denormalised deadline and escalation instants with their*_passedflags, the customer-pending accumulator, and the assigned agent run.KnownError: the KEDB entry. Links a problem to a workaround and carries the embedding used for similarity lookup by the Triage agent.ConfigurationItem+CiEdge: the CMDB.CiEdgeis a typed, directed edge between two CIs with apass_throughflag and optionalfrom_end/to_endpositions, so a network hop through a patch panel collapses to one logical path and a breakout is still representable.BlastRadius: a change record plus the materialised result of traversingCiEdgefrom the change's target CIs. The result reports three independent properties -truncated,is_complete,is_split- so a reviewer can tell "bounded answer" from "answer with a hole" from "answer that under-counts fan-out".ProcessOwner+AgentBinding: the governance pair. The binding carries the autonomy level and the risk-class allowlist.ImprovementEntry: the CSI register row, with expected and realised ROI.
One database, schema per service, versus database per service. The platform allows a vertical to own one database with one schema per service (architecture principles §6.6). serv8 takes that: the CMDB, the change record, and the ticket need to be joinable inside a single query for the blast-radius and SLA work, and cross-database joins do not exist. Isolation is enforced by per-service PostgreSQL roles and by RLS on every tenant table, and any cross-schema read is declared, not implied.
Eleven services versus fourteen. One service per FitSM process would put the catalogue and the SLA in separate services despite sharing every table and every caller. Grouping by data ownership rather than by process name keeps each table with exactly one writer. The process names remain visible in the API paths, the scopes, and the agent bindings.
Escalation levels are rules, not thresholds. A level_1_at / level_2_at
column pair is simpler until a customer negotiates a fifth level, or until a
level must fire on priority rather than on elapsed time, or must reassign the
ticket rather than merely notify. A real escalation level needs three things: an
offset, a set of conditions that decide applicability, and a set of actions that
decide the effect. Storing it as a rule with child criteria and action rows costs
one join on the SLA Monitor path, which is a scheduled scan, not a per-request
hop.
A service level is a commitment; a target is a number. A commercial agreement names a set of targets and says who it binds. The targets themselves are values keyed by metric, request type, and priority. Collapsing the two means a target cannot vary by priority, which is the normal commercial shape: the same contract promises a different response time to a platinum customer at priority 1 than at priority 4. The cost is one extra table and one lookup at deadline resolution.
Three commitments per ticket, not one. A first-response promise, an update promise, and a resolution promise are three different promises, frequently from different contracts. The update promise is the one that keeps a customer informed, so its clock restarts on every agent reply rather than running once from open. One deadline cannot express "acknowledge in 1 hour, reply again within 2, resolve in 4", and an organisation reporting on SLA performance needs all three measured separately.
The SLA clock pauses while the customer owes a reply. Without it, a ticket waiting three days for information breaches an SLA the team had no chance to meet. The pause is not a refinement: a breach metric that counts customer-held time is measuring the wrong party.
Deadline denormalisation on the ticket. The alternative is computing every deadline from the contract at read time. That makes the "which tickets are about to breach" query a join across several tables on every scan. Denormalising the deadline and escalation instants, and the passed flags, onto the ticket makes it an index scan. The invariant that keeps it honest: the deadline fields have exactly one writer, the ops deadline path, never the ticket handler.
Blast radius stored, not computed. Computing it per request is a recursive graph traversal on the read path, which the platform forbids (no cross-service or heavy work inside a handler). Storing it means a stale radius is possible; the design accepts staleness bounded by CMDB change events, and the change record carries the CMDB revision it was computed against so a reviewer can see whether anything moved.
Agent plane reused, not rebuilt. The temptation is a serv8-local agent
loop, because the ITSM semantics are specific. That would duplicate the run
record, the tool gateway, the approval state, and the audit chain. Instead
serv8 owns only the bindings (who executes, under what autonomy, with which
allowlist) and the platform's sentin8-ai owns execution. The cost is that
four governance requirements need platform changes; those are tracked as
platform stories, not serv8 code.
MCP as an adapter, never a second system of record. The MCP surface
(Serv8:MCP) holds no tables. It translates MCP tool and resource calls into
the same public query and command APIs the BFF uses, so the authorization
decision and the audit trail are identical for an agent reaching the system
over MCP and a human reaching it over the SPA.
Invariants that hold across every service in the vertical:
- Every process has a human owner. A process with no
process_ownersrow cannot have an enabled agent binding. The enrollment path rejects the configuration; there is no "owner TBD" state. - Every tenant table is RLS-protected.
ENABLEandFORCE ROW LEVEL SECURITY, policy matched onenv_id. ExplicitWHERE env_id = $Nclauses are present in every handler as defense in depth. - One writer per table. No service writes another service's schema. A cross-service need resolves in the order membus -> bus -> owner API.
- Denormalised fields have exactly one writer. Ticket deadlines belong to the SLA Monitor; blast radius belongs to the Change Risk path; a CI's observed state belongs to the Discovery agent.
- Agents act under a scope allowlist. An agent's effective scope is the
intersection of its M2M client's granted scopes, its
agent_toolsallowlist, and its binding's autonomy level. Escalation requires all three to change. - Every agent decision is recorded. A run with no matching
tool_callsand noaudit_journalentry is a defect, not an optimisation. - Confidence is explicit. A decision that gates on a confidence threshold reads a stored score; the system never infers a score after the fact.
- Events carry the snapshot. A published event envelope is self-contained enough for its consumer to act without calling back.
The vertical follows the standard vertical lifecycle. Nothing here is a phase gate; these are the operations, in the order an operator runs them.
# Platform first: the dev infrastructure and the fleet.
cd ../sentin8 && make infra-up && make build-rust
# Then the vertical: create the database, apply SQL, register, start.
cd ../serv8
make init # sentin8-cli vertical init - creates `serv8` + applies sql/
make enroll # sentin8-cli vertical enroll - services, scopes, triggers, apps
make build # cargo build --workspace --releaseConstraints that apply to every service in this vertical:
- Compile Rust only through
make build-rust(platform) ormake build(vertical). Never invokecargodirectly. - Restart services only through Sentin8:Captain (
make upgrade-instance,make restart-instance). Never signal a process directly. - Never write migration code. This is a greenfield schema; change
CREATE TABLEand re-runvertical init. - SQL is authored so
sqlx::query!compiles against a live database during preparation and against the committed offline cache during builds.
- Similarity clustering at scale.
pgvectoris available on the platform image. The open question is the index choice and whether the Problem agent clusters on every ticket close or on a schedule, which changes the freshness guarantee for the KEDB. - Multi-tenant catalogue divergence. The design assumes one catalogue per environment. A managed-service-provider shape (one org, many customer catalogues, overlapping SLA contracts) is not modelled and would change the uniqueness constraints on catalogue items.
- Blast radius across verticals. The CMDB owns CIs inside serv8. A CI that is itself a platform service (for example a Sentin8:Bus node) has no discovery feed today; the edge would need an owner API on the platform side.
- Agent-to-agent handoff. ISRM triage handing a clustered incident set to the Problem agent is modelled as an event. A richer handoff (shared run context) is deliberately not modelled; it would couple two agents' context windows.