
In a previous post, we explored the vision of an "AI-Perceivable" world. Now, it’s time to go under the hood. The first technical pillar of the apcore protocol is a deceptively simple idea: Directory-as-ID.
In a traditional microservices or modular architecture, you often have a central registry, a massive YAML configuration file, or a complex dependency injection container. As your system grows from 10 modules to 1,000, this central "phonebook" becomes a bottleneck. It’s the source of merge conflicts, naming collisions, and "Scaling Rot."
apcore solves this by making the file system the source of truth. Let’s look at the algorithm behind Directory-as-ID and why it’s essential for scaling AI-ready systems.
The Algorithm: From Path to Canonical ID
The principle is straightforward: The relative path of a module file is its unique identity.
If you have a module root directory (e.g., extensions/), apcore scans the files and applies a deterministic mapping:
Remove the Root:
extensions/executor/email/send.py->executor/email/send.pyRemove Extension:
executor/email/send.py->executor/email/sendNormalize Separators:
executor/email/send->executor.email.send(The Canonical ID)
Why this matters for AI:
AI Agents are highly sensitive to names. By using a hierarchical, directory-based naming convention, you naturally create Namespaces. An Agent can quickly differentiate between executor.user.delete and admin.user.delete because the hierarchy provides the context.
Case Study: Zero-Config in apexe
The power of Directory-as-ID is best seen in real-world products like apexe.
apexe: AI-fying the CLI Universe
apexe is a tool that scans existing CLIs (like git or docker) and wraps them into apcore modules. When you run apexe scan git, it generates a hierarchy of modules under your ~/.apexe/modules/ directory.
git commitbecomescli.git.commitgit pushbecomescli.git.push
Because of Directory-as-ID, apexe doesn't need to manage a database of IDs. It simply writes the files to the right folders, and the apcore Registry "perceives" the entire CLI command tree instantly. This enables Dynamic Skill Discovery: if you install a new CLI tool and scan it, your Agent can perceive it immediately without a single server restart.
Technical Rigor: Handling Multi-Language Drift
A core challenge of a language-agnostic standard is that different languages have different naming conventions. Python likes snake_case, while TypeScript prefers camelCase.
The apcore protocol defines strict ID Normalization Rules:
Normalization: All IDs are converted to a "Canonical" form (lowercase, snake_case) for the Registry.
Language Mapping: Each SDK (Python, TS, Rust) handles the translation between the Canonical ID and the local file name (e.g.,
SendEmail.tsmaps tosend_email).
This ensures that even in a polyglot enterprise, the AI Agent sees a single, consistent address space.
Conclusion: Scale is a Design Constraint
Directory-as-ID is more than a convenience; it’s a design constraint for the Agentic Era. It enables Zero-Config Discovery, eliminates registry bottlenecks, and provides a natural namespace for AI perception.
Next up: The 11-Step Execution Pipeline: A Secured Journey for Every Call
GitHub: aiperceivable/apcore | Docs: apcore.aiperceivable.com
About the author
- Build once, invoke by Code or AI. Where every interface is AI-perceivable by design. A schema-enforced module standard for the AI-Perceivable era.
Comments
Join the discussionNo comments yet. Be the first to comment.
APCORE
apcore is an AI-Perceivable module standard that makes every interface naturally perceivable and understandable by AI through enforced Schema definitions and behavioral annotations.





