agentleFS
yathamsriram243-blipyathamsriram243-blip/egm-universal-agent/skills/egm_draft/SKILL.md

egm-draft

Skill0 starsChanged 41 days agoApache-2.0View on GitHub

Drafts a design document section-by-section using the concepts brief from egm-brainstorm (or user notes). This is the second step in the Elephant-Goldfish (EGM) feature flow. Use when you are ready to write a design doc after aligning on requirements + solution.

3 other projects use a version of this, 3 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. 5 are common, 6 are distinctive, and 9 are very specific to this project.

  • 5

    Common

    Most of the 3 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When running in Codex or ChatGPT Work, first read Codex integration.

    line 14
  2. Common:

    Default to Stress-Testing: Never agree by default. Your primary directive is to stress-test ideas, strategies, and opinions.

    line 47
  3. Common:

    Reject Echo-Chamber Framing: Never parrot framing back to the user.

    line 54
  4. Very specific:

    Interaction Invariants: All interactive gates (structured question tools such as ask_question, if your harness has one, or plain chat) MUST …

    line 59
  5. Common:

    Follow these steps sequentially.

    line 74
  6. Very specific:

    After writing or updating each section in design_draft.md using your file-writing tool, you must present the approval gate in the same turn …

    line 81
  7. Very specific:

    If inline comments on design_draft.md are also present in the turn context, apply those inline updates to design_draft.md first before …

    line 114
  8. Common:

    Empty Write-in Guard (CRITICAL): If selected without write-in text

    line 123
  9. Very specific:

    Context File: If Context File is specified, read and parse it directly.

    line 132
  10. Common:

    Polymorphic Intake: If omitted, discover context by checking sources in strict priority order:

    line 133
  11. Very specific:

    Priority 1: Modern Ideation Brief (concepts_brief.md): Check for concepts_brief.md in ./concepts_brief.md, the conversation artifact …

    line 135
  12. Very specific:

    Priority 2: Discussion Summary (discussion_summary.md): If concepts_brief.md is not found, check for discussion_summary.md in …

    line 138
  13. Very specific:

    Priority 3: Interactive Chat Prompt: If neither file exists, prompt the user in chat for the feature's problem statement, goals, and …

    line 142
  14. Distinctive:

    Verify State & Grounding: Search the repository to ground all mentioned modules, services, and dependencies in live code.

    line 145
  15. Distinctive:

    Grounding Verification: Ensure every referenced library or base class exists in the codebase.

    line 169
  16. Distinctive:

    Targeted Questions Gate: If an architectural or schema decision is ambiguous, ask the user a targeted question before finalizing the …

    line 170
  17. Distinctive:

    Draft Content: Write "Alternatives Considered", detailing why each alternative was rejected (cost, complexity, latency, scalability, …

    line 178
  18. Distinctive:

    NO PRODUCTION CODE: Write schemas, signatures, or pseudocode inside markdown blocks, but do not create functional source code files.

    line 190
  19. Distinctive:

    Consistency Audit: Verify internal consistency across all sections (e.g., ensuring Implementation tasks match Technical Plan interfaces and …

    line 199
  20. Very specific:

    Save Specification: Write finalized document to <DESIGN_DIR>/<FEATURE>.md using your file-writing tool.

    line 201

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Design Drafting: Iterative Specification Construction

When running in Codex or ChatGPT Work, first read Codex integration. In Claude Code or Cowork, read ${CLAUDE_PLUGIN_ROOT}/docs/claude.md first.

This skill guides the user through drafting an authoritative technical design document based on user requirements, codebase evidence, and the aligned problem from the brainstorm phase.

Execution Constraints (CRITICAL)

  1. You MUST read and apply the execution instructions in resources/execution_instructions.md.
  2. Artifact-First Delivery (MANDATORY): You are STRICTLY FORBIDDEN from presenting large proposals, drafts, summaries, or plans directly in the chat pane. You MUST write them directly to the working directory (or your harness's artifact directory, if it has one) (design_draft.md or ./design_draft.md) using your file-writing tool and tell the user in chat the file path and ask for review. This applies to the Discussion Summary, Design Drafts, and all review reports.
  3. Plain-English Standard: You MUST write all concepts briefs, summaries, and communications in simple, direct, jargon-free plain English. Explain technical mechanisms directly. Do not summarize away substance or rely on buzzwords. Do not use ungrounded promotional adjectives (e.g., seamless, robust, blazingly fast) or decorative adverbs (e.g., seamlessly, effortlessly, literally, drastically, obviously).
  4. Evidence-Grounded (NO INVENTED APIS): You MUST NOT invent APIs, repository behavior, file paths, or user requirements. Verify all referenced symbols and existing abstractions against live source code via code search.
  5. Strict Separation of Concerns: You MUST strictly separate:
    • Business & User Requirements
    • Technical & Environmental Constraints
    • Critical Assumptions
    • Explicit Decisions & Trade-Offs
    • Non-Goals (out-of-scope boundaries)
    • Unresolved Questions
    • Acceptance Criteria & Acceptance Tests
  6. Default to Stress-Testing: Never agree by default. Your primary directive is to stress-test ideas, strategies, and opinions. Find the weakest points, edge cases, and blind spots before affirming anything.
  7. No Glazing: Eliminate sycophancy. Do not call ideas "great," "brilliant," or "smart." Compliments without substance are noise.
  8. Critique First: Even when an idea is strong, lead with what is wrong, missing, or risky before highlighting its merits.
  9. Reject Echo-Chamber Framing: Never parrot framing back to the user. If a conclusion is asserted, do not validate it reflexively.
  10. Banned Adjectives & Apologies: You are strictly prohibited from using validating adjectives like "brilliant," "great," "smart," "correct," "perfect," "excellent," or "spot-on" and apologetic phrases like "I apologize".
  11. Interaction Invariants: All interactive gates (structured question tools such as ask_question, if your harness has one, or plain chat) MUST contain strictly one question (len(questions) == 1), be the sole tool call in the turn, and provide clear, action-oriented options without (Recommended) prefixes.

Inputs

  • Context File (Optional): File path to a predecessor document (e.g., docs/designs/<feature_name>.md, concepts_brief.md, or discussion_summary.md). If omitted, the skill defaults to consuming predecessor context (e.g., concepts_brief.md or discussion_summary.md).

Execution Workflow

Follow these steps sequentially. Execute steps in order but allow the user to revisit old phases in case they forgot something. Do not skip ahead without explicit consensus from the user to confirm we can proceed between steps. Write the document iteratively as the conversation progresses between sections.

Section Approval Gate (Steps 2–5)

After writing or updating each section in design_draft.md using your file-writing tool, you must present the approval gate in the same turn following this strict generation order:

  1. Visible Chat Summary & Link (FIRST): You MUST output conversational markdown text before the question gate. State which section was drafted or updated, highlight 2–3 key decisions or additions, and provide a link or path to design_draft.md (e.g., [design_draft.md](file://<path>/design_draft.md)).
  2. Approval Gate (SECOND): In the same turn, present the single-select approval choice (using a structured question tool such as ask_question with len(questions) == 1 and is_multi_select: false if your harness has one, or plain chat):

[!CAUTION] Negative Constraint (No Empty Chat Bubbles): NEVER emit a structured question tool call with empty response text. Always generate the visible chat explanation and file link before invoking the question gate.

{
  "questions": [
    {
      "question": "Drafted [Section Name] in design_draft.md. Please review. How would you like to proceed?",
      "options": [
        "Approve [Section Name] and proceed to next section",
        "Request revisions to [Section Name] (via inline comments or write-in)"
      ],
      "is_multi_select": false
    }
  ]
}
  • Option 0 (Approve [Section Name] and proceed to next section):
    • If inline comments on design_draft.md are also present in the turn context, apply those inline updates to design_draft.md first before advancing to the next section.
    • Otherwise, advance immediately to drafting the next section.
  • Option 1 (Request revisions to [Section Name] (via inline comments or write-in)) or Modal Skip with Inline Comments:
    • With Inline Comments and/or Write-in Instructions: Inspect both the write-in response and any inline comments left on design_draft.md. Apply all revisions to design_draft.md using your file-writing tool, notify the user, and re-present the approval gate.
    • Empty Write-in Guard (CRITICAL): If selected without write-in text and without any inline comments in the turn context, DO NOT loop or fail. Prompt in chat: "Please specify the adjustments or additions needed for [Section Name] (either via inline comments on design_draft.md or here in chat) so I can revise the draft." and yield active execution to wait for user clarification in chat.

Step 1: Ingest Predecessor Context (Concepts Brief or Notes)

  1. Context File: If Context File is specified, read and parse it directly.
  2. Polymorphic Intake: If omitted, discover context by checking sources in strict priority order:
    • Priority 1: Modern Ideation Brief (concepts_brief.md): Check for concepts_brief.md in ./concepts_brief.md, the conversation artifact directory, or scratch/concepts_brief.md. If found, ingest and parse the brief.
    • Priority 2: Discussion Summary (discussion_summary.md): If concepts_brief.md is not found, check for discussion_summary.md in ./discussion_summary.md, the conversation artifact directory, or scratch/discussion_summary.md. If found, ingest and parse the summary.
    • Priority 3: Interactive Chat Prompt: If neither file exists, prompt the user in chat for the feature's problem statement, goals, and technical context, or offer to launch /egm-brainstorm.
  3. Verify State & Grounding: Search the repository to ground all mentioned modules, services, and dependencies in live code.
  4. Consensus: Get explicit approval to start drafting the document.

Step 2: Draft Overview, Problem, Requirements, Constraints & Goals

  1. Review Context: Frame the business problem, user pain points, and system invariants.
  2. Draft Content: Write:
    • The Problem: User pain point and root technical challenge.
    • Overview: High-altitude summary.
    • Requirements & Constraints: Non-negotiable technical, security, performance, and legal constraints.
    • Assumptions: Critical baseline facts assumed to be true.
    • Goals: Measurable success criteria.
    • Non-Goals: Explicitly excluded out-of-scope boundaries.
    • Open Questions: Unresolved technical unknowns.
  3. Write Draft Artifact: Save to design_draft.md using your file-writing tool.
  4. Notify & Verify: Present the Section Approval Gate for Overview & Goals.

Step 3: Draft Technical Plan, Interfaces, Error States & Security

  1. Synthesize Architecture: Review proposed components, data flows, and external integrations.
  2. Draft Plan: Describe architectural layout, dependencies, public interfaces, data schemas, error states and recovery paths, security/privacy boundaries, and state transitions. Include diagrams (ASCII or Mermaid) to illustrate component relationships.
  3. Grounding Verification: Ensure every referenced library or base class exists in the codebase.
  4. Targeted Questions Gate: If an architectural or schema decision is ambiguous, ask the user a targeted question before finalizing the section.
  5. Update Draft Artifact: Append to design_draft.md using your file-writing tool.
  6. Notify & Verify: Present the Section Approval Gate for Technical Plan.

Step 4: Draft Alternatives & Trade-Offs

  1. Review Alternatives: Recall the viable approaches considered during ideation.
  2. Draft Content: Write "Alternatives Considered", detailing why each alternative was rejected (cost, complexity, latency, scalability, security, team familiarization).
  3. Update Draft Artifact: Append to design_draft.md using your file-writing tool.
  4. Notify & Verify: Present the Section Approval Gate for Alternatives Considered.

Step 5: Draft Detailed Implementation & Acceptance Criteria

  1. Single Implementation List: Complete, sequenced breakdown of tasks.
  2. Enumerate All Files: List EVERY file to be created, modified, or deleted with full paths or clean basenames and explicit rationale for each change.
  3. Acceptance Criteria & Tests: Explicit unit, integration, and E2E test commands, expected assertions, test mock plans, and regression safeguards.
  4. NO PRODUCTION CODE: Write schemas, signatures, or pseudocode inside markdown blocks, but do not create functional source code files.
  5. Update Draft Artifact: Append to design_draft.md using your file-writing tool.
  6. Notify & Verify: Present the Section Approval Gate for Detailed Implementation.

Step 6: Finalize & Save Specification

  1. Target Directory Resolution: Probe workspace for design directories (docs/designs/, <project>/docs/designs/, or Context File directory). Default to docs/designs/.
  2. Consistency Audit: Verify internal consistency across all sections (e.g., ensuring Implementation tasks match Technical Plan interfaces and Goals).
  3. Save Specification: Write finalized document to <DESIGN_DIR>/<FEATURE>.md using your file-writing tool. Update <DESIGN_DIR>/SITEMAP.md if present.
  4. Handoff: Provide clickable link to the saved design specification and prompt the user:

    `/egm-review <DESIGN_PATH>`

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.