discover
Guidelines for discovering historical context, source code, and repository standards.
What this skill does
# Discover
Context discovery guidelines for ticket creation. Three discovery phases run in parallel by separate subagents.
## Discover History
Search all tickets (archive, todo, icebox) to find related past work and check for duplicates or overlaps.
### Instructions
Run the bundled script with keywords extracted from the ticket request:
```bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/discover/scripts/search.sh <keyword1> [keyword2] ...
```
### Keyword Extraction
Extract 3-5 keywords from:
- Key file paths (e.g., `ticket.md`, `drive.md`)
- Domain terms (e.g., `branch`, `commit`, `archive`)
- Layer names (e.g., `Config`, `UX`)
### Output Format
The script searches archive, todo, and icebox directories. Results are sorted by relevance (match count):
```
5 .workaholic/tickets/archive/feat-xxx/ticket-a.md
3 .workaholic/tickets/todo/ticket-b.md
2 .workaholic/tickets/icebox/ticket-c.md
```
### Interpreting Results
- Higher count = more keyword matches = more relevant
- Read top 5 tickets to understand context
- Extract: title, overview, key files, layer
### Overlap Analysis
For tickets found in todo/ and icebox/, perform overlap analysis against the proposed ticket:
#### Category Definitions
| Category | Overlap | Action |
|----------|---------|--------|
| **Duplicate** | 80%+ | Block creation - existing ticket covers request |
| **Merge candidate** | 40-80% | Suggest combining into single ticket |
| **Split candidate** | N/A | Existing ticket too broad - suggest decomposition |
| **Related** | <40% | Can coexist - note for cross-reference |
#### Calculating Overlap Percentage
Evaluate overlap based on:
1. **Key files overlap**: Do tickets modify the same files?
- Same primary file = +40%
- Overlapping key files = +20% per file
2. **Scope overlap**: Do tickets solve the same problem?
- Identical goal = +40%
- Subset/superset relationship = +20%
3. **Implementation overlap**: Would work be duplicated?
- Same code changes = +20%
#### Duplicate Detection (80%+)
A ticket is a duplicate when:
- Same key files AND same implementation goal
- Existing ticket fully addresses the request
- Creating new ticket would duplicate completed work
#### Merge Candidates (40-80%)
Tickets are merge candidates when:
- Significant key file overlap (2+ shared files)
- Related but distinct goals that benefit from unified approach
- Sequential dependencies that should be one atomic change
#### Split Candidates
An existing ticket needs splitting when:
- Covers multiple distinct features/concerns
- Key files span unrelated areas
- Implementation steps lack cohesion
- Estimated effort exceeds 4h
#### Related Tickets (<40%)
Tickets are related (not blocking) when:
- Minor file overlap (1 shared file)
- Same domain area but different goals
- Useful context but independent implementation
### History Output Schema
Return structured JSON combining historical context and ticket moderation:
```json
{
"summary": "2-3 sentence synthesis of related historical work",
"tickets": [
{
"path": ".workaholic/tickets/archive/branch/ticket.md",
"title": "Ticket title",
"match_reason": "Why this ticket is relevant"
}
],
"moderation": {
"status": "clear|duplicate|needs_decision",
"matches": [
{
"path": ".workaholic/tickets/todo/filename.md",
"title": "Ticket title from H1",
"category": "duplicate|merge|split|related",
"overlap_percentage": 85,
"reason": "Specific explanation of overlap"
}
],
"recommendation": "Action to take"
}
}
```
#### Moderation Status Values
| Status | Meaning | Next Action |
|--------|---------|-------------|
| `clear` | No blocking issues | Proceed with ticket creation |
| `duplicate` | Existing ticket covers request | Do not create new ticket |
| `needs_decision` | Merge/split opportunity found | User must decide strategy |
If no todo/icebox tickets match, set `moderation.status` to `"clear"` with empty `matches` array.
## Discover Source
Guidelines for finding and analyzing source code related to a ticket. Provides comprehensive exploration strategies for collecting rich codebase context.
### Exploration Phases
#### Phase 1: Direct Matches
Start with files directly matching the request keywords.
- Glob for files matching keywords from request
- Grep for function/class names mentioned
- Read directly relevant files (5-10 files)
- **Capture code snippets** from sections likely to be modified (store start/end lines and content)
#### Phase 2: Import Chain Exploration
Follow dependencies to understand context.
- For each Phase 1 file, extract import statements
- Follow imports to find upstream dependencies (depth 2 max)
- Trace exports to find downstream consumers
- Read dependency files that provide context (additional 5-10 files)
#### Phase 3: Usage Discovery
Find how code is used across the codebase.
- Grep for function/class usage across codebase
- Find example invocations in other modules
- Locate integration points (additional 3-5 files)
#### Phase 4: Related Test Files
Understand expected behavior from tests.
- For each source file `foo.ts`, check for `foo.test.ts`, `foo.spec.ts`
- Search `__tests__/`, `tests/`, `spec/` directories
- Read test files to understand expected behavior (additional 3-5 files)
#### Phase 5: Configuration and Schema Files
Find related configuration and type definitions.
- Find related config files (package.json, tsconfig, webpack)
- Locate schema definitions, type declarations (`*.d.ts`)
- Check for related documentation files (additional 2-3 files)
### Depth Controls
- **Hard limits per phase**: Phase 1 (8 files), Phase 2 (6), Phase 3 (3), Phase 4 (2), Phase 5 (1)
- **Relevance scoring**: Prioritize files with higher keyword density
- **Stop conditions**: Stop following chains when files become tangential
- **Total budget**: Hard limit of 20 files total - stop exploration immediately upon reaching limit
- **Time budget**: Complete exploration within 30 seconds
**Important**: These are hard limits, not guidelines. Stop adding files once limits are reached.
### Exploration Heuristics
#### Language-Specific Patterns
- **TypeScript/JavaScript**: Follow `import`/`require` statements, check `*.d.ts` files
- **Python**: Follow `import`/`from` statements, check `__init__.py` files
- **Markdown plugins**: Follow `skills:` frontmatter references, check SKILL.md patterns
- **Configuration**: Check `package.json` dependencies, tool config files
#### Skip Patterns
Avoid files that add noise without value:
- Generated files (`*.min.js`, `*.bundle.js`, `dist/`, `build/`)
- Lock files (`package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`)
- Large binary files
- Third-party dependencies (`node_modules/`, `vendor/`, `.venv/`)
- Cache directories (`.cache/`, `__pycache__/`)
### Source Output Format
Return structured JSON with categorized discoveries:
```json
{
"summary": "2-3 sentence synthesis of codebase context",
"files": [
{
"path": "path/to/file.ts",
"purpose": "What this file does",
"relevance": "Why it matters for the ticket",
"category": "direct|import|usage|test|config"
}
],
"snippets": [
{
"path": "path/to/file.ts",
"start_line": 10,
"end_line": 25,
"content": "actual code content that may need modification"
}
],
"import_graph": "Brief description of dependency relationships",
"code_flow": "How components interact end-to-end",
"patterns": ["Existing patterns discovered that should be followed"],
"test_coverage": "Summary of existing test coverage in affected areas"
}
```
#### Field Descriptions
| Field | Required | Description |
|-------|----------|-------------|
| `summary` | Yes | High-level synthesis of findings |
| `files` | Yes | List of relevant files with metadata |
| `snippets` | Optional | Code snippets likely to need modification (for patch generation) |
| `import_graph` | Optional | DependencyRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.