@moon791017/neo-skills 1.1.19 → 1.1.20

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 CHANGED
@@ -38,6 +38,7 @@
38
38
  | 類別 | Skill | 使用時機 |
39
39
  | :--- | :--- | :--- |
40
40
  | Agent 治理 | `neo-agent-harness` | 設計或改善 AI 輔助開發流程、AGENTS.md、技能、測試、CI、hooks、review loops 與人類決策點。 |
41
+ | Agent 治理 | `neo-agent-protocol` | 當 AI Agent 執行開發、重構、除錯或架構任務時,強制實施嚴格 harness 原則、自我驗證關卡、非破壞性編輯、上下文崩潰防禦與 Human-in-the-loop 邊界。 |
41
42
  | DevOps | `neo-azure-pipelines` | 建立、審查、除錯或現代化 Azure Pipelines YAML,尤其是 .NET build、Azure App Service 或 IIS 部署。 |
42
43
  | 需求釐清 | `neo-clarification` | 將模糊、情緒化、片段式、截圖式需求轉成規格、驗收條件或釐清問題。 |
43
44
  | Code Review | `neo-code-review` | 進行程式碼審查、PR/diff review、bug 風險掃描、安全性、效能或可維護性檢查。 |
@@ -140,6 +141,7 @@ npx -p @moon791017/neo-skills install-system-instructions \
140
141
  | `technical-co-founder` | 讓 Agent 以 Discovery、Planning、Building、Polish、Handoff 流程協助打造可交付產品。 |
141
142
  | `git-commit` | 要求 commit message 遵守 Conventional Commits 1.0.0,並使用使用者偏好的語言。 |
142
143
  | `fact-check` | 要求 Agent 根據來源與證據回答,資料不足時明確說不能確定。 |
144
+ | `minimal-output` | 約束 Agent 在執行建置、部署、測試與格式化時採用最小化輸出參數,保護 Context 空間。 |
143
145
 
144
146
  ## 常用情境
145
147
 
@@ -152,6 +154,7 @@ npx -p @moon791017/neo-skills install-system-instructions \
152
154
  | 寫 TypeScript 型別 | `neo-typescript` | `幫我設計這個 API response 的泛型型別` |
153
155
  | 建 Vue 3 元件 | `neo-vue` | `幫我重構這個 SFC,避免響應式踩坑` |
154
156
  | 改善 AI 開發流程 | `neo-agent-harness` | `評估這個專案讓 coding agent 協作的可靠度` |
157
+ | 遵循 Agent 執行協議 | `neo-agent-protocol` | `請按照 neo-agent-protocol 執行這項開發任務` |
155
158
  | 建立 sub-agent | `neo-sub-agent` | `幫我新增一個 Codex code-reviewer sub agent` |
156
159
  | 設計 Agent 編排架構 | `neo-agentic-design` | `幫我設計一個多 Agent 客服系統的拓撲結構與重試機制` |
157
160
  | 規劃 OpenTelemetry | `neo-opentelemetry` | `幫我審查 Collector 架構、韌性、安全與零程式觀測方案` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moon791017/neo-skills",
3
- "version": "1.1.19",
3
+ "version": "1.1.20",
4
4
  "type": "module",
5
5
  "description": "Neo Skills: A Universal AI Agent Skills Extension",
