@solaqua/ghosts 0.4.34 → 0.4.36

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/common/AGENTS.md CHANGED
@@ -1,8 +1,7 @@
1
- ## Avoid unnecessary complexity
1
+ ## Rules
2
2
 
3
3
  - AI-generated work tends to overcomplicate simple problems and overfill documents and interfaces. Keep the solution proportionate to the actual need; question added abstractions, tests, structure, explanations, and controls that do not help the intended audience understand, decide, or act.
4
4
  - Simplify when it reduces the audience's total reading, reasoning, or interaction burden. Brevity alone is not the goal: preserve necessary behavior, context, navigation, accessibility, and meaningful risk coverage, and do not force cleanup when no useful improvement is evident.
5
-
6
- ## Obsidian CLI
7
-
5
+ - In Korean, Chinese, and other text without spaces between words, avoid placing a closing `**` directly between punctuation and a following letter, since Markdown renderers may leave the emphasis markers visible. For example, prefer `**"중요"한 내용**` over `**"중요"**한 내용`.
6
+ - Include the attached particle, ending, or surrounding phrase in the bold span when needed. Preserve natural spacing; do not insert unnatural spaces or invisible characters just to make bold render.
8
7
  - If the obsidian CLI is unavailable, start the Obsidian desktop app first and retry.
@@ -73,7 +73,11 @@ python3 experience/skills/harvest/scripts/experience.py validate /path/to/vault/
73
73
  ```
74
74
 
75
75
  ### 3. Recall (Consult Prior Experience)
76
- Read-only skill, selected automatically during relevant engineering or document work:
76
+ Read-only skill intended to trigger before substantive implementation, refactoring,
77
+ test writing, code review, or document drafting and revision, even when the
78
+ approach seems straightforward, and when the user refers to previous feedback:
79
+
80
+ - Checks the relevant index without requiring an unresolved decision. Skips mechanical edits and reuses guidance already checked in the current task.
77
81
  - Opens its bundled `library/INDEX.md` → work-domain index → relevant document. A presentation task does not read engineering topics; domains without curated guidance return no match.
78
82
  - Injects only relevant constraints into context without loading the entire library.
79
83
  - Proceeds without recall when the library is unavailable or no topic matches.
@@ -33,9 +33,17 @@ Check these cases when evaluating future extraction runs:
33
33
  - Contrary choices qualify or defer an interpretation.
34
34
  - Naming and placement corrections are compared before being dismissed as cosmetic.
35
35
 
36
- For recall, a matching question should open only the relevant document; a near
37
- miss should open none. Keep the original evidence in candidates and the reusable
38
- criterion, conditions and examples in the library.
36
+ Evaluate recall selection with ordinary task requests that do not name the skill:
37
+
38
+ - A substantive implementation, refactoring, test-writing, code-review, or document task should trigger an index check even when the approach seems straightforward.
39
+ - A version-only bump or exact replacement specified by the user should skip recall.
40
+ - A matching topic should open only the relevant knowledge document; a near miss should stop at the indexes without opening knowledge documents.
41
+ - Repeating the same decision within a task should reuse guidance; a material scope or context change should prompt another check.
42
+ - A reference to previous feedback should trigger recall.
43
+
44
+ These are evaluation cases, not evidence that automatic selection has been
45
+ verified. Keep the original evidence in candidates and the reusable criterion,
46
+ conditions and examples in the library.
39
47
 
40
48
  ## Limits
41
49
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ghosts:recall
3
- description: Use when a concrete choice remains open after checking the user's instructions and nearby examples, or when the user refers to previous feedback. Skip mechanical changes and decisions already checked in the current task.
3
+ description: Consult prior user feedback before substantive code implementation, refactoring, test writing, code review, or document drafting and revision, and whenever the user refers to previous feedback. Check the relevant library index even when the approach seems straightforward. Skip mechanical edits and decisions already checked in the current task.
4
4
  ---
5
5
 
6
6
  # Recall
@@ -8,11 +8,11 @@ description: Use when a concrete choice remains open after checking the user's i
8
8
  Find the smallest set of verified knowledge relevant to the current task.
9
9
  This skill is strictly read-only; do not read unverified Obsidian candidates as behavioral rules.
10
10
 
11
- ## 1. Identify the needed decision
11
+ ## 1. Identify the task context
12
12
 
13
- - From the current task, identify the work domain, project or artifact, and unresolved decision before searching the library.
14
- - Form a question such as "Should these return values be named?" or "Does this new behavior belong in the existing module?" A broad label like implementation, review or testing is insufficient.
15
- - If the task context is unclear, inspect the relevant code, document or presentation first. Do not browse knowledge documents to invent a need for them.
13
+ - Before substantive work, identify the work domain, project or artifact, and intended change or review scope. Inspect the relevant code, document or presentation first if that context is unclear.
14
+ - Check the relevant library index even if the approach seems obvious or nearby examples appear sufficient; an unresolved decision is not required.
15
+ - Skip purely mechanical edits, such as a version-only bump or an exact replacement specified by the user. Reuse guidance already checked in the current task unless the scope or context materially changes.
16
16
 
17
17
  ## 2. Locate the library
18
18
 
@@ -22,7 +22,8 @@ This skill is strictly read-only; do not read unverified Obsidian candidates as
22
22
 
23
23
  ## 3. Match the situation before opening documents
24
24
 
25
- - Read root `INDEX.md` to choose the work domain. Open only its matching index (such as `engineering/INDEX.md`), then match the specific decision to a topic. A document or presentation task must not load engineering guidance merely because it is available.
25
+ - Read root `INDEX.md` to choose the work domain. Open only its matching index (such as `engineering/INDEX.md`), then match its topic conditions against the actual task. A document or presentation task must not load engineering guidance merely because it is available.
26
+ - For each matching topic, identify the concrete question its document would answer, such as "Should these return values be named?" or "Does this new behavior belong in the existing module?" A broad label like implementation, review or testing is insufficient to open a knowledge document.
26
27
  - Follow further subindexes only when they match the situation, then read the smallest set of matching documents. Each opened file must answer an identified question.
27
28
  - Do not open documents merely to determine whether they are relevant. If index conditions do not match, stop; a targeted filename/index search is appropriate only for a specific unanswered question the index failed to route.
28
29
  - Stop once the decision has enough guidance; do not follow neighboring topics or evidence links out of curiosity.
@@ -7,7 +7,7 @@ Open a document only when its decision matches the current task.
7
7
  - A script entry point hides fetching, processing or persistence. Should those stages be visible? → [Entry-point flow](entry-point-flow.md)
8
8
  - A name suggests the wrong state or action. What should callers predict? → [Names and effects](names-and-effects.md)
9
9
  - Two variables or declarations represent the same fact. Store both or derive one? → [Repeated state](single-source-state.md)
10
- - It is hard to see what a test verifies. Where should its scenario data live? → [Test scenarios](visible-test-scenarios.md)
10
+ - Understanding a test requires jumping between parameters, body and helpers. Where should its conditions be visible? → [Test scenarios](visible-test-scenarios.md)
11
11
  - Where should a new or renamed test go? → [Test file placement](test-file-placement.md)
12
12
  - Does this test protect a distinct boundary, or repeat wiring and incidental presentation? → [Test value](test-value.md)
13
13
  - Should a response field or component control become public? → [Public contracts](public-contract.md)
@@ -10,14 +10,12 @@ candidate_ids: ["candidate-181c8ce22f7c8a5659cffeeb"]
10
10
 
11
11
  Make the conditions and expected results clear without requiring readers to trace branches or hidden setup.
12
12
 
13
- ## Example
13
+ ## Explicit setup values
14
14
 
15
- Deidentified setup fragments from asynchronous coupon-reservation tests. The host project supplies the models, async creation helper and database session.
15
+ Deidentified setup fragments from asynchronous coupon-reservation tests. The host project supplies the models, async creation helper and database session. Each After block is a separate scenario.
16
16
 
17
17
  ### Before
18
18
 
19
- The prepared payment state depends on the meaning of `linked`.
20
-
21
19
  ```python
