From dx-core
Scan completed tickets for recurring patterns and promote to cross-ticket knowledge. Run periodically or after completing several tickets. Creates .ai/graph/nodes/patterns/ entries.
npx claudepluginhub easingthemes/dx-aem-flow --plugin dx-coreThis skill is limited to using the following tools:
You scan all completed spec directories for recurring decisions and approaches, then promote patterns that appear in 3+ tickets to `.ai/graph/nodes/patterns/` for cross-ticket knowledge reuse.
Extracts recurring patterns from git commits/PRs/handoffs/CLAUDE.md via bash/grep; recommends artifacts (skills/rules/hooks/agents) using frequency thresholds.
Searches project memory via progressive filtering with MEMORY.md index and grep for task-relevant patterns before non-trivial work; stores structured problem-solution insights after completion.
Extracts decisions, lessons, patterns, and surprises from completed phase artifacts (PLAN.md, SUMMARY.md, VERIFICATION.md, UAT.md, STATE.md) into LEARNINGS.md. Use after finishing workflow phases.
Share bugs, ideas, or general feedback.
You scan all completed spec directories for recurring decisions and approaches, then promote patterns that appear in 3+ tickets to .ai/graph/nodes/patterns/ for cross-ticket knowledge reuse.
Collect decisions from two sources — structured YAML (preferred) and markdown fallback.
Scan for structured decision YAML files:
find .ai/graph/nodes/decisions/ -name "*.yaml" -type f 2>/dev/null
Read shared/decision-schema.md for the schema definition. For each decision YAML file, extract:
ticket — the work item IDchosen — what was chosentags — for grouping by similarityfiles — for matching by file overlapalternatives — the rejected options (useful for understanding the pattern's scope)status — skip decisions with status: superseded or status: rejectedFind all spec directories with completed work:
find .ai/specs/ -name "implement.md" -type f 2>/dev/null
For each implement.md found, check if decision YAML files already exist for that ticket (by matching the ticket ID from the spec directory name against .ai/graph/nodes/decisions/<ticket>-*.yaml). If YAML files exist, skip the markdown scan for that ticket — the YAML is the authoritative source.
For tickets without decision YAML files, read from implement.md:
## Key Decisions section (if present) — these are explicit design choices with alternatives## Approach section — the overall strategy## Steps section — scan step titles and file references for recurring patternsAlso read research.md from the same directory (if present):
## Existing Implementation Check section — which existing code was reused## Key Findings section — important discoveriesSkip spec directories that have no implement.md or where all steps are still pending (ticket not yet worked on).
Group the extracted decisions and approaches by similarity. Two decisions are "the same pattern" when they share:
Matching heuristics:
tags values (from YAML) or reference the same files or directorieschosen approach (from YAML) or "Chosen" text (from markdown), even if wording differsfiles lists (from YAML) — strong signal of the same patternMinimum threshold: A pattern must appear in 3 or more tickets to be promoted. Fewer occurrences may be coincidence.
Read all existing pattern files:
find .ai/graph/nodes/patterns/ -name "*.yaml" -type f 2>/dev/null
For each existing pattern:
tickets: listupdated: timestamp if new evidence foundRead shared/pattern-schema.md for the YAML schema.
Create the directory if it doesn't exist:
mkdir -p .ai/graph/nodes/patterns
For each newly identified pattern (3+ tickets, not already captured):
.ai/graph/nodes/patterns/<topic>.yaml following the schema exactlyconfidence: medium, trust_tier: long-termFor existing patterns with new ticket evidence:
tickets:updated: timestampconfidence to highIf --dry-run is passed as argument:
## Pattern Extraction Complete
**Specs scanned:** <count>
**Patterns found:** <count new> new, <count updated> updated
### New Patterns
| Pattern | Tickets | Tags |
|---------|---------|------|
| <title> | <count> | <tags> |
### Updated Patterns
| Pattern | New Tickets Added | Total |
|---------|------------------|-------|
| <title> | +<count> | <total> |
### Below Threshold (2 tickets — watching)
| Candidate | Tickets | Notes |
|-----------|---------|-------|
| <description> | <count> | Needs 1 more occurrence |
### Next steps:
- Patterns are now available for `/dx-plan` to reference
- Run `/dx-plan <id>` — it will check patterns automatically
- Review patterns in `.ai/graph/nodes/patterns/` for accuracy
/dx-pattern-extract
Scans 12 completed specs, finds 3 patterns with 3+ ticket occurrences each. Creates .ai/graph/nodes/patterns/ with 3 YAML files. Reports 2 candidates below threshold.
/dx-pattern-extract --dry-run
Same analysis but only prints what would be created. No files written.
/dx-pattern-extract
After completing 5 more tickets, re-run. Finds 1 new pattern, updates 2 existing patterns with new ticket evidence. Reports updated totals.
validateField() in src/core/scripts/libs/forms.js" is concrete.