AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
AI SPECIFICATION ENTITY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | AI Development Entities
Version: 1.0 | Date: 05 November 2026
Authors: Mark Anthony Higgins — Sky Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/ai-development-entities/ai-specification-ontology.html
Status: Companion formalisation; not a verbatim transcription of inaccessible embedded page rules.
01. PURPOSE
Represent an AI specification as a versioned, testable, traceable set of constraints, interfaces, behaviours, acceptance criteria and evidence requirements governing a development artefact.
02. ENTITY DEFINITION
Specification := (id, scope, requirements, clauses, interfaces, constraints, acceptance, provenance, version, status).
A specification is distinct from a requirement: requirements state needs; specifications formalise verifiable obligations and permitted implementations.
03. HST STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t := currently available specification facts, change requests and verification evidence.
R_t := typed relations among requirements, clauses, artefacts, tests and owners.
B_t := scope, permissions, invariants, safety constraints and resource boundaries.
K_t := validated background knowledge, definitions, standards and prior versions.
E_t = expand(I_t, R_t)
V_t = {x in E_t | satisfies(x, B_t) AND supported(x, K_t)}
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_(t+1) = update(I_t, x*_t, evidence_t)
Note: argmax selects the highest-ranked admissible candidate under a declared scoring model; it does not establish correctness by itself.
04. ENTITY GRAPH
Specification --formalises--> Requirement
Specification --constrains--> DevelopmentTask
Specification --defines--> Interface
Specification --describes--> ExpectedBehaviour
Specification --requires--> AcceptanceCriterion
Specification --verified_by--> TestCase
Specification --implemented_by--> Artefact
Specification --belongs_to--> Project
Specification --supersedes--> EarlierSpecificationVersion
Specification --supported_by--> Evidence
Specification --approved_by--> AuthorisedReviewer
05. REQUIRED FIELDS
SPEC_ID: stable canonical identifier.
TITLE: unambiguous name.
SCOPE: included and excluded systems, components and use cases.
REQUIREMENT_REFS: canonical requirement identifiers.
CLAUSES: atomic, normative, measurable statements.
INTERFACES: input/output types, preconditions and postconditions.
CONSTRAINTS: functional, non-functional, safety, legal and operational limits.
ACCEPTANCE: observable pass/fail predicates with tolerances.
TRACEABILITY: links to requirements, design, code, tests and evidence.
PROVENANCE: author, source, timestamp and revision history.
VERSION: immutable version identifier.
STATUS: draft | review | approved | implemented | verified | deprecated.
06. FORMAL PREDICATES
WellFormed(s) := HasID(s) AND HasScope(s) AND Versioned(s) AND AllClausesAtomic(s).
Traceable(s) := forall c in Clauses(s), exists r in Requirements: formalises(c,r).
Verifiable(s) := forall c in NormativeClauses(s), exists a in Acceptance: checks(a,c).
Consistent(s) := NOT exists c1,c2 in Clauses(s): Conflict(c1,c2).
Approved(s) := AuthorisedApprovalRecorded(s, Version(s)).
ReadyForImplementation(s) := WellFormed(s) AND Traceable(s) AND Verifiable(s) AND Consistent(s) AND Approved(s).
Verified(s) := forall a in RequiredAcceptance(s), ValidEvidence(a) AND Pass(a).
07. EXECUTION FLOW
F0 INPUT: collect requirements, constraints, existing artefacts and provenance.
F1 NORMALISE: resolve identifiers, terms, units, modalities and versions.
F2 DECOMPOSE: convert broad statements into atomic specification clauses.
F3 LINK: establish requirement-to-clause-to-test traceability.
F4 CHECK: test internal consistency, completeness, boundary compliance and ambiguity.
F5 REVIEW: record accountable human approval for the exact version.
F6 IMPLEMENT: produce or modify development artefacts under approved clauses.
F7 VERIFY: execute acceptance tests and attach reproducible evidence.
F8 DECIDE: accept, revise, reject or escalate unresolved clauses.
F9 UPDATE: issue a new version, preserve previous provenance and invalidate affected approvals/tests.
F10 RECURSE: revisit dependent clauses and tests until fixed point or declared stop condition.
08. INFERENCE RULES
R1: IF clause lacks an observable acceptance predicate THEN flag NON_VERIFIABLE.
R2: IF two normative clauses require incompatible outcomes under identical conditions THEN flag CONFLICT.
R3: IF a requirement has no corresponding clause THEN flag COVERAGE_GAP.
R4: IF a clause has no requirement or authorised rationale THEN flag UNJUSTIFIED_SCOPE.
R5: IF an interface changes THEN revalidate consumers, contracts and integration tests.
R6: IF a normative clause changes THEN invalidate prior approval and test evidence only where impact analysis shows dependency.
R7: IF safety constraints fail THEN block promotion regardless of optimisation score.
R8: IF evidence is missing THEN report UNKNOWN, not PASS.
R9: IF a clause is ambiguous THEN request clarification; do not silently choose a meaning.
R10: IF all mandatory acceptance predicates pass with valid evidence THEN mark the specific version VERIFIED.
09. RECURSIVE REFINEMENT
Let C_t be the set of clauses and D_t the unresolved defect set.
C_(t+1) = Refine(C_t, D_t, Requirements, Boundaries).
D_(t+1) = Validate(C_(t+1)) + DependencyImpact(C_(t+1)).
Stop when D_(t+1) = empty AND all mandatory checks pass, or when the declared time/resource bound is reached.
If bounded execution ends with defects, emit INCOMPLETE with an explicit defect ledger.
10. TRI-MAPPING
ONTOLOGY: entities, identifiers, attributes and typed relationships.
ALGEBRA: state transitions, admissibility predicates and inference rules.
EXECUTION: review gates, change control, tests, evidence and release decisions.
Map each normative clause to its ontology node, formal predicate and executable validation step.
11. EXAMPLE
Requirement REQ-01: API shall reject unauthorised write requests.
Clause SPEC-01: for each write request without a valid write permission, return an authorisation failure and persist no mutation.
Test TEST-01: submit a write request with no valid permission and compare response plus persisted state.
Evidence EVD-01: signed test result, environment details and immutable artefact version.
Outcome: PASS only if both the response and no-mutation conditions are established.
12. UNCERTAINTY AND FAILURE HANDLING
Unresolved meaning -> AMBIGUOUS.
Missing requirement linkage -> UNTRACED.
Contradictory clauses -> INCONSISTENT.
Absent test evidence -> UNVERIFIED.
Outdated approval -> REVIEW_REQUIRED.
Failed acceptance test -> FAILED.
Do not equate absence of detected defects with proof of completeness.
13. CONDITIONAL EXECUTION GUARANTEE
For a fixed specification version, declared test environment and complete required evidence set:
IF all specified validation predicates are correctly implemented and evaluate true,
THEN the workflow may emit VERIFIED_FOR_DECLARED_CRITERIA.
This guarantee is conditional on predicate correctness, evidence integrity and scope completeness; it does not guarantee universal system correctness, security or future behaviour.
14. OUTPUT CONTRACT
Emit: specification_id, version, status, scope, clause_count, traceability_matrix, validation_results, unresolved_issues, evidence_refs, approval_refs, dependency_impacts, next_action.
Preserve original identifiers and a reproducible change log.
15. CITATION AND LICENCE NOTE
Cite the source ontology and authors when publishing or adapting this companion flow.
Respect the applicable Open Research Licence terms as published by the source.