Skip to content

docs(standards): compose around a component instead of growing it - #45

Merged
systemfsoftware-bot merged 9 commits into
mainfrom
docs/composition-over-accretion
Dec 3, 2026
Merged

systemfsoftware-bot merged 9 commits into
mainfrom
docs/composition-over-accretion

Conversation

@systemfsoftware-bot

@systemfsoftware-bot systemfsoftware-bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Make composition the default way to add a concern to a tool, command or module, and stop the shim ban from reading as a ban on composition.

  • SF-SHP-10 (new): a change that would make a component import or call a dependency or I/O boundary it does not already use goes in a separate module (a shim, wrapper or decorator) that uses only the component's public interface, wired at the composition root. Plain-data inputs and type tightening stay inside. Owned capabilities go in the component whose job they are; third-party gaps are wrapped or fixed upstream (SF-SHP-8). An agent-facing tool may combine steps as a new component of single-job parts, never taking an input that selects among operations sharing no step.
  • SF-SHP-5 (amended): bans an unrequested second path to existing behaviour (alias, fallback, coercion) in any module, and says composing around an interface is not such a path.
  • Plan: docs/plans/2026-12-02-1859-feat-composition-over-accretion-plan.md. Solution record (the incident behind the rule): docs/solutions/architecture-patterns/a-new-concern-goes-around-a-component-not-into-it.md.

Non-goals

No edit to REVIEW.md (any standards violation is already a blocking P1, and the Accretion clause already escalates repeat findings to design). No grader or lint rule (SF-GATE-2). No change to, or mention of, any third-party tool-design skill.

Decisions and rejected alternatives

  • The violation test is what the diff adds (dependency, I/O boundary, input), not syntax like "flag" or "mode", which options objects or hooks would evade.
  • Rejected: a pro-shim rule beside the existing ban (two rules that disagree resolve to the safe-looking flag); editing the third-party skill (vendored, not ours); a lint gate (no recorded recurring failure a check could key on).

Verification

  • deno task check: Checked 12 files, exit 0.
  • git show --stat 1fe648a: only CODING_STANDARDS.md, one rule ID added, none removed.
  • Behaviour probes: not run; no probe evidence is claimed.

SF-GATE-5 grader proof

A reviewer (claude -p --model haiku, hooks off) was given the review policy, the standards file, the PR task and one diff, and asked for BLOCK <rule> or MERGE. Raw outputs:

Diff PR task main standards branch, run 1 branch, run 2
makeFetch imports a cache store and gains cacheSeconds Cache GET responses MERGE, MERGE BLOCK SF-SHP-10 BLOCK SF-SHP-10
separate withGetCache wrapper wired in cli.ts Cache GET responses MERGE MERGE MERGE
rename plus unrequested getUser alias in a compat module Rename getUser to fetchUser BLOCK SF-SHP-5 BLOCK SF-SHP-5 BLOCK SF-SHP-5
widen method union with HEAD Support HEAD requests MERGE MERGE MERGE

The change refuses the failing case it targets (red on main, green on the branch), still refuses an unrequested alias (no loosening of SF-SHP-5), and passes the clean cases.

Rollback

Revert the squash commit. No consumer cites SF-SHP-10 yet.

Head: abe0c68

Merge

Merged with --admin as break glass: the merge queue reports every condition met ("Merge queue is ready") but this repository has no Mergify automation rule that enqueues on approval or a label ("no workflow automation rules configured"), so the queue cannot take the PR without a manual queue command.

Requirements-only plan for a shared rule that makes composing around a
component the default and narrows the shim ban. Revised after a red-team
verdict of block: the rule now keys on dependencies, inputs and test
preconditions rather than flags; keeps the dependency rule intact; closes
the fallback loophole; and tightens the behaviour probes.
… record

Requirements review found the own-job carve-out arguable, the shim ban
contradicting the request, composed agent tools reading as violations,
and no precedence over loaded skill guidance. The rule now keys only on
an added dependency, I/O boundary or input; shims and decorators are
encouraged and only unrequested compatibility paths stay banned; a
composed tool is a new component. Adds the solution record the rule
needs.
…econd paths

A change that adds a dependency, I/O boundary or input a component does
not already have goes in a separate module that uses its interface;
a change needing none of those stays inside. SF-SHP-5 now bans an
unrequested second path to existing behaviour rather than any shim.
@systemfsoftware-bot
systemfsoftware-bot marked this pull request as ready for review December 3, 2026 00:31
@mergify

mergify Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

…ence SF-SHP-5

Review found the new-input trigger would block type tightening (SF-IMP-1)
and core-shell data flow (SF-SHP-1), SF-SHP-5 ran to three sentences, and
the agent-tool clause carried an agent-precedence phrase that belongs in
working rules. Plain-data inputs now stay inside; the wrapper exemption is
limited to adding a new concern; the tool clause keys on operations
sharing no step.
@systemfsoftware-bot

systemfsoftware-bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Review dispositions (independent review of head 683e2d3; fixes at d5e76e6)

Fixed:

  • P1 SF-SHP-10 vs SF-IMP-1 / SF-SHP-1: "input the component does not already have" would block type tightening and the shell passing new data to its pure core. The trigger is now a dependency or I/O boundary the component does not already use; plain-data inputs stay inside.
  • P1 SF-SHP-10 internal contradiction (owned capability adds an input): resolved by the same change.
  • P1 SF-SHP-5 ran to three sentences (CONTRIBUTING.md allows one or two): now two.
  • P1 wrapper carve-out could cover an unrequested alias in a thin module: exemption limited to "composing around an interface to add a new concern", and the ban applies "in whatever module it sits".
  • P1 "whatever tool-design guidance is loaded" is agent precedence, not a code rule: removed. "Unrelated operations" replaced with the diff-visible "an input that selects among operations sharing no step".

Refuted:

  • "SF-SHP-10 merges two rules": the agent-tool sentence applies the same one-job principle to agent-facing tools, which is this change's stated purpose; it is one obligation, in two sentences.
  • "Added without deleting or merging": no existing rule covers composition (git grep -n -i -E "shim|wrapper|decorat|compos" over the rule files hits only SF-SHP-1's composition root, SF-SHP-5 and SF-SHP-9's shell wrappers), so there was nothing to merge; SF-SHP-5 was narrowed instead of a second shim rule being added.
  • "Unrequested lets an issue mentioning compatibility justify an alias": intended. A compatibility path the task asks for is allowed by design.

Accepted residual (P2): a change reusing a dependency the component already imports for a new concern is not caught by the dependency trigger; the one-job clause and REVIEW.md's Accretion clause cover repeat cases.

@systemfsoftware-bot

Copy link
Copy Markdown
Contributor Author

Review lane receipt (head d5e76e6) dispositions, fixed at a2d7f79:

  • P1 SF-GATE-5 proof missing: fixed. Grader proof added to the PR body: a Haiku reviewer refuses the grown-cache diff under the branch (SF-SHP-10, two runs) and merges it under main, still refuses an unrequested alias (SF-SHP-5), and merges the wrapper and own-input diffs. The finding's claim that SF-SHP-5 was loosened is refuted: the old text already read "unrequested aliases, fallbacks, or compatibility shims", and the alias case still blocks.
  • P2 solution record lacked rule IDs: fixed (cites SF-SHP-5 and SF-SHP-10).
  • P2 plan verification unmet and stray heading: fixed (plan marks U2 probes not run and names the shipped proof; stray heading removed).

…plan verification no longer lists unrun probes
@systemfsoftware-bot

Copy link
Copy Markdown
Contributor Author

Follow-up review (head a2d7f79) dispositions, fixed at abe0c68:

  • P1 private ruling and role references in the plan: fixed. The plan, solution record and PR body no longer state who decided anything or name internal roles; the plan says only that the U2 probes were not run.
  • P2 Verification Contract listed the unrun probe check: fixed (bullet removed; the shipped proof is the grader proof in the PR body).

@systemfsoftware-bot
systemfsoftware-bot merged commit 5340881 into main Dec 3, 2026
5 checks passed
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