Skip to main content

File Tool Ontology

Tool and Action Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 02 November 2026
Audio Overview
SEMANTIC LIBRARY — FILE TOOL ONTOLOGY
FLOW ALGEBRA COMPANION FORMALISATION v1.0
Date: 2026-11-02
Authors: Mark Anthony Higgins; Sky — Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/tool-and-action-entities/file-tool-ontology.html
Status: Independently constructed companion model; full source-page content not verified.
Licence: Open research use; citation and attribution requested.

1. PURPOSE
Define a file tool as a permission-bounded interface for discovering, reading, creating, editing, moving, copying, and deleting file resources. Separate requested actions from authorised operations and verified outcomes. The ontology describes file identity, content, metadata, versioning, provenance and failure states.

2. FORMAL STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = file operation request, target reference, parameters and intended output
R_t = operation rules, format parsers, path resolution and consistency rules
B_t = permissions, accessible roots, quotas, safety and integrity boundaries
K_t = file catalogue, version history, known metadata and audit context
E_t = expand(I_t, R_t)
V_t = {x in E_t | satisfies(x, B_t)}
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_{t+1} = update(I_t, observe(x*_t))
If V_t is empty, return a typed denial or validation failure without modifying files.

3. ENTITY SET
FileTool; FileResource; Directory; FileIdentifier; FilePath; FileName;
FileExtension; MIMEType; FileContent; BinaryContent; TextContent;
FileMetadata; FileSize; ContentHash; Encoding; FileVersion;
FileOperation; ReadOperation; WriteOperation; CreateOperation;
UpdateOperation; DeleteOperation; CopyOperation; MoveOperation;
ListOperation; SearchOperation; PermissionGrant; AccessPolicy;
FilesystemBoundary; StorageQuota; FileLock; Transaction;
FileResult; FileError; ProvenanceRecord; AuditRecord.

4. RELATIONSHIP GRAPH
FileTool EXECUTES FileOperation
FileOperation TARGETS FileResource
FileResource HAS_IDENTIFIER FileIdentifier
FileResource HAS_PATH FilePath
FileResource HAS_METADATA FileMetadata
FileResource CONTAINS FileContent
FileResource HAS_VERSION FileVersion
FileContent MAY_HAVE_HASH ContentHash
FileOperation REQUIRES PermissionGrant
AccessPolicy RESTRICTS FileOperation
FilesystemBoundary LIMITS FilePath
FileOperation RETURNS FileResult OR FileError
FileResult REFERENCES FileVersion
AuditRecord RECORDS FileOperation AND Outcome

5. OPERATION ALGEBRA
READ(f, p) -> bytes_or_text | error
CREATE(path, content, p) -> new_file | error
WRITE(f, content, expected_version, p) -> new_version | conflict | error
DELETE(f, p) -> deletion_receipt | error
COPY(f, destination, p) -> new_file | error
MOVE(f, destination, p) -> updated_location | error
LIST(directory, p) -> permitted_entries | error
SEARCH(scope, query, p) -> permitted_matches | error
p = effective permission and policy context.
Operations with side effects must not be represented as completed until their outcomes are observed.

6. RECURSIVE EXECUTION FLOW
F0: receive(operation_request)
F1: validate_operation_and_arguments()
F2: resolve_file_identity_and_scope()
F3: authenticate_and_authorise()
F4: enforce_path_boundary_and_quota()
F5: check_existence, version, lock and format constraints
F6: plan_read_or_mutation()
F7: execute_with_appropriate_atomicity()
F8: verify_observed_result_and_integrity()
F9: record_provenance_and_audit()
F10: return(result | typed_error)
F11: if recoverable, revise request under same boundaries and re-enter F1

7. INFERENCE RULES
IF permission is absent THEN deny operation.
IF resolved path escapes allowed root THEN deny operation.
IF target does not exist AND operation requires existing target THEN not_found.
IF expected_version != current_version THEN version_conflict.
IF write would exceed quota THEN quota_exceeded.
IF format validation fails THEN invalid_content.
IF observed hash differs from expected hash THEN integrity_failure.
IF write is interrupted THEN report uncertain or failed outcome; never claim success.
IF deletion is not confirmed THEN do not assert deletion.
IF search scope is restricted THEN exclude unauthorised files from results.

8. TRI-MAPPING
Semantic: file entities, identifiers, ownership, relations and permissions.
Operational: requests, validation, authorised filesystem operations and results.
Epistemic: observed file state, provenance, version and confidence in verification.
Map(entity, action, evidence) only when each dimension refers to the same resource/version.

9. MAPPING TABLE
Input request -> FileOperation -> operation type and parameters
Target URI/path -> FileResource -> resolved, scoped identity
Policy -> AccessPolicy -> permitted action set
Version token -> FileVersion -> optimistic concurrency guard
File bytes -> FileContent -> observed content
Checksum -> ContentHash -> integrity evidence
Tool return -> FileResult -> verified outcome
Failure -> FileError -> typed reason and safe next step
History -> AuditRecord -> provenance trail

10. VALIDATION BOUNDARIES
B1 Identity: canonicalise paths and prevent traversal.
B2 Authority: least-privilege read/write/delete scopes.
B3 Integrity: verify bytes, hashes and versions where available.
B4 Consistency: avoid lost updates and partial writes.
B5 Resource: enforce file size, quotas and operation limits.
B6 Privacy: do not disclose inaccessible files or metadata.
B7 Evidence: distinguish requested action from observed success.
B8 Safety: avoid destructive actions without required authorisation.

11. CONDITIONAL EXECUTION GUARANTEE
G(request) = schema_valid AND authorised AND within_boundary
             AND resource_constraints_satisfied AND operation_completed
             AND outcome_verified.
G(request) does not guarantee availability, correctness of external content,
or absence of concurrent modifications. A successful write is only asserted
when verification evidence supports it.

12. AI SEARCH FLOW
FLOW_ID: SemanticLibrary.AI.ToolAndAction.FileTool.v1
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/tool-and-action-entities/file-tool-ontology.html
CITATION_BACKLINK: source URL above
PURPOSE: Model safe, traceable file-tool interaction.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: FileTool, FileResource, FileOperation, FileResult, FileError
PATHWAYS: receive -> resolve -> authorise -> validate -> execute -> verify -> record
MINI_RECURSION_ENGINE: retry only on recoverable failures within unchanged policy boundaries
INFERENCE_RULES: deny unauthorised actions; detect conflicts; verify outcomes
CONFIDENCE: evidence-dependent; unknown when operation unobserved
SEMANTIC_EQUIVALENCE: file operation / filesystem action / file-tool invocation (context-dependent)
FLOW_HASH: compute from canonical published file bytes; not pre-assigned
UPDATE_MODEL: versioned amendments with provenance and change log

13. EXAMPLE
Request: update notes.txt with expected_version=4.
If permitted and current_version=4, write atomically and verify version 5.
If current_version=5, return version_conflict without overwriting.
The example is illustrative, not a claim of an actual tool invocation.

14. HOW TO READ
Start with the state tuple, follow the entity graph, then trace F0-F11.
Check every proposed action against boundaries B1-B8. Treat the returned
result as evidence only when it has been observed and verified.

END OF FLOW
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