Skip to content

Align layering, app-log loading, and architecture records #1222

Description

@devin-ai-integration

Problem

Several architecture/tooling claims are stronger or less honest than the code:

  • scripts/layering/check.ts says the target DAG is complete, but only the
    ranked target spine is checked for back-edges; root and peripheral zones are
    intentionally unranked.
  • CONTEXT.md describes a broader folder DAG as enforced by that script.
  • The build reports INEFFECTIVE_DYNAMIC_IMPORT for app-log.ts, because the
    same module is statically imported elsewhere.
  • ADR 0009 still lists shipped tvOS/capability/watchOS work as deferred.
  • Completed experiment/tracker records need reconciliation.

Scope

  • Make the layering model and documentation state exactly what is enforced:
    global production static value-cycle rejection, R1-R3, and an explicit ranked
    target spine. Classify root/peripheral zones deliberately rather than implying
    they are ranked.
  • Add tests that prevent future scope/claim drift. Do not create a broad
    refactor merely to rank every folder.
  • Remove the ineffective app-log dynamic import warning structurally; preserve
    behavior and cold-start characteristics rather than adding a large comment.
  • Update ADR 0009 and durable architecture/experiment wording to distinguish
    shipped work from intentional deferrals.
  • Reconcile completed tracker references; public Apple wire collapse remains
    deferred.

Owning files

  • scripts/layering/model.ts
  • scripts/layering/check.ts
  • scripts/layering/model.test.ts
  • CONTEXT.md
  • src/daemon/request-platform-providers.ts
  • src/daemon/app-log.ts
  • docs/adr/0009-apple-platform-consolidation.md
  • docs/agents/contract-projection-output-economy-spike.md

Acceptance criteria

  • Layering output/docs no longer claim broader back-edge coverage than exists.
  • Root/peripheral treatment is explicit and regression-tested.
  • Zero static production value cycles and zero ranked-spine back-edges remain
    enforced.
  • pnpm build has no INEFFECTIVE_DYNAMIC_IMPORT warning for app-log.ts.
  • ADR 0009 keeps only genuinely deferred items deferred.
  • No new code generation, schema DSL, blanket LOC gate, or mass utils move.
  • pnpm check:affected --base origin/main --run passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready-for-humanValid work that needs human implementation, judgment, or maintainer merge

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions