Intelligence
Artifacts
Browse the repository, read documents, and manage the governance folders. Source, runtime, and infrastructure are read-only.
Repository
repositories/aaf-holdings/hq01/lib/executives/types.ts
3.0 KB
/**
* Types for the HQ01 Executive Router.
*
* Core principle (from CANONICAL_00): executives are *offices*, not chats. The
* router maps a CEO instruction to the office that owns the work; a model
* instance is only the temporary reasoning engine that staffs the office.
*/
export type ExecStatus = "active" | "inactive" | "proposed";
export type Confidence = "high" | "medium" | "low";
/** Static definition of an executive office — the routing taxonomy. */
export interface ExecutiveOffice {
id: string;
/** Title of the office, e.g. "Chief Technology Officer". */
office: string;
displayName: string;
department: string;
/** Parent office id in the decision hierarchy (ivan or ceo). */
parent: string;
/** Keywords/phrases that route work to this office. */
routes: string[];
}
/** A registry entry — the activation/authority state of an office on disk. */
export interface RegistryEntry {
id: string;
office: string;
displayName: string;
department: string;
parent: string;
organization: string;
constitutionPath: string;
allowedRepositories: string[];
allowedTools: string[];
routes: string[];
status: ExecStatus;
}
export interface RoutingInput {
instruction: string;
repository?: string;
preferredExecutiveId?: string;
mode?: "preview" | "launch";
}
export interface RoutingMatch {
id: string;
office: string;
department: string;
score: number;
matched: string[];
}
export interface RoutingResult {
instruction: string;
mode: "preview" | "launch";
recommendedExecutiveId: string;
recommendedOffice: string;
department: string;
confidence: Confidence;
routingReason: string;
secondaryExecutives: RoutingMatch[];
/** Whether the recommended executive office is active (executable). */
exists: boolean;
requiresNewExecutiveProposal: boolean;
proposedExecutiveOffice?: ExecutiveOffice;
dispatchAllowed: boolean;
warnings: string[];
}
export interface ExecutiveProposal {
id: string;
proposedExecutiveId: string;
office: string;
department: string;
reason: string;
originatingInstruction: string;
proposedAuthority: string[];
proposedBoundaries: string[];
proposedRoutes: string[];
status: "pending_approval" | "approved" | "rejected";
createdAt: string;
}
/** Structured inter-executive communication (schema only in this pass). */
export interface Memo {
fromExecutiveId: string;
toExecutiveId: string;
subject: string;
context: string;
request: string;
responseExpected: boolean;
createdAt: string;
linkedSessionId?: string;
linkedAssignmentId?: string;
}
/** The assembled briefing for a dispatched session. */
export interface Briefing {
executiveId: string;
office: string;
department: string;
routingReason: string;
instruction: string;
constitutionFiles: { path: string; bytes: number }[];
constitutionLoaded: boolean;
operatingConstraints: string[];
reportRequirement: string;
/** The composed system context passed to the session. */
systemPrompt: string;
warnings: string[];
}
root · /srv/aaf