Skip to content

brainstorming/writing-plans SKILL efficiency #512

Open

Description

@iiian-crayon

Is your feature request related to a problem? Please describe.
Had a convo with claude about the plan.md that it generated for a feature I'm building [see additional context]. Sticking all of the tasks in a single file is maybe not the most efficient approach from a token burn perspective. It's minor, as it seems the subagent workflow efficiently breaks up the parent doc, although the doc could be written as multiple separate step files, the plan itself could be a directory.

Describe the solution you'd like
Consider splitting up the steps into .md files in a plan/ directory. I don't think there's any lost value from user readability in it being multiple documents.

Describe alternatives you've considered
Are there superpower plugin config options? This might be a nice enhancement, say --split-up-plans or --efficiency-mode

Additional context

file: skills/brainstorming/SKILL.md

**Documentation:**
- Write the validated design to `docs/plans/YYYY-MM-DD-<topic>-design.md`
- Use elements-of-style:writing-clearly-and-concisely skill if available
- Commit the design document to git

Claude Code conversation:


Me: Explain the mechanics from an LLM token burn perspective of how you would work through docs/plans/2026-02-19-do-
my-thing.md. It's 48k characters long. There are lots of steps. By my understanding, your context
  window would dry of it after awhile, and you'd probably re-read it. Would you reread docs/plans/2026-02-19-do-my-
thing.md multiple times?

Claude:
 Great question. Let me walk through the mechanics honestly.

  The token math on a 48k-char plan

  ~48k characters is roughly 12-15k tokens. Here's what happens during execution:

  Monolithic plan, single session:
  - I read the plan once → 12-15k tokens into context
  - I start working on Task 1 — writing code, reading files, running tests. Context fills up.
  - By Task 3-4, the system's automatic context compression kicks in. My original read of the plan gets summarized/truncated.
  - I need to know what Task 4 says → I re-read the full 48k file. Another 12-15k tokens.
  - This repeats roughly every 2-3 tasks.
  - Estimated plan-reading cost across 9 tasks: ~45-60k tokens (3-4 full re-reads)

  And that's just reading the plan — the actual code reads, writes, and test outputs pile on top.

  How the subagent model helps

  The subagent-driven-development approach is specifically designed to manage this:

  1. Parent agent reads the plan once, creates lightweight TaskCreate entries (just the subject + description)
  2. For each task, parent extracts only that task's description (~3-5k chars) and sends it to a fresh subagent
  3. The subagent never sees the full 48k plan — it gets a focused ~1-2k token prompt
  4. Subagent finishes, returns a short summary to the parent
  5. Parent's context stays lean: task list + subagent summaries

  Token cost: ~15k (one full read) + ~2k per task dispatch = ~33k total vs the monolithic ~60k+. And the parent context stays
  much healthier.


  Would splitting the file help? Yes, substantially.

  If the plan were:
  docs/plans/2026-02-19-do-my-thing/
    overview.md          (~2k chars — task list with one-liners)
    task-1-xxx.md      (~5k chars)
    task-2-yyy.md     (~4k chars)
    ...

  Then even in a single-session approach:
  - Read overview to know what's next: ~500 tokens
  - Read just the current task file: ~1-2k tokens
  - Per-task cost: ~2.5k tokens instead of 12-15k

  Over 9 tasks that's ~22k tokens on plan reads vs ~33k. About 1.5x more efficient.

  What the superpowers skill doesn't do

  Honestly — the writing-plans skill writes a single monolithic file. It doesn't split by task. The token efficiency comes from
   the
  execution skills (subagent-driven-development, executing-plans) which use the TaskCreate system as a lightweight index
   and dispatch
  focused prompts. But the plan file itself is a known inefficiency.

  The TaskCreate/TaskList system is the real mitigation — those entries persist in a special store that survives context 
  compression,
  so even when the plan file read gets compressed away, I still know "I'm on task 5 of 9, here's what task 5 says." It's a 
  summary
  cache, essentially.

  TL;DR

  You're right to notice this. The monolithic plan is expensive to re-read. The two mitigations are: (1) subagents that only see 
  their
  slice, and (2) the task list as a compression-resistant index. Splitting the plan into per-task files would be strictly better and
  the skill probably should do that. It doesn't currently.

