/adev:samplefrom adev
Scans the codebase for high-quality implementations, scores them against project constitution and patterns, and curates annotated golden samples in .context-index/samples/ to guide subagent code generation.
Ships in adev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Scan the codebase for exemplary implementations, score candidates against the constitution and declared patterns, and extract annotated golden samples into .context-index/samples/. Golden samples are the "show, do not tell" layer of the context index: they give subagents a concrete reference for how to write code in this project.
--pattern <name>: extract a golden sample for a specific specialist pattern (e.g., --pattern api-route)--from <file>: promote a specific file directly to golden sample (skips discovery, goes to scoring)--score: re-score all existing samples against the current constitution and patterns--refresh: re-score, flag stale samples, and update or remove invalid onesThe project must have .context-index/ initialized with constitution.md and manifest.yaml. If either is missing, stop and suggest running /adev:init first.
Announce at start:
Starting golden sample curation.
Mode: [discovery | promote <file> | score | refresh]
Read these files once at the start. They define what "good" looks like for this project.
.context-index/constitution.md — Extract the Coding Standards section. This is the primary quality rubric..context-index/manifest.yaml — Extract the specialists registry. Each specialist's trigger_patterns and trigger_keywords define domain-specific quality expectations..context-index/platform-context.yaml — If it exists, read framework conventions, file structure expectations, and naming patterns. If it does not exist, skip..context-index/samples/. Read their frontmatter to understand what patterns are already covered and their current scores.If --pattern was provided, filter the specialist registry to only the matching specialist. If the pattern name does not match any specialist, report the available patterns and stop.
Load Skill Extensions: Load any skill extension instructions before proceeding:
adev skill-ext load --skill sample
If the output is not __NONE__, incorporate it as additional standing instructions that apply to this skill's entire execution. Frame it as: "The following skill extension instructions apply to this invocation (source: installed domain extensions and/or project-level overrides)." If the output is __NONE__, continue normally.
Skip this step if --from, --score, or --refresh was provided.
Scan the codebase to identify candidate files that demonstrate good patterns.
For each specialist in the manifest (or the single specialist if --pattern was provided):
trigger_patterns glob against the codebase.If no specialists are configured, fall back to scanning common source directories (src/, lib/, app/, components/, pages/).
Remove candidates that are unlikely to be golden samples:
@generated, auto-generated, or common codegen markers)node_modules/, .next/, dist/, build/, or other build output directoriesFor remaining candidates, check recent git activity:
git log --oneline --since="60 days ago" -- <file> | wc -l
Files with recent activity (modified in the last 60 days) get a recency bonus in scoring. Files untouched for 6+ months are deprioritized (they may use outdated patterns).
Score each candidate on five dimensions. Each dimension is 0 to 20 points, for a maximum total of 100.
Test file detection: look for <filename>.test.<ext>, <filename>.spec.<ext>, or __tests__/<filename>.<ext>.
If no specialist is associated with the file, score based on general constitution adherence.
Rank candidates by total score. Present the top 10 (or fewer if less exist) to the user. Persona adaptation: The format below is the default for the Developer persona; adapt the display to the active persona's output rules. Verbosity is resolved separately across templates/verbosity/terse.md, templates/verbosity/normal.md, and templates/verbosity/deep.md: when the resolved verbosity is terse and this section carries a **Terse form:** block, that block is the section's declared rendering at terse verbosity. See skills/status/SKILL.md:12 for the full terse-form marker grammar and table-substitution recipe.
## Sample Candidates
| Rank | File | Pattern | Score | Test | Naming | Pattern | Complexity | Recency |
|------|------|---------|-------|------|--------|---------|------------|---------|
| 1 | src/lib/auth/session.ts | security | 85 | 20 | 20 | 20 | 15 | 10 |
| 2 | src/components/DataTable.tsx | frontend | 80 | 20 | 15 | 20 | 15 | 10 |
| ... | | | | | | | | |
Select files to extract as golden samples (e.g., "1, 3" or "all").
Wait for user selection before proceeding.
Terse form: Renders the ranked candidate table narrowed to rank, file, pattern, and total score, and the selection prompt asking which files to extract. Substitutes the five per-dimension score columns (Test, Naming, Pattern, Complexity, Recency) with /adev:sample --from <file>, which re-scores and shows the full dimension breakdown for any one candidate.
For each selected candidate, create an annotated golden sample.
Read the full source file. Read its corresponding test file if one exists.
Create the sample file using the template at templates/sample-template.md. Fill in every section:
Save the annotated sample to .context-index/samples/<pattern-name>-<descriptive-slug>.md.
File naming convention: <specialist-pattern>-<short-description>.md. Examples:
api-route-crud-endpoint.mdfrontend-data-table-component.mdsecurity-auth-middleware.mdIf no specialist pattern applies, use general-<description>.md.
After creating the sample:
Golden sample created:
- .context-index/samples/api-route-crud-endpoint.md (score: 85/100)
Source: src/app/api/users/route.ts
Pattern: api-route
Principles: error-handling, response-shape, input-validation
Terse form: Renders the repo-relative sample path (.context-index/samples/<name>.md) and its score. Substitutes the source file path, pattern name, and principles listing with the sample path already rendered above, whose frontmatter records them.
When --from <file> is provided:
When --score is provided:
.context-index/samples/.## Sample Score Audit
| Sample | Old Score | New Score | Delta | Status |
|--------|-----------|-----------|-------|--------|
| api-route-crud-endpoint.md | 85 | 80 | -5 | OK |
| frontend-data-table.md | 75 | 45 | -30 | DEGRADED |
| security-auth-middleware.md | 90 | 90 | 0 | OK |
Degraded samples need attention: source code has changed or standards have evolved.
Terse form: Renders the score audit table narrowed to sample, delta, and status columns, limited to degraded entries — the actionable subset. Skips the old-score and new-score columns; delta already carries the change they show. Substitutes the non-degraded (OK) rows with a count plus the repo-relative path under .context-index/samples/ for any one sample's current recorded score.
When --refresh is provided:
--score logic first.## Sample Refresh
| Sample | Score | Stale? | Drift? | Action |
|--------|-------|--------|--------|--------|
| api-route-crud-endpoint.md | 80 | Yes | No | Re-extract recommended |
| frontend-data-table.md | 45 | No | Yes | Find replacement |
| security-auth-middleware.md | 90 | No | No | No action needed |
Proceed with recommended actions? (y/n)
Terse form: This section's terse form governs the composed view; ## --score Mode's terse form applies only when --score runs on its own. Renders the refresh table narrowed to sample, stale, drift, and action columns — the action column and its per-sample rows are the evidence the following prompt asks the user to approve — plus the "Proceed with recommended actions?" prompt. Substitutes the score column with a count of samples needing attention and the repo-relative path under .context-index/samples/ for any one sample's score detail.
Never:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub agentic-development/adev-plugin --plugin adev31 skills in this plugin
/assessadev:assessAssess codebase readiness for agentic development. Scans the codebase using static file inspection and outputs maturity scores across 8 structural dimensions (raw mode) or 11 dimensions (adev mode). Use when you want to evaluate how well-suited a codebase is for AI-assisted development, identify improvement areas, or track progress over time./brainstormadev:brainstormExplore a feature idea interactively and produce a Feature Charter. Validates against constitution and existing charters. Use before building any new feature or module, when the user mentions a new capability, or says 'let us build X'./Other plugins' skills for the same job