Skip to content

docs(skills): drop prose that restates enforced rules - #231

Merged
furedea merged 4 commits into
mainfrom
docs/drop-enforced-prose
Nov 18, 2026
Merged

furedea merged 4 commits into
mainfrom
docs/drop-enforced-prose

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

概要

hook・ast-grep・adr-check がすでに強制している規則を Skill の文章から削除した(#169 の C).違反時のメッセージで直し方が分かる規則だけを対象にし,文章の書き換えはしていない.

対応表

規則 強制している仕組み 削除した文章の場所 直し方が分かるメッセージ
pip を使わない command_permissions.json の deny pip python-style/references/tooling.md の「don't use pip」 Use project-managed package tooling instead of pip.
uv pip install 禁止 同 deny uv pip 同 Prohibited: 行の uv pip install 同上
pytest-asyncio 禁止 py_no_pytest_asyncio(error) python-style/references/testing.md の「do not use asyncio」 note に @pytest.mark.anyio への置換を明記
BaseModel を直接継承しない py_pydantic_base_model_only_in_frozen_base(error) python-style/references/models.md の「only the class named FrozenBaseModel may inherit ...」 note に FrozenBaseModel への置換を明記
git push -u 禁止 guard_git.py(git_safety.sandbox_form_reason) development-cycle/references/delivery.md の段落 push with git push origin <branch> and open the pull request with gh pr create --head <branch>
bare force push・+refspec・main/master への force push 禁止 guard_git.py(git_safety.push_reason) delivery.md の「Never use bare --force ...」,development-cycle/SKILL.md の「rewrite published history only with the leased force push ...」 force-push flag detected,push target is 'main'(残した --force-with-lease --force-if-includes の手順が正解を示す)
-S での署名禁止 guard_git.py(sandbox_form_reason) development-cycle/references/commits.md の「-S」 agent commits and tags are unsigned; drop the signing option ...
subject 末尾にピリオドを付けない commitlint(.commitlintrc.yml,config-conventional の subject-full-stop;lefthook の commit-msg) commits.md の「No trailing period.」 commitlint が規則名を出力
herdr agent start に余分な引数を渡さない forbidden_commands.json(herdr agent start ... --,例外は Sonnet・Opus の medium のみ) development-cycle/references/branches.md の「pass exactly ... other agent arguments ask」(実際は ask ではなく deny で,文章が食い違っていた) deny の justification が許可する形を示す.コマンド例も残している

文章を残したもの

文章 理由
Jev の model rules(hooks/lint/model-rules/),#227 の ADR 規則 advisory のため.昇格するまで残す
#200 の shell 関数本体の判定 閉じていて強制していない
bash_local_underscore_prefix(severity が error でない),strict-mode-header など model-rules advisory
bash-style の shebang 規則は shebang がある file だけを見るので,無い場合は検出されない
go_mutex_field_documented,go_iota_enum_typed,py_dataclass_slots(frozen=True の判断を含む行) 強制は片方(コメントの有無・型の有無・slots)だけで,残りは判断基準
github-actions-style の permissions・timeout 強制は有無だけで,「必要な権限・適切な時間」は判断基準
rs_no_follow_links,rs_no_mocking_library の周辺 「明示的に必要でテスト済みなら許す」「mock より fake を優先」という判断基準
herdr --group 禁止,gh・herdr の ask の条件(gh api の変数の quote など) --group のメッセージは Herdr ownership actions need one simple direct Herdr call で直し方が伝わらない.ask は block ではない
uv・pnpm・go.sum・Cargo.lock の手編集禁止,@latest edit hook が見ておらず,@latest は go install など一部しか拒否しない
commit の「Imperative mood」「72 文字」,subject の小文字(固有名詞の例外) commitlint の上限は 100 文字で,imperative は機械で判定できない
ls-lint・shfmt・file-length(pre-commit のみ,この repository 固有) skill は他の repository にも使われ,そこでは強制されない
default / protected branch への直接 push 禁止(development-cycle/SKILL.md) guard は main と master だけを知る(PROTECTED_BRANCHES).レビュー指摘で復元
uv add --dev 禁止 deny は prefix uv add --dev だけで,uv add pkg --dev は ask.レビュー指摘で復元
hook の迂回禁止(commits.md) guard は --no-verify と core.hooksPath だけを見て,LEFTHOOK=0 は拒否しない.レビュー指摘で復元
accepted ADR の本文を変えず amended に残す(adr/SKILL.md) edit hook は --base なしで走り,CI の adr-lint にしか効かない.レビュー指摘で復元
ADR の置換手順(新 ADR の supersedes,旧 ADR の superseded-by) 複数 file にまたがる手順で,adr-check は事後にしか報告せず,他の repository では動かない.レビュー指摘で復元
verification_session.py verify を実行しない hook の block ではなく sandbox の書き込み禁止

確認

  • uv run --frozen pytest: 6120 passed, 2 skipped(tests/skills の skill command 検査を含む)
  • lefthook(shfmt,ls-lint,shellcheck,commitlint)が通る
  • .github/workflows/ の変更なし
前提・範囲外
  • 対象は block(deny・error)または CI 失敗の規則だけ.ask は対象外.
  • 文章の書き換え・再構成,hook・CI・lint rule とメッセージの変更,advisory の規則,他の repository は範囲外.

レビュー指摘への対応

指摘 扱い
P2 adr/SKILL.md: 置換手順を消すと正の手順が無くなる 修正.手順 4 の置換の一文を復元(後半の amended だけ削除のまま)
P2 python-style/references/tooling.md: uv add pkg --dev は deny の prefix に一致しない 修正.uv add --dev を Prohibited: 行に復元
P2 commits.md: LEFTHOOK=0 で hook を無効化できる 修正.「do not bypass the repository hooks」を復元
P2 adr/SKILL.md: accepted ADR の本文保護は CI にしか効かない 修正.amended の文を復元
P3・P1 development-cycle/SKILL.md: default / protected branch の push 禁止は main・master だけを guard が見る 修正.「Do not push directly to the default / protected branch.」を復元(force push の半分は強制済みなので削除のまま)

Closes #230
Refs #169

🤖 Generated with Claude Code

Remove sentences that the hooks and adr-check already enforce with a
message that names the fix: pip and uv pip, uv add --dev, pytest-asyncio,
direct pydantic BaseModel inheritance, git push -u, force and protected
branch pushes, commit signing and hook bypass, trailing period in a commit
subject, extra herdr agent arguments, and ADR supersession bookkeeping.

Refs #169
Closes #230

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@furedea

furedea commented Nov 18, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T04:47:45.353808Z 0e98634 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread agents/skills/adr/SKILL.md Resolved
@github-actions

Copy link
Copy Markdown

Review summary: this is a docs-only change that removes prose already enforced by hooks, ast-grep and adr-check. I found nothing that breaks behavior. I checked that the herdr agent start ... -- --model sonnet --effort medium example is still in branches.md and that push_reason still enforces the removed push rules.

  • P2 (adr/SKILL.md): the supersede procedure is removed entirely. It is a multi-step, positive instruction, so the agent learns it only after adr-check fails, and not at all in repositories without adr-check. A one-line pointer would avoid that.
  • P3 (development-cycle/SKILL.md): the hook protects only main and master. Dropping the "default / protected branch" sentence removes guidance for repositories whose protected branch has another name.

I did not run the test suite. No tests are needed for the docs change itself.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be382758ed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Keep the default / protected branch push rule, since guard_git.py only
knows main and master, and keep the positive ADR supersession step, since
it is a multi-file procedure that adr-check only reports after the fact.

Refs #230

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@furedea

furedea commented Nov 18, 2026

Copy link
Copy Markdown
Owner

@codex review

@github-actions

Copy link
Copy Markdown

No blocking findings. This is a docs-only change.

I checked that the removed prose is covered by the enforcement the PR table cites. The herdr agent start ... -- --model sonnet --effort medium example is still in branches.md:27, so the allowed form is still shown. I did not run the hooks, ast-grep rules, or tests.

Optional (P3): the Skills may be used in repositories that lack this repo's commitlint, adr-check, and ast-grep rules. Removing 'No trailing period', 'record changes in amended', and the pytest-asyncio and BaseModel rules therefore leaves nothing to enforce them there. The PR applies the other-repo reasoning to ls-lint and the ADR replacement steps but not to these, so the line it draws is slightly inconsistent. The PR text already lists other repositories as out of scope, so I'm not asking for a change.

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12e59f167d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The deny rule matches only the prefix `uv add --dev`, so `uv add pkg --dev`
is not refused.

Refs #230

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@furedea

furedea commented Nov 18, 2026

Copy link
Copy Markdown
Owner

@codex review

@github-actions

Copy link
Copy Markdown

No blocking findings. This PR only deletes prose in 8 Skill docs, and I found no correctness, security or test-coverage problems.

I checked these claims against the repo:

  • herdr agent start: the example command is still in branches.md. forbidden_commands.json and allowed_commands.json allow only -- --model (sonnet|opus) --effort medium.
  • -S, --gpg-sign and --no-verify: git_safety.py covers them in sandbox_form_reason and hook_skip_reason. hook_skip_reason also handles -c core.hooksPath and GIT_CONFIG_*.
  • subject-full-stop: .commitlintrc.yml extends config-conventional, which includes it.

I did not run the test suite. The PR reports 6120 passed.

This is docs-only, so no new tests are needed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aea49d622d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread agents/skills/adr/SKILL.md Resolved
The edit hook runs adr-check without --base, so only CI protects an
accepted ADR body, and no guard refuses LEFTHOOK=0 as a hook bypass.

Refs #230

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@furedea

furedea commented Nov 18, 2026

Copy link
Copy Markdown
Owner

@codex review

@github-actions

Copy link
Copy Markdown

Review summary

No findings. This is a read-only review of a docs-only change.

I checked the PR's "this is already enforced" claims against the code for the rules whose prose was removed:

  • git push -u / --set-upstream and -S / --gpg-sign: sandbox_form_reason in agents/hooks/lib/git_safety.py rejects them with a message that names the fix. Tests exist (tests/hooks/test_git_safety.py, test_guard_git.py).
  • Force push, +refspec, push to main/master: push_reason covers all three with specific messages. The lease form kept in delivery.md is the one remaining correct path.
  • herdr agent start ... --: forbidden_commands.json denies it, and the justification names the allowed Sonnet/Opus medium form. branches.md still has the example command at line 27. The removed "ask" wording was wrong, since the rule is a deny.
  • Rules kept in prose (uv add --dev, hook bypass, protected-branch push, ADR steps): the reasons given in the PR match the code. For example, PROTECTED_BRANCHES is only {main, master}.

The only remaining prose that mentions signing is -c commit.gpgsign=true, which is not enforced anywhere, so it is correctly kept.

No behavior changes and no tests are needed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 0e98634100

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@furedea
furedea merged commit 582bb86 into main Nov 18, 2026
29 checks passed
@furedea
furedea deleted the docs/drop-enforced-prose branch November 18, 2026 05:02
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.

docs(skills): drop prose that restates enforced rules

1 participant