Skip to content

Instantly share code, notes, and snippets.

Interview me relentlessly about this idea until we've pinned down the real problem, who actually has it, and the smallest thing I could ship to test it with real users.

Walk down one branch at a time, resolving each decision before moving on. For each question, provide your recommended answer based on what I've told you so far.

Ask one question at a time. Push back when my answers are vague, hypothetical, or scope-creep — "developers" isn't a user, "it would be cool if" isn't a problem, and "v1 should also do X" usually means v2.

Cover roughly in this order:

  1. The problem — what specifically hurts, for whom, how they handle it today
  2. Why it matters — frequency, cost, what changes if it's solved
@jonhilt
jonhilt / refactor.md
Created April 15, 2026 12:44
Help me refactor

Component Refactoring Exercise

You're going to walk me through refactoring a messy Blazor component. I want to learn the decision-making process, not just see the "right" answer.

The Rules

  1. One concern at a time — Don't show me the fully refactored code. Walk me through each decision.
  2. Ask me questions — Before extracting anything, ask me what I think should happen. Guide me to the answer.
  3. Name the principle — When we make a decision, tell me what principle it connects to (cohesion, coupling, SRP, etc.) but keep it brief.
  4. Show the smell first — Point out what's wrong before fixing it.
@jonhilt
jonhilt / SKILL.md
Last active April 8, 2026 08:59
Reflect skill
description Reflect on the current AI coding session to extract learnings and improve guidance. Use when a session went off the rails, you want to capture learnings, improve instructions, document preferences, or ask "what should we remember from this session."

Reflect on Session

Extract practical learnings from the current conversation and persist them so they survive beyond this session. One user checkpoint, then implement.

Phase 1: Scan Session Evidence

@page "/Testing"
<label class="fileInputZone" for="inputFile" title="Upload files">
Upload
</label>
<InputFile id="inputFile" OnChange="LoadFiles" multiple accept="@(String.Join(','))"/>
@foreach (var uploadInfo in _queuedFileUploads)
{
<A>
<B @bind-xyzInB = "@_xyzInA"><B>
</A>
@code {
private FipsDetail? _xyzInA { get; set; }
}
<MyFancyReusableBusinessLogic>
<MyOtherComponent />
</MyFancyReusableBusinessLogic>
@jonhilt
jonhilt / MyProject.csproj
Last active January 10, 2022 17:41
Testing out copying mudblazor files for intellisense purposes
<Target Name="CollectMudBlazorStaticAssets" DependsOnTargets="ResolveStaticWebAssetsInputs" AfterTargets="Build" Condition=" '$(Configuration)' == 'Debug' ">
<Copy SourceFiles="%(StaticWebAsset.Identity)" DestinationFolder="wwwroot/temp" Condition="$([System.String]::Copy(%(StaticWebAsset.Identity)).Contains('mudblazor'))" />
</Target>
<div class="rounded-md bg-white p-2 flex shadow">
<div>
<span class="block mb-4">@Text</span>
</div>
@if (!string.IsNullOrEmpty(Initials))
{
<div class="flex-none ml-2 w-8 h-8 rounded-full flex justify-center items-center bg-purple-400">
<span class="text-sm text-white">@Initials</span>
</div>
}
namespace MessagingTestApp.Features.Mesgs
{
public class List
{
public class Query : IRequest<Model>
{
}
public class Model
{
@jonhilt
jonhilt / Index.cshtml
Last active October 7, 2020 10:54
Prerendering Blazor WASM components
@page
@using PracticalAspNet.UI.Client.Pages
@model IndexModel
@{
ViewData["Title"] = "Home page";
}
<div class="text-center">
<script src="_framework/blazor.webassembly.js"></script>
<component type="typeof(Counter)" render-mode="WebAssemblyPrerendered"/>