/agent-engineering-system:semantic-architecturefrom agent-engineering-system
Maintains a hierarchical semantic model of system responsibilities, ownership, relationships, invariants, and architectural decisions.
Ships in agent-engineering-system. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use for a new system, feature, subsystem, significant refactor, or architectural change.
The goal is a persistent, hierarchical semantic model so future agents can understand the system at the right level without reconstructing intent from source code.
Architecture is hierarchical but conceptually one graph:
system
↓
subsystem
↓
component
↓
implementation
The filesystem is storage. Relationships may cross files and subsystem boundaries.
Architecture records are colocated with the code they describe:
ARCHITECTURE.md in each meaningful subsystem or module directory;ARCHITECTURE.md only for genuinely system-wide
relationships and guarantees.Do not create one architecture document for every source file. A document should represent a semantic boundary with its own responsibilities, ownership, relationships, or invariants.
Before implementation:
ARCHITECTURE.md for each affected path;Do not ask questions whose answers are confidently derivable.
For each file or directory involved in the change:
ARCHITECTURE.md in that directory.ARCHITECTURE.md or
repository root.ARCHITECTURE.md beside that subsystem using the
repository's template or this skill's structure.The repository's AGENTS.md may define a more specific architecture location
for the repository itself. Follow that explicit local rule when one exists.
Group questions and classify them:
REQUIRED — cannot safely proceed without an answerIMPORTANT — a default exists but materially changes designOPTIONAL — useful but not blockingPrioritize behavior, ownership, boundaries, source of truth, lifecycle, consistency, failure behavior, concurrency, persistence, caching/invalidation, performance, security/privacy, offline behavior, compatibility/migration, acceptable complexity, and non-goals.
Example:
repo/
├── ARCHITECTURE.md # optional cross-system summary
└── src/
├── editor/
│ ├── ARCHITECTURE.md
│ └── rendering/
│ └── ARCHITECTURE.md
├── sync/
│ ├── ARCHITECTURE.md
│ └── replication/
│ └── ARCHITECTURE.md
└── navigation/
└── ARCHITECTURE.md
Create a deeper model when there is distinct ownership, local invariants, important internal relationships, local lifecycle/source-of-truth rules, repeated rediscovery cost, or an overloaded parent model.
Place each document beside the subsystem it describes. Do not recreate the source tree with documents for trivial implementation details.
A fact belongs at the lowest scope where it is architecturally meaningful, and no lower.
Do not duplicate facts across levels unless the higher-level version is a useful summary.
Ask:
Ask:
Ask:
Ask:
Do not load unrelated architecture branches by default.
Example:
COMPONENT: PageCache
TYPE:
cache
RESPONSIBILITIES:
- provide immediately available page snapshots
OWNS:
- cached PageSnapshot
DOES_NOT_OWN:
- canonical Page state
INVALIDATED_BY:
- PageMutation
SOURCE_OF_TRUTH:
false
CONSISTENCY:
eventual
Only include fields with semantic value.
Example:
Navigation
REQUIRES -> PageAvailable
PageLoader
PROVIDES -> PageAvailable
READS -> PageCache
FALLS_BACK_TO -> PageAPI
PageMutation
WRITES -> PageAPI
MUST_INVALIDATE -> PageCache
Useful verbs:
OWNS, READS, WRITES, CALLS, PROVIDES, REQUIRES, DEPENDS_ON,
INVALIDATES, MUST_INVALIDATE, PRODUCES, CONSUMES, EMITS,
SUBSCRIBES_TO, FALLS_BACK_TO, SYNCHRONIZES_WITH, AUTHORIZES,
GOVERNS, PERSISTS_TO, DERIVED_FROM.
Represent each invariant with a stable four-digit INV-0000 identifier in its
heading and bulleted fields so adjacent invariants are visually distinct. Use
the next unused identifier; do not reuse an identifier for a different
invariant.
Example:
PageCache, PageLoader, PageMutationpage-cache-invalidation.test.tsLocal invariants are first-class too.
Example:
DATA: Page
SOURCE_OF_TRUTH:
PageStore
DERIVED:
- PageCache
- SearchIndex
SYNCHRONIZATION:
PageMutation updates PageStore and invalidates dependent representations.
Example:
BOUNDARY: PagePersistence
OWNS:
- serialized Page records
- persistence migrations
ALLOWED_DEPENDENCIES:
- StorageEngine
FORBIDDEN_DEPENDENCIES:
- NavigationUI
Prefer constraints that could eventually be checked mechanically.
Example:
REQUIREMENT: PAGE_NAVIGATION_LATENCY
TYPE:
performance
TARGET:
p95 < 100ms
APPLIES_TO:
Navigation -> PageAvailable
Never invent numerical targets.
Record decisions only when multiple reasonable alternatives existed or future agents could plausibly revisit the choice.
DECISION: CACHE_RECONCILIATION_STRATEGY
STATUS:
accepted
DECISION:
Return cached Page immediately and reconcile asynchronously.
WHY:
Navigation latency is more important than immediate consistency.
ALTERNATIVES:
- wait for canonical state
- do not cache
CONSEQUENCES:
- stale state may temporarily render
- mutations require reliable invalidation
SOURCE:
user-discussed
Sources:
user-discussed, existing-architecture, implementation-discovery, agent-decision.
When a meaningful architectural choice becomes necessary but was not discussed:
Attach evidence when useful:
RELATIONSHIP:
PageMutation MUST_INVALIDATE PageCache
EVIDENCE:
- TYPE: test
REF: page-mutation.test.ts
- TYPE: source-code
REF: PageMutation.invalidate()
Evidence types:
static-analysis, type-system, runtime-trace, test, telemetry,
schema, source-code, design-document, user-statement, agent-inference.
For uncertain facts:
CONFIDENCE: low | medium | high.
Example:
SEMANTIC DELTA
ADD:
PagePreloader PRELOADS PageCache
PRESERVE:
- system: Navigation does not wait for reconciliation
- navigation: PageLoader remains responsible for PageAvailable
- cache: PageCache is not source of truth
- mutation: PageMutation must invalidate PageCache
REMOVE:
- none
This describes the intended system change independently of files/syntax.
Before modifying a significant component, establish:
Then implement, test, compare against semantic delta, capture discoveries, and revert or record unexpected semantic changes.
For every discovery:
ARCHITECTURE.md.Example:
RetryScheduler MAY_REORDER mutations across different pages
may imply:
Sync
GUARANTEES_ORDERING -> PerPage
DOES_NOT_GUARANTEE_ORDERING -> Global
Parent and child models must not contradict each other.
Update a parent only when a child discovery invalidates a parent fact, makes it misleading, or introduces a broader constraint.
Higher levels summarize; they do not duplicate lower-level implementation semantics.
Update semantic architecture when responsibilities, ownership, boundaries, data flow, source of truth, consistency, lifecycle, important dependencies, invariants, requirements, or architectural decisions change.
Do not update for implementation-only changes that preserve semantics.
Git is history. The architecture tree describes the current system.
Too coarse: one giant root ARCHITECTURE.md containing every subsystem detail.
Too granular: source-tree-shaped documentation.
Target semantic compression: preserve facts future agents would otherwise need to reason about or rediscover.
For significant work, report:
IMPLEMENTED
SEMANTIC DELTA
INVARIANTS
DISCOVERIES
PROPAGATED INSIGHTS
AGENT DECISIONS
MODEL UPDATES
OPEN QUESTIONS
The persistent architecture artifacts are the record.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lalitkapoor/agent-starter --plugin agent-engineering-system3 skills in this plugin
/code-qualityDetailed engineering quality and design rules for non-trivial implementation, refactors, debugging, integration, and migration work./technical-communicationWrite clear, concrete engineering communication for comments, commits, pull requests, documentation, RFCs, diagrams, and specifications.