add discovery agent outputs: charters, commands, docs, figma-summaries - #385
Draft
shairil wants to merge 10 commits into
Draft
add discovery agent outputs: charters, commands, docs, figma-summaries#385shairil wants to merge 10 commits into
shairil wants to merge 10 commits into
Conversation
Commits CLAUDE.md, feature charters (font-generator, image-compressor, video-compressor), slash command definitions, architecture docs, and Figma summaries produced during discovery. Updates .gitignore to allow .claude/ subdirectories while keeping settings.local.json private. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
Contributor
|
@shairil Is there a reason this is still in draft and has not been upgraded to Ready for Review? |
Collaborator
Author
Hi Eric, I was working on this earlier as part of the Experiment Skill, where it would generate the end-to-end charter and the Milo doc using wiki and jira details. However, I got moved to another team before I had a chance to get this PR into a reviewable state. I'll try to pick it up again and work on it sometime next week. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Summary
The discovery agent is a Claude Code slash command (/feature:discover) that automates the pre-implementation discovery phase for a JDI feature. You kick it off by providing a Jira ticket key, Wiki URL, or Figma URL. It then runs a structured 7-step pipeline:
Step 1 — Load context. Before anything else, it reads the architecture docs in .claude/docs/ and cursor rules to understand the repo boundaries, coding patterns, and platform constraints. This grounds every decision it makes.
Step 2 — Prerequisite check. Confirms Jira MCP and Wiki MCP are reachable. If either is down, it stops immediately.
Step 3 — Read sources via sub-agents. It spawns isolated sub-agents (not tool calls in its own context) to read Jira, Wiki, and Figma in parallel. Each sub-agent returns only a structured summary — raw output like Figma XML or long ticket descriptions never pollutes the discovery agent's context. The Figma Reader sub-agent (/feature:figma-reader) is a separate command that handles the full Figma fetch: it discovers all top-level nodes, screenshots them, classifies each one (design frame, component library, reference screenshot, etc.), then deep-fetches design context. It writes its findings to .claude/figma-summaries/.md for permanent reference.
Step 3b/3c — Figma gap analysis. After Figma comes back, the agent cross-checks which phases of the user journey (upload, loading, error, success) actually have design coverage, and flags anything missing as explicit questions — not silent assumptions.
Step 4 — Codebase check. A sub-agent searches the actual codebase for every candidate requirement — checking if blocks exist, if quick action types are registered in QA_CONFIGS, if metadata keys are already used.
Step 5 — Clarification round. All remaining ambiguities are surfaced in one numbered list. It waits for answers, then asks again if new ambiguity is introduced. Nothing is assumed. It continues until every open question is resolved.
Step 6 — Write the charter. Produces .claude/charters/.md — a structured document with requirements broken down by repo (da-express-milo, CCEverywhere, Horizon), decisions made, out-of-scope items, and any remaining open items tiered by whether they block implementation start or just shipping.
Step 7 — Hand off. Reports a summary (item counts per repo, open item count) and stops. It does not implement — that's the Implementation Agent's job.
What's in each directory
.claude/charters/Feature charter documents written during discovery for each feature. Each charter captures the problem statement, user journey, block architecture, open questions, and implementation plan.
font-generator.md— Font Generator quick actionimage-compressor.md— Image Compressor quick actionvideo-compressor.md— Video Compressor quick action.claude/commands/feature/Custom slash command definitions used by the Claude discovery agent. These are reusable prompts that drive structured feature discovery and Figma reading workflows directly from the Claude Code CLI.
discover.md—/feature:discovercommand: kicks off a full feature discovery session (charter, open questions, architecture)figma-reader.md—/feature:figma-readercommand: reads a Figma design file and extracts layout, components, and design tokens.claude/docs/Codebase reference documents written by the discovery agent to give future AI sessions context about how this repo works.
architecture.md— High-level block/page architecture and how Express quick actions are wired togetherda-express-milo-internals.md— Deep dive into the da-express-milo repo conventions (block decoration, CCEverywhere SDK integration, analytics)eds-platform.md— Overview of the AEM Edge Delivery Services (EDS) platform that this repo runs on.claude/figma-summaries/Structured summaries of Figma designs extracted by the figma-reader agent. Used as grounding context when authoring feature charters and implementation plans.
font-generator.md— Figma summary for the Font Generator designimage-compressor.md— Figma summary for the Image Compressor designJira Ticket
Resolves: MWPW-NUMBER
Test URLs
Verification Steps
Potential Regressions
Additional Notes
(If applicable) Add context, related PRs, or known issues here.