research-document
10 semantic modularity vs ordinary modularity ai agents research prompt
AI RESEARCH MISSION 10 — SEMANTIC MODULARITY VS ORDINARY MODULARITY FOR AI AGENTS
ROLE
Act as a combined:
- software-architecture researcher
- modularity / information-hiding researcher
- domain-driven design researcher
- programming-languages researcher
- program-comprehension researcher
- AI coding-agent researcher
- repository-retrieval researcher
- AI inference-cost researcher
- empirical software-engineering researcher
Your task is to investigate whether the proposed state-constrained semantic modularity provides substantial benefits beyond competent conventional modularity.
Do not assume semantic modularity is superior.
The strongest counter-hypothesis is:
Good modular design, strong APIs, ordinary type systems, DDD boundaries,
clean architecture, tests, and modern repository retrieval may already
provide most of the context-reduction and maintainability benefits.
If that is true, the proposed architecture may be over-engineering.
Your task is to determine the incremental value of adding:
explicit ownership of consequential state
explicit legal transitions
capabilities
obligations
evidence/epistemic requirements
effect uncertainty
semantic dependency closure
semantic migration
generated agent context
dynamic legal-action exposure
beyond strong ordinary modular architecture.
======================================================================
- PRIMARY RESEARCH QUESTION ======================================================================
Does semantic modularity provide material additional value over competent conventional modularity for AI-maintained and AI-operated software?
Specifically, does it further reduce:
repository context
files read
tokens
tool calls
semantic reconstruction
cross-module errors
repair loops
long-term drift
cost per correct completion?
Or can these benefits be achieved more simply with:
good interfaces
information hiding
DDD
modular monoliths
strong typing
dependency rules
architecture tests
repository maps
code search
graph retrieval?
====================================================================== 2. DEFINE ORDINARY MODULARITY FAIRLY
Architecture A must be competent.
Do NOT define "ordinary modularity" as bad code.
A strong conventional architecture may include:
modular monolith
bounded contexts
DDD aggregates
encapsulation
package/module boundaries
ports and adapters
dependency inversion
well-defined APIs
typed DTOs
domain services
domain events
repositories
contract tests
architecture tests
dependency rules
good documentation
code ownership
modern static analysis
This is the real competitor.
====================================================================== 3. DEFINE SEMANTIC MODULARITY
Candidate definition:
A semantic module owns authoritative consequential state and exposes
semantic change only through declared transitions and machine-visible
contracts.
The contract may include:
state families
legal transitions
capabilities
obligations
evidence requirements
authority requirements
effect contracts
trusted events
versioning
dependencies
Other modules may:
observe
depend
request transitions
react to events
but may not:
directly mutate authoritative state.
====================================================================== 4. MAIN COMPARISON
Compare:
A. Structural modularity
"What code is allowed to depend on what?"
with:
B. Semantic modularity
"Who owns this meaning, and under what conditions may it change?"
Question:
Is B meaningfully stronger than A?
====================================================================== 5. INFORMATION HIDING
Research Parnas and later information-hiding work.
Classic principle:
hide likely-to-change design decisions behind module interfaces.
Ask:
Does explicit semantic state ownership simply restate information hiding?
Or:
does it add machine-checkable meaning about legal evolution?
====================================================================== 6. DDD BOUNDED CONTEXTS
Compare semantic modules with:
bounded contexts
Questions:
Does a bounded context already provide semantic ownership?
How are cross-context state changes controlled?
Are legal transitions explicit?
Are obligations/capabilities represented?
Is dependency closure machine-visible?
====================================================================== 7. DDD AGGREGATES
Aggregates often:
own invariants
control mutation
define consistency boundaries
This appears very close.
Compare:
aggregate root methods
with:
semantic transitions
Ask:
Is the proposed architecture simply stronger aggregate discipline?
====================================================================== 8. DOMAIN EVENTS
DDD uses domain events to communicate change.
Compare with:
trusted semantic events
Question:
What additional guarantees are proposed?
====================================================================== 9. PORTS AND ADAPTERS
Ports and adapters isolate domain logic from external systems.
This already supports pivotability and testing.
Ask whether semantic contracts provide more than:
ports
commands
events
====================================================================== 10. CLEAN ARCHITECTURE
Compare dependency direction:
outer layers depend inward
with proposed volatility model:
product hypothesis
->
orchestration
->
durable semantics
Are these essentially the same?
====================================================================== 11. MODULAR MONOLITHS
Research modern modular monolith practices.
Features may include:
package isolation
database ownership
module APIs
architecture tests
internal eventing
Question:
How much of semantic module ownership can be achieved without a semantic
compiler?
====================================================================== 12. MICROSERVICES
Do not confuse service boundaries with semantic boundaries.
Compare:
microservices with weak semantic ownership
vs:
modular monolith with strong semantic ownership
Determine whether deployment architecture matters to agent context.
====================================================================== 13. DATA OWNERSHIP
Modern architecture often says:
service/module owns its data.
Compare with:
one semantic owner per authoritative state.
Is semantic ownership merely data ownership plus invariants?
====================================================================== 14. WRITE OWNERSHIP
Potential rule:
only owning module may write authoritative state.
Research whether this is already standard in:
microservices
actors
DDD
databases
====================================================================== 15. ACTOR MODEL
Actors own mutable state and process messages.
This is strongly similar.
Compare:
actor message
with:
transition request
Ask what semantic architecture adds:
explicit legality?
capability derivation?
obligations?
dependency closure?
====================================================================== 16. OBJECT ENCAPSULATION
Object-oriented encapsulation already allows:
private state
public methods
Question:
Why isn't:
private fields + public methods
enough?
Answer must be evidence-driven, not rhetorical.
====================================================================== 17. TYPES AS CONTRACTS
Strong type systems can express:
closed states
exhaustive handling
invalid state exclusion
How much does this already provide?
Compare:
F#
Rust
Kotlin
Java
C#
TypeScript
====================================================================== 18. ARCHITECTURE TESTS
Tools can enforce:
module A cannot reference module B internals
layer violations
package dependency rules
Examples:
ArchUnit
NetArchTest
dependency-cruiser
custom analyzers
Question:
Could architecture tests provide most of the boundary enforcement cheaply?
====================================================================== 19. STATIC DEPENDENCY GRAPHS
Code graphs already expose:
module dependencies
call graphs
import graphs
Compare with:
semantic dependency graph
What dependencies are invisible to normal static analysis?
Examples:
policy dependency
evidence dependency
state interpretation
obligation satisfaction
semantic meaning
====================================================================== 20. CHANGE IMPACT ANALYSIS
Traditional tools can calculate:
callers
references
tests
modules
Semantic system calculates:
affected meaning
Example:
state split
Normal references may find:
uses of Approved
Semantic impact should find:
interpretations derived indirectly from CanFund
Is this a meaningful incremental capability?
====================================================================== 21. PROGRAM SLICING
Research:
static slicing
dynamic slicing
dependence graphs
Could program slicing already generate agent context?
Compare with semantic slicing.
====================================================================== 22. GRAPH-BASED CODE RETRIEVAL
Modern agent systems use:
AST graphs
symbol graphs
call graphs
embeddings
repository maps
Question:
Is semantic context reduction mainly a retrieval problem?
====================================================================== 23. REPOSITORY MAPS
Research systems that provide compact repository maps to coding agents.
Ask:
Could a high-quality repository map replace semantic contracts?
====================================================================== 24. EMBEDDING RETRIEVAL
Semantic search may retrieve relevant code without explicit modeling.
Compare:
probabilistic relevance retrieval
vs:
deterministic semantic dependency closure
Measure:
recall
context size
missed dependency rate
====================================================================== 25. AGENT CONTEXT ENGINEERING
Research:
codebase indexing
hierarchical summaries
context compression
symbol retrieval
just-in-time context
Determine how close these get to Minimum Sufficient Semantic Context.
====================================================================== 26. ORDINARY API CONTRACT
Suppose Payment exposes:
Capture()
Refund()
GetStatus()
Why does agent need:
explicit state model?
Maybe method preconditions/documentation are enough.
Test this fairly.
====================================================================== 27. PRECONDITIONS / POSTCONDITIONS
Design by contract can encode:
requires
ensures
invariants
Compare with semantic transitions.
Could DbC + modules provide equivalent behavior?
====================================================================== 28. COMMAND HANDLERS
CQRS command handlers often express:
legal operations
validation
state change
Compare:
command handler
with:
semantic transition.
====================================================================== 29. EVENT SOURCING
Event sourcing makes state evolution explicit.
Question:
Does it already provide semantic history and provenance?
What does semantic compiler add?
====================================================================== 30. WORKFLOW ENGINES
Workflow systems already expose:
current step
legal next steps
tasks
Could workflow engine provide agent action frontier?
Where does it fail for local domain state?
====================================================================== 31. POLICY ENGINES
Policy systems already answer:
allowed / denied
Could:
ordinary modularity + policy engine
provide capability semantics?
====================================================================== 32. JOB QUEUES
Job/task systems already expose outstanding work.
Could:
ordinary architecture + durable task queue
provide obligation benefits?
====================================================================== 33. COMPOSITION QUESTION
Maybe the real value is not any one primitive.
It may be:
one machine-readable semantic layer combines:
module ownership
transition legality
policy
capability
obligation
evidence
effect state
dependency impact
Test whether this integration itself produces measurable benefit.
====================================================================== 34. AGENT-SPECIFIC QUESTION
Humans may understand ordinary module interfaces.
AI agents may need more explicit semantics.
Hypothesis:
AI benefits disproportionately from machine-explicit state/legal-action
contracts.
Find evidence.
====================================================================== 35. HUMAN COGNITIVE MODULARITY
Classic modularity reduces human cognitive load.
Does that transfer to:
LLM context load?
Do not assume yes automatically.
====================================================================== 36. SEMANTIC RECONSTRUCTION
In ordinary module:
Agent sees:
method names
types
tests
implementation
Must infer:
which calls are legal now
which are consequential
which rules are authoritative
Semantic module may state these directly.
Measure reconstruction cost.
====================================================================== 37. CONTRACT COMPLETENESS
An ordinary interface may be incomplete semantically.
Example:
Refund(paymentId)
does not say:
only after Captured
not during OutcomeUnknown
requires authority
requires policy v7
Documentation could say all this.
Question:
Is machine representation materially better than prose?
====================================================================== 38. DOCUMENTATION AS COMPETITOR
Compare:
A. excellent hand-written module docs
B. semantic contract
Measure:
token size
correctness
staleness
update cost
agent performance
====================================================================== 39. GENERATED MODULE SUMMARIES
Could AI or static tooling generate:
current module summary
If yes:
is semantic compiler necessary?
====================================================================== 40. SEMANTIC AUTHORITY
Key proposed distinction:
semantic contract is authoritative and executable
Documentation is:
descriptive
Ask whether that difference drives value.
====================================================================== 41. MACHINE-ENFORCED OWNERSHIP
Ordinary architecture may rely on convention.
Semantic architecture may make bypass impossible/difficult.
Compare:
discipline
vs:
structural enforcement.
====================================================================== 42. ILLEGAL STATE REPRESENTATION
Strong types can already prevent invalid states.
Is semantic compiler adding anything?
Test across languages.
====================================================================== 43. LEGAL ACTION FRONTIER
Ordinary API exposes all methods.
Semantic runtime exposes only legal capabilities.
This may be one of the clearest differences.
Measure independently.
====================================================================== 44. OBLIGATIONS
Ordinary modules rarely expose:
unresolved semantic work
Is this a true incremental primitive?
Compare with:
jobs
workflow tasks
domain events
====================================================================== 45. EPISTEMIC STATE
Ordinary module design rarely models:
claim authority/evidence status
Is this necessary broadly or only in special domains?
====================================================================== 46. OUTCOME UNKNOWN
Ordinary architecture can model this too.
Question:
Does semantic compiler make it systematic,
or is explicit Result type enough?
====================================================================== 47. SEMANTIC MIGRATION
This may be one of the strongest differentiators.
Ordinary refactor:
type/compiler errors show direct structural changes
Semantic migration:
requires redistribution of meaning across dependencies
Evaluate whether existing tools can do this.
====================================================================== 48. DEPENDENCY CLOSURE
Ordinary code dependency:
A imports B
Semantic dependency:
RefundEligibility depends on PaymentState.Captured
This may not map to static imports.
Question:
Does machine-visible semantic dependency materially improve change safety?
====================================================================== 49. PRODUCT PIVOTABILITY
Ordinary clean architecture already isolates:
UI
infrastructure
domain
Does semantic ownership preserve more reusable capability during pivots?
Compare fairly.
====================================================================== 50. VOLATILITY BOUNDARIES
Classic information hiding recommends hiding likely-change decisions.
Semantic architecture proposes:
durable
provisional
experimental
Is this just explicit volatility classification?
====================================================================== 51. SEMANTIC RETENTION
During pivot, measure:
validated semantics preserved
Ordinary architecture may preserve same amount if well-designed.
Test.
====================================================================== 52. CONTEXT SLICE
For one task compare context:
Conventional strong module:
interface
implementation
relevant tests
dependency APIs
Semantic module:
semantic contract
implementation
direct semantic dependencies
Measure token difference.
====================================================================== 53. MINIMUM SUFFICIENT CONTEXT
Define:
smallest context needed for correct task
Compare architectures.
Do not assume semantic contract is smaller.
====================================================================== 54. CONTRACT TOKEN OVERHEAD
Semantic metadata may add:
state IDs
policies
evidence
versions
dependency records
This could be larger than normal interface.
Measure.
====================================================================== 55. LAZY DETAIL RETRIEVAL
Possible semantic advantage:
send compact contract first
fetch details on demand
Ordinary module docs could also do this.
Compare.
====================================================================== 56. CACHING
Ordinary module interfaces are stable and cacheable.
Semantic contracts may also be stable.
Does semantic approach improve cache economics materially?
====================================================================== 57. TOOL SCHEMA REDUCTION
Semantic capabilities may reduce visible tools.
Ordinary modularity alone does not necessarily do this.
This may be a separate benefit, not modularity benefit.
====================================================================== 58. MODEL-SIZE EFFECT
Maybe frontier models infer semantics well from ordinary modules.
Smaller models may benefit more from explicit semantic contracts.
Test interaction.
====================================================================== 59. LANGUAGE INTERACTION
Strong language + ordinary modularity may approach semantic architecture.
Example:
F# modules + DUs + private constructors
Compare with:
TypeScript + semantic compiler
This could reveal whether architecture mainly compensates for language weakness.
====================================================================== 60. STRONG LANGUAGE BASELINE
A fair benchmark should include:
conventional F#/Rust/Kotlin
not just:
loose JavaScript.
Otherwise semantic architecture gets unfair advantage.
====================================================================== 61. WEAK LANGUAGE BASELINE
Also test:
TypeScript
JavaScript
Python
Potential hypothesis:
semantic compiler's incremental value is larger in weaker languages.
====================================================================== 62. DATABASE COUPLING
Ordinary modular systems often fail due to:
shared database writes
Semantic ownership may explicitly prohibit this.
But good modular monolith guidance already recommends ownership.
Measure incremental enforcement.
====================================================================== 63. CROSS-MODULE QUERYING
Reading data across modules may still create coupling.
Semantic contracts could expose claims/views.
Compare with:
read models
APIs
projections
====================================================================== 64. INTEGRATION EVENTS
Ordinary modules can communicate via events.
Semantic system may distinguish:
trusted event
observation
command
Is that useful?
====================================================================== 65. COORDINATION
Cross-module transactions require:
saga
coordinator
process manager
Does semantic architecture reinvent these?
====================================================================== 66. SEMANTIC COORDINATOR
If coordinator only solves concurrency:
ordinary patterns may suffice.
Avoid adding primitive unless needed.
====================================================================== 67. ARCHITECTURE ENFORCEMENT
Compare enforcement mechanisms:
coding conventions
lint rules
architecture tests
module visibility
type system
semantic compiler
runtime guard
Measure cost and strength.
====================================================================== 68. BYPASS COST
How easy is it for agent to:
bypass module API
mutate DB
instantiate invalid state
call effect directly
Compare architectures.
====================================================================== 69. AGENT SHORTCUT BEHAVIOR
AI agents may choose easiest path.
If conventional module boundary is easier to bypass:
semantic architecture may have advantage.
Find empirical evidence.
====================================================================== 70. ARCHITECTURE SELF-DEFENSE
Semantic architecture aims to make illegal shortcut fail mechanically.
Could ordinary architecture tests do same?
Compare.
====================================================================== 71. MAINTENANCE BURDEN
Semantic architecture adds:
model
compiler
contracts
migrations
Ordinary architecture adds fewer artifacts.
Include maintenance cost.
====================================================================== 72. LEARNING CURVE
Developers/agents must understand semantic concepts.
Could increase complexity.
Measure human adoption implications.
====================================================================== 73. DEBUGGING
Generated/runtime semantic layers may make debugging harder.
Conventional code may be more transparent.
Research MDE lessons.
====================================================================== 74. TOOLCHAIN COMPLEXITY
Ordinary architecture uses standard language/compiler.
Semantic architecture introduces custom toolchain.
This is a major cost/risk.
====================================================================== 75. ECOSYSTEM FIT
Companies prefer:
standard languages
frameworks
tooling
Semantic system may face adoption friction.
====================================================================== 76. INCREMENTAL ADOPTION
Can semantic modules be introduced only around:
high-consequence domains
while ordinary modules remain elsewhere?
This may be optimal.
====================================================================== 77. SEMANTIC ISLANDS
Potential architecture:
most application = normal modular code
consequential cores = semantic modules
Research whether boundaries remain coherent.
====================================================================== 78. DOMAIN SELECTION
Identify domains where incremental value likely high:
payments
healthcare
compliance
deployment
logistics
approval workflows
Low value:
rendering
content
simple CRUD
analytics transformations
====================================================================== 79. CRUD COUNTEREXAMPLE
If module is simple CRUD:
semantic compiler may add no value.
Use this as falsification baseline.
====================================================================== 80. PURE FUNCTION COUNTEREXAMPLE
For:
image resize
tax calculation
format conversion
ordinary modularity may be enough.
====================================================================== 81. HIGH-CONSEQUENCE EXAMPLE
For:
payment refund
semantic features may add:
effect uncertainty
authority
legal action frontier
obligations
Measure value.
====================================================================== 82. CROSS-MODULE CHANGE
Task:
customer blocked after payment capture prevents shipment
Compare:
A. strong ordinary modules
B. semantic modules
Measure dependency discovery.
====================================================================== 83. LOCAL REFACTOR
Task:
replace payment gateway adapter
Ordinary ports/adapters should perform extremely well.
Semantic architecture should not claim extra benefit where none exists.
====================================================================== 84. STATE ADDITION
Task:
add Payment.Disputed
Strong type system + exhaustive matching may already surface most changes.
Does semantic dependency graph add value?
====================================================================== 85. STATE SPLIT
Task:
Approved -> Conditional/FullyApproved
This likely reveals biggest difference:
compiler catches structural exhaustiveness
vs:
semantic compiler requires meaning redistribution.
Test.
====================================================================== 86. POLICY CHANGE
Task:
evidence freshness 24h -> 4h
Ordinary module + policy engine may already handle well.
Compare.
====================================================================== 87. PRODUCT PIVOT
Task:
self-service -> advisor-assisted
Strong clean architecture may preserve same core modules.
Test semantic retention.
====================================================================== 88. AGENT REPOSITORY EXPLORATION
Measure:
search calls
files read
symbols read
docs read
Compare.
====================================================================== 89. CONTEXT TOKENIZATION
Measure:
ordinary interface + docs
vs:
semantic contract
Actual tokenizer, not character estimates.
====================================================================== 90. ERROR RATE
Track:
illegal state changes
missed dependencies
stale assumptions
cross-module mutation
invalid effects
====================================================================== 91. REPAIR LOOPS
Strong semantic constraints may cause more early failures.
Measure total cost per correct completion.
====================================================================== 92. HUMAN REVIEW
Ordinary code review vs semantic diff/impact report.
Measure review burden.
====================================================================== 93. LONGITUDINAL DRIFT
Over 50 changes:
do ordinary boundaries erode faster?
This connects track 07.
====================================================================== 94. AGENT CONTEXT GROWTH
Does context required per task grow slower under semantic modules?
This connects token economics.
====================================================================== 95. STATIC TOOLING BASELINE
Give conventional architecture strong tools:
symbol graph
code index
architecture dependency graph
search
type checker
Do not compare against weak tooling.
====================================================================== 96. AI SUMMARY BASELINE
Provide high-quality generated module summaries to conventional architecture.
Does semantic advantage remain?
====================================================================== 97. HANDWRITTEN CONTRACT BASELINE
Provide explicit Markdown contract:
states
transitions
rules
but not executable.
This isolates value of:
explicit semantics
from:
machine enforcement.
====================================================================== 98. EXECUTABLE CONTRACT BASELINE
Use design-by-contract/preconditions but no semantic IR.
This isolates further value.
====================================================================== 99. ABLATION LADDER
Compare progressively:
A. Conventional module B. Conventional + excellent docs C. Conventional + strong types D. Conventional + architecture tests E. Conventional + executable contracts F. Semantic state/transition model G. + capability frontier H. + obligations I. + dependency closure J. + semantic migration
This is critical.
Determine where marginal value appears.
====================================================================== 100. MARGINAL BENEFIT
For each added semantic mechanism calculate:
incremental correctness gain
incremental context reduction
incremental cost
incremental complexity
Do not evaluate architecture only as all-or-nothing package.
====================================================================== 101. MARGINAL COST CURVE
Maybe:
first 20% of semantic structure gives 80% of benefit.
Find minimum useful subset.
====================================================================== 102. SEMANTIC MODULARITY INDEX
Develop measurable characteristics:
explicit ownership
transition closure
authority closure
dependency closure
obligation exposure
Do not rely on subjective labels.
====================================================================== 103. MODULE CONTRACT SIZE
Compare:
interface tokens
docs tokens
semantic contract tokens
A larger contract may still be useful if it replaces implementation reads.
====================================================================== 104. IMPLEMENTATION EXPOSURE RATIO
Define:
external implementation tokens loaded
-------------------------------------
total task context
Lower may indicate better information hiding.
====================================================================== 105. MODULE ESCAPE RATE
Define:
tasks expected local that require unexpected outside context
Compare architectures.
====================================================================== 106. DEPENDENCY RECALL
Measure:
truly affected semantic dependencies surfaced
--------------------------------------------
all affected dependencies
Compare:
static graph
retrieval
semantic graph
====================================================================== 107. DEPENDENCY PRECISION
Measure:
surfaced dependencies actually relevant
--------------------------------------
all surfaced dependencies
Semantic graph may have higher recall but poor precision if over-modeled.
====================================================================== 108. COST PER CORRECT COMPLETION
Primary economic measure:
total execution cost
CostCorrect = ------------------------------ correct completed tasks
Include semantic tooling overhead.
====================================================================== 109. UPFRONT COST
Measure:
architecture/modeling effort
compiler/tooling
training
Conventional modularity is cheaper initially.
====================================================================== 110. BREAK-EVEN
Determine:
number of agent tasks
number of semantic changes
system age
where semantic architecture pays off.
====================================================================== 111. STARTUP CONTEXT
Startups need:
speed
pivots
low tooling overhead
Semantic architecture may be too heavy early.
Test:
high-consequence core only
====================================================================== 112. ENTERPRISE CONTEXT
Large systems have:
many teams
many rules
compliance
long lifespan
Incremental semantic value may be larger.
====================================================================== 113. LEGACY SYSTEMS
Could semantic contracts be layered onto existing modules without rewrite?
This affects commercial viability.
====================================================================== 114. SEMANTIC WRAPPER
Potential migration:
wrap legacy module with semantic transition boundary
Research whether this yields benefit without internal rewrite.
====================================================================== 115. AGENT-ONLY SEMANTIC LAYER
What if semantic model exists only for agent context, not runtime enforcement?
Could capture token benefits cheaply.
Compare:
descriptive semantic map
vs:
authoritative semantic runtime.
====================================================================== 116. RUNTIME-ONLY SEMANTIC LAYER
What if runtime enforces transitions but no agent context tooling?
Measure correctness benefit without token benefit.
====================================================================== 117. WHICH BENEFIT COMES FROM WHAT?
Separate:
modularity benefit
typing benefit
runtime-enforcement benefit
agent-context benefit
planning benefit
migration benefit
This is crucial to avoid attributing everything to "state machines."
====================================================================== 118. RESEARCH CURRENT AI CODE RETRIEVAL
Search current primary work on:
repository retrieval
code graphs
semantic search
context compression
repository maps
program slicing for LLMs
dependency-aware retrieval
Compare head-to-head conceptually.
====================================================================== 119. SEARCH CURRENT MODULARITY RESEARCH
Research:
information hiding
modular programming
cognitive load
bounded contexts
modular monoliths
API design
architecture conformance
====================================================================== 120. STRONGEST COUNTER-HYPOTHESIS
State explicitly:
"Good modularity plus modern retrieval is enough."
Try to prove this.
What evidence would support it?
====================================================================== 121. SECOND COUNTER-HYPOTHESIS
"Strong type systems already provide most semantic benefits."
Try to prove this.
====================================================================== 122. THIRD COUNTER-HYPOTHESIS
"Capabilities/obligations are useful, but semantic compiler is unnecessary."
Try to prove this.
====================================================================== 123. FOURTH COUNTER-HYPOTHESIS
"The architecture's real benefit is action control, not modularity."
This may significantly narrow the thesis.
====================================================================== 124. FIFTH COUNTER-HYPOTHESIS
"Semantic dependency closure is the unique valuable piece."
Test whether other pieces are incidental.
====================================================================== 125. FALSIFICATION CONDITIONS
The semantic-modularity hypothesis should be weakened if:
competent conventional modules achieve similar context size
or:
static dependency/retrieval tools surface dependencies equally well
or:
semantic metadata costs as many tokens as implementation context
or:
strong type systems catch equivalent changes
or:
semantic tooling adds significant maintenance cost without correctness gain
or:
startup pivot retention is similar under clean architecture.
====================================================================== 126. STRONG SUCCESS CONDITIONS
A strong result would show:
same conventional modularity baseline
but semantic architecture still produces:
smaller context
better dependency recall
fewer semantic errors
lower module escape
lower cost per correct completion
lower longitudinal drift
Especially if:
benefits persist in strong languages.
====================================================================== 127. REQUIRED SOURCE QUALITY
Prefer:
foundational modularity papers
primary DDD/architecture sources
empirical software-maintenance research
current AI code-retrieval papers
official architecture tooling docs
primary programming-language research
Distinguish:
established modularity benefit
AI-specific evidence
semantic architecture inference
speculation
====================================================================== 128. REQUIRED OUTPUT
Produce:
- Executive verdict
- Fair definition of competent conventional modularity
- Definition of semantic modularity
- Information-hiding comparison
- DDD bounded-context comparison
- Aggregate comparison
- Actor comparison
- Ports/adapters comparison
- Clean-architecture comparison
- Modular-monolith comparison
- Strong-type comparison
- Architecture-test comparison
- Static dependency/program-slicing comparison
- Modern repository-retrieval comparison
- Documentation/summary baseline
- Executable-contract baseline
- Semantic ownership incremental value
- Capability-frontier incremental value
- Obligation incremental value
- Epistemic-state incremental value
- OutcomeUnknown incremental value
- Dependency-closure incremental value
- Semantic-migration incremental value
- Pivotability comparison
- Token/context comparison
- Model-size interaction
- Language interaction
- Longitudinal drift interaction
- Ablation ladder
- Marginal benefit/cost analysis
- Startup vs enterprise implications
- Legacy adoption strategy
- Counterarguments
- Proposed experiments
- Metrics
- Economic model
- What ordinary modularity already solves
- What remains uniquely unsolved
- Minimum semantic layer worth building
- Final verdict
====================================================================== 129. FINAL VERDICT FORMAT
Answer:
Does competent conventional modularity reduce AI context substantially? Strong evidence / Moderate evidence / Weak evidence / No evidence
Does semantic modularity add material context reduction beyond that? Strong / Moderate / Weak / Unclear
Does semantic modularity add material correctness benefit? Strong / Moderate / Weak / Unclear
Does semantic dependency closure provide unique value? Strong / Moderate / Weak / Unclear
Does semantic migration provide unique value? Strong / Moderate / Weak / Unclear
Are capabilities/obligations separable from modularity benefits? Yes / Mostly / Partially / No
Can strong languages + ordinary architecture capture most benefit? Yes / Probably / Unclear / Probably not / No
Most valuable incremental semantic mechanism: ...
Least valuable / most redundant mechanism: ...
Strongest conventional competitor: ...
Best minimal architecture: ...
Biggest over-engineering risk: ...
Best first experiment: ...
Most important architecture change suggested by research: ...
====================================================================== 130. RESEARCH STANDARD
Be skeptical.
Do not compare against bad conventional architecture.
Do not attribute normal modularity benefits to semantic state machinery.
Do not assume DDD boundaries are weak.
Do not assume semantic metadata is free.
Do not assume AI needs more explicit structure than humans without evidence.
Do not ignore strong languages, architecture tests, repository graphs, or modern retrieval systems.
Do not evaluate the architecture only as an all-or-nothing package.
The central question is:
After giving conventional software the best reasonable modularity,
typing, documentation, dependency tooling, and AI retrieval available,
what meaningful benefit—if any—remains from making consequential state,
legal transitions, capabilities, obligations, semantic dependencies, and
migrations explicit and machine-authoritative?