Skip to content

docs(standards): let Adapters use Logic about their external thing and keep private caches - #300

Merged
sergej-koscejev merged 3 commits into
mainfrom
claude/env-logic-state-standards-3000ba
Nov 18, 2026
Merged

sergej-koscejev merged 3 commits into
mainfrom
claude/env-logic-state-standards-3000ba

Conversation

@sergej-koscejev

@sergej-koscejev sergej-koscejev commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Two rules for Adapters, without a new class kind or a new term:

  • adapter-deps: an Adapter may depend on Logic about its own external thing (adapter-one-thing). That Logic hides an Environment decision (decoding the format, deciding when a file's size and modification time prove it unchanged), and it lives in the Adapter's package. Logic that hides a Behavior decision, such as which MPS Modules to skip, stays outside the Adapter (adapter-translates-only). Adapter → Logic still points inward.
  • adapter-cache (new): an Adapter may keep a private cache, in-memory data that only saves work. The test: if the Adapter dropped the cache before a call, would that call give the same results and behave the same for a user or client, only slower? If not, it is State (state-justified). Cache invalidation is Logic (adapter-deps); state-one-owner applies in the same way as to State.
 Part 1
-  one-kind: ... If one seems to need two, split it.
+  one-kind: ... An Adapter that with a cache (adapter-cache) is still one kind.
 ### Adapter
   adapter-owns-format: "... is Logic that the Adapter uses (adapter-deps)"
-  adapter-deps: Values, interfaces, libraries, narrower Adapters
+  adapter-deps: ..., and Logic about their own external thing
+  adapter-cache: in-memory data that only saves work
 ### What a class hides
-  Environment decisions live in Adapters
+  Environment decisions live in Adapters and in the Logic they use

A third commit changes docs/agents/prose-guidelines.md: use the writing-for-agents skill when you write or review anything that agents read, not only skills and AGENTS.md.

The new text pushed design-standards.md over the file-size limit, so the first commit moves Part 2 (Plan / Execute) word for word to docs/agents/plan-execute.md and leaves a short summary with a link.

 docs/agents/
 ├── design-standards.md   # Part 2 is now a summary + link
+└── plan-execute.md       # plan-split, plan-complete, executor-follows-plan, dry-run-plans-only

Where to look

  • The guard in adapter-deps is "about the Adapter's own external thing" (adapter-one-thing), not the sibling-path test: Code Mode needs descriptor decoding too, and the Adapter may still use it.
  • adapter-cache has one test ("only saves work") and uses "cache" for both content caches and memory of what was already refreshed. The examples are described in general words; ClassPathFingerprints and ExternalProjectRefresh keep their invalidation checks inline today.
  • Splitting out Plan / Execute instead of another chapter.

Evidence

  • Before: with only the new rules, prek file-size fails: design-standards.md: 20990 bytes, limit is 20000 bytes.

    After: prek run on all commits: Prettier, markdownlint-cli2 and file-size pass (18749 and 2677 bytes).

Merge Danger

Blast Radius: docs

Agents and reviewers that cite these rules get the new wording; no code changes.

@sergej-koscejev
sergej-koscejev force-pushed the claude/env-logic-state-standards-3000ba branch from 177ff41 to a35a7b7 Compare November 18, 2026 19:28
@sergej-koscejev sergej-koscejev changed the title docs(standards): let Adapters use Environment Logic and keep state that is safe to forget docs(standards): let Adapters use Logic about their external thing and keep memory that only saves work Nov 18, 2026
@sergej-koscejev
sergej-koscejev force-pushed the claude/env-logic-state-standards-3000ba branch 2 times, most recently from c30f00e to 8086e4b Compare November 18, 2026 19:35
@sergej-koscejev
sergej-koscejev force-pushed the claude/env-logic-state-standards-3000ba branch from 8086e4b to daefe08 Compare November 18, 2026 19:39
@sergej-koscejev sergej-koscejev changed the title docs(standards): let Adapters use Logic about their external thing and keep memory that only saves work docs(standards): let Adapters use Logic about their external thing and keep private caches Nov 18, 2026
@sergej-koscejev
sergej-koscejev marked this pull request as ready for review November 18, 2026 19:43
@sergej-koscejev
sergej-koscejev added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 3cae2f9 Nov 18, 2026
7 of 8 checks passed
@sergej-koscejev
sergej-koscejev deleted the claude/env-logic-state-standards-3000ba branch November 18, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant