-
Notifications
You must be signed in to change notification settings - Fork 35
feat(aidd-context): refresh cook recipes and enforce heading hierarchy #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Changes from all commits
e4d814a
36f48da
6e45f17
09f2d32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ Create or update one project recipe at `aidd_docs/recipes/<slug>.md`, scaffolded | |
|
|
||
| ## Input | ||
|
|
||
| The recipe topic. Ask for any missing field (description, steps, verify, related) before writing. | ||
| The recipe topic. Infer description, steps, and verification from the request and research; ask only for a missing decision that changes the recipe's outcome or scope. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Je pense que le Ask devrait être dans un step plutôt que l'Input ? |
||
|
|
||
| ## Output | ||
|
|
||
|
|
@@ -19,12 +19,14 @@ The recipe file at `aidd_docs/recipes/<slug>.md`, filled from the template. | |
| - Only a bundled recipe exists: ask whether to copy it into `aidd_docs/recipes/<slug>.md` or edit the bundled one. Edit a bundled recipe only when the user asks for that framework-source change. | ||
| 4. **Dedup.** For a new recipe, run `list` and rate each near match in an overlap table `| Existing recipe | Source | Shared scope | Overlap |`, where `Overlap` is none, partial, or high. | ||
| - On any `high`, recommend updating that recipe instead and ask update-or-create before scaffolding. | ||
| 5. **Scaffold.** Scaffold from [recipe-template.md](../assets/recipe-template.md) when needed, applying [recipe-contract.md](../references/recipe-contract.md) to every section. | ||
| 5. **Scaffold.** Scaffold from [recipe-template.md](../assets/recipe-template.md) when needed, applying [recipe-contract.md](../references/recipe-contract.md) to every section while preserving verified commands, examples, limits, screenshots, and evidence and deleting narrative repetition. | ||
| 6. **Fill.** Fill every placeholder. Never maintain a separate recipe index; `list` reads the files directly. | ||
| 7. **Validate.** Run `validate` (05), fix every deterministic or semantic finding, and rerun both checks until they pass. | ||
|
|
||
| ## Test | ||
|
|
||
| - A new or substantially-updated recipe is drafted from `research` results, not from memory. | ||
| - `aidd_docs/recipes/<slug>.md` exists and follows the recipe contract: opens with a one-sentence description (no Goal label, no table), each step a `#### N)` emoji heading with a real example, no `<...>` placeholder left. | ||
| - `aidd_docs/recipes/<slug>.md` exists and passes the recipe contract. | ||
| - `validate` passes after the write; no validation finding is silently waived. | ||
| - A bundled recipe is never overwritten unless the user explicitly asks to change a bundled/framework recipe. | ||
| - A new recipe that highly overlaps an existing project or bundled recipe triggers an update-or-create prompt before scaffolding. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # 05 - Validate recipes | ||
|
|
||
| Check one recipe or every available recipe without changing files. | ||
|
|
||
| ```text | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pourquoi on a ça ici dans le skill lui même ? Ca serait à la limite dans le SKILL.md et encore |
||
| cook validate <recipe> | ||
| cook validate all | ||
| ``` | ||
|
|
||
| ```md | ||
| @../references/recipe-locations.md | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On ne permet pas dans les règles du skill-generate les references comme ça au niveau du titre mais dans les step associées. J'ai bien vérifié et regénéré avec le skill il ne propose jamais ça de mon côté |
||
| @../references/recipe-contract.md | ||
| ``` | ||
|
|
||
| ## Input | ||
|
|
||
| A recipe named by number from the latest `list`, slug, title, or path; or `all` for every project and bundled recipe. | ||
|
|
||
| ## Output | ||
|
|
||
| On success: | ||
|
|
||
| ```text | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. C'est un asset pour moi d'output ? |
||
| PASS: <n> recipe(s) validated. | ||
| Checks: deterministic and semantic; unavailable parsers: <languages or none>. | ||
| ``` | ||
|
|
||
| On failure: | ||
|
|
||
| ```md | ||
| | File | Line | Rule | Fix | | ||
| | --- | ---: | --- | --- | | ||
| | <path> | <line> | <rule> | <specific correction> | | ||
| ``` | ||
|
|
||
| Validation is read-only. Never repair, reformat, or rewrite a recipe during this action. | ||
|
|
||
| ## Process | ||
|
|
||
| 1. **Resolve.** Resolve one recipe with `@../references/recipe-locations.md`, or keep `all` as the full project-plus-bundled scope. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Des markdown link désormais plus de @, tu as bien ça dans les autres actions du skill cook |
||
| 2. **Check structure.** Run `node <skill-directory>/scripts/validate-recipe.mjs <resolved-path>` or `node <skill-directory>/scripts/validate-recipe.mjs --all`. Preserve its exit code and findings. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Je pense qu'on peut simplifier en disant run the script with appropriate input (all, etc) |
||
| 3. **Check semantics.** Apply the Writing, Steps, and Evidence rules from `@../references/recipe-contract.md`; record one line-specific finding per violated rule. For non-JSON snippets, use available native YAML, TOML, and shell parsers and record which languages could not be checked mechanically. | ||
| 4. **Report.** Merge deterministic and semantic findings into the output table, or print the two success lines. An unavailable optional parser is disclosed but does not fail an otherwise valid recipe. Do not suppress a finding because it requires editorial judgment. | ||
|
|
||
| ## Test | ||
|
|
||
| - One valid recipe and `all` return PASS without changing tracked files. | ||
| - A structural failure returns the validator table with file, line, rule, fix, and a non-zero exit code. | ||
| - A semantic failure appears in the same table even when the deterministic script passes. | ||
| - JSON is parsed mechanically; YAML, TOML, and shell use available tools, and unavailable parsers appear in the success summary or a relevant failure. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,17 @@ | ||
| # <Recipe title> | ||
| # <!-- Recipe title --> | ||
|
|
||
| <One sentence describing what this recipe gets the reader.> | ||
| <!-- Write one plain sentence naming the observable outcome. --> | ||
|
|
||
| ## Why | ||
| <!-- Add a table of contents only when the finished recipe has at least 10 steps. --> | ||
|
|
||
| <Short and benefit-first, one idea per line. Lead with the keywords a reader would search, **bold** the key terms.> | ||
| ## Steps to <!-- outcome --> | ||
|
|
||
| ## Steps to <the outcome the reader achieves> | ||
| ### 1) <!-- emoji + action title --> | ||
|
|
||
| ### 🟢 Beginner | ||
|
|
||
| #### 1) <emoji> <First step title> | ||
|
|
||
| <One benefit-focused line of what and why, in prose.> | ||
|
|
||
| 1. <where it is, then install it from its URL> | ||
| 2. <how to invoke it — its real command or slash> | ||
|
|
||
| ```bash | ||
| $ <command the reader runs> | ||
| <the useful output it prints, trimmed to what matters> | ||
| ``` | ||
|
|
||
| ### 🟡 Intermediate | ||
|
|
||
| #### 2) <emoji> <Next step title> | ||
|
|
||
| <Benefit-focused what and why, in prose.> | ||
|
|
||
| 1. <action> | ||
| 2. <action> | ||
|
|
||
| ```<lang> | ||
| <a config or snippet the reader can copy> | ||
| ``` | ||
|
|
||
| ### 🔴 Expert | ||
|
|
||
| #### 3) <emoji> <Last step title — until the goal is reached> | ||
|
|
||
| <Benefit-focused what and why, in prose.> | ||
|
|
||
| 1. <action> | ||
|
|
||
|  | ||
| <!-- Start with one benefit or risk sentence. --> | ||
| <!-- Add numbered actions only when the technique has multiple actions. --> | ||
| <!-- Add a typed, copyable command/config/output, a concrete table, or an operational image. --> | ||
|
|
||
| ## Verify | ||
|
|
||
| - <Optional. An observable check that proves it worked: a command, a UI state, a file that now exists.> | ||
| <!-- Add an observable command output, UI state, or file check; omit only when none exists. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avec le nouveau format et le mermaid chart tu auras normalement pas besoin d'expliciter autant de chose