Skip to content

feat(architecture): add four agent hazards to the deepening scan and a one-paragraph shape to record-decision #8646

Description

@kyle-sexton

Refs: #7590

Agent Brief

Type: Feature
Summary: The deepening scan of /architecture:improve learns four design hazards that mislead agents, each judged by an open-file test, and may take a spec or plan for upcoming work as its scope; /architecture:record-decision offers a one-paragraph ADR shape and lists the kinds of decision that qualify.

Current behavior:

  • The friction checklist (plugins/architecture/skills/improve/research/deepening/scan-briefing.md:22-48) restates the Phase 1 signals of actions/deepening.md for a subagent: six shared signals and three scan-only ones. None names a hazard by how it misleads an agent.
  • Phase 1 scope (actions/deepening.md:22-30) comes from the arguments, the conversation, or recent history; a spec or plan for upcoming work is not a source.
  • record-decision Step 2b offers "two or three common shapes" with no shape named (plugins/architecture/skills/record-decision/SKILL.md:96-104), and the admission test (SKILL.md:57-66) gives three questions and no examples of what qualifies.

Desired behavior:

  • Four hazards added to the Phase 1 signals in deepening.md and to the checklist in scan-briefing.md, in our words:
    • Split ownership: more than one module writes the same state or keeps its own copy, so an agent that edits one writer cannot see the others. Remedy: one owner per piece of state; others read it or ask the owner.
    • Two ways to do one task: an agent copies whichever way it finds first, so every way keeps gaining callers. Remedy: keep one way; move callers off the others and delete them in the same change.
    • Importable internals: an agent takes the shortest path that compiles and imports internals directly, which makes them part of the interface. Remedy: make internals unreachable from outside, so such an import fails the build.
    • Hand-synced list: two or more places list the same items and adding one means editing every list; an agent updates only the list it sees. Remedy: keep one list and derive the others, or fail the build when they disagree.
  • Open-file test, stated once beside the hazards: with only the file being edited open, can an agent see every other place it must change? A "no" confirms the hazard.
  • Phase 1 scope sources gain "a spec or plan for upcoming work": when one is given, scan the areas it will change.
  • record-decision: Step 2b offers, as one shape, a one-paragraph ADR: a short title and 1-3 sentences giving the context, the decision and why; optional status, considered options and consequences only when they add something. Under the admission test, one line of qualifying kinds: architectural shape; integration patterns between contexts; technology choices that carry lock-in; boundary and scope decisions; deliberate deviations from the obvious path; constraints not visible in the code; rejected alternatives when the rejection is not obvious.
  • Eval cases: in improve/evals/evals.json, a fixture where two modules each write the same state yields a split-ownership candidate that cites the open-file test; in record-decision/evals/evals.json, a no-convention run lists the one-paragraph shape among the offered shapes.
  • No existing sentence is removed.

Key interfaces:

  • /architecture:improve deepening (Phase 1 signals, scan briefing).
  • /architecture:record-decision Step 2b and admission test.

Acceptance criteria:

  • The diff adds the four hazards and the open-file test to both deepening.md and scan-briefing.md, the spec-or-plan scope source to deepening.md, and the one-paragraph shape and qualifying kinds to record-decision/SKILL.md, deleting no line in any of them.
  • plugins/skill-quality/scripts/check-evals-quality.sh plugins/architecture/skills/improve/evals/evals.json plugins/architecture/skills/record-decision/evals/evals.json exits 0, with the two new cases asserting the behavior named.
  • scripts/check-changelog-fragments.sh --check passes, with one minor fragment for architecture naming pstack's architect design red flags and Matt Pocock's domain-modeling ADR format as sources.
  • CI's check-skills passes on the PR (a PR check; this run does not run it).

Out of scope:

Origin:

  • Four agent hazards with the open-file test: Lauren's (pstack architect design-red-flags.md), Q48.
  • A spec or plan for upcoming work as a scope source: Matt's, Q525.
  • One-paragraph ADR shape and qualifying kinds: Matt's (domain-modeling ADR format), Q525.

Do not run with: none open.


Slice of #7590, drafted by the poteto-review session from the thread's recorded decisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions