Skip to content

add discovery agent outputs: charters, commands, docs, figma-summaries - #385

Draft
shairil wants to merge 10 commits into
stagefrom
shairillk/discovery_agent
Draft

add discovery agent outputs: charters, commands, docs, figma-summaries#385
shairil wants to merge 10 commits into
stagefrom
shairillk/discovery_agent

Conversation

@shairil

@shairil shairil commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

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 action
  • image-compressor.md — Image Compressor quick action
  • video-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:discover command: kicks off a full feature discovery session (charter, open questions, architecture)
  • figma-reader.md/feature:figma-reader command: 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 together
  • da-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 design
  • image-compressor.md — Figma summary for the Image Compressor design

Jira Ticket

Resolves: MWPW-NUMBER


Test URLs

Env URL
Before https://main--da-express-milo--adobecom.aem.page/express/
After https://--da-express-milo--adobecom.aem.page/express/?martech=off

Verification Steps

  • Steps to reproduce the issue or view the new feature.
  • What to expect before and after the change.

Potential Regressions

  • https://--da-express-milo--adobecom.aem.live/express/?martech=off

Additional Notes

(If applicable) Add context, related PRs, or known issues here.

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>
@aem-code-sync

aem-code-sync Bot commented Apr 21, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@shairil
shairil requested a review from vvineett April 21, 2026 11:48
@aem-code-sync
aem-code-sync Bot temporarily deployed to shairillk/discovery_agent April 24, 2026 11:04 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to shairillk/discovery_agent May 8, 2026 06:45 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to shairillk/discovery_agent May 9, 2026 12:36 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to shairillk/discovery_agent May 9, 2026 15:45 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to shairillk/discovery_agent May 9, 2026 16:53 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to shairillk/discovery_agent May 10, 2026 16:32 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to shairillk/discovery_agent May 11, 2026 19:58 Inactive
@echen-adobe

Copy link
Copy Markdown
Contributor

@shairil Is there a reason this is still in draft and has not been upgraded to Ready for Review?

@shairil

shairil commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

@shairil Is there a reason this is still in draft and has not been upgraded to Ready for Review?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants