AI Initiative logoAI Initiative
Reading room / GraFOSa

GraFOSa Vision — Long-Term Direction

Explains the ambition behind a graph-oriented system for understanding software and its relationships.

Graph-system vision
This is the retained source text, not a new validation of its claims. Numerical results and comparative claims require the accompanying source review before public reuse.

Read the connected case study or article →

Not explicitly attributed in document header · 2026-02-27

Provenance, authorship and editorial notes

GraFOSa Vision — Long-Term Direction

Id

grafosa-vision

Project

GraFOSa

Source path

grafosa/docs/VISION.md

Source host

genesis

Source sha256

7b372e32112b6340eed291b83f4cefe9f1952e16fbed73a3740c6fc729fcc1ec

Repo root

grafosa

Repo head

388b50cfb34decee9d716f7f02d01ccf53305c03

Date

2026-02-27

Author

Not explicitly attributed in document header

Document status

Graph-system vision

Source status statement

Aspirational — not scheduled for near-term implementation

Summary

Explains the ambition behind a graph-oriented system for understanding software and its relationships.

Topics
  • GraFOSa
  • AI Learning
  • Orchestration
  • Graph-system vision
Related ids
  • grafosa-pipeline
  • grafosa-gca-decisions
  • grafosa-embedded-graph-os
Evidence concerns
  • Vision scope is broader than the implemented subset and does not establish autonomous software understanding.
  • Private source selection. Source inspection only; no fresh build, deployment or effectiveness certification.
Copy scope

Full original document, byte-identical

Copy status

copied-private-review

Format

markdown

Bytes

9612

Word count

1386

Headings
  • GraFOSa Vision — Long-Term Direction
  • Why This Is Separate from the Roadmap
  • V1: Full TypeScript AST Scanner
  • V2: Anti-Pattern Detection Library
  • V3: API Coverage Gap Analysis
  • V4: Performance Topology Analysis
  • V5: Enhanced Deduplication
  • V6: Pluggable Scanner Registry
  • V7: Migration Planner
  • V8: Cross-Repository Analysis
  • V9: Infrastructure-as-Code Integration
  • V10: Time-Series Health Tracking
  • V11: LLM-Powered Recommendations
  • Prioritization (If We Had Unlimited Time)
Sensitive content review
Automated secret patterns
Email occurrences

0

Customer record terms
Limitation

Pattern scan plus editorial review; not a guarantee of no personal or proprietary material. Private copies retain source code examples, internal locations and attributions.

Attribution note

Source document attribution is preserved. Repository ownership or an agent role is not automatically authorship.

Date basis

Document header or dated filename; source may contain later updates

Source pin note

SHA-256 binds exact copied working-file bytes; repo_head is repository context, not proof that every byte is committed at that head.

Publication recommendation

Private technical reading candidate; editorial selection and claim review required before public use

GraFOSa Vision — Long-Term Direction

Date: 2026-02-27
Status: Aspirational — not scheduled for near-term implementation
Prerequisite: Complete Phases 0-3 from docs/ROADMAP.md first

This document captures features that would make GraFOSa a full platform engineering
tool. Each section is a standalone product-level capability. They are recorded here
for direction-setting, not as commitments.


Why This Is Separate from the Roadmap

The roadmap (Phases 0-4) focuses on making GraFOSa accurate and portable — fixing
data quality, eliminating hardcoding, adding CALLS edges, and integrating into developer
workflow. That work is concrete, scoped, and deliverable.

The items below are different in kind. They are:

The risk of mixing them with tactical fixes is scope creep and loss of focus.


V1: Full TypeScript AST Scanner

What: Replace the 90-line regex TS scanner with a proper AST parser.

Options (in order of recommendation):
1. tree-sitter (via tree-sitter-typescript) — fast, battle-tested, Python bindings exist
2. SWC (via swc-python) — very fast, full AST
3. TypeScript compiler via subprocess — accurate but slower

What it enables:

Impact: maestro_api's 10,500 symbols go from 100% N/A to fully analyzable.

Honest estimate: 2-3 weeks for production quality. tree-sitter Python bindings are
finicky, JSX/TSX handling has edge cases, and TS module resolution
(paths, baseUrl, compilerOptions) is complex.

Prerequisite: Phase 0.1 (scanner tests) — need a baseline before replacing the scanner.


V2: Anti-Pattern Detection Library

What: Detect known architectural patterns and anti-patterns from graph structure.

PatternDetectionThreshold
God service>500 symbols, >50 endpoints, >5 depsRecommend decomposition
Circular service depsA→B→A via HTTP_DEPENDSFlag with break points
Orphaned serviceNo inbound HTTP/NATS edgesFlag as potentially dead
Fan-out hotspotDepended on by >5 servicesSingle point of failure
Missing health checkHas endpoints but no /healthFlag
Deep call chainMax call depth >10 from endpointFlag as fragile
Tight couplingCa + Ce > 8Recommend interface extraction

Overlap warning: SonarQube, CodeClimate, and Semgrep already detect many of these
at the file/function level. GraFOSa's unique angle is cross-service pattern detection
(e.g., god service, circular service deps, fan-out). Focus there to differentiate.

Honest estimate: 1-2 weeks for the cross-service patterns. File-level patterns
are better left to existing lint tools.


V3: API Coverage Gap Analysis

What: Compare declared endpoints against tests, clients, and documentation.

Output: "47 endpoints have no tests, 12 are never called by any client,
8 are undocumented."

Challenge: Matching test file content to endpoint paths requires heuristics.
A test file named test_chat.py doesn't necessarily test /v1/chat. Pattern matching
will have false positives/negatives.

Honest estimate: 1-2 weeks for a useful-but-imperfect version.


V4: Performance Topology Analysis

What: Infer performance characteristics from graph structure.

Limitation: This is structural inference, not runtime measurement. It can identify
potential bottlenecks but cannot confirm them without profiling data. Be clear about
this in the output — "potential bottleneck based on graph topology" not "bottleneck."

Honest estimate: 1-2 weeks.


V5: Enhanced Deduplication

What: Go beyond name-based collision detection.

shared package with migration steps

Limitation: Semantic similarity without CALLS edges or type information is noisy.
This becomes much more valuable after Phase 3 (CALLS edges) is complete.

Honest estimate: 1-2 weeks.


V6: Pluggable Scanner Registry

What: Make the scanner architecture extensible for new languages.

class ScannerRegistry:
    _scanners: dict[str, Scanner] = {}

    def register(self, language: str, scanner: Scanner): ...
    def scan_file(self, path: str) -> ScanResult:
        lang = detect_language(path)
        return self._scanners[lang].scan(path)

Each scanner produces the same primitives: File, Symbol, Endpoint, DEFINES, IMPORTS,
CALLS, HANDLES. Language detection by file extension + shebang.

Languages to support over time: Go, Java, Rust, Ruby, PHP, C#.

Honest estimate: 1-2 days for the registry itself. 2-4 weeks per new language
scanner (tree-sitter-based).


V7: Migration Planner

What: Given two graph snapshots (before/after), generate migration guidance.

The scheduler layer (GraphSched) already has plan_change(), simulate(), and
what_if() — this builds on those primitives.

Honest estimate: 1-2 months for a production-quality migration planner. Breaking
change detection alone is a research problem (especially for dynamically-typed languages).


V8: Cross-Repository Analysis

What: Scan multiple repositories and link them via shared packages.

Honest estimate: 1-2 months. Package resolution (npm/pip), version compatibility
checking, and API contract inference are each significant problems.


V9: Infrastructure-as-Code Integration

What: Extend the graph to include infrastructure topology.

Honest estimate: 1-2 months. Each IaC format is its own parser. Kubernetes alone
has 50+ resource types.


V10: Time-Series Health Tracking

What: Store graph snapshots and health reports over time.

Honest estimate: 1-2 weeks.


V11: LLM-Powered Recommendations

What: Use the MCP server (44 tools) as an interface for AI-driven analysis.

Current state: Already partially possible via MCP tools. The gap is generating
structured, natural-language recommendations from graph patterns — essentially
prompt engineering + output formatting.

Honest estimate: 1-2 weeks for structured prompt templates + output formatting.


Prioritization (If We Had Unlimited Time)

Vision ItemImpactEffortDepends On
V1: TS AST ScannerVery high2-3 weeksPhase 0.1
V6: Scanner RegistryHigh1-2 days + per-langPhase 0.1
V2: Anti-Pattern LibraryHigh1-2 weeksPhase 3
V3: API Coverage GapsHigh1-2 weeksPhase 2.1
V10: Time-Series TrackingMedium1-2 weeksPhase 2.3
V7: Migration PlannerVery high1-2 monthsPhase 4.2
V11: LLM RecommendationsMedium1-2 weeksExisting MCP
V4: Perf TopologyMedium1-2 weeksPhase 1
V5: Enhanced DedupMedium1-2 weeksPhase 3
V8: Cross-RepoHigh1-2 monthsV6
V9: IaC IntegrationMedium1-2 monthsPhase 1

Recommendation: After completing the roadmap (Phases 0-4), tackle V1 (TS AST) and
V2 (anti-patterns) first — they have the highest impact-to-effort ratio and build
directly on the foundation the roadmap establishes.

Continue exploring