Skip to content

Commit 06bca63

Browse files
fix(skill): add validation checkpoint
Shorten classification and add a concrete validation checkpoint while preserving full eval lift.
1 parent 2251691 commit 06bca63

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

skills/java-optionals/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ Open [references/optional-examples.md](references/optional-examples.md) for work
1313

1414
## Core Workflow
1515

16-
1. Classify the boundary first: fallback, error, side effect, boolean check, collection lookup,
17-
checked IO/prompt, or nullable API. Ordinary value flow should start with an Optional terminal,
18-
not `isPresent()`.
16+
1. Classify the boundary first. For ordinary value flow, use an Optional terminal instead of
17+
`isPresent()`.
1918
2. Use the Optional API that matches the intent: `map`, `flatMap`, `filter`, `or`, `orElse` for
2019
cheap values, `orElseGet` for lazy fallback work, `orElseThrow` for true absence errors, and
2120
`ifPresent` or `ifPresentOrElse` for side effects.
@@ -49,8 +48,9 @@ Open [references/optional-examples.md](references/optional-examples.md) for work
4948
chosen values in target Optional fields inside that lambda.
5049
7. Special boundaries: use a plain branch for checked IO/prompts; keep `orElse(null)` only at
5150
null-based API boundaries; return an explicit decision for review-only tasks.
52-
8. Verify manually and with tests: same return values, exceptions, prompts, side effects, lazy
53-
fallback timing, generated output, branch order, and sibling Optional smells.
51+
8. Verify with relevant tests or a traced example for each changed branch: same return values,
52+
exceptions, prompts, side effects, laziness, generated output, and branch order; scan sibling code
53+
for the same Optional smell.
5454

5555
## References
5656

0 commit comments

Comments
 (0)