Activity

  1. added
    enhancement
    on Feb 20, 2026
  2. iiian-crayon commented on Feb 20, 2026

    @iiian-crayon
    Author

    And another thing is like, it's just dropping the raw code for the steps it needs to do into the plan.md. I could get how that's probably the only way to setup a subagent for success on what it's doing, maybe that's the most efficient way to communicate it, but also it feels weird without thinking deeper about it. Like is the raw code itself the most efficient compression of the task the subagent needs to implement? Maybe the subagent doesn't walk away having only implemented the raw code from the plan.md... Just makes me wonder

  3. changed the title [-]brainstorming SKILL efficiency[/-] [+]brainstorming/writing-plans SKILL efficiency[/+] on Feb 20, 2026
  4. iiian-crayon commented on Feb 20, 2026

    @iiian-crayon
    Author

    Just a thought, I can totally see this ticket getting closed as will-not-implement. Cheers on the rad tool!

  5. joeblackwaslike commented on Feb 20, 2026

    @joeblackwaslike

    Sticking all of the tasks in a single file is maybe not the most efficient approach from a token burn perspective. It's minor, as it seems the subagent workflow efficiently breaks up the parent doc, although the doc could be written as multiple separate step files, the plan itself could be a directory.

    Totally agreed here, I used superpowers the other day for the first time and btw the experience of cc actually creating something non-trivial and the result actually being great, is amazing. But I also noticed it burned through a lot of tokens, easily $50+. I did what it looks like you did too, used claude to analyze the transcripts and figure out where the inefficiencies lie. My Implementation plan was over 1750 lines! What did it contain? Some examples:

    ## Phase 1: Foundation
    
    ### Task 1: Scaffold TanStack Start project
    
    **Files:**
    - Create: `frontend/package.json`
    - Create: `frontend/app.config.ts`
    - Create: `frontend/tsconfig.json`
    - Create: `frontend/app/routes/__root.tsx`
    - Create: `frontend/app/routes/index.tsx`
    - Create: `frontend/app/styles/globals.css`
    
    **Step 1: Create frontend directory and init TanStack Start**
    
    ```bash
    cd frontend
    pnpm create @tanstack/start@latest . --template basic
    ```
    
    If the CLI doesn't support `--template`, use manual setup:
    
    ```bash
    mkdir -p frontend && cd frontend
    pnpm init
    pnpm add @tanstack/react-start @tanstack/react-router vinxi react react-dom
    pnpm add -D @types/react @types/react-dom typescript vite
    ```
    
    **Step 2: Verify dev server starts**
    
    ```bash
    cd frontend && pnpm dev
    ```
    
    Expected: Dev server starts on localhost, renders a page.
    
    **Step 3: Commit**
    
    ```bash
    git add frontend/
    git commit -m "feat: scaffold TanStack Start project"
    ```
    

    My thoughts: this is a lot of content, I would have expected

    ### Task 1: Scaffold TanStack Start project
    1. Initialize repo using tanstack start
    2. verify the dev server starts without errors
    3. commit your work
    

    Next example

    ### Task 4: Create database schema migration
    
    **Files:**
    - Create: `supabase/migrations/00001_initial_schema.sql`
    
    **Step 1: Create the migration file**
    
    ```bash
    supabase migration new initial_schema
    ```
    
    **Step 2: Write the schema SQL**
    
    File: `supabase/migrations/<timestamp>_initial_schema.sql`
    
    ```sql
    ** 300 lines of commented sql omitted ** It literally injected the whole database schema
    ```
    
    **Step 3: Apply migration**
    
    ```bash
    supabase db reset
    ```
    
    Expected: All tables created, RLS policies applied, storage bucket created.
    
    **Step 4: Verify schema**
    
    ```bash
    supabase db lint
    ```
    
    Expected: No errors.
    
    **Step 5: Commit**
    
    ```bash
    git add supabase/migrations/
    git commit -m "feat: add initial database schema with RLS and indexes"
    ```
    

    My thoughts: this is a ridiculous amount of detail, especially the 300 lines of SQL I edited out. I would have expected

    ### Task 4: Create database schema migration
    1. Create a new supabase migration with the initial table schema.
    2. Apply the migration
    3. Verify the db is as expected, all tables created, rls policies applied, storage bucket created, etc
    4. Commit your work
    

    Ok, what's next?

    ### Task 5: Set up Supabase client libraries
    
    **Files:**
    - Create: `frontend/app/lib/supabase/client.ts`
    - Create: `frontend/app/lib/supabase/server.ts`
    - Create: `frontend/app/lib/supabase/middleware.ts`
    - Create: `frontend/app/lib/supabase/types.ts`
    
    **Step 1: Install Supabase deps**
    
    ```bash
    cd frontend
    pnpm add @supabase/supabase-js @supabase/ssr
    ```
    
    **Step 2: Generate TypeScript types from schema**
    
    ```bash
    supabase gen types typescript --local > frontend/app/lib/supabase/types.ts
    ```
    
    This generates type-safe database types from your local schema.
    
    **Step 3: Create browser client**
    
    File: `frontend/app/lib/supabase/client.ts`
    
    ```ts
    import { createBrowserClient } from "@supabase/ssr";
    import type { Database } from "./types";
    
    export function createClient() {
      return createBrowserClient<Database>(
        import.meta.env.VITE_SUPABASE_URL,
        import.meta.env.VITE_SUPABASE_ANON_KEY
      );
    }
    ```
    
    **Step 4: Create server client**
    
    File: `frontend/app/lib/supabase/server.ts`
    
    ```ts
    import { createServerClient } from "@supabase/ssr";
    import { getCookie, setCookie } from "vinxi/http";
    import type { Database } from "./types";
    
    export function createServerSupabaseClient() {
      return createServerClient<Database>(
        import.meta.env.VITE_SUPABASE_URL,
        import.meta.env.VITE_SUPABASE_ANON_KEY,
        {
          cookies: {
            getAll() {
              // Read all cookies from the request
              // Implementation depends on TanStack Start's cookie API
              return Object.entries(getCookie() || {}).map(([name, value]) => ({
                name,
                value: value ?? "",
              }));
            },
            setAll(cookies) {
              cookies.forEach(({ name, value, options }) => {
                setCookie(name, value, options);
              });
            },
          },
        }
      );
    }
    ```
    
    > **Note:** The exact cookie API depends on TanStack Start's server context. Check `@tanstack/react-start` docs at implementation time. The `vinxi/http` utilities (`getCookie`, `setCookie`) are the standard approach since TanStack Start uses Vinxi under the hood. Consult the TanStack Start docs via context7 MCP if the API has changed.
    
    **Step 5: Commit**
    
    ```bash
    git add frontend/app/lib/supabase/
    git commit -m "feat: add Supabase client libraries with typed schema"
    ```
    

    Again very verbose, complete implementations of boilerplate and exact shell commands to execute seem a bit much. I would have expected

    ### Task 5: Set up Supabase client libraries
    
    Task Context: `frontend/app/lib/supabase/`
    1. Install the supabase SDK and dependencies
    2. Generate TypeScript types from db schema, write to `$context/types.ts`
    3. Add supabase client boilerplate to `$context/client.ts`
    4. Add server client boilerplate in `$context/server.ts`
    5. Commit your work
    

    At this point I'm noticing some un necessary repetition in my expectations even. Shouldn't "commit your work when task is complete be front-loaded context in a skill?

    Ok one more

    ### Task 6: Implement auth flow
    
    **Files:**
    - Create: `frontend/app/routes/login.tsx`
    - Create: `frontend/app/routes/_authenticated.tsx`
    - Create: `frontend/app/components/auth/login-form.tsx`
    - Create: `frontend/app/components/auth/signup-form.tsx`
    
    **Step 1: Create login page**
    
    File: `frontend/app/routes/login.tsx`
    
    The login page should:
    - Check if user is already authenticated (server-side in `beforeLoad`), redirect to `/dashboard` if so
    - Render a card with two tabs: "Sign In" and "Sign Up"
    - Sign In: email + password fields, submit calls `supabase.auth.signInWithPassword()`
    - Sign Up: email + password + confirm password, submit calls `supabase.auth.signUp()`
    - OAuth buttons for Google and GitHub: call `supabase.auth.signInWithOAuth({ provider: 'google' })`
    - On success, redirect to `/dashboard`
    - Error messages displayed inline
    
    Use shadcn `Card`, `Tabs`, `Input`, `Label`, `Button` components. Use React Hook Form for validation.
    
    **Step 2: Create auth guard layout route**
    
    File: `frontend/app/routes/_authenticated.tsx`
    
    ```tsx
    import { createFileRoute, redirect, Outlet } from "@tanstack/react-router";
    import { createServerSupabaseClient } from "../lib/supabase/server";
    
    export const Route = createFileRoute("/_authenticated")({
      beforeLoad: async () => {
        const supabase = createServerSupabaseClient();
        const { data: { user } } = await supabase.auth.getUser();
    
        if (!user) {
          throw redirect({ to: "/login" });
        }
    
        return { user };
      },
      component: () => <Outlet />,
    });
    ```
    
    > **Note:** The exact server-side API for `beforeLoad` in TanStack Start may differ from TanStack Router SPA mode. Consult TanStack Start docs. The key is: call `supabase.auth.getUser()` server-side, redirect if no user, pass user to child routes via route context.
    
    **Step 3: Update index route to redirect**
    
    File: `frontend/app/routes/index.tsx`
    
    ```tsx
    import { createFileRoute, redirect } from "@tanstack/react-router";
    
    export const Route = createFileRoute("/")({
      beforeLoad: () => {
        throw redirect({ to: "/dashboard" });
      },
    });
    ```
    
    **Step 4: Verify auth flow manually**
    
    1. Navigate to `/dashboard` — should redirect to `/login`
    2. Sign up with email/password
    3. Should redirect to `/dashboard` (even if dashboard is blank)
    4. Refresh page — should stay on `/dashboard` (session persists)
    
    **Step 5: Commit**
    
    ```bash
    git add frontend/app/
    git commit -m "feat: implement auth flow with login, signup, and route guard"
    ```
    

    OK, not too bad, step 1 is very reasonable, it uses the models ability to apply stated logic, constraints and generate the code themselves.

    step 2 then generates the auth guard route upfront then tells him btw this may not be right, check the docs, the key point is to "call supabase.auth.getUser() server-side, redirect if no user, pass user to child routes via route context." facepalm So it's almost clear the agent realizes its micromanaging and starts behaving more logically, but the realization is short lived.

    Step 4 is actually reasonable

    Step 5 can we take a moment to appreciate how strange it is to reserve a step in every task to tell the agent how to commit his work and the exact commit message to use while doing it?

    Sigh... at this level of detail why is there an implementation plan the agent could have just saved the content where its telling the subagent to and save a ton of tokens.

    The level of detail in these implementation plans is kinda crazy. I would almost say you don't even need an agent to implement them.

    What should we do @obra? Is there a reason we're not seeing why this level of detail is necessary. Are you seeing the same things when you use superpowers? Are we doing it wrong?

  6. joeblackwaslike commented on Feb 20, 2026

    @joeblackwaslike

    And another thing is like, it's just dropping the raw code for the steps it needs to do into the plan.md. I could get how that's probably the only way to setup a subagent for success on what it's doing, maybe that's the most efficient way to communicate it, but also it feels weird without thinking deeper about it. Like is the raw code itself the most efficient compression of the task the subagent needs to implement? Maybe the subagent doesn't walk away having only implemented the raw code from the plan.md... Just makes me wonder

    Me too, I actually discuss this same thing in the above comment!

  7. joeblackwaslike commented on Feb 20, 2026

    @joeblackwaslike

    I just realized I provided examples from something I built using superpowers but for some reason it decided not to do TDD. I was really disappointed and added a bunch of stuff to CLAUDE.md about TDD being necessary, the implementation plan it created next is the same prob as above plus the added detail of not telling the subagent to do tdd but instead doing TDD for them by micromanaging their every move. it's actually really funny, here's an excerpt:

    ### Task 2: Contacts query layer
    
    **Files:**
    - Create: `frontend/src/lib/queries/contacts.ts`
    - Test: `frontend/src/lib/queries/__tests__/contacts.test.ts`
    
    **Step 1: Write the failing test**
    
    ```typescript
    // frontend/src/lib/queries/__tests__/contacts.test.ts
    import { describe, it, expect, vi } from "vitest";
    
    // We'll test that the query functions and hooks are exported correctly
    // and that the search hook debounces properly
    describe("contacts query layer", () => {
      it("exports useContacts hook", async () => {
        const mod = await import("../contacts");
        expect(mod.useContacts).toBeDefined();
        expect(typeof mod.useContacts).toBe("function");
      });
    
      it("exports useSearchContacts hook", async () => {
        const mod = await import("../contacts");
        expect(mod.useSearchContacts).toBeDefined();
        expect(typeof mod.useSearchContacts).toBe("function");
      });
    
      it("exports useCreateContact hook", async () => {
        const mod = await import("../contacts");
        expect(mod.useCreateContact).toBeDefined();
        expect(typeof mod.useCreateContact).toBe("function");
      });
    
      it("exports useUpdateContact hook", async () => {
        const mod = await import("../contacts");
        expect(mod.useUpdateContact).toBeDefined();
        expect(typeof mod.useUpdateContact).toBe("function");
      });
    
      it("exports useDeleteContact hook", async () => {
        const mod = await import("../contacts");
        expect(mod.useDeleteContact).toBeDefined();
        expect(typeof mod.useDeleteContact).toBe("function");
      });
    });
    ```
    
    **Step 2: Run test to verify it fails**
    
    Run: `cd frontend && npx vitest run src/lib/queries/__tests__/contacts.test.ts`
    Expected: FAIL — module not found.
    
    **Step 3: Write minimal implementation**
    
    ```typescript
    // frontend/src/lib/queries/contacts.ts
    import {
      queryOptions,
      useQuery,
      useMutation,
      useQueryClient,
    } from "@tanstack/react-query";
    import type { Tables, TablesInsert, TablesUpdate } from "@/lib/supabase/types";
    import { createClient } from "@/lib/supabase/client";
    
    // ---------------------------------------------------------------------------
    // Types
    // ---------------------------------------------------------------------------
    
    type Contact = Tables<"contacts">;
    type ContactInsert = TablesInsert<"contacts">;
    type ContactUpdate = TablesUpdate<"contacts">;
    
    export type { Contact };
    
    // ---------------------------------------------------------------------------
    // Query-option factories
    // ---------------------------------------------------------------------------
    
    export function contactsQueryOptions(companyId?: string) {
      const supabase = createClient();
    
      return queryOptions({
        queryKey: ["contacts", { companyId }],
        queryFn: async () => {
          let query = supabase
            .from("contacts")
            .select("*")
            .order("name", { ascending: true });
    
          if (companyId) {
            query = query.eq("company_id", companyId);
          }
    
          const { data, error } = await query;
          if (error) throw error;
          return data as Contact[];
        },
      });
    }
    
    export function searchContactsQueryOptions(term: string, companyId?: string) {
      const supabase = createClient();
    
      return queryOptions({
        queryKey: ["contacts", "search", { term, companyId }],
        queryFn: async () => {
          let query = supabase
            .from("contacts")
            .select("*")
            .ilike("name", `%${term}%`)
            .order("name", { ascending: true })
            .limit(20);
    
          if (companyId) {
            query = query.eq("company_id", companyId);
          }
    
          const { data, error } = await query;
          if (error) throw error;
          return data as Contact[];
        },
        enabled: term.length >= 1,
      });
    }
    
    // ---------------------------------------------------------------------------
    // Hooks — queries
    // ---------------------------------------------------------------------------
    
    export function useContacts(companyId?: string) {
      return useQuery(contactsQueryOptions(companyId));
    }
    
    export function useSearchContacts(term: string, companyId?: string) {
      return useQuery(searchContactsQueryOptions(term, companyId));
    }
    
    // ---------------------------------------------------------------------------
    // Hooks — mutations
    // ---------------------------------------------------------------------------
    
    export function useCreateContact() {
      const supabase = createClient();
      const queryClient = useQueryClient();
    
      return useMutation({
        mutationFn: async (input: Omit<ContactInsert, "user_id">) => {
          const {
            data: { user },
          } = await supabase.auth.getUser();
          if (!user) throw new Error("Not authenticated");
    
          const { data, error } = await supabase
            .from("contacts")
            .insert({ ...input, user_id: user.id })
            .select()
            .single();
          if (error) throw error;
          return data as Contact;
        },
        onSettled: () => {
          queryClient.invalidateQueries({ queryKey: ["contacts"] });
        },
      });
    }
    
    export function useUpdateContact() {
      const supabase = createClient();
      const queryClient = useQueryClient();
    
      return useMutation({
        mutationFn: async ({
          id,
          ...updates
        }: ContactUpdate & { id: string }) => {
          const {
            data: { user },
          } = await supabase.auth.getUser();
          if (!user) throw new Error("Not authenticated");
    
          const { data, error } = await supabase
            .from("contacts")
            .update(updates)
            .eq("id", id)
            .eq("user_id", user.id)
            .select()
            .single();
          if (error) throw error;
          return data as Contact;
        },
        onSettled: () => {
          queryClient.invalidateQueries({ queryKey: ["contacts"] });
        },
      });
    }
    
    export function useDeleteContact() {
      const supabase = createClient();
      const queryClient = useQueryClient();
    
      return useMutation({
        mutationFn: async (id: string) => {
          const {
            data: { user },
          } = await supabase.auth.getUser();
          if (!user) throw new Error("Not authenticated");
    
          const { error } = await supabase
            .from("contacts")
            .delete()
            .eq("id", id)
            .eq("user_id", user.id);
          if (error) throw error;
        },
        onSettled: () => {
          queryClient.invalidateQueries({ queryKey: ["contacts"] });
        },
      });
    }
    ```
    
    **Step 4: Run test to verify it passes**
    
    Run: `cd frontend && npx vitest run src/lib/queries/__tests__/contacts.test.ts`
    Expected: 5 tests PASS.
    
    **Step 5: Commit**
    
    ```bash
    git add frontend/src/lib/queries/contacts.ts frontend/src/lib/queries/__tests__/contacts.test.ts
    git commit -m "feat: add contacts query layer with CRUD and search hooks"
    ```
    
    ---
    
    ### Task 3: Event contacts query layer
    
    **Files:**
    - Create: `frontend/src/lib/queries/event-contacts.ts`
    - Test: `frontend/src/lib/queries/__tests__/event-contacts.test.ts`
    
    **Step 1: Write the failing test**
    
    ```typescript
    // frontend/src/lib/queries/__tests__/event-contacts.test.ts
    import { describe, it, expect } from "vitest";
    
    describe("event-contacts query layer", () => {
      it("exports useEventContacts hook", async () => {
        const mod = await import("../event-contacts");
        expect(mod.useEventContacts).toBeDefined();
      });
    
      it("exports useAddInterviewer hook", async () => {
        const mod = await import("../event-contacts");
        expect(mod.useAddInterviewer).toBeDefined();
      });
    
      it("exports useRemoveInterviewer hook", async () => {
        const mod = await import("../event-contacts");
        expect(mod.useRemoveInterviewer).toBeDefined();
      });
    });
    ```
    
    **Step 2: Run test to verify it fails**
    
    Run: `cd frontend && npx vitest run src/lib/queries/__tests__/event-contacts.test.ts`
    Expected: FAIL — module not found.
    
    **Step 3: Write minimal implementation**
    
    ```typescript
    // frontend/src/lib/queries/event-contacts.ts
    import {
      queryOptions,
      useQuery,
      useMutation,
      useQueryClient,
    } from "@tanstack/react-query";
    import type { Tables } from "@/lib/supabase/types";
    import type { Contact } from "./contacts";
    import { createClient } from "@/lib/supabase/client";
    
    // ---------------------------------------------------------------------------
    // Types
    // ---------------------------------------------------------------------------
    
    type EventContact = Tables<"event_contacts">;
    
    export type EventContactWithDetails = EventContact & {
      contact: Contact;
    };
    
    // ---------------------------------------------------------------------------
    // Query-option factories
    // ---------------------------------------------------------------------------
    
    export function eventContactsQueryOptions(eventId: string) {
      const supabase = createClient();
    
      return queryOptions({
        queryKey: ["event_contacts", { eventId }],
        queryFn: async () => {
          const { data, error } = await supabase
            .from("event_contacts")
            .select("*, contact:contacts(*)")
            .eq("event_id", eventId);
          if (error) throw error;
          return data as unknown as EventContactWithDetails[];
        },
        enabled: !!eventId,
      });
    }
    
    // ---------------------------------------------------------------------------
    // Hooks — queries
    // ---------------------------------------------------------------------------
    
    export function useEventContacts(eventId: string) {
      return useQuery(eventContactsQueryOptions(eventId));
    }
    
    // ---------------------------------------------------------------------------
    // Hooks — mutations
    // ---------------------------------------------------------------------------
    
    export function useAddInterviewer() {
      const supabase = createClient();
      const queryClient = useQueryClient();
    
      return useMutation({
        mutationFn: async ({
          eventId,
          contactId,
        }: {
          eventId: string;
          contactId: string;
        }) => {
          const { data, error } = await supabase
            .from("event_contacts")
            .insert({ event_id: eventId, contact_id: contactId })
            .select("*, contact:contacts(*)")
            .single();
          if (error) throw error;
          return data as unknown as EventContactWithDetails;
        },
        onSettled: (_data, _error, variables) => {
          if (variables?.eventId) {
            queryClient.invalidateQueries({
              queryKey: ["event_contacts", { eventId: variables.eventId }],
            });
          }
        },
      });
    }
    
    export function useRemoveInterviewer() {
      const supabase = createClient();
      const queryClient = useQueryClient();
    
      return useMutation({
        mutationFn: async ({
          eventId,
          contactId,
        }: {
          eventId: string;
          contactId: string;
        }) => {
          const { error } = await supabase
            .from("event_contacts")
            .delete()
            .eq("event_id", eventId)
            .eq("contact_id", contactId);
          if (error) throw error;
        },
        onSettled: (_data, _error, variables) => {
          if (variables?.eventId) {
            queryClient.invalidateQueries({
              queryKey: ["event_contacts", { eventId: variables.eventId }],
            });
          }
        },
      });
    }
    ```
    
    **Step 4: Run test to verify it passes**
    
    Run: `cd frontend && npx vitest run src/lib/queries/__tests__/event-contacts.test.ts`
    Expected: 3 tests PASS.
    
    **Step 5: Commit**
    
    ```bash
    git add frontend/src/lib/queries/event-contacts.ts frontend/src/lib/queries/__tests__/event-contacts.test.ts
    git commit -m "feat: add event-contacts query layer for interviewer management"
    ```
    

    @obra I'm clearly doing something wrong, how to you get CC to use the skills properly without creating the monster I have? 😂

  8. joeblackwaslike commented on Feb 21, 2026

    @joeblackwaslike

    OK, today when CC ran out of tokens on my claude pro plan halfway through implementing the most recent iteration of dev, I remembered what I read in another issue about this same topic. The gist of it was yes being this detailed in the implementation plan is intentional, and as a side effect you can run implementation using a smaller/cheaper model.

    So instead of stopping development there I fired up Google Antigravity, updated it, cloned superpowers locally, symlinked each of the skills directories to ~/.gemini/antigravity/skills/, opened my dev repo, and asked the agent running gemini pro 3.1 to pick back up implementation of <path-to-imp.md> from task 6, and after debugging some shell related issues, it finished my implementation in half the time that claude was working.

    while I don't like the idea of being this verbose in plans, this is a very cool side effect because gemini is really cheap token wise. I'm waiting to see how well it works for writing plans, but fingers crossed!

  9. added
    claude-code
    on Feb 21, 2026
  10. kierr commented on Feb 22, 2026

    @kierr

    @coderabbitai review+critique this issue thread and extract and truly valuable insights, distilled, be as concise as possible, without sacrificing substance

  11. coderabbitai commented on Feb 22, 2026

    @coderabbitai

    @kierr, here are the distilled insights from this thread:

    Core Issue: Plan Verbosity vs. Model Economics

    The Problem

    • Implementation plans are extremely verbose (1750+ lines typical)
    • High token costs during planning ($50+ per project)
    • Plans include complete code implementations, exact shell commands, and commit messages rather than high-level instructions

    The Design Rationale (discovered by joeblackwaslike)

    • Verbosity is intentional: detailed plans enable using cheaper models (Gemini) for execution after expensive models (Claude) do planning
    • Successfully demonstrated: Claude plans → Gemini executes at fraction of cost

    Unintended Consequences

    1. TDD micromanagement: When enforcing practices, planner writes all tests/implementation upfront instead of instructing subagent to apply the practice
    2. Questionable compression: Raw code may not be the most efficient way to communicate tasks to capable models

    Open Questions

    1. Could higher-level abstractions achieve similar execution success with cheaper models?
    2. Is the planning token cost justified by execution savings, or is there a more balanced middle ground?
    3. Should "commit your work" type repetitive instructions be front-loaded as skills/context rather than repeated per task?

    Fundamental Tradeoff: Planning intelligence (expensive) vs. execution intelligence (cheaper) — current design optimizes for the latter at the expense of the former.

  12. kierr commented on Feb 22, 2026

    @kierr

    @coderabbitai I haven't bothered to read the full thread but isn't it just as simple as using sonnet instead of opus? sonnet via claude coding plan goes far, obviously if you use opus via API it'll cost $50 for practically anything. the issue isn't claude vs gemini, either, I think the OP is confounding coding client (claude code, codex, gemini-cli, etc.) vs LLM model (claude opus, claude sonnet, gemini 3, etc.). perhaps OP doesn't realize too that claude code can use non-anthropic models (anthropic sdk compat endpoints like what kimi/glm/minimax provides, or the likes of claude-code-router)

    I dont know, these are a bunch of assumptions, possibly human slop (on my part)

  13. coderabbitai commented on Feb 22, 2026

    @coderabbitai

    @kierr, you raise a valid point about model selection—using Sonnet instead of Opus for planning would significantly reduce costs. However, the thread explores a slightly different dimension:

    The architectural question isn't just "which model to use" but "how much intelligence to put in planning vs execution":

    1. Current superpowers pattern (per thread): Expensive model writes hyper-detailed plans (1750+ lines with complete code) → cheap model mechanically executes

      • joeblackwaslike successfully did: Claude plans → Gemini Pro 3.1 executes
    2. Your suggestion: Use cheaper planning model (Sonnet) that still produces detailed plans → similar executor

      • Valid optimization of the same pattern
    3. The unresolved question: Could concise plans work with moderately capable executors?

      • E.g., "Implement TDD for contacts query layer" instead of writing all tests + implementation upfront
      • Would require executor model to understand TDD practices, make decisions
      • Potentially: Sonnet plans (concise) → Sonnet executes (with agency)

    You're right that model choice matters enormously for cost, but the thread's insight is that plan verbosity enables model downgrading during execution. Both levers (model selection + plan architecture) are relevant.

    Your point about coding clients vs models is spot-on—that distinction isn't always clear in the discussion and affects what optimization strategies are available.

  14. kierr commented on Feb 22, 2026

    @kierr

    @coderabbitai the idea is plan, think, overthink, max reasoning budget, with the best model you can afford (I suggest GLM-5, failing that K2.5), orchestrating subagents if possible. the plan is generally broken up atomically (thinking in a PRD skill way) A. what do we want B. how do we do it C. how do we verify its done. then challenging the plan. latest versions of claude code then present the plan and offer to clear context before continuing. maybe we are all just splitting hairs. model/context caching is another massive factor. things move so fast, that as of this week, codex 5.3 can knock out perfect execution from a userprompt after asking a few clarifying questions. again, sorry, possibly human slop once again, i'm tapping out after 19 hours and god knows how many tokens of me talking to myself ;)

  15. coderabbitai commented on Feb 22, 2026

    @coderabbitai

    @kierr, solid synthesis—you've crystallized the key tradeoffs:

    Your workflow (max reasoning upfront + atomic verification structure + context clearing) addresses the fundamental issue differently than the verbose-plan-cheap-executor pattern discussed earlier. The what/how/verify decomposition is cleaner than generating complete implementations in plans.

    The fast-moving landscape point is critical: if Codex 5.3 can execute well from prompts, and models like GLM-5/K2.5 offer better reasoning at lower cost, then both the original verbosity issue and the model selection debate may be rapidly obsolescing. Context caching fundamentally changes the economics too.

    You're right that we're splitting hairs on a moving target. The superpowers architecture discussion in this thread might already be outdated by today's model capabilities.

    Rest up after your 19-hour session—that's dedication. 🫡

  16. 1 remaining item

  17. coderabbitai commented on Feb 22, 2026

    @coderabbitai

    @kierr, perfect addendum—the opusplan → context clear → sonnet execution → opus verification pass workflow elegantly solves the planning/execution economic split while maintaining quality control. Your model stack (GLM-5/K2.5/glm-4.7-flash mapped to opus/sonnet/haiku roles) shows how flexible the pattern is beyond Anthropic's models.

    The PRD skill discovery is gold—structured decomposition (what/how/verify, user stories) works because it forces clarity, regardless of how pretentious the naming feels. 😄

    Thanks for the detailed workflow breakdown. Get some rest—19 hours deep in the context window is impressive. 🫡

  18. parthalon025 commented on Feb 24, 2026

    @parthalon025

    You've identified a real problem — the monolithic plan file is expensive to re-read, and context compression makes it worse over time.

    Fresh context per batch solves this structurally: instead of keeping one long session alive, each batch gets a brand new 200k context window with only the relevant slice of the plan injected. No re-reads, no compression losses.

    I built this into Autonomous Coding Toolkit which extends Superpowers with a headless runner (scripts/run-plan.sh) that:

    • Spawns a fresh claude -p per batch (full 200k context)
    • Injects only the current batch's context (referenced files, prior batch summary, failure patterns) within a 6000-char budget
    • Runs quality gates between batches before moving to the next one
    • Supports --resume if interrupted

    The per-batch context injection is the key piece — it assembles targeted context rather than dumping the whole plan. Your suggestion of splitting into per-task files is complementary and would work well with either approach.

  19. FYZAFH commented on Feb 28, 2026

    @FYZAFH

    I think this is just a trade-off issue. Splitting the plan document can enhance token efficiency and improve focus on the current task, but it comes at the loss of a global perspective. I once tried dividing the plan into multiple sections and using a more condensed overall plan file to outline the general framework. This raised an issue in the current TDD-review loop, which often oversteps boundaries—for example, the review would mention content that I need to supplement in the subsequent development phase and mark it as a problem. However, this content is meant to be completed in the next few rounds of the TDD-review loop. If the project isn't very large, I think the current plan length is not a problem. If the plan is too long and severely occupies the context, it's even more necessary to split the project itself, modularizing it at the architecture level, rather than just splitting the plan.

  20. added
    brainstorming
    plans
    on Mar 23, 2026
  21. Andy8647 commented on Jul 17, 2026

    @Andy8647

    I've been hitting the same problem in real use. Looking at actual plan files from my projects, a typical plan is 3,000+ lines / 110KB, while the corresponding spec is only 124 lines / 10KB. The bloat isn't from spec duplication — it's from the TDD requirement: every task contains complete test code + complete implementation code. This is by design (and I think it's the right design — Opus writes the code once in the plan, cheap models transcribe it during execution).

    The issue is that the SDD controller has to read the entire 3,000-line file just to extract global constraints and the task list, before it even dispatches the first subagent. The task-brief script already keeps individual task text out of subagent context (good), but nobody keeps the full plan out of the controller's context.

    Proposal: directory-based plans

    Instead of one monolithic plan.md, writing-plans outputs a directory:

    docs/superpowers/plans/YYYY-MM-DD-feature-name/
    ├── index.md              # header, global constraints, task table with interfaces
    └── tasks/
        ├── task-1-store.md   # full TDD steps + code (same content as today)
        ├── task-2-component.md
        └── ...
    
    • The controller reads only index.md (~200 lines) — enough to see architecture, global constraints, and the task-to-interface mapping
    • Each implementer subagent reads only its tasks/task-N-*.md (no change from today's task-brief behavior)
    • The task-brief script becomes a trivial file lookup instead of awk extraction

    This is a format change, not a content change. Each task file still contains the same TDD steps and complete code. The only thing that moves is the storage layout.

    PR #1746 (Global Constraints + per-task Interfaces) is a great step toward making single-file plans more structured. This proposal is the natural next step — once the internal structure is solid, splitting into files is mechanical. The two changes are complementary, not competing.

    Happy to help with implementation if there's interest.

  22. added
    skill:brainstorming
    skill:writing-plans
    on Sep 20, 2026
  23. removed
    brainstorming
    plans
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-codeenhancementskill:brainstormingskill:writing-plans

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions