@yuaone/core 0.9.0 → 0.9.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/dist/agent-loop.js +1 -1
- package/dist/agent-loop.js.map +1 -1
- package/dist/system-prompt.js +7 -1
- package/dist/system-prompt.js.map +1 -1
- package/package.json +2 -2
- package/dist/skills/skills/code-review.md +0 -58
- package/dist/skills/skills/debug.md +0 -45
- package/dist/skills/skills/languages/python.md +0 -89
- package/dist/skills/skills/languages/react.md +0 -86
- package/dist/skills/skills/languages/typescript.md +0 -110
- package/dist/skills/skills/plan.md +0 -49
- package/dist/skills/skills/refactor.md +0 -46
- package/dist/skills/skills/security-scan.md +0 -59
- package/dist/skills/skills/test-driven.md +0 -51
- /package/dist/skills/{skills/languages → languages}/bash.md +0 -0
- /package/dist/skills/{skills/languages → languages}/c.md +0 -0
- /package/dist/skills/{skills/languages → languages}/cpp.md +0 -0
- /package/dist/skills/{skills/languages → languages}/csharp.md +0 -0
- /package/dist/skills/{skills/languages → languages}/cuda.md +0 -0
- /package/dist/skills/{skills/languages → languages}/dart.md +0 -0
- /package/dist/skills/{skills/languages → languages}/docker.md +0 -0
- /package/dist/skills/{skills/languages → languages}/elixir.md +0 -0
- /package/dist/skills/{skills/languages → languages}/gdscript.md +0 -0
- /package/dist/skills/{skills/languages → languages}/go.md +0 -0
- /package/dist/skills/{skills/languages → languages}/haskell.md +0 -0
- /package/dist/skills/{skills/languages → languages}/java.md +0 -0
- /package/dist/skills/{skills/languages → languages}/javascript.md +0 -0
- /package/dist/skills/{skills/languages → languages}/kotlin.md +0 -0
- /package/dist/skills/{skills/languages → languages}/lua.md +0 -0
- /package/dist/skills/{skills/languages → languages}/php.md +0 -0
- /package/dist/skills/{skills/languages → languages}/r.md +0 -0
- /package/dist/skills/{skills/languages → languages}/ruby.md +0 -0
- /package/dist/skills/{skills/languages → languages}/rust.md +0 -0
- /package/dist/skills/{skills/languages → languages}/solidity.md +0 -0
- /package/dist/skills/{skills/languages → languages}/sql.md +0 -0
- /package/dist/skills/{skills/languages → languages}/svelte.md +0 -0
- /package/dist/skills/{skills/languages → languages}/swift.md +0 -0
- /package/dist/skills/{skills/languages → languages}/terraform.md +0 -0
- /package/dist/skills/{skills/languages → languages}/verilog.md +0 -0
- /package/dist/skills/{skills/languages → languages}/vue.md +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
## Identity
|
|
2
|
-
- domain: general
|
|
3
|
-
- type: test
|
|
4
|
-
- confidence: 0.85
|
|
5
|
-
|
|
6
|
-
# Test-Driven — Red, Green, Refactor
|
|
7
|
-
|
|
8
|
-
Write the failing test before writing any implementation. The test defines what "done" means.
|
|
9
|
-
|
|
10
|
-
## Workflow
|
|
11
|
-
1. **Red** — Write the test. Run it. It MUST fail. If it passes, the test is wrong.
|
|
12
|
-
2. **Green** — Write the minimal code to make it pass. No extras.
|
|
13
|
-
3. **Refactor** — Clean up without changing behavior. Tests must still pass.
|
|
14
|
-
4. **Commit** — One test + implementation at a time.
|
|
15
|
-
|
|
16
|
-
## Rules
|
|
17
|
-
- Test behavior, not implementation. Test what it does, not how.
|
|
18
|
-
- One assertion focus per test. Multiple assertions are fine if they all test the same thing.
|
|
19
|
-
- Use real inputs and expected outputs — no magic numbers without explanation.
|
|
20
|
-
- If you need a mock, you probably need to redesign the interface.
|
|
21
|
-
|
|
22
|
-
## Known Error Patterns
|
|
23
|
-
|
|
24
|
-
### Test Passes Without Implementation
|
|
25
|
-
- **Symptom**: Wrote test, it passed immediately before any implementation
|
|
26
|
-
- **Cause**: Test is testing the wrong thing, or the feature already exists
|
|
27
|
-
- **Strategy**: 1. Read the test assertion carefully 2. Verify the thing being tested does not already exist 3. Make the assertion stricter until it fails
|
|
28
|
-
- **Tool sequence**: file_read (test) → shell_exec (run test) → fix assertion
|
|
29
|
-
- **Pitfall**: Do NOT skip the "verify red" step. A test that never fails is worthless.
|
|
30
|
-
|
|
31
|
-
### Test Too Tightly Coupled to Implementation
|
|
32
|
-
- **Symptom**: Refactoring breaks tests even though behavior is unchanged
|
|
33
|
-
- **Cause**: Test asserts internal state, method call counts, or private methods
|
|
34
|
-
- **Strategy**: Rewrite test to assert observable outputs and side effects only
|
|
35
|
-
- **Tool sequence**: file_read (test) → file_edit (test only) → shell_exec
|
|
36
|
-
- **Pitfall**: Do NOT test private methods directly.
|
|
37
|
-
|
|
38
|
-
### All Tests Pass But Feature Is Incomplete
|
|
39
|
-
- **Symptom**: Tests pass but edge cases are missing
|
|
40
|
-
- **Cause**: Tests only cover the happy path
|
|
41
|
-
- **Strategy**: 1. Identify edge cases: null/empty, boundary values, error conditions 2. Write one test per edge case 3. Implement
|
|
42
|
-
- **Tool sequence**: file_read (implementation) → file_edit (add tests) → shell_exec
|
|
43
|
-
- **Pitfall**: Do NOT consider a feature done with only happy-path tests.
|
|
44
|
-
|
|
45
|
-
## Validation Checklist
|
|
46
|
-
- [ ] Test written BEFORE implementation
|
|
47
|
-
- [ ] Test runs RED before implementation
|
|
48
|
-
- [ ] Test runs GREEN after implementation
|
|
49
|
-
- [ ] Edge cases covered (null, empty, boundary, error)
|
|
50
|
-
- [ ] No implementation details asserted
|
|
51
|
-
- [ ] Full test suite passes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|