Skip to content

DSH scope gate: a pure decision spec for where a DSH thread may write and what it must declare #13018

Closed

Description

@gHashTag

Owner rule (translated, 2026-11-01): DSH codes only inside T27OS, and every thread carries an issue number, a DSH task id, a target path and a visual-core impact. Chain: Claude Code decides, DSH orchestrates, T27OS executes (see #12945).

Decisions already taken, not to be re-opened in the lane:

  • The path rule is the existing specs/policy/own_language.t27 classify(). Hand-written .rs, .yaml and Dockerfile are foreign there and stay DENY even inside a T27OS root. The owner's pasted allow-list named cli/**/src/.rs, configs/.yaml and docker/*.Dockerfile; the Only-t27 rule overrides it. No second path rule is written, and its lists are not copied.
  • The default mode is AUDIT: decide, log, never block. BLOCK is a const the owner flips in a later PR, because a blocking gate on a task id that DSH does not export yet would stop every session.
  • T27OS has two homes: specs/t27os/ in this repo and specs/os/ in the sibling t27os repo. Both are root consts the owner can edit.
  • The hook host (Claude Code PreToolUse, a DSH plugin) is out of scope. The spec ends with a host-gap inventory.

Boundary

  • specs/t27os/dsh_scope.t27

User Scenarios

  • Given a thread with no issue number, when it asks to write specs/t27os/x.t27, then the verdict is DENY with reason no-issue (in AUDIT mode: allowed and logged).
  • Given a declared thread whose target path is outside the T27OS roots, when it writes, then the verdict is DENY with reason outside-t27os.
  • Given a declared thread targeting specs/t27os/x.t27 with visual-core impact "petal 3", when it writes, then the verdict is ALLOW.
  • Given a declared thread with no visual-core impact, when it is checked, then the verdict is INTERNAL_ONLY: allowed, marked, and not counted as visual-core progress.
  • Given a hand-written .rs file or a Dockerfile inside a T27OS root, when it is written, then the verdict is DENY with the foreign reason from own_language.

Requirements

  • FR-001: The spec MUST be a pure module T27osDshScope with no @extern, in the style of specs/t27os/doctor.t27.
  • FR-002: A thread declaration MUST hold an issue number, a DSH task id, a target path and a visual-core impact (a layer, petal or band name, or internal-only).
  • FR-003: The path check MUST reuse own_language classify(); import it the way specs/tri/mesh/mesh_graph.t27 imports its readers (a use line such as use policy::own_language::reason;). If the import does not compile, file a compiler defect on epic: self-host t27c -- rewrite the compiler from Rust into t27 #5980 and name the module in a str const. It MUST NOT copy the extension lists.
  • FR-004: The default mode MUST be AUDIT. decide(mode, ...) MUST return the verdict plus a logged flag; BLOCK MUST turn every would-be deny into DENY.
  • FR-005: Tests MUST cover the five scenarios, AUDIT versus BLOCK, and a test that pins the default mode to AUDIT, with 0 vacuous passes.
  • FR-006: The file MUST end with a comment block that lists, one line each, what a PreToolUse host has to provide: the stdin JSON, tool_input.file_path, agent_id and agent_type, the DSH_TASK_ID environment value, exit code 2 with a stderr message, and one jsonl log row per decision. Mark which of these are documented for Claude Code and which are unverified for DSH.
  • FR-007: The diff MUST add no hand-written non-t27 file.

Success Criteria

  • t27c test-report specs/t27os/dsh_scope.t27 reports 0 failing tests and 0 vacuous passes, exit 0.
  • git diff --name-only origin/master lists 1 file.
  • A test asserts that the default mode is AUDIT.

Activity

  1. added a commit that references this issue on Oct 31, 2026
    583995b
  2. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Spec created: specs/t27os/dsh_scope_gate.t27 (typecheck OK, 1 test pass).

  3. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Reopened: closed as spec-only. A .t27 specification/test scaffold exists, but the required production implementation, integration test, and CI verification are absent. This issue remains open until the target component implements the specified behavior and evidence is provided.

  4. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Specs created. M8 milestone complete.

  5. gHashTag commented on Nov 18, 2026

    @gHashTag
    CollaboratorAuthor

    Reopened: closed as spec-only. A .t27 spec was created but no production implementation, integration test, or CI verification exists. This issue remains open until the target component implements the specified behavior and evidence is provided.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions