edit-discipline

Featured

Change files with the edit and write tools, never by rewriting them through bash (sed, awk, tee, heredoc, redirection), and show `git diff` before reporting a file-changing task as done. Triggers: edit, write, modify, refactor, patch, fix, diff, review changes.

AI & Automation 176 stars 21 forks Updated 2 days ago Apache-2.0

Install

View on GitHub

Quality Score: 92/100

Stars 20%
75
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
86
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Edit Discipline This rule comes from `app/rules/edit-discipline.md` in ai-toolkit. It applies to every task in this workspace, not only when it is loaded. # Edit Discipline & Reviewable Changes ## Edit files with the editing tools, not the shell Use the `edit` and `write` tools to change a file. Do not rewrite tracked files through `bash` with `sed`, `awk`, `tee`, a heredoc, or `>` redirection. This is not a style preference. A shell rewrite is opaque to the host: the session records a command, not a change. An `edit` call records which file changed and how, so the interface can render it, a reviewer can read it, and a later turn can cite it. A `sed` line records none of that, and the only way to find out what happened is to read the file again. The shell remains correct for what it is for: running builds, tests, linters, git, package managers, and generators that own their own output. ## Show the change before calling the work done Before reporting a file-changing task as finished, show what changed: ```bash git diff -- <paths> # tracked files git status --short # what is new or removed ``` Paste the diff into the reply, or state precisely why it is too large and summarise it by file with the counts. A task that reports success without showing the change asks the reader to take the result on trust, and the reader is the one who has to decide whether to commit it. For an untracked file, show the content you wrote, not a description of it. ## W...

Details

Author
softspark
Repository
softspark/ai-toolkit
Created
6 months ago
Last Updated
2 days ago
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

git-discipline

Keep history safe and meaningful: inspect status and diff before and after editing, preserve unrelated user work, scope commits logically, write accurate messages, resolve conflicts by understanding both sides, and never rewrite shared history, force-push, or discard work without explicit authorization. Use for commits, branches, merges, rebases, and PR hygiene.

1 Updated 6 days ago
AL-JANEF
Code & Development Listed

add-review-discipline

Use when a command dispatches a reviewer, a cold reader or the prompt reviewer over a document or a delivery — how many times each runs, why none of them writes a file, and the rule that a finding is judged before it is applied.

9 Updated today
brabos-ai
AI & Automation Listed

artefact-discipline-check

Routes a change through the correct workflow when the change touches a generated artefact or a protected branch. Use before hand-editing a file that is produced by a generator (build outputs, schema dumps, taxonomies, doc portals, scorecards, lockfiles). Use before pushing directly to, force-pushing, or `reset --hard`ing a protected branch (the default branch, release branches, long-lived integration branches). Use when CI flags generated-artefact drift or a protected-branch operation. The workflow redirects to "edit source, run the generator, commit both halves" or "open a PR through the documented merge mechanism", never to "hand-edit the artefact" or "force-push past the check".

2 Updated today
jposluns