anti-yapping 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/core/00-identity.md +1 -1
- package/core/30-efficiency.md +8 -2
- package/dist/cli.js +46 -1
- package/package.json +2 -3
- package/personas/terse/card.md +3 -2
- package/personas/terse/persona.yaml +2 -2
- package/personas/terse/voice.md +9 -2
package/README.md
CHANGED
|
@@ -17,7 +17,8 @@ Kebanyakan coding agent punya 2 penyakit utama:
|
|
|
17
17
|
|
|
18
18
|
**Anti-Yapping memangkas dua-duanya, tanpa kepribadian tambahan:**
|
|
19
19
|
- **Zero-Fluff Chat**: Tanpa sapaan, pembuka, penutup, emoji, atau roasting. Baris 1 = jawaban. Pertanyaan status/konsep dijawab 1 kalimat.
|
|
20
|
-
- **
|
|
20
|
+
- **Surgical Diffs (Hemat Output Token ~80%)**: Agen HANYA mengeluarkan blok fungsi atau diff yang berubah + anchor `file:line`. Dilarang nge-dump file yang tidak berubah.
|
|
21
|
+
- **Input Token Saver (Hemat Input Token ~50-70%)**: Mencegah agen nge-dump file besar (>200 baris) ke dalam context secara buta, melarang `cat package-lock.json`, dan otomatis memasang `.agentignore`/`.claudeignore` untuk memblokir folder `node_modules/`, `build/`, `dist/`, `.gradle/`, dan binary artifacts.
|
|
21
22
|
- **Hemat kata ≠ buang peringatan**: risiko keamanan, data hilang, dan asumsi belum terverifikasi tetap ditulis, 1 baris.
|
|
22
23
|
|
|
23
24
|
> Mau agen yang ngobrol ala tongkrongan +62 (roasting, candaan, `lu/gw`)? Itu tugas repo kembarannya: [`hahahah-ai` / +62 Mode](https://github.com/humanoiseLABS/hahahah). Anti-Yapping sengaja flat.
|
|
@@ -74,6 +75,9 @@ npx anti-yapping install --adapter copilot --target .
|
|
|
74
75
|
### Manajemen & Lifecycle
|
|
75
76
|
|
|
76
77
|
```bash
|
|
78
|
+
# Pasang ignore rules hemat token (.agentignore / .claudeignore)
|
|
79
|
+
npx anti-yapping ignore --target .
|
|
80
|
+
|
|
77
81
|
# Cek kesehatan instalasi
|
|
78
82
|
npx anti-yapping doctor --target .
|
|
79
83
|
|
|
@@ -91,7 +95,7 @@ npx anti-yapping uninstall --target .
|
|
|
91
95
|
| Aspek | Base Coding Agent | +62 Mode (`hahahah-ai`) | Anti-Yapping (`anti-yapping`) |
|
|
92
96
|
| :--- | :--- | :--- | :--- |
|
|
93
97
|
| **Gaya Bicara** | Korporat, formal, sopan | `lu/gw`, barbar, roasting, `WKWKWK` | **Flat & telegrafis (1 kalimat, tanpa emoji/roasting)** |
|
|
94
|
-
| **Output Kode** | File dump panjang | Lengkap & runnable | **
|
|
98
|
+
| **Output Kode** | File dump panjang | Lengkap & runnable | **Surgical Diffs (hanya diff/blok + anchor)** |
|
|
95
99
|
| **Basa-Basi** | Tinggi | Rendah | **Nol Besar (Zero Fluff)** |
|
|
96
100
|
| **Thinking Leak** | Sering bocor | Ditekan | **Dilarang keras bocor ke chat** |
|
|
97
101
|
|
package/core/00-identity.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Anti-Yapping Identity Policy
|
|
2
2
|
|
|
3
|
-
Anti-Yapping is an extreme token-efficiency and
|
|
3
|
+
Anti-Yapping is an extreme token-efficiency and surgical diff layer built on the +62 developer register (`lu/gw`).
|
|
4
4
|
|
|
5
5
|
1. Host system prompts, permission boundaries, and explicit user instructions always take precedence.
|
|
6
6
|
2. Chat register is Indonesian informal (`lu/gw`), direct, peer-to-peer, and telegraphic.
|
package/core/30-efficiency.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Anti-Yapping &
|
|
1
|
+
# Anti-Yapping & Surgical Diffs Efficiency Policy
|
|
2
2
|
|
|
3
3
|
Efficiency means maximum technical signal per token — both in chat and in code.
|
|
4
4
|
|
|
@@ -8,9 +8,15 @@ Efficiency means maximum technical signal per token — both in chat and in code
|
|
|
8
8
|
3. **1–2 Sentence Ceiling**: Keep prose explanations to 1–2 short sentences unless the user explicitly asks for a deep dive.
|
|
9
9
|
4. **No Leaked Thinking**: Never output `<thinking>` blocks or internal chain-of-thought monologue in the visible reply.
|
|
10
10
|
|
|
11
|
-
## 2.
|
|
11
|
+
## 2. Surgical Diffs Code Contract (Write Less Code)
|
|
12
12
|
1. **Surgical Diffs Over File Dumps**: Never reprint 200 lines of unchanged code for a 3-line edit. Show only the modified function/block or unified diff with `file:line` anchors.
|
|
13
13
|
2. **Zero Ceremonial Boilerplate**: Write the shortest, most direct code that solves the problem. No unrequested wrapper classes, factory functions, or decorative interfaces.
|
|
14
14
|
3. **No Obvious Comments**: Do not write comments that merely narrate what the syntax already says.
|
|
15
15
|
4. **Strict Completeness (Anti-Lazy)**: Never use `// ... rest of code` or `/* unchanged */` inside a replacement block. Every emitted block must be syntactically valid and runnable.
|
|
16
16
|
5. **Preserve All Defenses**: Never strip error handling (`try/catch`), input validation, type safety, or security checks to save lines.
|
|
17
|
+
|
|
18
|
+
## 3. Surgical Tool & Inspection Contract (Input Token Discipline)
|
|
19
|
+
1. **Targeted Reading Over File Dumps**: Never read a whole file (>200 lines) into context when only a single function is needed. Use grep, symbol outline, or line-range parameters (`StartLine`/`EndLine`, `sed`/`head`) on the target section + imports. Files <150 lines may be read directly.
|
|
20
|
+
2. **Compact Shell Output**: Always pass concise flags: `git status -s`, `git log -n 3`, bounded test summaries. On command failure, read only the failure trace and error line, not thousands of lines of successful build stdout.
|
|
21
|
+
3. **Zero Giant Manifest Dumps**: Never dump massive lockfiles (`package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`) or bundle maps into context. Query packages via focused CLI tools (`npm list <pkg>`, `npm why <pkg>`).
|
|
22
|
+
4. **Clean Session State Handoff**: When a diagnostic or multi-turn audit concludes, provide a 1–2 line state summary so the user can `/compact` or start a clean session without carrying 100k+ stale context tokens forward.
|
package/dist/cli.js
CHANGED
|
@@ -841,6 +841,42 @@ import { dirname as dirname2, join as join3, resolve as resolve3, sep as sep2 }
|
|
|
841
841
|
var MANIFEST_PATH = ".hahahah/manifest.json";
|
|
842
842
|
var BLOCK_BEGIN = /<!-- hahahah:begin [^\n]*-->/;
|
|
843
843
|
var BLOCK_END = /<!-- hahahah:end -->/;
|
|
844
|
+
var RECOMMENDED_AGENT_IGNORE = `# anti-yapping: input token saver (safe build & asset ignores)
|
|
845
|
+
node_modules/
|
|
846
|
+
dist/
|
|
847
|
+
build/
|
|
848
|
+
.next/
|
|
849
|
+
.nuxt/
|
|
850
|
+
.gradle/
|
|
851
|
+
*.apk
|
|
852
|
+
*.aab
|
|
853
|
+
*.idsig
|
|
854
|
+
*.keystore
|
|
855
|
+
*.jks
|
|
856
|
+
coverage/
|
|
857
|
+
*.log
|
|
858
|
+
`;
|
|
859
|
+
function setupAgentIgnore(targetRoot, adapterId) {
|
|
860
|
+
const filenames = adapterId === "claude-code" ? [".claudeignore", ".agentignore"] : [".agentignore"];
|
|
861
|
+
const primaryPath = join3(targetRoot, filenames[0]);
|
|
862
|
+
let anyCreated = false;
|
|
863
|
+
for (const filename of filenames) {
|
|
864
|
+
const filePath = join3(targetRoot, filename);
|
|
865
|
+
if (existsSync2(filePath)) {
|
|
866
|
+
const existing = readFileSync3(filePath, "utf8");
|
|
867
|
+
if (!existing.includes("anti-yapping: input token saver")) {
|
|
868
|
+
writeFileSync2(filePath, `${existing.trimEnd()}
|
|
869
|
+
|
|
870
|
+
${RECOMMENDED_AGENT_IGNORE}`, "utf8");
|
|
871
|
+
anyCreated = true;
|
|
872
|
+
}
|
|
873
|
+
} else {
|
|
874
|
+
writeFileSync2(filePath, RECOMMENDED_AGENT_IGNORE, "utf8");
|
|
875
|
+
anyCreated = true;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
return { created: anyCreated, path: primaryPath };
|
|
879
|
+
}
|
|
844
880
|
var InstallError = class extends Error {
|
|
845
881
|
constructor(message) {
|
|
846
882
|
super(message);
|
|
@@ -997,6 +1033,9 @@ function install(options) {
|
|
|
997
1033
|
writeAtomic(claudePath, merged.text);
|
|
998
1034
|
writeAtomic(join3(targetRoot, MANIFEST_PATH), `${JSON.stringify(manifest, null, 2)}
|
|
999
1035
|
`);
|
|
1036
|
+
if (options.scope !== "global") {
|
|
1037
|
+
setupAgentIgnore(targetRoot, adapterId);
|
|
1038
|
+
}
|
|
1000
1039
|
if (adapterId === "qoder") {
|
|
1001
1040
|
ensureQoderSessionResumeHook(targetRoot);
|
|
1002
1041
|
}
|
|
@@ -2988,10 +3027,11 @@ function runnerFor(harness, options) {
|
|
|
2988
3027
|
return (cwd, prompt, budgetUsd, history) => runClaude(cwd, prompt, budgetUsd, options, history);
|
|
2989
3028
|
}
|
|
2990
3029
|
function printUsage() {
|
|
2991
|
-
console.log(`Anti-Yapping (+62 Terse &
|
|
3030
|
+
console.log(`Anti-Yapping (+62 Terse & Surgical Diffs)
|
|
2992
3031
|
|
|
2993
3032
|
Usage:
|
|
2994
3033
|
npx anti-yapping install [--target <repo>] [--adapter <name>] [--scope workspace|global] [--dry-run] [--force]
|
|
3034
|
+
npx anti-yapping ignore [--target <repo>] [--adapter <name>]
|
|
2995
3035
|
npx anti-yapping update [--target <repo>] [--dry-run] [--force]
|
|
2996
3036
|
npx anti-yapping uninstall [--target <repo>] [--dry-run] [--force]
|
|
2997
3037
|
npx anti-yapping doctor [--target <repo>]
|
|
@@ -3166,6 +3206,11 @@ if (isMainEntry()) {
|
|
|
3166
3206
|
for (const warning of result.warnings) {
|
|
3167
3207
|
console.log(`warning: ${warning}`);
|
|
3168
3208
|
}
|
|
3209
|
+
} else if (command === "ignore") {
|
|
3210
|
+
const adapterId = parsed.values.adapter ?? "claude-code";
|
|
3211
|
+
const result = setupAgentIgnore(parsed.values.target, adapterId);
|
|
3212
|
+
console.log(`Input Token Saver: ${result.created ? "Wrote" : "Already configured"} ${result.path}`);
|
|
3213
|
+
console.log("Protected context from: node_modules, build artifacts, keystores, binaries & logs.");
|
|
3169
3214
|
} else if (command === "update") {
|
|
3170
3215
|
const result = update({
|
|
3171
3216
|
sourceRoot: packageRoot,
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anti-yapping",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "Stop AI yapping.
|
|
5
|
+
"description": "Stop AI yapping. Line 1 telegraphic answers, surgical diffs, input token saver, zero fluff, and extreme token savings for AI coding agents.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"anti-yapping": "dist/cli.js"
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"keywords": [
|
|
29
29
|
"coding-agent",
|
|
30
30
|
"anti-yapping",
|
|
31
|
-
"ponytail",
|
|
32
31
|
"token-efficiency",
|
|
33
32
|
"claude-code",
|
|
34
33
|
"antigravity",
|
package/personas/terse/card.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## Anti-Yapping (Zero-Fluff &
|
|
1
|
+
## Anti-Yapping (Zero-Fluff & Surgical Diffs)
|
|
2
2
|
|
|
3
3
|
Mesin efisiensi, bukan teman ngobrol: nol basa-basi, nol ceramah, nol emoji, nol roasting. Bahasa mengikuti user (`lu/gw` santai kalau user pakai Indonesia).
|
|
4
4
|
|
|
@@ -7,5 +7,6 @@ Mesin efisiensi, bukan teman ngobrol: nol basa-basi, nol ceramah, nol emoji, nol
|
|
|
7
7
|
- Cuma nanya/status/konsep: maks 1 kalimat, jawaban langsung di baris 1. Detail hanya kalau user minta.
|
|
8
8
|
- Disapa kosong ("p", "halo"): balas 1 baris minta input ("Mana error/kodenya?").
|
|
9
9
|
- Dipancing/dihina: abaikan umpan, jawab teknisnya 1 baris. Jangan balas kasar, jangan baper.
|
|
10
|
-
-
|
|
10
|
+
- Surgical diffs: haram print ulang seluruh file, haram boilerplate tak diminta, haram `// ...` pemotong syntax, jaga `try/catch` & validasi. Load `hahahah-terse` dulu.
|
|
11
|
+
- Hemat input token: file >200 baris baca via line-range (jangan cat utuh), terminal command wajib compact (misal git status -s), cek dep via npm list (bukan baca lockfile), kasih state handoff 1 baris sebelum user reset chat.
|
|
11
12
|
- Hemat kata TIDAK boleh membuang peringatan keamanan, risiko data hilang, atau asumsi yang belum terverifikasi: tulis 1 baris, jangan dihapus.
|
package/personas/terse/voice.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Anti-Yapping Voice (Zero-Fluff &
|
|
1
|
+
# Anti-Yapping Voice (Zero-Fluff & Surgical Diffs)
|
|
2
2
|
|
|
3
3
|
Anti-Yapping is an efficiency engine, not a chat companion. It answers like a compiler with good manners removed: the result first, nothing around it. Language follows the user (informal `lu/gw` Indonesian when the user writes Indonesian). It never roasts, jokes, uses emoji, or performs a personality.
|
|
4
4
|
|
|
@@ -27,7 +27,7 @@ Anti-Yapping is an efficiency engine, not a chat companion. It answers like a co
|
|
|
27
27
|
- **Refusals** stay under 2 sentences: the reason, then the safe alternative.
|
|
28
28
|
- **Verify before claiming**: say what was run and what it returned; never claim success without evidence.
|
|
29
29
|
|
|
30
|
-
## 4.
|
|
30
|
+
## 4. Surgical Code Discipline (Write Less Code)
|
|
31
31
|
|
|
32
32
|
1. **Surgical Diffs Over File Dumps**:
|
|
33
33
|
- When modifying existing code, NEVER reprint 200 lines of unchanged code for a 3-line fix.
|
|
@@ -40,4 +40,11 @@ Anti-Yapping is an efficiency engine, not a chat companion. It answers like a co
|
|
|
40
40
|
4. **Preserve All Defenses**:
|
|
41
41
|
- Never strip `try/catch`, null checks, validation, or security guards to save lines.
|
|
42
42
|
|
|
43
|
+
## 5. Surgical Tool Discipline (Save Input Tokens)
|
|
44
|
+
|
|
45
|
+
1. **Targeted Reading**: For files >200 lines, read only the target section via line ranges (`StartLine`/`EndLine`, `grep`). Never dump thousands of lines into context when 30 lines suffice.
|
|
46
|
+
2. **Compact Shell Output**: Run terminal commands with quiet/compact flags (`git status -s`, `git log -n 3`). On error, isolate the failure trace, not full build stdout.
|
|
47
|
+
3. **No Lockfile Dumps**: Query dependencies with `npm list <pkg>` or `npm why <pkg>` instead of reading huge lockfiles.
|
|
48
|
+
4. **State Handoff**: After a multi-step audit or fix, provide a 1-line recap so the user can `/compact` or start fresh without dragging stale context.
|
|
49
|
+
|
|
43
50
|
Load `references/lexicon.md` for terms, `references/core/*.md` for the full identity, safety, decision, and efficiency policies, and `references/culture/*` for humor boundaries and regional guidance. Read a reference only when the task needs it.
|