22
20
  usage = await create_coupon_usage(
23
21
  session,
@@ -32,8 +30,6 @@ usage = await create_coupon_usage(
32
30
 
33
31
  ### After
34
32
 
35
- Each block belongs to a separate test scenario.
36
-
37
33
  ```python
38
34
  # Given: a subscription-linked reservation not yet applied to a payment
39
35
  usage = await create_coupon_usage(
@@ -65,3 +61,40 @@ Explicit call-site values can still leave branching inside the helper. To remove
65
61
  Do not select inputs or expectations through conditionals in test setup, actions or assertions.
66
62
 
67
63
  Keep small scenario data beside the test. Move data elsewhere when its size obstructs reading the test itself. Put test cases before supporting fixtures and helpers.
64
+
65
+ ## Parameterized scenarios
66
+
67
+ Keep parameterization when it makes cases easy to compare. Group related inputs under field names, and give failure cases IDs that describe the failing condition.
68
+
69
+ The following deidentified fragments illustrate an approval test. The host project supplies the async persistence helpers, organization and document types.
70
+
71
+ ### Before
72
+
73
+ Positional values need the parameter header to be understood; the setup helper also chooses email and income-earner values from the settlement type.
74
+
75
+ ```python
76
+ pytest.param("WITHHOLDING", "SOLE_PROPRIETOR", True, True, document_types)
77
+ # In the test body:
78
+ await prepare_approval(session, organization, settlement_type, document_types)
79
+ ```
80
+
81
+ ### After
82
+
83
+ ```python
84
+ pytest.param(
85
+ {"business_type": "SOLE_PROPRIETOR", "is_domestic_resident": True,
86
+ "is_representative": True, "tax_invoice_email": None},
87
+ {"settlement_type": "WITHHOLDING", "income_earner_name": "Applicant"},
88
+ document_types,
89
+ id="withholding-sole-proprietor",
90
+ )
91
+ # The parameter names are application, settlement, document_types.
92
+ # In the test body:
93
+ organization.update(application)
94
+ await add_submission_documents(session, organization.id, document_types)
95
+ await add_settlement_profile(session, organization.id, **settlement)
96
+ ```
97
+
98
+ The helper persists the supplied settlement values; it does not choose scenario conditions or overwrite application fields. Name failure cases such as `missing-bank` and `blank-account-holder` so test output identifies the condition.
99
+
100
+ Keep the action, response checks, and resulting state/history assertions visible in the test body. This cleanup does not require a scenario class or builder.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solaqua/ghosts",
3
- "version": "0.4.34",
3
+ "version": "0.4.36",
4
4
  "description": "Reusable agent skills and reviewers.",
5
5
  "license": "MIT",
6
6
  "repository": {