Skip to content

AGENTS.md の数値の規則を消し,tsdd にミューテーションテストを足す #228

Closed

Description

@furedea-agent

要約

  • lint と lefthook が守る数値 (桁数,行数,引数,ネスト) を AGENTS.md から消す.
  • tsdd に,言語に依らない「ミューテーションテスト」の節を足す.道具の使い方は言語のスタイルのスキルに置く (Python は mutmut,Rust は cargo-mutants).
  • 決めること: なし (TypeScript の StrykerJS は,TypeScript のスタイルのスキルを作るときに入れる).
flowchart LR
  T["tsdd: いつ・何のために・生き残りの扱い"] -->|道具は言語のスキルを見る| P["python-style testing.md: mutmut"]
  T --> R["rust-style testing.md: cargo-mutants"]
Loading

AGENTS.md の変更 (合意済み)

- - Keep files focused: prefer 80-120 columns, roughly 200-500 lines, high-level code before lower-level details, and related concepts close together.
+ - Keep files focused: high-level code before lower-level details, and related concepts close together.
- - Keep functions single-purpose at one abstraction level: prefer 0-3 arguments, short variable lifetimes, and guard clauses over nested conditionals; keep nesting to about two levels.
+ - Keep functions single-purpose at one abstraction level, with short variable lifetimes and guard clauses over nested conditionals.
規則 守るもの
桁数 ruff line-length = 119,oxfmt と rustfmt は 100
行数 (500) lefthook file-length (Python,Rust),oxlint max-lines (TypeScript)
引数 (3) ruff max-args,oxlint max-params,clippy too-many-arguments-threshold
ネスト (2) ruff max-nested-blocks,oxlint max-depth,clippy excessive-nesting-threshold

置き場所と文面 (案)

置き場所 書くこと
agents/skills/tsdd/SKILL.md 目的,使う場面,生き残ったミュータントの扱い,証拠としての扱い.道具の名前は書かない
agents/skills/python-style/references/testing.md mutmut: 変更したモジュールに絞る方法,結果の見方
agents/skills/rust-style/references/testing.md cargo-mutants: cargo mutants --file <path>,結果の見方

tsdd (## Test Oracles and Falsification の後):

## Mutation Testing

Mutation testing checks whether the tests catch plausible faults: a tool changes the code
(flipped operators, altered constants, replaced return values) and reruns the tests. A
surviving mutant marks behavior that no test observes.

- Run it when changing logic where an undetected fault is costly, such as safety or permission
  decisions, parsers, and policy evaluation, especially when the same agent wrote both the tests
  and the implementation. Do not run it for every change or in CI.
- Scope it to the changed module. The language style skill names the tool and its invocation.
- For each surviving mutant, add a test that kills it, or record in the PR why it is equivalent.
- Report the score and the survivors as verification evidence. A high score does not replace
  oracles derived from the requirements.

受け入れ条件

  • AGENTS.md が上の diff のとおりになっている
  • tsdd に上の節があり,道具の名前を含まない
  • python-style と rust-style の testing.md に,それぞれ mutmut と cargo-mutants の使い方がある
  • スキルの構成テストと lefthook が通る
範囲・除外・前提
  • 範囲: agents/AGENTS.md,agents/skills/tsdd/SKILL.md,agents/skills/python-style/references/testing.md,agents/skills/rust-style/references/testing.md.
  • 除外: TypeScript (StrykerJS) の使い方,各リポジトリへのツールの導入 (使うときに入れる).
  • 前提: dotfiles の lint 導入 (dotfiles にも数値の lint を入れて違反を直す #227) と同時期に入れる.lint の無いリポジトリでは数値の手がかりが消える.

Activity

  1. furedea-agent commented on Oct 18, 2026

    @furedea-agent
    ContributorAuthor

    計画

    レーン ブランチ 担当ファイル
    trim-rules docs/trim-numeric-rules agents/AGENTS.md,agents/skills/tsdd/SKILL.md,agents/skills/python-style/references/testing.md,agents/skills/rust-style/references/testing.md
    • 1. Issue 本文の diff どおりに AGENTS.md を直す
    • 2. Issue 本文の文面どおりに tsdd に ## Mutation Testing を足す (道具の名前は書かない)
    • 3. python-style と rust-style の testing.md に,mutmut と cargo-mutants の使い方を短く足す (変更したモジュールに絞る方法と結果の見方.版は公式で確かめる)
    • 4. スキルの構成テスト (tests/agents/test_workflow_skill_layout.py など) と lefthook

    #227 (dotfiles の lint) と同時期にマージする.

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions