@moon791017/neo-skills 1.1.27 → 1.1.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moon791017/neo-skills",
3
- "version": "1.1.27",
3
+ "version": "1.1.28",
4
4
  "type": "module",
5
5
  "description": "Neo Skills: A Universal AI Agent Skills Extension",
6
6
  "homepage": "https://neo-blog-iota.vercel.app/",
@@ -3,45 +3,56 @@ name: neo-code-review
3
3
  description: >
4
4
  Use this skill when the user asks to review or audit source code, a PR, diff, commit,
5
5
  or recent changes for bugs, security, performance, tests, compatibility, or
6
- maintainability. Also use it after an AI agent finishes modifying code to inspect the
7
- current uncommitted working tree before handoff and report actionable findings with
8
- file and line evidence.
6
+ maintainability, duplicated code or logic across files, or hard-coded values. Also use
7
+ it after an AI agent finishes modifying code to inspect the current uncommitted working
8
+ tree before handoff and report actionable findings with file and line evidence.
9
9
  compatibility: Requires Python 3.11+ and uv for the Git change helper.
10
10
  ---
11
11
 
12
12
  # Code Review
13
13
 
14
- Use the Reviewer workflow. Keep the review read-only and report only evidence-backed, actionable findings.
14
+ Follow this read-only workflow. Report only actionable findings supported by evidence.
15
15
 
16
16
  ## Trigger On
17
17
 
18
18
  - The user requests a code, PR, diff, commit, security, performance, test, or maintainability review.
19
+ - The user asks whether code or logic is duplicated across files, or whether hard-coded values should be centralized.
19
20
  - An AI Agent finishes modifying code, tests, configuration, or scripts before handoff.
20
21
 
21
22
  ## Workflow
22
23
 
23
- 1. **Collect the review scope**
24
- - Use the files or code snippets supplied by the user as the primary scope.
25
- - If no scope is supplied inside a Git repository, run:
24
+ 1. **Define the review scope**
25
+ - Use the files or snippets supplied by the user as the primary scope.
26
+ - If the user provides no scope and the current directory is a Git repository, run:
26
27
  ```bash
27
28
  uv run skills/neo-code-review/scripts/git-diff-reviewer.py --working-tree
28
29
  ```
29
30
  - Use `--staged` for staged-only changes and `--commit <range>` for a commit range.
30
31
  - Read surrounding code, related tests, and existing contracts. If no reviewable input exists, report it and stop.
32
+ - For a working-tree review, include the helper's tracked diff and each non-ignored untracked file as separate inputs.
31
33
 
32
- 2. **Load the rules**
34
+ 2. **Load the review rules**
33
35
  - Read [review-checklist.md](references/review-checklist.md) before evaluating code.
34
36
  - Identify the actual language, framework, and affected behavior from the change. Do not infer unverified rules from filenames.
35
37
 
36
- 3. **Analyze risk**
38
+ 3. **Run the cross-file consistency scan**
39
+ - Build the comparison set from the review targets and relevant repository source and configuration files. Use `rg --files` and the repository's ignore rules. Exclude dependency, vendor, cache, generated, minified, build, and coverage output unless a file is explicitly in scope.
40
+ - Inventory changed or reviewed functions, classes, validation and authorization rules, state transitions, request or query construction, error handling, and distinctive literals such as URLs, routes, timeouts, retry counts, thresholds, regexes, feature flags, and error messages.
41
+ - Search the comparison set for exact and near-exact matches, then read each match in context. Ignore name and formatting differences when the behavior matches. Treat renamed or slightly rearranged copies as duplicates when their business rules, inputs, side effects, and failure behavior are materially the same.
42
+ - Report only meaningful duplication: copied implementation, duplicated business or validation logic, divergent security or state logic, or repeated non-trivial hard-coded configuration. Do not report a match based only on a common keyword, normal one-time literal, test fixture, snapshot, generated file, or vendor code.
43
+ - For every cross-file finding, cite both file paths and line numbers. Explain the concrete maintenance, divergence, security, or behavior risk and recommend a specific shared helper, constant, configuration source, or other single source of truth.
44
+ - If the user supplied only a snippet or specific files without repository context, state in `## Validation` that cross-file verification was unavailable. Never invent repository matches or line evidence.
45
+
46
+ 4. **Analyze risk**
37
47
  - Prioritize correctness, regressions, security, data consistency, resource lifetime, concurrency, and high-risk test gaps.
38
48
  - `🔴 Critical Issues` contain only security vulnerabilities, data loss, incorrect behavior, authorization bypasses, or major regressions.
39
49
  - `🟡 Suggestions` contain only actionable, non-blocking issues with a clear impact and remediation direction.
50
+ - Classify ordinary duplicated logic or hard-coded configuration as `🟡 Suggestions`. Classify hard-coded secrets or duplication that creates a demonstrable security or behavior defect as `🔴 Critical Issues`.
40
51
  - Do not report preferences, unsupported speculation, or checklist items that were not triggered by evidence.
41
52
 
42
- 4. **Produce a concise report**
53
+ 5. **Produce a concise report**
43
54
  - Write in English and preserve file paths and line numbers, such as `src/user.ts:42`.
44
- - Use this structure. Write `None` when a section has no findings; do not omit the severity sections:
55
+ - Use this structure. Keep all severity sections and write `None` when a section has no findings:
45
56
 
46
57
  ```markdown
47
58
  ## 🔍 Review Summary
@@ -56,15 +67,18 @@ Use the Reviewer workflow. Keep the review read-only and report only evidence-ba
56
67
 
57
68
  ## 🟡 Suggestions
58
69
  - **Location**: `path:line`
70
+ - **Type**: Duplicated logic, duplicated hard-coded value, or another applicable category.
71
+ - **Evidence**: The matching location and the relevant behavior or value in each file.
59
72
  - **Recommendation**: Specific, non-blocking improvement.
60
73
 
61
74
  ## 🟢 Strengths
62
75
  - List only strengths directly supported by the change.
63
76
 
64
77
  ## Validation
65
- - List executed tests, builds, or checks that were not run.
78
+ - State the cross-file comparison scope and any unavailable repository context.
79
+ - List executed tests, builds, and checks. Name any that were not run.
66
80
  ```
67
81
 
68
- 5. **Apply the delivery gate**
82
+ 6. **Apply the delivery gate**
69
83
  - If an automatic review finds `🔴 Critical Issues`, cannot establish the review scope, or cannot load the skill, do not declare completion or hand off.
70
84
  - After fixing findings, rerun the required checks and review the changes again.
@@ -10,7 +10,10 @@
10
10
  "Is this TypeScript code well designed? What should be improved?",
11
11
  "Check this SQL query for performance problems, slow queries, or missing indexes",
12
12
  "Run static code analysis and identify problems in this Go project",
13
- "An AI Agent just finished modifying code. Review the uncommitted changes before handoff"
13
+ "An AI Agent just finished modifying code. Review the uncommitted changes before handoff",
14
+ "Review this pull request and check whether validation logic or hard-coded limits are duplicated in other source files",
15
+ "Audit the repository for copy-pasted business rules and repeated URLs, timeouts, or thresholds introduced by these changes",
16
+ "Check whether the same implementation appears in different files and whether repeated configuration should be centralized"
14
17
  ],
15
18
  "should_not_trigger": [
16
19
  "How do I install Git?",
@@ -23,6 +26,8 @@
23
26
  "Translate this Python code into Rust",
24
27
  "What is the principle behind SQL injection?",
25
28
  "Generate today's development progress report",
26
- "Run the current project's tests only; do not perform a code review"
29
+ "Run the current project's tests only; do not perform a code review",
30
+ "How should I extract duplicated code into a shared helper?",
31
+ "Write a script that detects repeated literals across a repository"
27
32
  ]
28
33
  }
@@ -36,6 +36,40 @@
36
36
  "If 🔴 Critical Issues are found, the status blocks delivery",
37
37
  "The report invents no findings when no changes exist"
38
38
  ]
39
+ },
40
+ {
41
+ "id": 4,
42
+ "prompt": "Review these changed TypeScript files for correctness and compare them with each other for duplicated logic and hard-coded values. File: src/orders/createOrder.ts\n```typescript\nconst MAX_ITEMS = 50;\n\nexport function validateCreateItems(items: Item[]): void {\n if (items.length > MAX_ITEMS) throw new Error('Too many items');\n for (const item of items) {\n if (item.quantity <= 0) throw new Error('Invalid quantity');\n }\n}\n```\nFile: src/orders/updateOrder.ts\n```typescript\nconst MAX_ITEMS = 50;\n\nexport function validateUpdateItems(items: Item[]): void {\n if (items.length > MAX_ITEMS) throw new Error('Too many items');\n for (const item of items) {\n if (item.quantity <= 0) throw new Error('Invalid quantity');\n }\n}\n```",
43
+ "expected_output": "A concise English review report that identifies the duplicated item-validation logic and repeated MAX_ITEMS hard-coded value in both files, cites both file locations, classifies the maintainability issue as a 🟡 Suggestion rather than a 🔴 Critical Issue, and recommends extracting shared validation and a single source of truth for the limit. It must not invent unrelated defects.",
44
+ "assertions": [
45
+ "The report contains both src/orders/createOrder.ts and src/orders/updateOrder.ts as evidence locations",
46
+ "The report identifies the duplicated validation behavior rather than only matching function names",
47
+ "The report identifies the repeated MAX_ITEMS value as hard-coded configuration duplication",
48
+ "The duplication findings appear under 🟡 Suggestions and do not block delivery",
49
+ "The report recommends a shared validator and centralized constant or configuration",
50
+ "The report contains no unsupported security, performance, or correctness findings"
51
+ ]
52
+ },
53
+ {
54
+ "id": 5,
55
+ "prompt": "Review these two test files and check for meaningful cross-file duplication or hard-coded configuration. File: tests/orders.test.ts\n```typescript\nit('returns HTTP 200 for a valid order', async () => {\n expect(response.status).toBe(200);\n});\n```\nFile: tests/payments.test.ts\n```typescript\nit('returns HTTP 200 for a valid payment', async () => {\n expect(response.status).toBe(200);\n});\n```\nThese tests cover different endpoints and share only a normal HTTP status literal.",
56
+ "expected_output": "A concise English review report that performs or clearly scopes the cross-file check but reports no duplication finding. It must not treat a normal repeated test literal or separate endpoint fixture as meaningful hard-coded configuration, and it must not invent other issues.",
57
+ "assertions": [
58
+ "The report does not raise a duplicated-logic or hard-coded-configuration finding for the shared 200 test literal",
59
+ "The report does not claim the two endpoint tests implement the same business rule",
60
+ "The report explicitly states the cross-file scan scope or limitation",
61
+ "The report invents no unrelated findings"
62
+ ]
63
+ },
64
+ {
65
+ "id": 6,
66
+ "prompt": "Review only this Python snippet and check whether the same code or hard-coded values appear in other files:\n```python\ndef is_active(user):\n return user.status == 'active'\n```\nNo repository or additional files are available.",
67
+ "expected_output": "A concise English review report that states the supplied snippet was reviewed but cross-file verification was unavailable because no repository context or additional files were provided. It must not invent duplicate locations or line evidence.",
68
+ "assertions": [
69
+ "The report states that cross-file verification could not be performed",
70
+ "The report does not invent another file path, duplicate match, or line number",
71
+ "The report still uses the required review sections and severity headings"
72
+ ]
39
73
  }
40
74
  ]
41
75
  }
@@ -1,8 +1,8 @@
1
1
  # Code Review Checklist
2
2
 
3
- This checklist is the review baseline for `neo-code-review`. During review, compare the code changes against these criteria and categorize findings by severity: Critical Issues (🔴 Must-fix), Suggestions (🟡 Clean Code/Performance), and Praise (🟢 High Quality).
3
+ Use this checklist as the baseline for `neo-code-review`. Compare each change against these criteria and report findings under `Critical Issues` (🔴 must fix), `Suggestions` (🟡 non-blocking), or `Strengths` (🟢).
4
4
 
5
- Only report a finding when the risk is supported by the diff, surrounding code, tests, runtime behavior, or a clearly stated requirement. Do not turn every checklist item into a finding.
5
+ Report a finding only when the diff, surrounding code, tests, runtime behavior, or a stated requirement supports the risk. Do not turn every checklist item into a finding.
6
6
 
7
7
  ---
8
8
 
@@ -122,8 +122,18 @@ Only list SOLID/design findings when the violation clearly increases defect risk
122
122
  - Is a function, method, component, or query too long or deeply nested to review safely?
123
123
  - Is cyclomatic complexity high enough to hide bugs or make tests brittle?
124
124
  - [ ] **Modularity & Duplication**:
125
- - Does the code avoid meaningful duplication, copy-pasted business rules, and divergent validation logic?
125
+ - Does the code avoid meaningful duplication and copy-pasted implementations across changed and relevant repository files?
126
+ - Are business, validation, authorization, state-transition, error-handling, or request/query rules implemented in more than one place?
127
+ - Are apparently different implementations materially equivalent after comparing inputs, conditions, side effects, and failure behavior?
126
128
  - Is shared behavior placed at the right abstraction level without over-engineering?
129
+ - [ ] **Hard-coded Values & Single Source of Truth**:
130
+ - Are non-trivial URLs, routes, timeouts, retry counts, thresholds, regexes, feature flags, error messages, or other configuration values repeated across production files?
131
+ - Should a repeated value be moved to a shared constant, configuration source, or domain-level policy to prevent drift?
132
+ - Are hard-coded credentials, tokens, private keys, or other secrets treated as security findings rather than ordinary maintainability suggestions?
133
+ - Do not report common one-time literals, test fixtures, snapshots, generated files, vendor code, or matches based only on a shared keyword.
134
+ - [ ] **Cross-file Evidence**:
135
+ - Does every duplication finding cite both file paths and line numbers with enough surrounding context to verify the match?
136
+ - If repository context is unavailable, does the review state that cross-file verification could not be performed instead of inventing evidence?
127
137
  - [ ] **Testability**:
128
138
  - Is the code easy to unit test or integration test?
129
139
  - Are dependencies injectable or isolatable where tests need control over time, I/O, network calls, randomness, or external systems?
@@ -3,143 +3,155 @@ name: neo-stop-slop
3
3
  description: >
4
4
  Use this skill when the user wants to polish, rewrite, shorten, or review prose so
5
5
  it sounds natural rather than AI-generated. Trigger for Traditional Chinese or English
6
- drafts, technical docs, code comments, commit messages, PR descriptions, sales copy,
7
- and requests to remove AI tells, slop, fluff, or formulaic phrasing.
6
+ drafts, rough notes, source material, articles, technical docs, code comments, commit
7
+ messages, PR descriptions, sales copy, or requests to remove AI tells, slop, fluff,
8
+ or formulaic phrasing.
8
9
  license: MIT
9
10
  compatibility: Requires Node.js (ESM) to run the analyze-slop.js script.
10
11
  metadata:
11
12
  author: Ben Knight Dark
12
- version: "1.0.0"
13
+ version: "1.1.0"
13
14
  patterns: reviewer, generator
14
15
  ---
15
16
 
16
17
  # Neo Stop Slop
17
18
 
18
- `neo-stop-slop` 是一個專門設計用來消除中英文 AI 腔調(AI Tells)、贅詞及公式化囉唆結構的雙核技能。它能讓 AI 生成的文案、技術草稿、程式碼註解、Git Commit 及 PR 說明,轉換為極簡、乾淨且生動的自然語言。
19
+ `neo-stop-slop` is a writing skill for removing AI tells, filler, and formulaic verbosity from Chinese and English prose. It handles copy, technical drafts, code comments, Git commits, PR descriptions, and rough notes or source material that need to become clear, accurate articles.
19
20
 
20
- 本技能結合了 **Reviewer (文字診斷審查)** 與 **Generator (極簡重寫生成)** 兩大核心工作流。
21
+ It combines two core workflows: **Reviewer** for diagnosing text and **Generator** for rewriting it. Article Rewrite rules add source fidelity and Taiwan Traditional Chinese writing guidance where needed.
21
22
 
22
23
  ---
23
24
 
24
25
  ## Gotchas
25
26
 
26
- * **過度精簡風險**:在進行「Rewrite (重寫)」時,務必確保**沒有遺漏關鍵的技術細節或事實資訊**。去 AI 腔是指「清除贅詞與修飾架構」,而不是刪減實質內容。
27
- * **代碼語法與註解標記**:修剪「代碼註解」時,切勿破壞 XML 文件結構(如 C# 的 `<summary>`、`<param>`)或 JSDoc/TSDoc 的結構標記。
28
- * **檢測腳本執行**:使用 `analyze-slop.js` 時,一律採用**非互動模式**(傳入 `--file` 或 `--input`,配合 `--format json` 或不帶選項),避免任何 TTY 卡死。
27
+ * **Over-shortening risk**: When rewriting, preserve all important technical details and facts. Removing AI tells means removing filler and decorative structure, not deleting substance.
28
+ * **Article Rewrite fact boundary**: When handling drafts, notes, articles, or source material, use only information supplied and supported by the user. Do not add external context, data, causality, motives, impact, or unverified conclusions. Preserve uncertainty, attribution, and contradictions. See `references/article-rewrite.md` for the complete rules.
29
+ * **Code syntax and comment markers**: When trimming code comments, do not break XML documentation structures such as C# `<summary>` and `<param>`, or JSDoc/TSDoc markers.
30
+ * **Analyzer execution**: Run `analyze-slop.js` non-interactively with `--file` or `--input`, optionally using `--format json`; never invoke a TTY prompt that could hang the agent.
29
31
 
30
32
  ---
31
33
 
32
34
  ## Workflow Checklist
33
35
 
34
36
  Progress:
35
- - [ ] **Step 1 — Perceive (感知環境)**:辨識輸入文字的語言(繁中/英文)與場景(文案、註解、Git Commit 或 PR 說明),確認使用者需要 `Review`(診斷)還是 `Rewrite`(重寫)。
36
- - [ ] **Step 2 — Reason (制定策略)**:根據語言與場景,加載相對應的參考手冊(`references/` 資源檔)。
37
- - [ ] **Step 3 — Act: Review (執行診斷,若適用)**:執行內建的 `scripts/analyze-slop.js` 統計贅詞並計算 Slop 密度分數。
38
- - [ ] **Step 4 — Act: Rewrite (執行重寫,若適用)**:對照 `references/examples.md` 的轉換標準,將文字徹底重寫為極簡且充滿力量的直白文句。
39
- - [ ] **Step 5 — Verify (結果驗證)**:再次對重寫後的文字執行 `analyze-slop.js`,確保 Slop 密度降至 A+ 級(< 0.5%)。
37
+ - [ ] **Step 1 — Perceive**: Identify the language, content context, and output goal. Route the request to `Review`, general `Rewrite`, or `Article Rewrite`.
38
+ - [ ] **Step 2 — Reason**: Load only the `references/` resources relevant to the context. Article Rewrite must load `article-rewrite.md`.
39
+ - [ ] **Step 3 — Act: Review**: Run `analyze-slop.js` only when the user asks for an AI-tell diagnosis.
40
+ - [ ] **Step 4 — Act: Rewrite**: Remove information-free filler, formulaic structures, and vague wording. In Article Rewrite mode, reorder the supplied information without deleting facts for brevity.
41
+ - [ ] **Step 5 — Verify**: Check style, source fidelity, output format, and technical markers according to the selected mode. Treat analyzer scores as diagnostic signals, not hard gates for every mode.
40
42
 
41
43
  ---
42
44
 
43
45
  ## Detailed Guidelines
44
46
 
45
- ### Step 1 — Perceive (感知環境)
46
- 仔細分析使用者的請求與文本:
47
- 1. **語言檢索**:辨識主要語言是 **繁體中文 (Taiwan)** 還是 **英文**。
48
- 2. **場景分類**:
49
- * *一般文案/草稿*:加載 `phrases-zh.md`/`phrases-en.md` 與 `structures.md`。
50
- * *開發者文字 (註解/Commit/PR)*:加載 `dev-slop.md`。
51
- 3. **模式選擇**:
52
- * 使用者問「這段文字有 AI 腔嗎?」或「幫我做文字審查」:進入 **Review 模式**。
53
- * 使用者直接說「幫我重寫這段話」或「把 AI 腔消掉」:進入 **Rewrite 模式**。
47
+ ### Step 1 — Perceive
48
+ Analyze the user's request and text carefully:
49
+ 1. **Detect the language**: Determine whether the primary language is **Taiwan Traditional Chinese** or **English**.
50
+ 2. **Classify the context**:
51
+ * *General copy or drafts*: Load `phrases-zh.md` or `phrases-en.md`, plus `structures.md`.
52
+ * *Developer text (comments, commits, or PRs)*: Load `dev-slop.md`.
53
+ * *Article Rewrite (rough notes, source material, news, or technical content)*: Load `article-rewrite.md` and prioritize source fidelity and natural narrative flow.
54
+ 3. **Choose the mode**:
55
+ * If the user asks whether text contains AI tells or asks for a text review, use **Review mode**.
56
+ * If the user directly asks to rewrite text or remove AI tells, use **Rewrite mode**.
57
+ * If the user asks to organize drafts, notes, articles, or source material into a complete article, use **Article Rewrite mode**.
54
58
 
55
59
  ---
56
60
 
57
61
  ### Step 2 — Reason & Load References
58
- 動態加載該技能目錄下的專用知識庫。請根據 Step 1 的感知結果載入以下相對應的路徑:
59
- * **英文通用**:`references/phrases-en.md`
60
- * **中文通用**:`references/phrases-zh.md`
61
- * **公式化結構**:`references/structures.md`
62
- * **開發者專項**:`references/dev-slop.md`
63
- * **Before/After 對照組**:`references/examples.md`
62
+ Load the skill's focused reference material dynamically. Based on Step 1, load the applicable paths:
63
+ * **General English**: `references/phrases-en.md`
64
+ * **General Chinese**: `references/phrases-zh.md`
65
+ * **Formulaic structures**: `references/structures.md`
66
+ * **Developer-specific guidance**: `references/dev-slop.md`
67
+ * **Article Rewrite guidance**: `references/article-rewrite.md`
68
+ * **Before/after examples**: `references/examples.md`
64
69
 
65
70
  ---
66
71
 
67
- ### Step 3 — Act: Review 模式 (診斷)
68
- 1. 將使用者提供的文本寫入臨時檔案,或直接作為參數傳遞給統計腳本。
69
- 2. 在終端非互動執行 `analyze-slop.js`:
72
+ ### Step 3 — Act: Review
73
+ 1. Write the user's text to a temporary file or pass it directly as an argument to the analyzer.
74
+ 2. Run `analyze-slop.js` non-interactively:
70
75
  ```bash
71
- node skills/neo-stop-slop/scripts/analyze-slop.js --input "[使用者輸入的文本內容]" --format json
76
+ node skills/neo-stop-slop/scripts/analyze-slop.js --input "[user input text]" --format json
72
77
  ```
73
- 3. 解析腳本產出的 JSON 數據,擷取:
74
- * **Slop Density Score (Slop 密度分數)**
75
- * **Grade (評估等級)**
76
- * **Violations (檢出的贅詞清單)**
77
- 4. 依據 Output Templates 呈現 Slop 診斷報告,列出違規行數、違規類型,並給出重構建议。
78
+ 3. Parse the JSON output and extract:
79
+ * **Slop Density Score**
80
+ * **Grade**
81
+ * **Violations**
82
+ 4. Use the Output Templates to present a slop diagnosis, including violation line numbers, categories, and concrete restructuring suggestions.
78
83
 
79
84
  ---
80
85
 
81
- ### Step 4 — Act: Rewrite 模式 (重寫)
82
- 當需要重寫文本時,請遵循以下 6 條去 Slop 鋼鐵鐵律:
83
- 1. **消滅清喉嚨詞 (Cut fillers)**:徹底刪去「值得注意的是」、「不容忽視」、「Here's the thing」等起手式。
84
- 2. **用主動代替被動 (Active voice)**:確保每個句子都有具體的主語(如「人」或「具體組件」)在執行動作。避免擬人化 ("The code wants to...")。
85
- 3. **打碎公式化結構 (Break formulaic setups)**:去除「不是因為 X,而是因為 Y」這類刻意轉折的二元對立;刪除「試想一下:」等自我設問。
86
- 4. **用具體事實代替空泛形容詞 (Be specific)**:將「大幅提升效能、解決痛點」等空話,改寫為具體成效(例如「減少 80% 記憶體開銷」)。
87
- 5. **縮減字數至少 30%**:AI 腔的本質是稀釋資訊。優秀的文字會以最少字數傳達最大資訊量。
88
- 6. **適用開發者規則 (Apply Dev Conventions)**:若處理代碼註解或 Git Commit,嚴格套用 `dev-slop.md` 的精簡規則。
86
+ ### Step 4 — Act: Rewrite
87
+ Follow these rules in general Rewrite mode; use `references/article-rewrite.md` instead for Article Rewrite:
88
+ 1. **Cut fillers**: Remove openers such as 「值得注意的是」, 「不容忽視」, and "Here's the thing".
89
+ 2. **Use active voice**: Give each sentence a concrete subject, such as a person or component, that performs the action. Avoid anthropomorphism such as "The code wants to...".
90
+ 3. **Break formulaic setups**: Remove binary contrasts such as 「不是因為 X,而是因為 Y」 and rhetorical prompts such as 「試想一下:」.
91
+ 4. **Be specific**: Replace vague claims such as 「大幅提升效能、解決痛點」 with concrete results, such as 「減少 80% 記憶體開銷」.
92
+ 5. **Preserve substance**: Remove information-free filler and repetition without applying a fixed word-reduction target or sacrificing facts, conditions, limitations, or technical details.
93
+ 6. **Apply developer conventions**: For code comments or Git commits, follow the concise-writing rules in `dev-slop.md`.
94
+
95
+ In Article Rewrite mode, first extract and reorder the supplied information, then output only the article body. Do not use the general Rewrite word-count target or report format.
89
96
 
90
97
  ---
91
98
 
92
- ### Step 5 — Verify (結果驗證)
93
- 1. 將重寫後的文字再次輸入檢測腳本:
99
+ ### Step 5 — Verify
100
+ 1. In general Rewrite mode, you may run the rewritten text through the analyzer again:
94
101
  ```bash
95
- node skills/neo-stop-slop/scripts/analyze-slop.js --input "[重寫後的文本]" --format json
102
+ node skills/neo-stop-slop/scripts/analyze-slop.js --input "[rewritten text]" --format json
96
103
  ```
97
- 2. 確認 `slopDensityScore` **小於 0.5%**(評估等級達到 **A+**)。
98
- 3. 向使用者呈交成果時,標明重寫前後的字數變化與 Slop 密度的巨大改善。
104
+ 2. Compare `slopDensityScore` with the source as a style signal. Unless the user asks otherwise, do not treat `A+` or `< 0.5%` as a hard gate.
105
+ 3. Do not use the analyzer to verify facts in Article Rewrite mode. Apply the fact and naturalness checks in `article-rewrite.md`, and output only the article body.
106
+ 4. If a general Rewrite response includes a diagnostic summary, it may report word-count and slop-density changes, but must not delete substance to improve the score.
99
107
 
100
108
  ---
101
109
 
102
110
  ## Output Templates
103
111
 
104
- ### 1. Review 診斷報告範本
105
- 當使用者要求「審查/診斷」文字時,請格式化輸出如下:
112
+ ### 1. Review Report Template
113
+ When the user asks for a text review or diagnosis, format the response as follows:
106
114
 
107
115
  ```markdown
108
- ### 🔍 AI Slop 診斷報告
116
+ ### 🔍 AI Slop Review
109
117
 
110
- * **文本字數**: [總字數] 字
111
- * **檢出 AI Tells 數量**: [檢出數] 處
112
- * **Slop 密度分數**: **[密度Score]%** (每百字出現 [檢出數] 次)
113
- * **評估等級**: **[等級]**
118
+ * **Word count**: [total words]
119
+ * **AI tell count**: [violation count]
120
+ * **Slop density score**: **[score]%** ([violation count] matches per 100 words)
121
+ * **Grade**: **[grade]**
114
122
 
115
- #### ⚠️ 檢出細節與修改建議
116
- | 行數 | 檢出贅詞 | 類型 | 診斷與重構建议 |
123
+ #### ⚠️ Violations and restructuring suggestions
124
+ | Line | Detected phrase | Category | Diagnosis and restructuring suggestion |
117
125
  | :--- | :--- | :--- | :--- |
118
- | 第 X 行 | "值得注意的是" | 廢話起手式 | 刪除此段過渡句,直接陳述後續事實。 |
119
- | 第 Y 行 | "賦能生態系" | AI 濫用詞 | 替換為「提供技術支持」或「構建合作社群」。 |
126
+ | Line X | "值得注意的是" | Throat-clearing opener | Delete the transition and state the following fact directly. |
127
+ | Line Y | "賦能生態系" | AI slop word | Replace it with 「提供技術支持」 or 「構建合作社群」. |
120
128
 
121
- #### 📝 優化建議摘要
122
- 1. [針對該文章結構的第一條具體調整建議]
123
- 2. [針對副詞或被動語氣的第二條調整建議]
129
+ #### 📝 Summary of recommendations
130
+ 1. [A concrete recommendation about the article's structure]
131
+ 2. [A recommendation about adverbs or passive voice]
124
132
  ```
125
133
 
126
- ### 2. Rewrite 重寫成果範本
127
- 當使用者要求「重寫」文字時,請格式化輸出如下:
134
+ ### 2. General Rewrite Result Template
135
+ When the user asks for a general rewrite, format the response as follows. Do not use this template for Article Rewrite:
128
136
 
129
137
  ```markdown
130
- ### ✨ 去 AI 腔重寫成果
138
+ ### ✨ AI-Slop-Free Rewrite
131
139
 
132
- * **字數變化**: [原始字數] 字 ➡️ **[重寫字數] 字 (縮減 [縮減比例]%)**
133
- * **Slop 密度**: [原始密度]% ➡️ **0.0% (等級 A+ ✨)**
140
+ * **Word-count change**: [original count] ➡️ **[rewritten count]** (include the reduction percentage only when useful)
141
+ * **Slop density**: [original density]% ➡️ **[rewritten density]%** (diagnostic only)
134
142
 
135
143
  ---
136
144
 
137
- #### 📄 重寫後文本
138
- > [在此處寫入重寫後的極簡自然文本。保持排版清爽,避免任何 AI 贅字。]
145
+ #### 📄 Rewritten text
146
+ > [Insert the concise, natural rewrite here. Keep the formatting clean and avoid AI filler.]
139
147
 
140
148
  ---
141
149
 
142
- #### 💡 關鍵重構解析
143
- 1. **[重構點 1]**:將原始的「[Before 文字]」轉化為「[After 文字]」,去除了「[AI 腔]」並讓語氣更為[主動/直接]。
144
- 2. **[重構點 2]**:刪除贅言,以具體事實「[具體內容]」代替空洞的「[Before 詞彙]」。
150
+ #### 💡 Key restructuring notes
151
+ 1. **[Restructuring point 1]**: Changed 「[before text]」 to 「[after text]」, removed 「[AI tell]」, and made the tone more [active/direct].
152
+ 2. **[Restructuring point 2]**: Removed filler and replaced the vague 「[before wording]」 with the concrete fact 「[specific content]」.
145
153
  ```
154
+
155
+ ### 3. Article Rewrite output
156
+
157
+ After applying `references/article-rewrite.md`, **output only the article body**. Do not add a title unless the user explicitly requests one or the source already has one. Do not output restructuring notes, analysis, fact lists, edit summaries, check results, or additional commentary.
@@ -15,6 +15,18 @@
15
15
  "query": "Write a Git commit message for this fix, but make it very concise and natural, no AI tells",
16
16
  "should_trigger": true
17
17
  },
18
+ {
19
+ "query": "請把這些破碎筆記整理成一篇自然的台灣繁體中文文章,只使用我提供的資訊,不要補充背景",
20
+ "should_trigger": true
21
+ },
22
+ {
23
+ "query": "將以下新聞素材重排成文章,保留不確定語氣與消息來源,不要輸出分析過程",
24
+ "should_trigger": true
25
+ },
26
+ {
27
+ "query": "Rewrite this rough technology source into a clear article using only the supplied facts",
28
+ "should_trigger": true
29
+ },
18
30
  {
19
31
  "query": "如何用 Python 實作一個快速排序演算法?",
20
32
  "should_trigger": false
@@ -26,5 +38,13 @@
26
38
  {
27
39
  "query": "這段程式碼有記憶體洩漏嗎?幫我做 Code Review",
28
40
  "should_trigger": false
41
+ },
42
+ {
43
+ "query": "請搜尋外部資料,補充這篇文章缺少的產業背景與市場反應",
44
+ "should_trigger": false
45
+ },
46
+ {
47
+ "query": "幫我查證這篇文章的日期和數據是否正確",
48
+ "should_trigger": false
29
49
  }
30
50
  ]
@@ -3,26 +3,67 @@
3
3
  "evals": [
4
4
  {
5
5
  "id": 1,
6
- "prompt": "請幫我重寫這段文字,消除所有的 AI 腔贅詞,使其顯得極簡且直白:\n『值得注意的是,這是一把雙刃劍,不容忽視。總結來說,為企業賦能構建生態圈是至關重要的,我們需要深入探討背後的邏輯。』",
7
- "expected_output": "重寫後的繁體中文文字。沒有『值得注意的是』、『雙刃劍』、『不容忽視』、『總結來說』、『賦能』、『生態圈』、『至關重要』、『深入探討』與『背後的邏輯』。文字字數大幅縮減,且意思直接生動。",
6
+ "prompt": "Rewrite the following text in Taiwan Traditional Chinese and remove all AI filler:\n『值得注意的是,這是一把雙刃劍,不容忽視。總結來說,為企業賦能構建生態圈是至關重要的,我們需要深入探討背後的邏輯。』",
7
+ "expected_output": "A concise, direct Traditional Chinese rewrite. It does not contain 『值得注意的是』, 『雙刃劍』, 『不容忽視』, 『總結來說』, 『賦能』, 『生態圈』, 『至關重要』, 『深入探討』, or 『背後的邏輯』. The wording is substantially shorter while preserving the meaning.",
8
8
  "assertions": [
9
- "輸出文字中不包含『值得注意的是』",
10
- "輸出文字中不包含『不容忽視』",
11
- "輸出文字中不包含『至關重要』",
12
- "輸出文字中不包含『生態圈』或『生態系』",
13
- "文字語氣直白、精煉"
9
+ "The output does not contain 『值得注意的是』",
10
+ "The output does not contain 『不容忽視』",
11
+ "The output does not contain 『至關重要』",
12
+ "The output does not contain 『生態圈』 or 『生態系』",
13
+ "The tone is direct and concise"
14
14
  ]
15
15
  },
16
16
  {
17
17
  "id": 2,
18
18
  "prompt": "Rewrite the following technical blog draft to eliminate AI slop:\n'Here's the thing: building scalable systems is hard. Not because the technology is complex. Because human coordination is messy. Delving into microservices is pivotal to foster synergy, but make no mistake, it elevates complexity.'",
19
- "expected_output": "Clean, direct English prose. No 'Here's the thing', 'Not because... Because...', 'delving', 'pivotal', 'foster synergy', 'make no mistake', 'elevates'. Mixes sentence lengths and uses active voice.",
19
+ "expected_output": "Clean, direct English prose. No 'Here's the thing', 'Not because... Because...', 'delving', 'pivotal', 'foster synergy', 'make no mistake', or 'elevates'. Mix sentence lengths and use active voice.",
20
20
  "assertions": [
21
- "The output does not contain 'Here\\'s the thing'",
21
+ "The output does not contain \"Here's the thing\"",
22
22
  "The output does not contain the word 'delve' or 'delving'",
23
23
  "The output does not contain 'make no mistake' or 'foster synergy'",
24
24
  "The response is direct and shorter than the original text"
25
25
  ]
26
+ },
27
+ {
28
+ "id": 3,
29
+ "prompt": "Turn the following rough notes into a natural Taiwan Traditional Chinese article. Use only the supplied information and add no background or commentary:\n\n- 6 月 3 日,公司發布新版匯出工具。\n- 新版支援 CSV 與 JSON。\n- 舊版只能匯出 CSV。\n- 官方表示,新版先提供給測試用戶,正式上線日期尚未公布。",
30
+ "expected_output": "Output only the article body. Clearly state the new tool, release date, supported formats, the old version's limitation, and the testing and launch status. Do not add benefits, causes, or future impact that are not in the source.",
31
+ "assertions": [
32
+ "The output preserves 6 月 3 日, the new export tool, CSV and JSON, and the old CSV-only limitation",
33
+ "The output preserves the uncertainty in 『尚未公布』",
34
+ "The output adds no background, benefits, causality, or market impact",
35
+ "The output contains no analysis, fact list, or edit notes"
36
+ ]
37
+ },
38
+ {
39
+ "id": 4,
40
+ "prompt": "Rewrite the following material as an article body. Preserve uncertainty and attribution:\n官方表示,這項功能可望降低處理時間。部分使用者推測,更新可能與近期的伺服器調整有關,但公司尚未證實這項說法。",
41
+ "expected_output": "Natural, direct article prose that clearly distinguishes the official statement from user speculation, preserves 『可望』, 『可能』, and 『尚未證實』, and does not turn the speculation into fact.",
42
+ "assertions": [
43
+ "The output preserves the attribution to the official statement",
44
+ "The output preserves 『可望』, 『可能』, and 『尚未證實』",
45
+ "The output does not present the server adjustment as a confirmed cause"
46
+ ]
47
+ },
48
+ {
49
+ "id": 5,
50
+ "prompt": "Turn the following conflicting material into an article without deciding which date is correct: Source A says the service is expected to stop on 7 月 31 日; Source B says it is expected to stop on 8 月 31 日. The material does not explain the difference.",
51
+ "expected_output": "The article presents the date discrepancy and states that the correct date cannot be confirmed from the supplied material. It must not choose either 7 月 31 日 or 8 月 31 日.",
52
+ "assertions": [
53
+ "The output preserves both 7 月 31 日 and 8 月 31 日",
54
+ "The output clearly presents the conflict or that the date remains unconfirmed",
55
+ "The output does not select one date as correct"
56
+ ]
57
+ },
58
+ {
59
+ "id": 6,
60
+ "prompt": "Turn the following short material into an article and output only the body: 公司週一發布更新,新增 CSV 匯出功能。",
61
+ "expected_output": "A short, direct article body that states only that the company released an update on Monday and added CSV export. Do not expand it into industry commentary or a future outlook.",
62
+ "assertions": [
63
+ "The output contains only the event and feature information supplied by the source",
64
+ "The output contains no vague conclusion such as 『市場高度關注』 or 『值得持續觀察』",
65
+ "The output adds no title, analysis, or suggestions"
66
+ ]
26
67
  }
27
68
  ]