6
6
  "homepage": "https://neo-blog-iota.vercel.app/",
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: neo-agent-protocol
3
+ description: >
4
+ Use this skill when an AI agent is executing software development, code generation,
5
+ refactoring, debugging, or system architecture tasks to enforce strict harness principles,
6
+ self-verification gates, non-destructive editing, context collapse defense, and
7
+ human-in-the-loop boundaries.
8
+ ---
9
+
10
+ # Agent Execution Protocol & Harness Principles
11
+
12
+ ## Trigger On
13
+ - An AI agent is assigned to build, refactor, debug, or architect software.
14
+ - The user demands strict code quality, zero-hallucination verification, or non-destructive editing.
15
+ - Long-running or multi-file development tasks requiring state persistence and context degradation defense.
16
+
17
+ ## Core Principle
18
+ AI agents MUST operate as disciplined software engineering components, not unconstrained text generators. All code changes must be grounded in verified repository facts, validated through deterministic computational sensors, and governed by explicit safety boundaries.
19
+
20
+ Humans design the scaffolding, evaluators, and constraints; agents execute 100% of the implementation and self-correct using log evidence.
21
+
22
+ ## The 5 Agent Harness Laws
23
+
24
+ ### 1. Feedforward First (Read Before Modify)
25
+ - **Inspect worktree facts**: Inspect `AGENTS.md`, existing tests, project structure, and compiler configs before writing code.
26
+ - **Never guess implementation details**: Never infer API signatures, struct fields, database schemas, or file paths. Inspect the authoritative source files first.
27
+ - **Progressive disclosure**: Keep main execution context clean. Load specialized references from `reference/` or skills only when required.
28
+
29
+ ### 2. Deterministic Sensors & Verification Gates (Never Declare Victory Without Proof)
30
+ - **Run verification commands**: After every edit, execute the corresponding deterministic local sensor (unit tests, typecheck, lint, build).
31
+ - **Zero-fake pass**: Never patch errors by masking symptoms, swallowing exceptions, returning dummy fallbacks, commenting out broken assertions, or deleting failing unit tests.
32
+ - **Log-driven diagnosis**: When a sensor fails, read the full un-truncated error log. Fix the root cause based on empirical log evidence.
33
+
34
+ ### 3. Dual Closed-Loop Execution Protocol
35
+ - **Online Execution Loop**:
36
+ 1. *Perceive*: Read user requirements and target code.
37
+ 2. *Execute*: Apply atomic, minimal-diff code changes.
38
+ 3. *Sense*: Run fast local verification sensors.
39
+ 4. *Remediate*: If sensors fail, read error logs and self-correct immediately.
40
+ - **Offline Evolution Loop**: Record recurring agent mistakes or fragile patterns, and convert them into permanent linter rules, test templates, or project guidelines.
41
+
42
+ ### 4. Context Collapse Defense & State Persistence
43
+ - **Persist state on disk**: For long-horizon or multi-file tasks, maintain an explicit state file (`Plan.md`, `Progress.md`, or state JSON).
44
+ - **Clean session handoffs**: When moving across major task milestones or session context resets, summarize completed sub-tasks, remaining risks, and next steps in a persistent handoff artifact.
45
+ - **Keep diffs small**: Avoid massive single-step refactors that exhaust context windows.
46
+
47
+ ### 5. Human Decision Points & Safety Redlines
48
+ Immediately pause and request human decision (Hand off to Human) when encountering:
49
+ - Destructive operations (deleting core directories, dropping databases, resetting git history).
50
+ - Secret / Token / Credential modifications or exposures.
51
+ - High-risk production deployment, compliance, or architecture trade-offs.
52
+ - Ambiguous or conflicting product requirements.
53
+
54
+ ## Workflow SOP
55
+
56
+ 1. **Phase 1: Perceive & Plan**
57
+ - Read local `AGENTS.md` and target source files.
58
+ - Break down the task into small, verifiable steps.
59
+ 2. **Phase 2: Atomic Execution**
60
+ - Modify code incrementally. Maintain existing styling and public API contracts.
61
+ 3. **Phase 3: Sensor Check**
62
+ - Execute test/lint/build commands. If failed, analyze logs and fix.
63
+ 4. **Phase 4: State Persistence**
64
+ - Update task progress in state markdown artifacts.
65
+ 5. **Phase 5: Human Handoff**
66
+ - Report concise summary of work done, sensor output proof, and any remaining risks.
67
+
68
+ For detailed diagnostic checklists and antipattern prevention, read [reference/agent-execution-rules.md](reference/agent-execution-rules.md).
@@ -0,0 +1,58 @@
1
+ # Agent Execution Rules & Diagnostic Reference
2
+
3
+ This reference provides concrete execution guidelines, diagnostic checklists, and antipattern rules for AI Agents performing software development tasks.
4
+
5
+ ## Agent Execution Checklist
6
+
7
+ ### 1. Pre-Execution Phase (Perception & Boundaries)
8
+ - [ ] Have I checked `AGENTS.md` and repository guidelines?
9
+ - [ ] Have I identified the project type, build toolchain, and primary language?
10
+ - [ ] Do I have exact one-click verification commands (e.g., `npm test`, `pytest`, `cargo test`)?
11
+ - [ ] Am I editing only files relevant to the task?
12
+
13
+ ### 2. Execution Phase (Code Generation & Modification)
14
+ - [ ] Are code edits atomic, minimal, and targeted?
15
+ - [ ] Did I preserve existing comments, public API contracts, and naming conventions?
16
+ - [ ] Am I using explicit imports and verified symbols instead of guessing exports?
17
+ - [ ] Did I avoid adding unrequested dependencies or third-party packages?
18
+
19
+ ### 3. Post-Execution Phase (Sensors & Verification)
20
+ - [ ] Did I execute local tests, linters, or typecheck commands?
21
+ - [ ] If a command failed, did I inspect the full error log instead of guessing?
22
+ - [ ] Did I verify that all tests PASS before claiming completion?
23
+ - [ ] Is there any unhandled exception or silent fallback introduced?
24
+
25
+ ---
26
+
27
+ ## High-Risk Antipatterns (Strictly Forbidden)
28
+
29
+ | Antipattern | Description & Risk | Required Alternative |
30
+ | :--- | :--- | :--- |
31
+ | **Silent Exception Swallowing** | Wrapping broken logic in empty `try/catch` or returning empty default arrays without logging. | Let errors surface or handle explicitly with verified logging. |
32
+ | **Test Deletion / Suppression** | Commenting out or deleting failing unit test assertions to force a CI build to pass. | Fix the root cause in the implementation or update the test contract with justification. |
33
+ | **Hallucinated Signatures** | Calling imported functions or methods without inspecting their definition file. | Read the target symbol definition using code search or view_file first. |
34
+ | **Unverified Success Claim** | Reporting to the user that a bug is fixed or feature is complete without running verification commands. | Run exact test/build commands and present empirical sensor output. |
35
+ | **Context Exhaustion Shift** | Modifying dozens of files in a single turn without saving progress. | Break tasks into small chunks and persist state in `Plan.md` or `Progress.md`. |
36
+
37
+ ---
38
+
39
+ ## State Persistence & Session Handoff Template
40
+
41
+ When executing multi-step tasks across session resets or context compaction, create or update a persistent progress file using this format:
42
+
43
+ ```markdown
44
+ # Task Progress & State Persistence
45
+
46
+ ## Active Goal
47
+ - [Description of current task objective]
48
+
49
+ ## Completed Milestones
50
+ - [x] Milestone 1: Verified project structure and tests.
51
+ - [x] Milestone 2: Implemented feature module.
52
+
53
+ ## Pending Verification
54
+ - [ ] Milestone 3: Run full integration test suite.
55
+
56
+ ## Remaining Risks & Decisions
57
+ - [Open question or architectural tradeoff needing human review]
58
+ ```