Skip to content

Replace turbo-fetch skill with dynamic-forms (turbo_form gem) - #63

Merged
OutlawAndy merged 3 commits into
mainfrom
dynamic-forms-skill
Sep 29, 2026
Merged

OutlawAndy merged 3 commits into
mainfrom
dynamic-forms-skill

Conversation

@OutlawAndy

@OutlawAndy OutlawAndy commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Why

The turbo-fetch skill taught agents to hand-wire a route, controller action, Turbo Stream view and Stimulus controller for every dynamic form. The turbo_form gem replaces all of that. The skill is renamed dynamic-forms, says turbo_form is the mechanism, and sends agents to the gem's README for the API instead of repeating it, so the skill doesn't fall out of date with each gem release.

What Changed

  • Renamed turbo-fetch to dynamic-forms and rewrote it around the turbo_form gem, linking its GitHub README as the API reference
  • Existing turbo_fetch / turbo-form Stimulus wiring is marked superseded: don't extend it, convert it when you touch it
  • routing-patterns applies the engine's :turbo_form concern instead of teaching how to define a turbo_fetch concern
  • Updated the README table, AGENTS.md and the stimulus-controllers related-skills link
  • form-auto-save specs wait on a count kept by the auto-save controller instead of the turbo-fetch controller, whose count never moved on an auto-save; rails-audit reports turbo_fetch actions as conversion candidates

Screenshots

N/A — no UI changes


Pre-merge

  • Have you updated README.md and AGENTS.md? Any new, renamed, or removed skill needs a row in the README table and a bullet in AGENTS.md. Check the box or replace it with N/A if this PR touches no skill.

🤖 Generated with Claude Code

The turbo_form gem is RoleModel's mechanism for dynamic form interaction.
The skill now says so, points at the gem's README for the API, and treats
hand-wired turbo_fetch code as superseded. routing-patterns no longer
teaches defining a turbo_fetch concern.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 29, 2026 15:11
@OutlawAndy OutlawAndy self-assigned this Sep 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The form auto-save skill still instructs agents to introduce the superseded turbo-fetch wiring.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Replaces the hand-wired turbo-fetch skill with turbo_form-based dynamic-form guidance.

Changes:

  • Adds the dynamic-forms skill and removes turbo-fetch.
  • Updates routing guidance and related-skill references.
  • Updates repository indexes.
File Description
skills/​turbo-fetch/​SKILL.md Removes obsolete guidance.
skills/​dynamic-forms/​SKILL.md Adds turbo_form guidance.
skills/​routing-patterns/​SKILL.md Uses the gem-provided concern.
skills/​stimulus-controllers/​SKILL.md Updates the related-skill link.
README.md Updates the skill catalog.
AGENTS.md Documents the replacement skill.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread skills/dynamic-forms/SKILL.md
OutlawAndy and others added 2 commits September 29, 2026 10:17
Auto-save specs waited on the turbo-fetch controller's count, which only
moves on turbo-fetch#perform, never on the auto-save submission. The
form-auto-save controller now counts successful Turbo submissions itself
and the helper waits on that. rails-audit reports turbo_fetch actions as
conversion candidates instead of calling them a convention.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The auto-save listener can double-count after reconnection, and several instructions overstate the gem’s routing, migration, and redirect behavior.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
Resolved since last review (1)
Previously missed (2)

In code that hasn't changed since last review

Low severity Make migration conditional on supported form behavior

skills/​dynamic-forms/​SKILL.md:36

This migration instruction is unconditional, but the referenced gem explicitly excludes debouncing, request cancellation, loading state, and the normal flow is limited to resourceful new/edit pages. For those cases the hand-written behavior may still be necessary (or require dynamic_action:), so automatically deleting it can remove required behavior. Make conversion conditional on the form fitting the README's supported paths.

Low severity Limit dynamic form guidance to supported routing modes

skills/​routing-patterns/​SKILL.md:43

The upstream API has a dynamic_action: mode that posts to an explicitly configured URL and expressly does not require dynamic: true; that mode does not use the generated new/edit routes from this concern. Saying all dynamic forms use the concern gives incorrect routing guidance and can add irrelevant endpoints. Limit this rule to the default resource-page mode and call out the custom-action exception.

Comment thread skills/form-auto-save/SKILL.md
Comment thread skills/form-auto-save/SKILL.md
@OutlawAndy
OutlawAndy merged commit 19d6423 into main Sep 29, 2026
1 check passed
@OutlawAndy
OutlawAndy deleted the dynamic-forms-skill branch September 29, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants