@farmslot/skills 0.1.0
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/CHANGELOG.md +7 -0
- package/README.md +74 -0
- package/bin/farmslot-skills.mjs +131 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/package.json +70 -0
- package/schemas/recipe-cook-learning.schema.json +31 -0
- package/schemas/recipe-cook-patch-metadata.schema.json +19 -0
- package/schemas/recipe-cook-run-ledger-entry.schema.json +37 -0
- package/schemas/recipe-cook-validator-manifest.schema.json +92 -0
- package/schemas/recipe-cook-version-ledger.schema.json +49 -0
- package/scripts/lib.cjs +356 -0
- package/scripts/prepare-cooking-run.cjs +310 -0
- package/scripts/record-validator-run.cjs +339 -0
- package/scripts/run-cooking-lane.cjs +1097 -0
- package/skills/project-adopt/SKILL.md +33 -0
- package/skills/recipe-cook/SKILL.md +147 -0
- package/skills/recipe-cook/TASK.md +114 -0
- package/skills/recipe-cook/references/TASK.md +176 -0
- package/skills/recipe-cook/references/VALIDATOR-LOOP.md +54 -0
- package/skills/recipe-cook/repos/example-browser.md +50 -0
- package/skills/recipe-cook/repos/example-mobile.md +61 -0
- package/skills/recipe-doctor/SKILL.md +39 -0
- package/skills/recipe-harness/SKILL.md +31 -0
- package/skills/recipe-quality/SKILL.md +45 -0
- package/templates/recipe-cook/scenarios.json +24 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-adopt
|
|
3
|
+
description: Recommend the smallest useful Farmslot recipe adoption level for a project
|
|
4
|
+
compatibility: Claude, Codex, Cursor, and Markdown skill runners with repo read access
|
|
5
|
+
metadata:
|
|
6
|
+
package: '@farmslot/skills'
|
|
7
|
+
allowed-tools: Read Bash(rg:*) Bash(node:*) Bash(git:*)
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Project Adopt
|
|
11
|
+
|
|
12
|
+
Recommend a pragmatic adoption path for recipe-first validation.
|
|
13
|
+
|
|
14
|
+
## Adoption Levels
|
|
15
|
+
|
|
16
|
+
0. Skills only: author and review recipes with no runner.
|
|
17
|
+
1. Recipe runner: add a local command that executes one recipe and emits artifacts.
|
|
18
|
+
2. Project recipe layer: add recipes, runner manifest, project actions, and artifact conventions.
|
|
19
|
+
3. Farmslot project integration: add `project.json` hooks for slot-based execution.
|
|
20
|
+
4. Full OS: adopt Gateway, Command Center, multi-slot dispatch, Companion, and retrospectives.
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
1. Identify the project type and current test commands.
|
|
25
|
+
2. Identify the proof surfaces the project can already produce.
|
|
26
|
+
3. Pick the lowest level that would produce reviewer-trustworthy evidence.
|
|
27
|
+
4. List only the next one or two concrete changes.
|
|
28
|
+
|
|
29
|
+
## Hard Rules
|
|
30
|
+
|
|
31
|
+
- Do not prescribe the full Farmslot OS when a local recipe runner is enough.
|
|
32
|
+
- Do not add domain-specific assumptions.
|
|
33
|
+
- Do not require a project to change its test stack before proving the first useful recipe.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: recipe-cook
|
|
3
|
+
description: Build a validation recipe from PR intent, ticket ACs, or investigation findings
|
|
4
|
+
compatibility: Designed for agent runners with Markdown skill loading, Bash access, git diff visibility, and repo-local recipe validation runners when available
|
|
5
|
+
metadata:
|
|
6
|
+
package: recipe-cook
|
|
7
|
+
loop_model: inner-run-cook plus validator-run-refine
|
|
8
|
+
outputs: artifacts/recipe.json artifacts/recipe-cook.json artifacts/recipe-cook-learning.json
|
|
9
|
+
allowed-tools: Bash(rg:*) Bash(node:*) Bash(git:*) Read Write
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Recipe Cook
|
|
13
|
+
|
|
14
|
+
Turn PR intent, ticket acceptance criteria, or investigation findings into a validation recipe.
|
|
15
|
+
|
|
16
|
+
This is an LLM skill.
|
|
17
|
+
Do not treat it as deterministic templating.
|
|
18
|
+
|
|
19
|
+
Use [references/TASK.md](references/TASK.md) as the immutable harness template.
|
|
20
|
+
[TASK.md](TASK.md) remains the compatibility harness path for runners that expect a package-root task file.
|
|
21
|
+
For each run, materialize a fresh `TASK.md` beside the run artifacts and work through that copy top-to-bottom.
|
|
22
|
+
File-first is the default pattern. The launcher prompt should be small; the real instructions live in the run-local `TASK.md`.
|
|
23
|
+
Do not stop after writing a recipe file.
|
|
24
|
+
See [the validator loop reference](references/VALIDATOR-LOOP.md) when you need the versioning and experiment artifacts beyond a single cooking run.
|
|
25
|
+
|
|
26
|
+
When this skill is injected into a target repo, prefer a repo-local install path like `.agents/skills/recipe-cook/`.
|
|
27
|
+
Keep that path local-only via `.git/info/exclude` or the repo's existing local exclude pattern, not by editing the shared `.gitignore`.
|
|
28
|
+
When running inside a target repo, prefer repo-local validator/runtime discovery first; Farmslot slot lookup is only the experiment-harness fallback.
|
|
29
|
+
|
|
30
|
+
## Execution Modes
|
|
31
|
+
|
|
32
|
+
Treat `recipe-cook` as one core skill with multiple execution surfaces:
|
|
33
|
+
|
|
34
|
+
- **Interactive / farmslot mode**: preferred when a live slot, tmux pane, or human-observable debugging loop exists. In this mode, keep going until the recipe is written, the run-local `TASK.md` is fully rewritten from the template, and every available validation command has been executed or explicitly marked unavailable with a real reason.
|
|
35
|
+
- **Batch mode**: useful for unattended benchmark reruns and validator-comparison loops. Batch mode is optional. It does not lower the completion bar.
|
|
36
|
+
|
|
37
|
+
If an interactive slot exists, do not stop after pasting or emitting JSON in chat. The point is to drive the run-local workspace to completion.
|
|
38
|
+
|
|
39
|
+
## When To Use
|
|
40
|
+
|
|
41
|
+
- Current PR has no recipe and needs reviewable validation proof
|
|
42
|
+
- Existing recipe is weak, stale, or does not cover the real acceptance criteria
|
|
43
|
+
- You have investigation findings and want to turn them into a reproducible recipe
|
|
44
|
+
- You need before/after visual proof or explicit state proof for a change
|
|
45
|
+
|
|
46
|
+
## Workflow
|
|
47
|
+
|
|
48
|
+
1. Copy `references/TASK.md` into the run-local workspace as `TASK.md` and fill the `## Task` block there.
|
|
49
|
+
2. Gather the real source of truth.
|
|
50
|
+
3. Enumerate acceptance criteria before recipe drafting.
|
|
51
|
+
4. Extract proof targets.
|
|
52
|
+
5. Decide `state` / `visual` / `mixed` per target.
|
|
53
|
+
6. Discover reuse before invention.
|
|
54
|
+
7. Draft the recipe.
|
|
55
|
+
8. Rewrite the run-local `TASK.md` from the template into a real task artifact.
|
|
56
|
+
9. Run schema validation when available.
|
|
57
|
+
10. Run runner dry-run validation when available.
|
|
58
|
+
11. Run the strongest honest live validation path when available.
|
|
59
|
+
12. Audit resolved vs unresolved targets.
|
|
60
|
+
13. Only then mark completion.
|
|
61
|
+
|
|
62
|
+
The harness order is mandatory.
|
|
63
|
+
Do not silently batch or skip steps.
|
|
64
|
+
Mark each completed checklist step `[x]` immediately. Do not batch checkbox updates.
|
|
65
|
+
|
|
66
|
+
## Output Contract
|
|
67
|
+
|
|
68
|
+
Preferred outputs when the workflow/task has an artifacts directory:
|
|
69
|
+
|
|
70
|
+
- `artifacts/recipe.json`
|
|
71
|
+
- `artifacts/recipe-cook.json`
|
|
72
|
+
|
|
73
|
+
`recipe.json` should own:
|
|
74
|
+
|
|
75
|
+
- executable workflow
|
|
76
|
+
- claim-to-proof linkage
|
|
77
|
+
- proof steps
|
|
78
|
+
|
|
79
|
+
`recipe-cook.json` should own:
|
|
80
|
+
|
|
81
|
+
- resolved targets
|
|
82
|
+
- unresolved targets
|
|
83
|
+
- proof mode by target
|
|
84
|
+
- degrade reason when relevant
|
|
85
|
+
|
|
86
|
+
If the current runner/tooling does not use sidecar metadata yet, still write the recipe and include unresolved/proof-mode notes in the report or task artifact.
|
|
87
|
+
|
|
88
|
+
Completion requires:
|
|
89
|
+
|
|
90
|
+
- recipe artifact written
|
|
91
|
+
- run-local `TASK.md` materially rewritten from the template
|
|
92
|
+
- learning artifact written
|
|
93
|
+
- unresolved-target audit written
|
|
94
|
+
- validation evidence recorded
|
|
95
|
+
- all required proof targets either `PROVEN` or explicitly non-applicable by contract
|
|
96
|
+
- `STATUS: done` in the run-local copied `TASK.md`
|
|
97
|
+
|
|
98
|
+
## Hard Rules
|
|
99
|
+
|
|
100
|
+
- Do not fake proof for vague claims
|
|
101
|
+
- Do not emit canonical success output if every target is unresolved
|
|
102
|
+
- Do not prefer screenshots when state proof is enough
|
|
103
|
+
- Do not skip screenshots when the claim is visual or review-sensitive
|
|
104
|
+
- Do not rebuild known flows as raw steps when `call` exists
|
|
105
|
+
- Do not stop after printing a recipe or JSON payload if writable artifacts and validation surfaces still exist
|
|
106
|
+
- Do not leave the copied `TASK.md` as the untouched template
|
|
107
|
+
- Do not write `SIGNAL.json` with `complete/success` when a required validation failed or when a required proof target remains `UNRESOLVED`
|
|
108
|
+
- For `wait_for` nodes, use canonical runner field names such as `timeout_ms` and `poll_ms`. Do not invent `timeout` unless the target runner explicitly documents that alias.
|
|
109
|
+
- Do not edit `recipe-cook/SKILL.md`, `recipe-cook/references/TASK.md`, or `recipe-cook/repos/*.md` during the cooking run
|
|
110
|
+
|
|
111
|
+
## Common Pitfalls
|
|
112
|
+
|
|
113
|
+
| Pitfall | Correct Pattern |
|
|
114
|
+
| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- |
|
|
115
|
+
| Treating cooking as deterministic templating | Treat it as LLM synthesis constrained by repo flows/evals and honest proof |
|
|
116
|
+
| Using the whole PR description as one target | Extract small executable proof targets |
|
|
117
|
+
| Defaulting every UI claim to screenshots only | choose `visual` or `mixed` deliberately |
|
|
118
|
+
| Defaulting every non-visual claim to a screenshot anyway | prefer state/log/trace proof |
|
|
119
|
+
| Rewriting long repeated setup chains | reuse `call` flows |
|
|
120
|
+
| Forcing a canonical recipe when the claim is unresolved | stop or emit only resolved targets with explicit gaps |
|
|
121
|
+
| Treating interactive farmslot execution like chat-only drafting | keep driving the workspace until artifacts + validation evidence exist |
|
|
122
|
+
| Writing recipe artifacts but forgetting the copied `TASK.md` | rewrite the task file and update `STATUS` / evidence sections before stopping |
|
|
123
|
+
| Inventing non-canonical runner fields like `timeout` on `wait_for` | use documented runner field names such as `timeout_ms` so live validation honors the intended timing |
|
|
124
|
+
|
|
125
|
+
## Stop Conditions
|
|
126
|
+
|
|
127
|
+
Stop and report instead of forcing a recipe when:
|
|
128
|
+
|
|
129
|
+
- target text is still too ambiguous to map honestly
|
|
130
|
+
- repo has no viable flow/eval/native interaction path for the claim
|
|
131
|
+
- current runner context is missing and the missing context changes what should be proven
|
|
132
|
+
- the repo has no validation runner and you already recorded `validation unavailable`
|
|
133
|
+
|
|
134
|
+
Do **not** stop merely because the model has drafted a plausible recipe in chat. Drafting is not completion.
|
|
135
|
+
|
|
136
|
+
## Required Response Sections
|
|
137
|
+
|
|
138
|
+
1. `Proof Targets`
|
|
139
|
+
2. `Resolved vs Unresolved`
|
|
140
|
+
3. `Proof Mode Decisions`
|
|
141
|
+
4. `Recipe Plan`
|
|
142
|
+
5. `Validation Commands`
|
|
143
|
+
|
|
144
|
+
## Harness Rule
|
|
145
|
+
|
|
146
|
+
If the current repo has an `recipe-cook` harness, execute through it.
|
|
147
|
+
If the harness is copied into a task/work directory, keep the same sections and checklist order.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Recipe Cook Task
|
|
2
|
+
|
|
3
|
+
> Compatibility harness path for runners that expect `recipe-cook/TASK.md`.
|
|
4
|
+
> The immutable template lives at `references/TASK.md`.
|
|
5
|
+
> For each run, copy `references/TASK.md` into the run-local workspace as `TASK.md` before editing it.
|
|
6
|
+
|
|
7
|
+
## Task
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
TARGET_REPO:
|
|
11
|
+
SOURCE_KIND:
|
|
12
|
+
SOURCE_REF:
|
|
13
|
+
ARTIFACT_DIR:
|
|
14
|
+
VALIDATION_MODE:
|
|
15
|
+
STATUS: pending
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Source Material
|
|
19
|
+
|
|
20
|
+
Paste or summarize:
|
|
21
|
+
|
|
22
|
+
- PR body
|
|
23
|
+
- linked ticket ACs / expected behavior
|
|
24
|
+
- investigation findings
|
|
25
|
+
- existing recipe / flow / eval refs
|
|
26
|
+
|
|
27
|
+
## Acceptance Criteria
|
|
28
|
+
|
|
29
|
+
If structured ACs exist, enumerate them verbatim.
|
|
30
|
+
If they do not, derive a numbered canonical list from the source material before proceeding.
|
|
31
|
+
|
|
32
|
+
## Proof Targets
|
|
33
|
+
|
|
34
|
+
One executable claim per line.
|
|
35
|
+
Every target must map to an AC number or be explicitly marked as investigation-only.
|
|
36
|
+
|
|
37
|
+
## Proof Mode Decisions
|
|
38
|
+
|
|
39
|
+
For each proof target, choose exactly one:
|
|
40
|
+
|
|
41
|
+
- `state`
|
|
42
|
+
- `visual`
|
|
43
|
+
- `mixed`
|
|
44
|
+
|
|
45
|
+
If `mixed`, explain why both matter.
|
|
46
|
+
|
|
47
|
+
## Resolved vs Unresolved
|
|
48
|
+
|
|
49
|
+
List:
|
|
50
|
+
|
|
51
|
+
- resolved targets
|
|
52
|
+
- unresolved targets
|
|
53
|
+
- why any unresolved target could not be covered honestly
|
|
54
|
+
|
|
55
|
+
## Recipe Coverage Audit
|
|
56
|
+
|
|
57
|
+
Map:
|
|
58
|
+
|
|
59
|
+
- AC / finding
|
|
60
|
+
- recipe node(s)
|
|
61
|
+
- proof mode
|
|
62
|
+
- screenshot required? yes/no
|
|
63
|
+
- status: `PROVEN` | `UNRESOLVED` | `UNTESTABLE`
|
|
64
|
+
|
|
65
|
+
## Validation Evidence
|
|
66
|
+
|
|
67
|
+
Record:
|
|
68
|
+
|
|
69
|
+
- schema validation command
|
|
70
|
+
- runner dry-run command
|
|
71
|
+
- live-run command if used
|
|
72
|
+
- output or explicit `validation unavailable`
|
|
73
|
+
|
|
74
|
+
## Learning Artifact
|
|
75
|
+
|
|
76
|
+
Write:
|
|
77
|
+
|
|
78
|
+
- `artifacts/recipe-cook-learning.json`
|
|
79
|
+
|
|
80
|
+
It must include:
|
|
81
|
+
|
|
82
|
+
- scenario type
|
|
83
|
+
- recipe paths
|
|
84
|
+
- evidence verdict
|
|
85
|
+
- proposed next delta
|
|
86
|
+
- touched files from the cooking run
|
|
87
|
+
|
|
88
|
+
## Checklist
|
|
89
|
+
|
|
90
|
+
- [ ] **1. Fill the task block** — set `TARGET_REPO`, `SOURCE_KIND`, `SOURCE_REF`, `ARTIFACT_DIR`, `VALIDATION_MODE`, `STATUS: working`.
|
|
91
|
+
- [ ] **2. Gather the real source of truth** — PR/ticket/investigation text plus existing flows/evals in the target repo.
|
|
92
|
+
- [ ] **3. Enumerate acceptance criteria** — write a numbered canonical list under `## Acceptance Criteria`.
|
|
93
|
+
- [ ] **4. Extract proof targets** — split the work into the smallest executable claims.
|
|
94
|
+
- [ ] **5. Decide proof mode** — choose `state`, `visual`, or `mixed` for every target and justify every `mixed`.
|
|
95
|
+
- [ ] **6. Discover reuse** — list existing `flow` / `eval_ref` / canonical recipe surfaces before writing new graph steps.
|
|
96
|
+
- [ ] **7. Draft the recipe** — write `artifacts/recipe.json` and, when supported, `artifacts/recipe-cook.json`.
|
|
97
|
+
- [ ] **8. Run schema validation** — if the repo provides a schema validator, run it and record the command + output under `## Validation Evidence`.
|
|
98
|
+
- [ ] **9. Run runner dry-run validation** — if the repo provides a runner, run at least a dry-run and record the command + output.
|
|
99
|
+
- [ ] **10. Handle unavailable validation honestly** — if the repo has no validator or runner, write `validation unavailable` with the reason. Do not fake success.
|
|
100
|
+
- [ ] **11. Write the learning artifact** — write `artifacts/recipe-cook-learning.json` with evidence verdict and proposed next delta.
|
|
101
|
+
- [ ] **12. Audit unresolved targets** — update `## Resolved vs Unresolved` and `## Recipe Coverage Audit` after validation evidence exists.
|
|
102
|
+
- [ ] **13. Final completion gate** — set `STATUS: done` only after recipe writing, validation evidence, learning artifact, and unresolved-target audit are all present.
|
|
103
|
+
|
|
104
|
+
## Failure Conditions
|
|
105
|
+
|
|
106
|
+
Fail the cooking attempt if:
|
|
107
|
+
|
|
108
|
+
- the recipe is written before AC extraction
|
|
109
|
+
- proof modes are missing
|
|
110
|
+
- unresolved targets are hidden
|
|
111
|
+
- `artifacts/recipe-cook-learning.json` is missing
|
|
112
|
+
- the agent stops after writing JSON with no validation evidence
|
|
113
|
+
- the agent claims canonical success when every target is unresolved
|
|
114
|
+
- the cooking run edits `recipe-cook/SKILL.md`, `recipe-cook/TASK.md`, or `recipe-cook/repos/*.md`
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Recipe Cook Task Template
|
|
2
|
+
|
|
3
|
+
> Direct-developer skill harness template.
|
|
4
|
+
> Work top-to-bottom.
|
|
5
|
+
> Do not stop after writing a recipe.
|
|
6
|
+
> In interactive/farmslot mode, do not stop after printing JSON in chat. Finish the workspace artifact set and run validations when available.
|
|
7
|
+
|
|
8
|
+
Copy this file into the run-local workspace as `TASK.md` before editing it.
|
|
9
|
+
Do not edit the template in-place during a cooking run.
|
|
10
|
+
|
|
11
|
+
Every time you complete a checklist step:
|
|
12
|
+
|
|
13
|
+
1. immediately change `- [ ]` to `- [x]`
|
|
14
|
+
2. update `STATUS` if needed
|
|
15
|
+
3. only then move to the next step
|
|
16
|
+
|
|
17
|
+
Do not batch checkbox updates.
|
|
18
|
+
Do not leave completed steps unchecked.
|
|
19
|
+
|
|
20
|
+
## Task
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
SCENARIO_ID: {{SCENARIO_ID}}
|
|
24
|
+
WRAPPER: {{WRAPPER}}
|
|
25
|
+
TARGET_REPO: {{TARGET_REPO}}
|
|
26
|
+
REPO_ROOT: {{REPO_ROOT}}
|
|
27
|
+
SOURCE_KIND: {{SOURCE_KIND}}
|
|
28
|
+
SOURCE_REF: {{SOURCE_REF}}
|
|
29
|
+
SOURCE_ARTIFACT_DIR: {{SOURCE_ARTIFACT_DIR}}
|
|
30
|
+
TASK_DIR: {{TASK_DIR}}
|
|
31
|
+
ARTIFACT_DIR: {{ARTIFACT_DIR}}
|
|
32
|
+
SOURCE_BUNDLE_FILE: {{SOURCE_BUNDLE_FILE}}
|
|
33
|
+
VALIDATION_MODE: {{VALIDATION_MODE}}
|
|
34
|
+
STATUS: pending
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Source Material
|
|
38
|
+
|
|
39
|
+
Read `{{SOURCE_BUNDLE_FILE}}` first.
|
|
40
|
+
|
|
41
|
+
Then replace this section with your own summary of:
|
|
42
|
+
|
|
43
|
+
- PR body
|
|
44
|
+
- linked ticket ACs / expected behavior
|
|
45
|
+
- investigation findings
|
|
46
|
+
- existing recipe / flow / eval refs
|
|
47
|
+
|
|
48
|
+
## Acceptance Criteria
|
|
49
|
+
|
|
50
|
+
If structured ACs exist, enumerate them verbatim.
|
|
51
|
+
If they do not, derive a numbered canonical list from the source material before proceeding.
|
|
52
|
+
|
|
53
|
+
## Proof Targets
|
|
54
|
+
|
|
55
|
+
One executable claim per line.
|
|
56
|
+
Every target must map to an AC number or be explicitly marked as investigation-only.
|
|
57
|
+
|
|
58
|
+
## Proof Mode Decisions
|
|
59
|
+
|
|
60
|
+
For each proof target, choose exactly one:
|
|
61
|
+
|
|
62
|
+
- `state`
|
|
63
|
+
- `visual`
|
|
64
|
+
- `mixed`
|
|
65
|
+
|
|
66
|
+
If `mixed`, explain why both matter.
|
|
67
|
+
|
|
68
|
+
## Resolved vs Unresolved
|
|
69
|
+
|
|
70
|
+
List:
|
|
71
|
+
|
|
72
|
+
- resolved targets
|
|
73
|
+
- unresolved targets
|
|
74
|
+
- why any unresolved target could not be covered honestly
|
|
75
|
+
|
|
76
|
+
## Recipe Coverage Audit
|
|
77
|
+
|
|
78
|
+
Map:
|
|
79
|
+
|
|
80
|
+
- AC / finding
|
|
81
|
+
- recipe node(s)
|
|
82
|
+
- proof mode
|
|
83
|
+
- screenshot required? yes/no
|
|
84
|
+
- status: `PROVEN` | `UNRESOLVED` | `UNTESTABLE`
|
|
85
|
+
|
|
86
|
+
## Validation Evidence
|
|
87
|
+
|
|
88
|
+
Record:
|
|
89
|
+
|
|
90
|
+
- schema validation command
|
|
91
|
+
- runner dry-run command
|
|
92
|
+
- live-run command if used
|
|
93
|
+
- output or explicit `validation unavailable`
|
|
94
|
+
|
|
95
|
+
If the repo can run a validator or test command and you did not run it, explain exactly why.
|
|
96
|
+
|
|
97
|
+
## Learning Artifact
|
|
98
|
+
|
|
99
|
+
Write:
|
|
100
|
+
|
|
101
|
+
- `artifacts/recipe-cook-learning.json`
|
|
102
|
+
|
|
103
|
+
It must include:
|
|
104
|
+
|
|
105
|
+
- scenario type
|
|
106
|
+
- recipe paths
|
|
107
|
+
- evidence verdict
|
|
108
|
+
- proposed next delta
|
|
109
|
+
- touched files from the cooking run
|
|
110
|
+
|
|
111
|
+
## Checklist
|
|
112
|
+
|
|
113
|
+
- [ ] **1. Fill the task block** — set `TARGET_REPO`, `SOURCE_KIND`, `SOURCE_REF`, `ARTIFACT_DIR`, `VALIDATION_MODE`, `STATUS: working`.
|
|
114
|
+
- [ ] **2. Gather the real source of truth** — PR/ticket/investigation text plus existing flows/evals in the target repo.
|
|
115
|
+
- [ ] **3. Enumerate acceptance criteria** — write a numbered canonical list under `## Acceptance Criteria`.
|
|
116
|
+
- [ ] **4. Extract proof targets** — split the work into the smallest executable claims.
|
|
117
|
+
- [ ] **5. Decide proof mode** — choose `state`, `visual`, or `mixed` for every target and justify every `mixed`.
|
|
118
|
+
- [ ] **6. Discover reuse** — list existing `flow` / `eval_ref` / canonical recipe surfaces before writing new graph steps.
|
|
119
|
+
- [ ] **7. Draft the recipe** — write `artifacts/recipe.json` and, when supported, `artifacts/recipe-cook.json`. Use documented runner field names for nodes (for example `timeout_ms` / `poll_ms` on `wait_for`), not guessed aliases.
|
|
120
|
+
- [ ] **8. Rewrite this copied TASK file** — replace the template placeholders with the real run data and working notes. Leaving the untouched template is a failure.
|
|
121
|
+
- [ ] **9. Run schema validation** — if the repo provides a schema validator, run it and record the command + output under `## Validation Evidence`.
|
|
122
|
+
- [ ] **10. Run runner dry-run validation** — if the repo provides a runner, run at least a dry-run and record the command + output.
|
|
123
|
+
- [ ] **11. Run the strongest honest live validation path** — if a live slot/runtime exists, use it. If not, record the concrete blocker.
|
|
124
|
+
- [ ] **12. Handle unavailable validation honestly** — if the repo has no validator or runner, write `validation unavailable` with the reason. Do not fake success.
|
|
125
|
+
- [ ] **13. Write the learning artifact** — write `artifacts/recipe-cook-learning.json` with evidence verdict and proposed next delta.
|
|
126
|
+
- [ ] **14. Audit unresolved targets** — update `## Resolved vs Unresolved` and `## Recipe Coverage Audit` after validation evidence exists.
|
|
127
|
+
- [ ] **15. Final completion gate** — set `STATUS: done` only after recipe writing, rewritten TASK.md, validation evidence, learning artifact, and unresolved-target audit are all present.
|
|
128
|
+
- [ ] **16. Write terminal signal** — write exactly one terminal `SIGNAL.json` based on the outcome matrix below.
|
|
129
|
+
|
|
130
|
+
## Outcome Matrix
|
|
131
|
+
|
|
132
|
+
Write `SIGNAL.json` only after step 15 is evaluated.
|
|
133
|
+
|
|
134
|
+
- **Success**:
|
|
135
|
+
- every required validation passed or was explicitly non-applicable by contract
|
|
136
|
+
- no required proof target remains `UNRESOLVED`
|
|
137
|
+
- `STATUS: done`
|
|
138
|
+
- signal:
|
|
139
|
+
```json
|
|
140
|
+
{ "status": "complete", "outcome": "success" }
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
- **Blocked**:
|
|
144
|
+
- a concrete environment/runtime/tooling blocker prevented required validation
|
|
145
|
+
- or a proof target remains `UNRESOLVED` because a required live/runtime dependency was unavailable
|
|
146
|
+
- `STATUS: blocked`
|
|
147
|
+
- signal:
|
|
148
|
+
```json
|
|
149
|
+
{ "status": "blocked", "outcome": "partial", "reason": "<concrete blocker>" }
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
- **Failed**:
|
|
153
|
+
- a required validation actually ran and failed
|
|
154
|
+
- or the recipe/proof contradicts the PR claim
|
|
155
|
+
- `STATUS: failed`
|
|
156
|
+
- signal:
|
|
157
|
+
```json
|
|
158
|
+
{ "status": "failed", "outcome": "failure", "reason": "<concrete failure>" }
|
|
159
|
+
```
|
|
160
|
+
In particular: if live validation proves a regression or contradiction, this is `failed`, not `complete`.
|
|
161
|
+
|
|
162
|
+
## Failure Conditions
|
|
163
|
+
|
|
164
|
+
Fail the cooking attempt if:
|
|
165
|
+
|
|
166
|
+
- the recipe is written before AC extraction
|
|
167
|
+
- proof modes are missing
|
|
168
|
+
- unresolved targets are hidden
|
|
169
|
+
- the copied `TASK.md` remains mostly the untouched template
|
|
170
|
+
- `artifacts/recipe-cook-learning.json` is missing
|
|
171
|
+
- the agent stops after writing JSON with no validation evidence
|
|
172
|
+
- the agent claims canonical success when every target is unresolved
|
|
173
|
+
- `SIGNAL.json` reports `complete/success` while any required proof target is still `UNRESOLVED`
|
|
174
|
+
- `SIGNAL.json` reports `complete/success` after a required validation actually failed
|
|
175
|
+
- `SIGNAL.json` says complete before the checklist is actually complete
|
|
176
|
+
- the cooking run edits `recipe-cook/SKILL.md`, `recipe-cook/references/TASK.md`, or `recipe-cook/repos/*.md`
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Validator Loop
|
|
2
|
+
|
|
3
|
+
Use the validator loop when you are comparing `recipe-cook` versions across real runs.
|
|
4
|
+
|
|
5
|
+
Core split:
|
|
6
|
+
|
|
7
|
+
- cooking run writes task-local artifacts
|
|
8
|
+
- validator run reads them, edits `recipe-cook/`, saves a patch, and updates ledgers
|
|
9
|
+
|
|
10
|
+
Core artifacts:
|
|
11
|
+
|
|
12
|
+
- task-local:
|
|
13
|
+
- `artifacts/recipe-cook-learning.json`
|
|
14
|
+
- `artifacts/recipe.json`
|
|
15
|
+
- `artifacts/recipe-cook.json` when supported
|
|
16
|
+
- validator state:
|
|
17
|
+
- `.omx/artifacts/recipe-cook-runs/<run-id>.json`
|
|
18
|
+
- `.omx/artifacts/recipe-cook-patches/<timestamp>-<slug>.patch`
|
|
19
|
+
- `.omx/state/recipe-cook/runs.jsonl`
|
|
20
|
+
- `.omx/state/recipe-cook/versions.json`
|
|
21
|
+
|
|
22
|
+
Score inputs:
|
|
23
|
+
|
|
24
|
+
- `quality`
|
|
25
|
+
- `pass_rate`
|
|
26
|
+
- `cost_efficiency`
|
|
27
|
+
|
|
28
|
+
Selection rules:
|
|
29
|
+
|
|
30
|
+
- floors:
|
|
31
|
+
- `quality >= 0.80`
|
|
32
|
+
- `pass_rate >= 0.80`
|
|
33
|
+
- tie-breaks:
|
|
34
|
+
1. higher `quality`
|
|
35
|
+
2. higher `pass_rate`
|
|
36
|
+
3. higher `cost_efficiency`
|
|
37
|
+
- if cost is unknown:
|
|
38
|
+
- `balanced_score = null`
|
|
39
|
+
- compare by `quality`, then `pass_rate`
|
|
40
|
+
- do not promote that version to `keep` until cost coverage exists
|
|
41
|
+
|
|
42
|
+
Convergence rules:
|
|
43
|
+
|
|
44
|
+
- stop after 3 consecutive applied patches with no improvement greater than `0.02`
|
|
45
|
+
- or when all three lanes reach:
|
|
46
|
+
- `quality >= 0.90`
|
|
47
|
+
- `pass_rate >= 0.90`
|
|
48
|
+
- cost remains within 10% of the current best
|
|
49
|
+
|
|
50
|
+
Canonical lanes:
|
|
51
|
+
|
|
52
|
+
- review
|
|
53
|
+
- fix
|
|
54
|
+
- investigation
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
repo: example-browser
|
|
3
|
+
parent: recipe-cook
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Generic Browser App Recipe Cook
|
|
7
|
+
|
|
8
|
+
Use this overlay when the target project is a browser or web app and has no more specific recipe skill.
|
|
9
|
+
|
|
10
|
+
## Discovery
|
|
11
|
+
|
|
12
|
+
Start with:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
rg --files | rg 'recipes?/.*\\.json$|flows?/.*\\.json$|validate-recipe\\.(js|mjs|cjs|ts)|validate-flow-schema\\.(js|mjs|cjs|ts)|playwright|cypress|vitest|agentic-toolkit\\.md'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Then inspect package scripts for existing validation surfaces:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
node -e "const p=require('./package.json'); console.log(p.scripts || {})"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Reuse Before Invention
|
|
25
|
+
|
|
26
|
+
Look for:
|
|
27
|
+
|
|
28
|
+
- existing recipe files
|
|
29
|
+
- browser automation tests
|
|
30
|
+
- page objects or stable selectors
|
|
31
|
+
- runner/action manifests
|
|
32
|
+
- screenshot or trace artifact conventions
|
|
33
|
+
- schema validators
|
|
34
|
+
|
|
35
|
+
## Validation
|
|
36
|
+
|
|
37
|
+
Use repo-local commands first. Common shapes include:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
node <validate-flow-schema.js> <recipe.json>
|
|
41
|
+
node <validate-recipe.js> --recipe <recipe.json> --dry-run
|
|
42
|
+
npm test -- --runInBand
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Live browser validation is optional for first use. When available, record the command, browser control endpoint, artifact directory, and exit status.
|
|
46
|
+
|
|
47
|
+
If discovery finds no repo-local validator or runner:
|
|
48
|
+
|
|
49
|
+
- write `validation unavailable: no repo-local validator/runner discovered`
|
|
50
|
+
- do not claim that validation passed
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
repo: example-mobile
|
|
3
|
+
parent: recipe-cook
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Generic Mobile App Recipe Cook
|
|
7
|
+
|
|
8
|
+
Use this overlay when the target project is a mobile app and has no more specific recipe skill.
|
|
9
|
+
|
|
10
|
+
## Discovery
|
|
11
|
+
|
|
12
|
+
Start with:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
rg --files | rg 'recipes?/.*\\.json$|flows?/.*\\.json$|validate-recipe\\.(sh|js|mjs|cjs|ts)|detox|maestro|appium|testIds?|accessibility|agentic-toolkit\\.md'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Then inspect package scripts for local test and validation commands:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
node -e "const p=require('./package.json'); console.log(p.scripts || {})"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Cooking Rules
|
|
25
|
+
|
|
26
|
+
- Prefer stable accessibility labels, test IDs, or existing mobile flows when they exist.
|
|
27
|
+
- Keep proof targets separate from platform mechanics.
|
|
28
|
+
- Do not import web-only selectors or desktop assumptions into mobile recipes.
|
|
29
|
+
- If mobile lacks a repo-owned helper, write a recipe and proof plan, then mark live validation unavailable with the concrete blocker.
|
|
30
|
+
|
|
31
|
+
## Validation
|
|
32
|
+
|
|
33
|
+
Use repo-local commands first. Common shapes include:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
bash <validate-recipe.sh> <artifacts-dir> --dry-run
|
|
37
|
+
node <validate-recipe.js> --recipe <recipe.json> --dry-run
|
|
38
|
+
npm test
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Live device or simulator validation is optional for first use. When available, record the device/simulator target, command, artifact directory, and exit status.
|
|
42
|
+
|
|
43
|
+
If discovery finds no repo-local validator or runner:
|
|
44
|
+
|
|
45
|
+
- write `validation unavailable: no repo-local validator/runner discovered`
|
|
46
|
+
- do not claim that validation passed
|
|
47
|
+
|
|
48
|
+
## Mobile-Specific Caution
|
|
49
|
+
|
|
50
|
+
Keep stable across platforms:
|
|
51
|
+
|
|
52
|
+
- proof target meaning
|
|
53
|
+
- proof mode (`state`, `visual`, `mixed`)
|
|
54
|
+
- honest unresolved-target reporting
|
|
55
|
+
|
|
56
|
+
Allow to differ by platform:
|
|
57
|
+
|
|
58
|
+
- selectors
|
|
59
|
+
- navigation steps
|
|
60
|
+
- runtime validation commands
|
|
61
|
+
- artifact capture mechanics
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: recipe-doctor
|
|
3
|
+
description: Diagnose local readiness for recipe authoring and execution
|
|
4
|
+
compatibility: Claude, Codex, Cursor, and Markdown skill runners with shell access
|
|
5
|
+
metadata:
|
|
6
|
+
package: '@farmslot/skills'
|
|
7
|
+
outputs: readiness report
|
|
8
|
+
allowed-tools: Read Bash(rg:*) Bash(node:*) Bash(npm:*) Bash(yarn:*) Bash(pnpm:*) Bash(git:*)
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Recipe Doctor
|
|
12
|
+
|
|
13
|
+
Check how far a project can go with recipes today.
|
|
14
|
+
|
|
15
|
+
## Use When
|
|
16
|
+
|
|
17
|
+
- A project wants to try recipe-first validation
|
|
18
|
+
- An agent needs to know whether a local recipe runner exists
|
|
19
|
+
- A recipe failed because commands, fixtures, browser control, or artifact paths are unclear
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
1. Inspect package scripts and repo docs for recipe commands.
|
|
24
|
+
2. Look for recipe files, runner manifests, action manifests, schemas, or artifact conventions.
|
|
25
|
+
3. Check whether `@farmslot/recipe-harness`, an app-specific runner, or a custom script is installed.
|
|
26
|
+
4. Identify proof surfaces: state/log artifacts, screenshots, traces, browser control, mobile bridge, or command output.
|
|
27
|
+
5. Report the smallest useful next step.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
|
|
31
|
+
Return:
|
|
32
|
+
|
|
33
|
+
- detected project type
|
|
34
|
+
- available recipe commands
|
|
35
|
+
- available proof surfaces
|
|
36
|
+
- missing blockers
|
|
37
|
+
- suggested adoption level from 0 to 4
|
|
38
|
+
|
|
39
|
+
Do not require Farmslot Gateway, Command Center, pool files, or slots for the first readiness pass.
|