From 3cf618ee7be170e1fd047f397cb91b122391a0da Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 7 Apr 2026 23:13:55 +0000 Subject: [PATCH 1/6] feat(skills): add aidd-genesplice evolutionary optimization skill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the /genesplice skill — an evolutionary optimization framework for creative output. Closes #180. - SKILL.md: frontmatter, constraints, quality gate, commands - references/algorithm.md: full pipeline, candidate output spec, scoring template, learnings including emergent redundancy problem - README.md: what/why/usage/when-to-use Validation: 74 frontmatter tokens, 52 body lines, 505 body tokens — well within all thresholds. Co-authored-by: Eric Elliott --- ai/skills/aidd-genesplice/README.md | 23 +++++ ai/skills/aidd-genesplice/SKILL.md | 57 ++++++++++++ .../aidd-genesplice/references/algorithm.md | 88 +++++++++++++++++++ ai/skills/index.md | 1 + 4 files changed, 169 insertions(+) create mode 100644 ai/skills/aidd-genesplice/README.md create mode 100644 ai/skills/aidd-genesplice/SKILL.md create mode 100644 ai/skills/aidd-genesplice/references/algorithm.md diff --git a/ai/skills/aidd-genesplice/README.md b/ai/skills/aidd-genesplice/README.md new file mode 100644 index 00000000..2ec95900 --- /dev/null +++ b/ai/skills/aidd-genesplice/README.md @@ -0,0 +1,23 @@ +# aidd-genesplice + +Evolutionary optimization framework for creative output — pitches, copy, UI designs, and strategies. + +## Why + +When "good enough" isn't enough, genesplice runs competing candidates through scored generations, splices the strongest genes, and picks a provably best version with full justification. It encodes hard-won lessons about individually optimized genes producing weaker organisms, and mandates holistic scoring criteria to catch emergent problems. + +## Usage + +``` +/genesplice [artifact] [n=2] — run the full evolutionary optimization pipeline +/genesplice review — review the current generation's scoring table +/genesplice winner — name the winner and justify gene inheritance +``` + +Invoke `/genesplice` with the artifact you want to optimize (e.g. "investor one-pager", "landing page hero", "product pitch"). The skill researches domain criteria, generates `n` candidates per generation with distinct gene profiles, scores them, splices the best traits, introduces a mutation, and repeats until scores plateau. + +## When to use + +- Optimizing any creative artifact where multiple viable approaches exist +- When a pitch, design, or copy must be provably better than alternatives +- When you need to find the optimal blend of competing ideas diff --git a/ai/skills/aidd-genesplice/SKILL.md b/ai/skills/aidd-genesplice/SKILL.md new file mode 100644 index 00000000..f02d4d49 --- /dev/null +++ b/ai/skills/aidd-genesplice/SKILL.md @@ -0,0 +1,57 @@ +--- +name: aidd-genesplice +description: "Evolutionary optimization framework. Research criteria → generate N candidates → score pros/cons → splice best genes → repeat generations → score all → pick winner with justification. Use when optimizing any creative output (copy, design, strategy, pitches)." +--- + +# /genesplice — Evolutionary Optimization + +Act as an evolutionary optimizer. Run competing candidates through scored generations, splice the best genes, and justify the winner. + +Constraints { + Each candidate must have a *distinct gene profile* — not minor variations + Mutations introduce structural novelty (e.g. "what if we flip the entire approach?") + Best genes can come from the lowest-scoring candidate + Score improvements should compound across generations + Always show the scoring table — transparency builds trust + Never keep candidates only in chat — save to prototypes/ folder + Source all criteria — no unsourced scoring +} + +## When to Use +- Optimizing creative output (pitches, copy, designs, strategies) +- When "good enough" isn't enough — need a provably best version +- When multiple viable approaches exist and you need the optimal blend + +import references/algorithm.md + +## Quality Gate (UI Prototypes) + +For UI prototype candidates, run the a11y scorer after generating each candidate: + +```bash +bun run aidd-custom/skills/aidd-ui/scripts/a11y-score.ts path/to/candidate/index.html --fix-hints +``` + +Flow per candidate: +``` +generate → save to prototypes/ → run a11y-score.ts + → score ≥ B? → proceed to genesplice scoring + → score < B? → /aidd-fix using --fix-hints → re-score + → still < B after 2 fix attempts? → score as-is, flag in table +``` + +A11y grade maps to genesplice score: A=10, B=8, C=5, D=3, F=1. Weighted ×2. + +## Key Principles + +- A collection of individually optimized genes can produce a weaker organism than a coherent design. +- Genesplice finds strong components; the final splice needs holistic review against the *purpose* of the artifact. +- Don't score your own work — the final pass needs a "does this actually work as a whole?" gut check. + +## Commands + +``` +/genesplice [artifact] [n=2] — run the full evolutionary optimization pipeline +/genesplice review — review the current generation's scoring table +/genesplice winner — name the winner and justify the gene inheritance +``` diff --git a/ai/skills/aidd-genesplice/references/algorithm.md b/ai/skills/aidd-genesplice/references/algorithm.md new file mode 100644 index 00000000..80c9c07c --- /dev/null +++ b/ai/skills/aidd-genesplice/references/algorithm.md @@ -0,0 +1,88 @@ +# Genesplice Algorithm + +## Pipeline + +``` +genesplice(artifact, n=2) { + researchCriteria(artifact) + |> generationLoop(n) + |> scoreAllCandidates + |> suggestWinner + |> justifySelection +} +``` + +## Steps + +### researchCriteria(artifact) +- Search for domain-specific best practices for the artifact type +- Synthesize findings into scored criteria (0–10 each) +- Source everything — no unsourced criteria +- Always include these two holistic criteria in every scoring matrix: + 1. *Information Efficiency* — does every element add NEW information? + 2. *Narrative Structure* — does the reading order tell a story? +- For UI prototypes: also include "A11y/Readability" criterion (weighted ×2) + +### generationLoop(n) +Repeat until scores plateau or time-box is reached: + +``` +a. Build n candidates with distinct gene profiles +b. Save each candidate to the prototypes folder (see Candidate Output below) +c. Run quality gate per-candidate (see main SKILL.md) +d. Score each (post-fix) against all criteria +e. List pros and cons for each candidate +f. Identify best genes from each candidate +g. Splice best genes into next generation +h. Introduce 1 mutation (novel structural idea) per generation +``` + +### scoreAllCandidates +- Final scoring table across all criteria +- Stack rank all candidates from all generations + +### suggestWinner + justifySelection +- Name the winner +- Show which genes it inherited and from which parent +- State the "one core idea" the output delivers + +## Candidate Output + +Every candidate is saved to a real file in the project's prototypes folder. Never keep candidates only in chat. + +``` +projects/{project}/prototypes/{artifact}/gen{N}-{short_id}/ +├── index.html # The candidate itself +├── preview.png # Screenshot for quick comparison +└── full.png # Full-page screenshot +``` + +- `{short_id}` = 8-char random alphanumeric, e.g. `gen3-a7k2m9p1` +- Generation number increments across the whole evolutionary run +- All candidates from all generations are preserved — never delete earlier gens +- `SCORES.md` at the `{artifact}/` level tracks all candidates across generations + +## Scoring Template + +``` +Criteria Cand X Cand Y +─────────────────── ────── ────── +[Criterion 1] ? ? +[Criterion 2] ? ? +Information Efficiency ? ? +Narrative Structure ? ? +TOTAL ?? ?? +``` + +## Learnings (April 2026) + +- 2 candidates per generation is the sweet spot — enough diversity, manageable scope +- Mutations (structurally novel ideas) often contribute the strongest genes +- The winning candidate rarely looks like any single parent — it's the splice that wins +- Always render/preview each candidate before scoring — catch layout issues early + +### Emergent Redundancy Problem + +Scoring individual criteria can miss problems that only emerge in the *combination*. Example: a giant stat (scored 9 on Typography) + italic punchline (scored 9 on Copy Punch) = the punchline restated the stat. Redundancy that no single criterion caught. + +This is why *Information Efficiency* and *Narrative Structure* are mandatory holistic criteria in every run. diff --git a/ai/skills/index.md b/ai/skills/index.md index b6604198..975df755 100644 --- a/ai/skills/index.md +++ b/ai/skills/index.md @@ -7,6 +7,7 @@ - aidd-error-causes - Use the error-causes library for structured error handling in JavaScript/TypeScript. Use when throwing errors, catching errors, defining error types, or implementing error routing. - aidd-fix - Fix a bug or implement review feedback following the AIDD fix process. Use when a bug has been reported, a failing test needs investigation, or a code review has returned feedback that requires a code change. - aidd-functional-requirements - Write functional requirements for a user story. Use when drafting requirements, specifying user stories, or when the user asks for functional specs. +- aidd-genesplice - Evolutionary optimization framework. Research criteria → generate N candidates → score pros/cons → splice best genes → repeat generations → score all → pick winner with justification. Use when optimizing any creative output (copy, design, strategy, pitches). - aidd-javascript - JavaScript and TypeScript best practices and guidance. Use when writing, reviewing, or refactoring JavaScript or TypeScript code. - aidd-javascript-io-effects - Isolate network I/O and side effects using the saga pattern with call and put. Use when making network requests, invoking side effects, or implementing Redux sagas. - aidd-jwt-security - JWT security review patterns. Use when reviewing or implementing authentication code, token handling, session management, or when JWT is mentioned. From 929a0f6d99d286400b466757cbfcda362a4b16b2 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 8 Apr 2026 00:18:30 +0000 Subject: [PATCH 2/6] refactor(genesplice): restructure into focused reference files - Split algorithm.md into candidate-output.md, quality-gate.md, learnings.md - Rewrite SKILL.md with SudoLang step functions and Competencies block - Expand README with Why section and full command reference - Add /genesplice score and /genesplice splice as first-class commands Validation: 77 frontmatter tokens, 97 body lines, 867 body tokens. Co-authored-by: Eric Elliott --- ai/skills/aidd-genesplice/README.md | 42 ++++-- ai/skills/aidd-genesplice/SKILL.md | 127 ++++++++++++------ .../aidd-genesplice/references/algorithm.md | 88 ------------ .../references/candidate-output.md | 16 +++ .../aidd-genesplice/references/learnings.md | 32 +++++ .../references/quality-gate.md | 31 +++++ 6 files changed, 198 insertions(+), 138 deletions(-) delete mode 100644 ai/skills/aidd-genesplice/references/algorithm.md create mode 100644 ai/skills/aidd-genesplice/references/candidate-output.md create mode 100644 ai/skills/aidd-genesplice/references/learnings.md create mode 100644 ai/skills/aidd-genesplice/references/quality-gate.md diff --git a/ai/skills/aidd-genesplice/README.md b/ai/skills/aidd-genesplice/README.md index 2ec95900..ae3cb3da 100644 --- a/ai/skills/aidd-genesplice/README.md +++ b/ai/skills/aidd-genesplice/README.md @@ -1,23 +1,43 @@ # aidd-genesplice -Evolutionary optimization framework for creative output — pitches, copy, UI designs, and strategies. +Evolutionary optimization framework for creative output — copy, UI prototypes, +pitches, strategies, or any artifact where multiple viable approaches exist +and you need to find the optimal blend. ## Why -When "good enough" isn't enough, genesplice runs competing candidates through scored generations, splices the strongest genes, and picks a provably best version with full justification. It encodes hard-won lessons about individually optimized genes producing weaker organisms, and mandates holistic scoring criteria to catch emergent problems. +Generating a single "best attempt" leaves value on the table. Genesplice +borrows from genetic algorithms: competing candidates with distinct gene +profiles are scored against researched criteria, and the strongest traits are +spliced across generations. Mutations introduce structural novelty that no +single-pass approach would discover. The result compounds improvements across +generations — the winner rarely looks like any single parent. -## Usage +## Commands ``` -/genesplice [artifact] [n=2] — run the full evolutionary optimization pipeline -/genesplice review — review the current generation's scoring table -/genesplice winner — name the winner and justify gene inheritance +/genesplice [artifact] ``` -Invoke `/genesplice` with the artifact you want to optimize (e.g. "investor one-pager", "landing page hero", "product pitch"). The skill researches domain criteria, generates `n` candidates per generation with distinct gene profiles, scores them, splices the best traits, introduces a mutation, and repeats until scores plateau. +Run the full evolutionary optimization pipeline: research criteria → generate +candidates → score → splice → mutate → repeat → pick winner. -## When to use +``` +/genesplice score [candidates] +``` + +Score existing candidates against the researched criteria without running a +new generation. + +``` +/genesplice splice [candidate-a] [candidate-b] +``` + +Manually splice two specific candidates, combining their best genes into a +new candidate. + +## When to Use -- Optimizing any creative artifact where multiple viable approaches exist -- When a pitch, design, or copy must be provably better than alternatives -- When you need to find the optimal blend of competing ideas +- Optimizing creative output (pitches, copy, UI designs, strategies) +- When "good enough" isn't enough — need a provably best version +- When there are multiple viable approaches and you need the optimal blend diff --git a/ai/skills/aidd-genesplice/SKILL.md b/ai/skills/aidd-genesplice/SKILL.md index f02d4d49..3485662b 100644 --- a/ai/skills/aidd-genesplice/SKILL.md +++ b/ai/skills/aidd-genesplice/SKILL.md @@ -1,57 +1,106 @@ --- name: aidd-genesplice -description: "Evolutionary optimization framework. Research criteria → generate N candidates → score pros/cons → splice best genes → repeat generations → score all → pick winner with justification. Use when optimizing any creative output (copy, design, strategy, pitches)." +description: > + Evolutionary optimization framework for creative output. + Research criteria, generate competing candidates, score, splice best genes, + mutate, repeat. Use when optimizing copy, UI prototypes, pitches, strategies, + or any artifact where "good enough" isn't enough. --- -# /genesplice — Evolutionary Optimization +# Evolutionary Optimizer -Act as an evolutionary optimizer. Run competing candidates through scored generations, splice the best genes, and justify the winner. +Act as an evolutionary optimization engine. Generate competing candidates +with distinct gene profiles, score them against researched criteria, splice +the best traits across generations, and introduce mutations until scores +plateau. -Constraints { - Each candidate must have a *distinct gene profile* — not minor variations - Mutations introduce structural novelty (e.g. "what if we flip the entire approach?") - Best genes can come from the lowest-scoring candidate - Score improvements should compound across generations - Always show the scoring table — transparency builds trust - Never keep candidates only in chat — save to prototypes/ folder - Source all criteria — no unsourced scoring +Competencies { + domain research and criteria synthesis + divergent candidate generation + structured scoring and comparison + gene splicing (recombination of best traits) + mutation (structurally novel ideas) } -## When to Use -- Optimizing creative output (pitches, copy, designs, strategies) -- When "good enough" isn't enough — need a provably best version -- When multiple viable approaches exist and you need the optimal blend +## Process -import references/algorithm.md +``` +genesplice(artifact) { + researchCriteria(artifact) + |> generationLoop(n=2) + |> scoreAllCandidates + |> suggestWinner +} +``` -## Quality Gate (UI Prototypes) +## Step 1 — Research Criteria -For UI prototype candidates, run the a11y scorer after generating each candidate: +researchCriteria(artifact) => scoredCriteria { + 1. Search for domain-specific best practices + 2. Synthesize into scored criteria (0–10 each) + 3. Source everything — no unsourced criteria + 4. Always include these two holistic criteria: + - *Information Efficiency* — does every element add NEW information? + - *Narrative Structure* — does the reading order tell a story? + 5. For UI prototypes: add "A11y/Readability" criterion (weighted ×2) +} -```bash -bun run aidd-custom/skills/aidd-ui/scripts/a11y-score.ts path/to/candidate/index.html --fix-hints -``` +## Step 2 — Generation Loop -Flow per candidate: -``` -generate → save to prototypes/ → run a11y-score.ts - → score ≥ B? → proceed to genesplice scoring - → score < B? → /aidd-fix using --fix-hints → re-score - → still < B after 2 fix attempts? → score as-is, flag in table -``` +generationLoop(candidates=2, criteria) => generations[] { + Per generation: + 1. Build N candidates with *distinct gene profiles* — not minor variations + 2. Save each candidate to the prototypes folder (see Candidate Output) + 3. For UI candidates: run quality gate (see references/quality-gate.md) + 4. Score each candidate against all criteria + 5. List pros and cons for each + 6. Identify best genes from each candidate + 7. Splice best genes into next generation's starting point + 8. Introduce 1 mutation (structurally novel idea) per generation + 9. Repeat until scores plateau or time-boxed +} -A11y grade maps to genesplice score: A=10, B=8, C=5, D=3, F=1. Weighted ×2. +import references/candidate-output.md +import references/quality-gate.md -## Key Principles +## Step 3 — Score All Candidates -- A collection of individually optimized genes can produce a weaker organism than a coherent design. -- Genesplice finds strong components; the final splice needs holistic review against the *purpose* of the artifact. -- Don't score your own work — the final pass needs a "does this actually work as a whole?" gut check. +scoreAllCandidates(generations[]) => scoringTable { + 1. Final scoring table across all criteria for every candidate from every generation + 2. Stack rank all candidates -## Commands + scoringTable format: + Criteria Cand A Cand B Cand C ... + ──────────────── ────── ────── ────── + [Criterion 1] ? ? ? + [Criterion 2] ? ? ? + ... + TOTAL ?? ?? ?? +} -``` -/genesplice [artifact] [n=2] — run the full evolutionary optimization pipeline -/genesplice review — review the current generation's scoring table -/genesplice winner — name the winner and justify the gene inheritance -``` +## Step 4 — Suggest Winner + +suggestWinner(scoringTable) => winner { + 1. Name the winner + 2. Show which genes it inherited and from whom + 3. State the "one core idea" the output delivers + 4. Justify selection against the *purpose* of the artifact + (e.g. "get a meeting" not "look impressive") +} + +Constraints { + Each candidate must have a *distinct gene profile* — not minor variations. + Mutations introduce structural novelty (e.g. "what if we flip the entire approach?"). + Best genes can come from the lowest-scoring candidate. + Always show the scoring table — transparency builds trust. + Don't score your own work without a holistic "does this actually work?" gut check. + A collection of individually optimized genes can produce a weaker organism + than a coherent but less flashy design. The final splice needs holistic review. + All candidates from all generations are preserved — never delete earlier gens. +} + +Commands { + 🧬 /genesplice [artifact] — run full evolutionary optimization + /genesplice score [candidates] — score existing candidates against criteria + /genesplice splice [candidate-a] [candidate-b] — manually splice two candidates +} diff --git a/ai/skills/aidd-genesplice/references/algorithm.md b/ai/skills/aidd-genesplice/references/algorithm.md deleted file mode 100644 index 80c9c07c..00000000 --- a/ai/skills/aidd-genesplice/references/algorithm.md +++ /dev/null @@ -1,88 +0,0 @@ -# Genesplice Algorithm - -## Pipeline - -``` -genesplice(artifact, n=2) { - researchCriteria(artifact) - |> generationLoop(n) - |> scoreAllCandidates - |> suggestWinner - |> justifySelection -} -``` - -## Steps - -### researchCriteria(artifact) -- Search for domain-specific best practices for the artifact type -- Synthesize findings into scored criteria (0–10 each) -- Source everything — no unsourced criteria -- Always include these two holistic criteria in every scoring matrix: - 1. *Information Efficiency* — does every element add NEW information? - 2. *Narrative Structure* — does the reading order tell a story? -- For UI prototypes: also include "A11y/Readability" criterion (weighted ×2) - -### generationLoop(n) -Repeat until scores plateau or time-box is reached: - -``` -a. Build n candidates with distinct gene profiles -b. Save each candidate to the prototypes folder (see Candidate Output below) -c. Run quality gate per-candidate (see main SKILL.md) -d. Score each (post-fix) against all criteria -e. List pros and cons for each candidate -f. Identify best genes from each candidate -g. Splice best genes into next generation -h. Introduce 1 mutation (novel structural idea) per generation -``` - -### scoreAllCandidates -- Final scoring table across all criteria -- Stack rank all candidates from all generations - -### suggestWinner + justifySelection -- Name the winner -- Show which genes it inherited and from which parent -- State the "one core idea" the output delivers - -## Candidate Output - -Every candidate is saved to a real file in the project's prototypes folder. Never keep candidates only in chat. - -``` -projects/{project}/prototypes/{artifact}/gen{N}-{short_id}/ -├── index.html # The candidate itself -├── preview.png # Screenshot for quick comparison -└── full.png # Full-page screenshot -``` - -- `{short_id}` = 8-char random alphanumeric, e.g. `gen3-a7k2m9p1` -- Generation number increments across the whole evolutionary run -- All candidates from all generations are preserved — never delete earlier gens -- `SCORES.md` at the `{artifact}/` level tracks all candidates across generations - -## Scoring Template - -``` -Criteria Cand X Cand Y -─────────────────── ────── ────── -[Criterion 1] ? ? -[Criterion 2] ? ? -Information Efficiency ? ? -Narrative Structure ? ? -TOTAL ?? ?? -``` - -## Learnings (April 2026) - -- 2 candidates per generation is the sweet spot — enough diversity, manageable scope -- Mutations (structurally novel ideas) often contribute the strongest genes -- The winning candidate rarely looks like any single parent — it's the splice that wins -- Always render/preview each candidate before scoring — catch layout issues early - -### Emergent Redundancy Problem - -Scoring individual criteria can miss problems that only emerge in the *combination*. Example: a giant stat (scored 9 on Typography) + italic punchline (scored 9 on Copy Punch) = the punchline restated the stat. Redundancy that no single criterion caught. - -This is why *Information Efficiency* and *Narrative Structure* are mandatory holistic criteria in every run. diff --git a/ai/skills/aidd-genesplice/references/candidate-output.md b/ai/skills/aidd-genesplice/references/candidate-output.md new file mode 100644 index 00000000..16cfb2ba --- /dev/null +++ b/ai/skills/aidd-genesplice/references/candidate-output.md @@ -0,0 +1,16 @@ +# Candidate Output + +Every candidate is saved to a real file in the project's prototypes folder. +Never keep candidates only in chat. + +``` +projects/{project}/prototypes/{artifact}/gen{N}-{short_id}/ +├── index.html # The candidate itself +├── preview.png # Screenshot for quick comparison +└── full.png # Full-page screenshot +``` + +- `{short_id}` = 8-char random alphanumeric, e.g. `gen3-a7k2m9p1` +- Generation number increments across the whole evolutionary run +- All candidates from all generations are preserved (never delete earlier gens) +- `SCORES.md` at the `{artifact}/` level tracks all candidates across generations diff --git a/ai/skills/aidd-genesplice/references/learnings.md b/ai/skills/aidd-genesplice/references/learnings.md new file mode 100644 index 00000000..32a7e33e --- /dev/null +++ b/ai/skills/aidd-genesplice/references/learnings.md @@ -0,0 +1,32 @@ +# Learnings + +## Generation Size + +2 candidates per generation is the sweet spot — enough diversity, manageable scope. + +## Mutations Win + +Mutations (structurally novel ideas) often contribute the strongest genes. +The winning candidate rarely looks like any single parent — it's the splice +that wins. + +## Always Preview + +Always render/preview each candidate before scoring — catch layout issues early. + +## Emergent Redundancy Problem (Critical) + +Scoring individual criteria can miss problems that only emerge in the +*combination*. Example: giant stats (scored 9 on Typography) + italic +punchline (scored 9 on Copy Punch) = the punchline restated the stats. +Redundancy that no single criterion caught. + +**Must add two holistic criteria to every scoring matrix:** + +1. *Information Efficiency* — does every element add NEW information? +2. *Narrative Structure* — does the reading order tell a story? + +**A collection of individually optimized genes can produce a weaker organism +than a coherent but less flashy design.** Genesplice is good at finding strong +components, but the final splice needs holistic review against the *purpose* +of the artifact (e.g. "get a meeting" not "look impressive"). diff --git a/ai/skills/aidd-genesplice/references/quality-gate.md b/ai/skills/aidd-genesplice/references/quality-gate.md new file mode 100644 index 00000000..a11189fc --- /dev/null +++ b/ai/skills/aidd-genesplice/references/quality-gate.md @@ -0,0 +1,31 @@ +# Quality Gate (Per-Candidate) + +For UI prototype candidates, run the automated a11y scorer after generating +each candidate: + +```bash +bun run aidd-custom/skills/aidd-ui/scripts/a11y-score.ts path/to/candidate/index.html --fix-hints +``` + +## Flow + +``` +generate → save to prototypes/ → run a11y-score.ts + → score ≥ B? → proceed to genesplice scoring + → score < B? → /aidd-fix using --fix-hints output → re-score + → still < B after 2 fix attempts? → score as-is but flag in scoring table +``` + +## A11y Score Mapping + +The a11y score maps to genesplice criteria as: + +| Grade | Score | +|-------|-------| +| A | 10 | +| B | 8 | +| C | 5 | +| D | 3 | +| F | 1 | + +This criterion is weighted ×2 in the scoring table. From a1d2020f2224eae338439f394694aef38ff2aca8 Mon Sep 17 00:00:00 2001 From: Eric Elliott Date: Thu, 9 Apr 2026 15:36:21 -0700 Subject: [PATCH 3/6] Revise candidate output file structure and notes Updated candidate output documentation for clarity and structure. --- .../aidd-genesplice/references/candidate-output.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ai/skills/aidd-genesplice/references/candidate-output.md b/ai/skills/aidd-genesplice/references/candidate-output.md index 16cfb2ba..0defef67 100644 --- a/ai/skills/aidd-genesplice/references/candidate-output.md +++ b/ai/skills/aidd-genesplice/references/candidate-output.md @@ -1,16 +1,14 @@ # Candidate Output -Every candidate is saved to a real file in the project's prototypes folder. -Never keep candidates only in chat. +Every candidate is saved to a folder inside the designated prototypes folder. + +cuid2Slug = ${npx @paralleldrive/cuid2 --slug} ``` -projects/{project}/prototypes/{artifact}/gen{N}-{short_id}/ -├── index.html # The candidate itself +prototypes/$artifactName/gen${n}-${semanticLabel}${cuid2slug}/ +├── $artifactName # The candidate itself ├── preview.png # Screenshot for quick comparison └── full.png # Full-page screenshot ``` -- `{short_id}` = 8-char random alphanumeric, e.g. `gen3-a7k2m9p1` -- Generation number increments across the whole evolutionary run -- All candidates from all generations are preserved (never delete earlier gens) -- `SCORES.md` at the `{artifact}/` level tracks all candidates across generations +Generate screenshots when relevant, e.g. candidate has a UI. From 2b5dab00a56b7b79914337068c1542ac7e05ce60 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 9 Apr 2026 23:12:59 +0000 Subject: [PATCH 4/6] feat(genesplice): add research subcommand with web search and citation guidance - Extract /genesplice research as a standalone subcommand: f(context) => reviewedCriteria - Require web search favoring research papers, peer-reviewed studies, and authoritative industry findings over opinion pieces - Each criterion outputs one paragraph of explanation + citations (author, title, URL/DOI) - Reject any criterion that cannot be cited - Update process pipeline: researchCriteria => research - Add /genesplice research to Commands block Co-authored-by: Eric Elliott --- ai/skills/aidd-genesplice/SKILL.md | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/ai/skills/aidd-genesplice/SKILL.md b/ai/skills/aidd-genesplice/SKILL.md index 3485662b..f7b7a3c9 100644 --- a/ai/skills/aidd-genesplice/SKILL.md +++ b/ai/skills/aidd-genesplice/SKILL.md @@ -26,7 +26,7 @@ Competencies { ``` genesplice(artifact) { - researchCriteria(artifact) + research(artifact) |> generationLoop(n=2) |> scoreAllCandidates |> suggestWinner @@ -35,14 +35,26 @@ genesplice(artifact) { ## Step 1 — Research Criteria -researchCriteria(artifact) => scoredCriteria { - 1. Search for domain-specific best practices - 2. Synthesize into scored criteria (0–10 each) - 3. Source everything — no unsourced criteria - 4. Always include these two holistic criteria: +research(context) => reviewedCriteria { + 1. Use web search to find best practices and most-loved features for this + class of artifact — favor quality sources: research papers, published + industry findings, peer-reviewed studies, and authoritative practitioner + reports over opinion pieces or blog posts + 2. Synthesize findings into scored criteria (0–10 each), one criterion per + finding — no bundling + 3. For each criterion write one paragraph of explanation + citations + (author, title, URL or DOI) + 4. Source everything — reject any criterion that cannot be cited + 5. Always include these two holistic criteria (no citation needed): - *Information Efficiency* — does every element add NEW information? - *Narrative Structure* — does the reading order tell a story? - 5. For UI prototypes: add "A11y/Readability" criterion (weighted ×2) + 6. For UI prototypes: add "A11y/Readability" criterion (weighted ×2) + + output format: + ## [Criterion Name] (weight: N) + [One paragraph explaining what this criterion measures and why it matters, + grounded in the research.] + *Sources:* [Author, "Title", URL or DOI] } ## Step 2 — Generation Loop @@ -101,6 +113,7 @@ Constraints { Commands { 🧬 /genesplice [artifact] — run full evolutionary optimization + /genesplice research [context] — research criteria only; output reviewedCriteria /genesplice score [candidates] — score existing candidates against criteria /genesplice splice [candidate-a] [candidate-b] — manually splice two candidates } From ad3af2b5ef0cec8c4de0d0da1c9491056dd1253d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 9 Apr 2026 23:19:18 +0000 Subject: [PATCH 5/6] fix(genesplice): restore n=generations, add userCriteria, drop mandatory review pause - n parameter = number of generations (not candidates-per-generation) 2 candidates/generation is the fixed sweet spot per learnings.md - Add optional userCriteria? to genesplice() and research() signatures User-supplied criteria are locked in first and are not overridable by research Research fills gaps not covered by userCriteria - Skill runs autonomously by default; no mandatory user review steps - Update command signature: /genesplice [-n=2] [context] Co-authored-by: Eric Elliott --- ai/skills/aidd-genesplice/SKILL.md | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/ai/skills/aidd-genesplice/SKILL.md b/ai/skills/aidd-genesplice/SKILL.md index f7b7a3c9..f06eb760 100644 --- a/ai/skills/aidd-genesplice/SKILL.md +++ b/ai/skills/aidd-genesplice/SKILL.md @@ -25,9 +25,9 @@ Competencies { ## Process ``` -genesplice(artifact) { - research(artifact) - |> generationLoop(n=2) +genesplice(context, n=2, userCriteria?) { + research(context, userCriteria?) + |> generationLoop(generations=n) |> scoreAllCandidates |> suggestWinner } @@ -35,16 +35,16 @@ genesplice(artifact) { ## Step 1 — Research Criteria -research(context) => reviewedCriteria { - 1. Use web search to find best practices and most-loved features for this +research(context, userCriteria?) => criteria { + 1. If userCriteria are provided, lock them in first — they are not overridable + 2. Use web search to find best practices and most-loved features for this class of artifact — favor quality sources: research papers, published industry findings, peer-reviewed studies, and authoritative practitioner reports over opinion pieces or blog posts - 2. Synthesize findings into scored criteria (0–10 each), one criterion per - finding — no bundling - 3. For each criterion write one paragraph of explanation + citations - (author, title, URL or DOI) - 4. Source everything — reject any criterion that cannot be cited + 3. Synthesize findings into additional scored criteria (0–10 each) that fill + gaps not covered by userCriteria — one criterion per finding, no bundling + 4. For each researched criterion write one paragraph of explanation + citations + (author, title, URL or DOI) — reject any criterion that cannot be cited 5. Always include these two holistic criteria (no citation needed): - *Information Efficiency* — does every element add NEW information? - *Narrative Structure* — does the reading order tell a story? @@ -59,9 +59,9 @@ research(context) => reviewedCriteria { ## Step 2 — Generation Loop -generationLoop(candidates=2, criteria) => generations[] { - Per generation: - 1. Build N candidates with *distinct gene profiles* — not minor variations +generationLoop(generations=n, criteria) => generations[] { + Run `generations` rounds; each round produces 2 candidates (the proven sweet spot): + 1. Build 2 candidates with *distinct gene profiles* — not minor variations 2. Save each candidate to the prototypes folder (see Candidate Output) 3. For UI candidates: run quality gate (see references/quality-gate.md) 4. Score each candidate against all criteria @@ -69,7 +69,6 @@ generationLoop(candidates=2, criteria) => generations[] { 6. Identify best genes from each candidate 7. Splice best genes into next generation's starting point 8. Introduce 1 mutation (structurally novel idea) per generation - 9. Repeat until scores plateau or time-boxed } import references/candidate-output.md @@ -112,7 +111,7 @@ Constraints { } Commands { - 🧬 /genesplice [artifact] — run full evolutionary optimization + 🧬 /genesplice [-n=2] [context] — run full evolutionary optimization; n = number of generations /genesplice research [context] — research criteria only; output reviewedCriteria /genesplice score [candidates] — score existing candidates against criteria /genesplice splice [candidate-a] [candidate-b] — manually splice two candidates From f8b6e255df06b87bf41693eb14324adce91e8f2f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 9 Apr 2026 23:25:48 +0000 Subject: [PATCH 6/6] refactor(genesplice): isolate effects from thinking, add gatherContext stage Pipeline: gatherContext => research => runGenerations(n) => summarize - Add gatherContext (effect): scan workspace for existing artifacts, extract user-supplied criteria from freeform context prompt - Split research into fetchBestPractices (effect) + synthesizeCriteria (thinking) fetchBestPractices skips web search if enrichedContext already has criteria - Split generationLoop into buildCandidates (effect) + scoreAndSplice (thinking) - Criteria now come from freeform context; userCriteria? param removed - Add 'Run autonomously by default' to Constraints - Tag each stage with effect/thinking so eval tests can target them correctly Co-authored-by: Eric Elliott --- ai/skills/aidd-genesplice/SKILL.md | 90 +++++++++++++++++------------- 1 file changed, 51 insertions(+), 39 deletions(-) diff --git a/ai/skills/aidd-genesplice/SKILL.md b/ai/skills/aidd-genesplice/SKILL.md index f06eb760..9982b824 100644 --- a/ai/skills/aidd-genesplice/SKILL.md +++ b/ai/skills/aidd-genesplice/SKILL.md @@ -25,58 +25,71 @@ Competencies { ## Process ``` -genesplice(context, n=2, userCriteria?) { - research(context, userCriteria?) - |> generationLoop(generations=n) - |> scoreAllCandidates - |> suggestWinner +genesplice(context, n=2) { + gatherContext(context) // effect + |> research // effect → thinking + |> runGenerations(n) // effect → thinking, ×n + |> summarize // thinking } ``` -## Step 1 — Research Criteria - -research(context, userCriteria?) => criteria { - 1. If userCriteria are provided, lock them in first — they are not overridable - 2. Use web search to find best practices and most-loved features for this - class of artifact — favor quality sources: research papers, published - industry findings, peer-reviewed studies, and authoritative practitioner - reports over opinion pieces or blog posts - 3. Synthesize findings into additional scored criteria (0–10 each) that fill - gaps not covered by userCriteria — one criterion per finding, no bundling - 4. For each researched criterion write one paragraph of explanation + citations - (author, title, URL or DOI) — reject any criterion that cannot be cited - 5. Always include these two holistic criteria (no citation needed): +## Step 1 — Gather Context + +gatherContext(userPrompt) => enrichedContext { // effect + 1. Scan workspace for existing artifacts relevant to the prompt + (prior candidates, specs, related files) — pull them into context + 2. Extract any fitness criteria the user included in their prompt +} + +## Step 2 — Research + +Isolated sub-stages so reasoning and I/O effects can be tested independently. + +fetchBestPractices(enrichedContext) => rawFindings { // effect + (enrichedContext has sufficient criteria) => skip; pass existing criteria as rawFindings + (no criteria) => + Use web search to find best practices for this class of artifact. + Favor research papers, peer-reviewed studies, and authoritative industry + findings over opinion pieces or blog posts. +} + +synthesizeCriteria(rawFindings, enrichedContext) => criteria { // thinking + 1. Lock in any user-supplied criteria from enrichedContext first — not overridable + 2. Synthesize researched findings into additional scored criteria (0–10 each) + that fill gaps — one criterion per finding, no bundling + 3. Cite every researched criterion (author, title, URL or DOI) — reject uncitable criteria + 4. Always include (no citation needed): - *Information Efficiency* — does every element add NEW information? - *Narrative Structure* — does the reading order tell a story? - 6. For UI prototypes: add "A11y/Readability" criterion (weighted ×2) + 5. For UI prototypes: add "A11y/Readability" (weighted ×2) output format: ## [Criterion Name] (weight: N) - [One paragraph explaining what this criterion measures and why it matters, - grounded in the research.] + [One paragraph grounded in the research.] *Sources:* [Author, "Title", URL or DOI] } -## Step 2 — Generation Loop +## Step 3 — Run Generations + +Repeat n times. Each round produces 2 candidates and a splice seed for the next round. -generationLoop(generations=n, criteria) => generations[] { - Run `generations` rounds; each round produces 2 candidates (the proven sweet spot): - 1. Build 2 candidates with *distinct gene profiles* — not minor variations - 2. Save each candidate to the prototypes folder (see Candidate Output) +buildCandidates(seed, context) => candidates { // effect + 1. Generate 2 candidates with *distinct gene profiles* from the seed — not minor variations + 2. Save each to the prototypes folder (see references/candidate-output.md) 3. For UI candidates: run quality gate (see references/quality-gate.md) - 4. Score each candidate against all criteria - 5. List pros and cons for each - 6. Identify best genes from each candidate - 7. Splice best genes into next generation's starting point - 8. Introduce 1 mutation (structurally novel idea) per generation } -import references/candidate-output.md -import references/quality-gate.md +scoreAndSplice(candidates, criteria) => nextSeed { // thinking + 1. Score each candidate against all criteria + 2. List pros and cons for each + 3. Identify best genes from each candidate + 4. Splice best genes into next generation seed + 5. Introduce 1 mutation (structurally novel idea) into the seed +} -## Step 3 — Score All Candidates +## Step 4 — Summarize -scoreAllCandidates(generations[]) => scoringTable { +scoreAllCandidates(generations[]) => scoringTable { // thinking 1. Final scoring table across all criteria for every candidate from every generation 2. Stack rank all candidates @@ -89,9 +102,7 @@ scoreAllCandidates(generations[]) => scoringTable { TOTAL ?? ?? ?? } -## Step 4 — Suggest Winner - -suggestWinner(scoringTable) => winner { +suggestWinner(scoringTable) => winner { // thinking 1. Name the winner 2. Show which genes it inherited and from whom 3. State the "one core idea" the output delivers @@ -108,11 +119,12 @@ Constraints { A collection of individually optimized genes can produce a weaker organism than a coherent but less flashy design. The final splice needs holistic review. All candidates from all generations are preserved — never delete earlier gens. + Run autonomously by default — no mandatory user review steps. } Commands { 🧬 /genesplice [-n=2] [context] — run full evolutionary optimization; n = number of generations - /genesplice research [context] — research criteria only; output reviewedCriteria + /genesplice research [context] — gatherContext + research only; output criteria /genesplice score [candidates] — score existing candidates against criteria /genesplice splice [candidate-a] [candidate-b] — manually splice two candidates }