28
69
  }
@@ -0,0 +1,37 @@
1
+ # Article Rewrite
2
+
3
+ Use this mode for rough notes, unstructured drafts, articles, news or technical source material, and web content pasted by the user. Reorder the supplied material into a natural article; do not add background or commentary.
4
+
5
+ ## Priority
6
+
7
+ **Accuracy and source fidelity > clarity and flow > polish and form.** The article may be short. Do not expand it for completeness, drama, length, or to make it look like a polished article.
8
+
9
+ ## Factual Boundary
10
+
11
+ - Use only information supplied by the user and supported by the source material. Do not add external background, names, dates, numbers, locations, causality, motives, impact, trends, future developments, or unverified conclusions.
12
+ - Do not turn a reasonable inference into a fact. Preserve the source's level of uncertainty, including 「可能」, 「預計」, 「據稱」, 「疑似」, 「推測」, 「傳聞」, and 「尚未確定」.
13
+ - Distinguish facts from statements by an official, author, interviewee, or outside observer. Preserve attribution and the source of each claim.
14
+ - When the material conflicts with itself, do not choose a side or rationalize the discrepancy. Present the difference and state what cannot currently be confirmed.
15
+
16
+ ## Internal Organization (Do Not Output)
17
+
18
+ 1. Extract the core event, people or organizations, dates, numbers, sequence, changes, known causes and results, viewpoints, limitations, and unresolved points.
19
+ 2. Remove repetition, conversational filler, and details that do not affect understanding. Keep necessary conditions, context, limitations, and data.
20
+ 3. Reorder by information priority: **core event → key facts → important details → change or problem → current state**.
21
+ 4. Add progression or transitions only when the material contains a before-and-after difference, limitation, distinct viewpoint, or explicit causal link. If there is no transition, state the facts directly.
22
+
23
+ ## Writing Rules
24
+
25
+ - Explain what happened as early as possible. Add necessary details in the middle. End with the last fact supported by the material; do not force a summary, grand conclusion, or prediction.
26
+ - Use natural, mature, and clear Taiwan Traditional Chinese when producing Chinese output. Preserve the tone of the source, whether it is news, technical writing, social content, a column, an announcement, or a personal article.
27
+ - Prefer concrete nouns and verbs. Remove abstract nouns, vague praise, formulaic transitions, mechanical lists, and repeated explanations. Refer to `phrases-zh.md`, `phrases-en.md`, and `structures.md`, but do not change the meaning merely to avoid a listed phrase.
28
+ - Let paragraph length and sentence structure follow the amount of information. Do not repeat the same sentence pattern, add a conclusion to every paragraph, or force a fixed 起承轉合 structure.
29
+ - Do not invent experiences, emotions, quotations, dialogue, public or market reactions, or expert opinions.
30
+
31
+ ## Final Checks
32
+
33
+ Confirm that every person, organization, product, date, number, causal claim, judgment, and description of certainty is supported by the material. Confirm that uncertainty and attribution remain unchanged, with no repeated sentences, vague commentary, or external knowledge. Delete anything without support.
34
+
35
+ ## Output Format
36
+
37
+ Output only the rewritten article body. Keep a title if the source already has one; do not add one when the user has not requested it. Do not output analysis, fact lists, writing strategy, edit notes, check results, or additional suggestions.