Preface¶
In collaboration with AI coding agents, blind modifications, skipping verification, or assuming interfaces are common problems. This plugin constrains agents to confirm before writing code, calling interfaces, or refactoring through a set of verifiable criteria.
It is the “Eight Honors and Eight Shames” working guidelines for AI coding agents — a DSH native Skill, including installation and configuration guides.
Core Features¶
This plugin provides the following capabilities:
- Rule Constraints: Provides nine verifiable AI coding working guidelines, requiring agents to check them before operation.
- Execution Reports: Generates execution reports containing baselines and change records, requiring a record for every user request.
- Mandatory Reading: Supports configuration in
AGENTS.mdto enforce mandatory reading before starting work. - Pitfall Lookup: Includes a known pitfall lookup table, managed via an independent file.
Installation¶
Install using the DSH plugin management command:
dsh plugin --profile <profile> add github:wangcangxing/ai-eight-honors-eight-shames
This plugin is registered via the dsh.bundle mechanism. There is only one copy of the content, without duplicating SKILL.md.
Working Mechanism¶
Report Generation and Directory Determination¶
The plugin requires generating two types of report files in the workspace root directory:
- Execution Report - Initial Run.md: Records baseline information. On the first run, if the file exists, it is read with priority higher than change records; if it does not exist, a restricted scan (skipping
node_modules,.git, etc.) is performed to establish it. When it exceeds ≈30 KB or ≈200 lines, organization suggestions will be prompted. - Execution Report - Change Log -
.md : Archived by timestamp. Records are appended for each conversation; changes are noted if there are modifications, otherwise it states no modifications were made. When the file reaches ≈256 KB, it is mechanically archived.
Workspace Root Determination¶
The plugin determines the workspace root directory through a priority logic:
- The directory has project markers like
.git,package.json, or existing reports. - The directory is merely a container, but the task clearly points to a specific subdirectory.
- If it cannot be determined, list the first-level directories as a fallback (non-recursive).
Known Pitfalls¶
An independent file Execution Report - Known Pitfalls.md stores pitfall information. Full reading is strictly prohibited; it must be retrieved via query commands by keywords. Each pitfall is on one line (Why → How), with stable numbering.
Working Guidelines¶
The plugin defines nine core guidelines:
- To guessing interfaces is shameful; to serious inquiry is honorable.
- To vague execution is shameful; to seeking confirmation is honorable.
- To assuming business logic is shameful; to human confirmation is honorable.
- To creating new interfaces is shameful; to reusing existing ones is honorable.
- To skipping verification is shameful; to proactive testing is honorable.
- To destroying architecture is shameful; to following conventions is honorable.
- To pretending to understand is shameful; to honest ignorance is honorable.
- To blind modification is shameful; to backup refactoring is honorable.
- To delivering without trace is shameful; to leaving records and reporting is honorable.
Detailed Rule for Article 9: Reports are placed in the workspace root. Apart from report files, writing engineering files under the workspace directory is strictly prohibited. Engineering files should be placed in subdirectories named after the project.
Configuration and Integration¶
Mandatory Loading in AGENTS.md¶
To ensure agents read these guidelines before starting work, instructions can be written in AGENTS.md:
## Mandatory Reading Before Start
Before writing or changing any file, calling unfamiliar interfaces, refactoring, or declaring "done", first use the `skill` tool to load `ai-eight-honors-eight-shames` and execute according to its full text. Core bottom lines: verify before calling, ask if ambiguous, accept only facts for business, reuse before creating, conclusions must have evidence, write according to agreements, distinguish facts from inference, revert if possible before changing, how to determine workspace root: ① Has markers like `.git`/`package.json` or existing reports → use it; ② Just a container but task points to a subdirectory → use subdirectory; ③ If undetermined, list first-level directories once as fallback. Start by checking `Execution Report - Initial Run.md`: if exists, use it plus the latest change log as the unique baseline, no full scan; if not, perform restricted scan (skip node_modules/.git/dist/build/.vscode etc.) to establish. Leave a brief record for every new request or question; record changes if modified, if no business files changed write "Except for this report, no files were modified in this conversation" (both report types are meta-mechanisms, not counted as business file modifications). Record check time and file count at the report header, refresh locally if expired. `Execution Report - Change Log - <timestamp>.md` family archives by timestamp: in the same round only read the file with the largest filename, and bounded read (latest entry first, read only until covering the check time); when full ≈256 KB, mechanically archive and start a new one with a new timestamp. When `Execution Report - Initial Run.md` exceeds ≈30 KB / ≈200 lines, suggest organization once for this task, wait for human confirmation; it only writes long-term fixed content (directory structure / file functions / conventions), changing info goes to logs. "Known Pitfalls" is an independent file `Execution Report - Known Pitfalls.md`: strictly no full reading, use a query command to get entries by keyword (each pit one line: Why → How), leave a pointer line at the top of baseline.
Patch File¶
The plugin relies on the cordis.patch.yml patch for registration.
Ecology and Maintenance¶
- License: MIT
- Repository: github.com/wangcangxing/ai-eight-honors-eight-shames
- Community Inclusion: Listed in the skill category of awesome-dsh-plugin