@meyverick/agentic 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/AGENTS.md +234 -0
  2. package/CHANGELOG.md +236 -0
  3. package/README.md +50 -0
  4. package/install.ts +349 -0
  5. package/package.json +37 -0
  6. package/scripts/check-deps.mjs +587 -0
  7. package/scripts/git-dl.mjs +100 -0
  8. package/skills/check/SKILL.md +108 -0
  9. package/skills/check/evals/benchmark.json +40 -0
  10. package/skills/check/evals/evals.json +38 -0
  11. package/skills/check/references/diagnostic-matrix.md +170 -0
  12. package/skills/check/references/script-anatomy.md +154 -0
  13. package/skills/create-skill/SKILL.md +291 -0
  14. package/skills/create-skill/assets/templates/SKILL.md.template +118 -0
  15. package/skills/create-skill/assets/templates/evals.json.template +36 -0
  16. package/skills/create-skill/assets/templates/grading.json.template +26 -0
  17. package/skills/create-skill/evals/benchmark.json +41 -0
  18. package/skills/create-skill/evals/evals.json +50 -0
  19. package/skills/create-skill/evals/grading-template.json +36 -0
  20. package/skills/create-skill/evals/near-misses.json +35 -0
  21. package/skills/create-skill/evals/trigger-queries.json +80 -0
  22. package/skills/create-skill/references/antipatterns.md +123 -0
  23. package/skills/create-skill/references/component-decomposition.md +130 -0
  24. package/skills/create-skill/references/content-quality-criteria.md +61 -0
  25. package/skills/create-skill/references/description-optimization.md +90 -0
  26. package/skills/create-skill/references/eval-methodology.md +100 -0
  27. package/skills/create-skill/references/fragility-matching.md +88 -0
  28. package/skills/create-skill/references/gotchas-patterns.md +80 -0
  29. package/skills/create-skill/references/specification.md +77 -0
  30. package/skills/create-skill/scripts/audit-antipatterns.mjs +164 -0
  31. package/skills/create-skill/scripts/compute-benchmark.mjs +111 -0
  32. package/skills/create-skill/scripts/run-cold-eval.mjs +118 -0
  33. package/skills/create-skill/scripts/scaffold-skill.mjs +86 -0
  34. package/skills/create-skill/scripts/validate-routing.mjs +137 -0
  35. package/skills/create-skill/scripts/validate-structure.mjs +223 -0
  36. package/skills/design-craft/SKILL.md +134 -0
  37. package/skills/design-craft/evals/benchmark.json +41 -0
  38. package/skills/design-craft/evals/evals.json +81 -0
  39. package/skills/design-craft/references/anti-slop-patterns.md +49 -0
  40. package/skills/design-craft/references/art-direction.md +89 -0
  41. package/skills/design-craft/references/design-engineering.md +122 -0
  42. package/skills/design-craft/references/motion-craft.md +124 -0
  43. package/skills/design-craft/references/process.md +47 -0
  44. package/skills/design-craft/references/review-checklist.md +121 -0
  45. package/skills/guardrails/SKILL.md +118 -0
  46. package/skills/guardrails/evals/benchmark.json +40 -0
  47. package/skills/guardrails/evals/evals.json +49 -0
  48. package/skills/guardrails/references/guardrails-patterns.md +43 -0
  49. package/skills/okf-docs/SKILL.md +79 -0
  50. package/skills/okf-docs/evals/benchmark.json +21 -0
  51. package/skills/okf-docs/evals/evals.json +37 -0
  52. package/skills/okf-docs/references/okf-spec.md +56 -0
  53. package/skills/okf-docs/scripts/validate-frontmatter.mjs +130 -0
  54. package/skills/openspec-harden/SKILL.md +138 -0
  55. package/skills/openspec-harden/evals/benchmark.json +40 -0
  56. package/skills/openspec-harden/evals/evals.json +38 -0
  57. package/skills/openspec-learn/SKILL.md +216 -0
  58. package/skills/openspec-learn/evals/benchmark.json +44 -0
  59. package/skills/openspec-learn/evals/evals.json +48 -0
  60. package/skills/openspec-learn/evals/retrieval-bench.json +27 -0
  61. package/skills/openspec-learn/references/conflict-handling.md +20 -0
  62. package/skills/openspec-learn/references/evaluation-methodology.md +126 -0
  63. package/skills/openspec-learn/references/examples.md +37 -0
  64. package/skills/openspec-learn/references/improvement-patterns.md +155 -0
  65. package/skills/openspec-learn/references/report-analysis.md +104 -0
  66. package/skills/openspec-learn/references/skill-quality.md +103 -0
  67. package/skills/openspec-learn/references/tool-type-detection.md +30 -0
  68. package/skills/openspec-report/SKILL.md +104 -0
  69. package/skills/openspec-report/assets/templates/assessment.md.template +84 -0
  70. package/skills/openspec-report/assets/templates/report.md.template +92 -0
  71. package/skills/openspec-report/evals/benchmark.json +44 -0
  72. package/skills/openspec-report/evals/evals.json +46 -0
  73. package/skills/qmd-research/SKILL.md +89 -0
  74. package/skills/qmd-research/evals/benchmark.json +40 -0
  75. package/skills/qmd-research/evals/evals.json +38 -0
  76. package/skills/qmd-research/references/index-management.md +69 -0
  77. package/skills/qmd-research/references/query-craft.md +82 -0
@@ -0,0 +1,44 @@
1
+ {
2
+ "skill": "opsx-report",
3
+ "generated": {
4
+ "by": "process:compute-benchmark/1.0",
5
+ "at": "2026-08-23T12:42:46Z"
6
+ },
7
+ "stage": "behavioral",
8
+ "structural": {
9
+ "validate_structure": {
10
+ "pass": true,
11
+ "warnings": [
12
+ "Missing scripts/ directory",
13
+ "Missing references/ directory"
14
+ ]
15
+ },
16
+ "validate_routing": {
17
+ "checks_total": 6,
18
+ "positive_triggers": 3,
19
+ "anti_triggers": 2,
20
+ "description_body_alignment": "9/10 description keywords found in body (90% alignment)",
21
+ "single_responsibility": true
22
+ },
23
+ "evals": {
24
+ "count": 3,
25
+ "assertions": 7,
26
+ "anti_trigger_coverage": true
27
+ }
28
+ },
29
+ "behavioral_dxm": "1×0.33",
30
+ "ship_gate": {
31
+ "criterion": "d = +1 and m >= 0.2",
32
+ "applies_to": "behavioral stage"
33
+ },
34
+ "behavioral": {
35
+ "at": "2026-09-12T09:38:54.074Z",
36
+ "evals": 4,
37
+ "assertions": 9,
38
+ "baseline": 0.5556,
39
+ "with_skill": 0.8889,
40
+ "d": 1,
41
+ "m": 0.3333,
42
+ "ship": "pass"
43
+ }
44
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "skill_name": "opsx-report",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "Generate a report from the archived change fix-auth-gate.",
7
+ "expected_output": "Agent loads the opsx-report skill, locates the archived change under openspec/changes/archive/, and generates report.md following the report.md.template section structure (What Happened, What I Learned, What I'd Do Differently, Key Decisions, Trade-offs Made, Follow-ups, Archive Reference).",
8
+ "files": [],
9
+ "assertions": [
10
+ "Skill activates on report-generation request",
11
+ "Generated report follows template section structure",
12
+ "Report references the archive path of the named change"
13
+ ]
14
+ },
15
+ {
16
+ "id": 2,
17
+ "prompt": "Analyze the reports in ./openspec/reports/ and improve our skills based on them.",
18
+ "expected_output": "Agent does NOT activate opsx-report. This is an analysis/improvement request handled by the opsx-learn skill; opsx-report only generates self-reflection reports from archived changes.",
19
+ "files": [],
20
+ "assertions": [
21
+ "Anti-trigger fires: request must route to opsx-learn, not opsx-report",
22
+ "No report generation attempted"
23
+ ]
24
+ },
25
+ {
26
+ "id": 3,
27
+ "prompt": "Create a report for the simplify-main-overlay change.",
28
+ "expected_output": "Generated report is a self-reflection (meditation) referencing openspec/changes/archive/<date>-simplify-main-overlay/ — it summarizes and links to archive artifacts rather than copying their content wholesale.",
29
+ "files": [],
30
+ "assertions": [
31
+ "Report contains an Archive Reference section with location",
32
+ "Report content is reflection (lessons, decisions, trade-offs), not artifact duplication"
33
+ ]
34
+ },
35
+ {
36
+ "id": 4,
37
+ "prompt": "I want to explore whether we should use Redis or Postgres for session storage.",
38
+ "expected_output": "Agent does NOT activate openspec-report. This is an open-ended exploration request handled by openspec-explore; openspec-report only reflects on completed/archived changes.",
39
+ "files": [],
40
+ "assertions": [
41
+ "Anti-trigger fires: request routes to openspec-explore, not openspec-report",
42
+ "No report generation attempted"
43
+ ]
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: qmd-research
3
+ description: >
4
+ Research project knowledge, specifications, and architecture using the
5
+ project-local QMD index and maintain index collections. Use when searching
6
+ project markdown, researching specifications or past reports, or managing
7
+ local QMD index collections and embeddings. Do NOT use when looking up exact
8
+ file paths, symbols, or code lines (use grep or Read), or creating a new change.
9
+ allowed-tools: Bash(qmd:*)
10
+ license: MIT
11
+ compatibility: Requires qmd CLI and local .qmd index.
12
+ metadata:
13
+ author: agentic
14
+ version: "1.0.0"
15
+ positive_triggers:
16
+ - "research project specifications and architecture with qmd"
17
+ - "search project documentation and past reports conceptually"
18
+ - "manage and update local qmd collections and embeddings"
19
+ anti_triggers:
20
+ - "look up exact file path or code symbol"
21
+ - "grep exact string in source code"
22
+ ---
23
+
24
+ # QMD Research
25
+
26
+ Research project knowledge bases and manage project-local QMD index collections.
27
+
28
+ ## Activation Boundary
29
+
30
+ - **Use when:** Searching project documentation, researching specifications, exploring past change reports, or managing the project-local index and embeddings.
31
+ - **Do NOT use when:** Locating exact file paths, line numbers, headings, or code symbols (use `grep` and `Read` instead); or executing code implementations.
32
+
33
+ ## Project-Local Index Law
34
+
35
+ - **Strict Project Locality:** All index operations bind strictly to the project repository root (`<repo>/.qmd/index.sqlite`, gitignored).
36
+ - **No Global Indexing:** NEVER create, populate, query, or fall back to a global or shared index (such as `~/.qmd`).
37
+ - **Initialization:** When `.qmd/` is missing during a task, run `qmd init` at the repository root before querying.
38
+
39
+ ## Read Path
40
+
41
+ ### Mode Selection
42
+
43
+ - **Exact Terms & Symbols:** Keyword search via BM25 (no LLM latency):
44
+ ```bash
45
+ qmd search '"<exact phrase>"' --json -n 10 -c <collection>
46
+ ```
47
+ - **Conceptual & Paraphrased Recall:** Multi-line query document authored by the agent:
48
+ ```bash
49
+ qmd query $'intent: <goal and concepts to avoid>\nlex: <lexical anchors>\nvec: <semantic paraphrase>' --json -n 10 -c <collection>
50
+ ```
51
+ Author the query fields deliberately from task context; never pass raw user text to bare `qmd query`.
52
+
53
+ ### Retrieval Discipline
54
+
55
+ - **Retrieve Before Claiming:** Always fetch full document contents using `qmd get` or `qmd multi-get` before asserting facts:
56
+ ```bash
57
+ qmd get "#<docid>"
58
+ qmd multi-get "<docid1>,<docid2>" --json
59
+ ```
60
+ - **Evidence Citation:** Cite the `#docid` or document path together with exact line numbers for any claim.
61
+ - **Document Slicing:** Slice ranges using `qmd get "<path:from:count>"` or `-l <count>`, never by piping through `head`, `tail`, or `sed`.
62
+ - **Collection Scoping:** Restrict queries to relevant collections using `-c <collection>` (e.g., `-c openspec`, `-c references`).
63
+
64
+ ## Mutation Path (Gated)
65
+
66
+ Index mutations modify files and vector state. They are strictly gated:
67
+ - **Available Mutations:** `qmd init`, `qmd collection add/remove/rename`, `qmd context add/rm`, `qmd embed`, `qmd update`, `qmd cleanup`.
68
+ - **Explicit Gate:** Mutations SHALL run ONLY when the user explicitly requests index setup, collection updates, embedding refresh, or repairs.
69
+ - **Never on Search:** Read-only searches MUST NOT invoke `collection`, `embed`, `update`, or `cleanup` as a side effect.
70
+ - **Embedding Command:**
71
+ ```bash
72
+ qmd update && qmd embed --chunk-strategy auto
73
+ ```
74
+ - **Health Inspection:**
75
+ ```bash
76
+ qmd status
77
+ ```
78
+
79
+ ## Gotchas and Anti-Examples
80
+
81
+ - **Anti-Example (Bare Expand):** Do NOT run `qmd query "how does auth work"`. This delegates query expansion to the model. Instead author `intent:`, `lex:`, and `vec:` lines explicitly.
82
+ - **Anti-Example (Output Piping):** Do NOT pipe `qmd get` into `grep`, `sed`, or `awk`. Use QMD's native `path:from:count` range slicing.
83
+ - **Anti-Example (External Paths):** Do NOT add home-directory collections (`qmd collection add ~/docs`). All collection paths must reside inside the project tree.
84
+ - **Loud Degradation:** If `qmd status` fails or daemon is absent, report that QMD is unavailable and note any `grep` fallback explicitly with retrieved evidence.
85
+
86
+ ## References
87
+
88
+ - [references/query-craft.md](references/query-craft.md) — Query grammar, multi-line fusion, metadata AST filters, and worked examples.
89
+ - [references/index-management.md](references/index-management.md) — Project-local initialization, collection management, context attachment, and maintenance.
@@ -0,0 +1,40 @@
1
+ {
2
+ "skill": "qmd-research",
3
+ "generated": {
4
+ "by": "process:structural-stage/1.0",
5
+ "at": "2026-09-12T11:38:00Z"
6
+ },
7
+ "stage": "behavioral",
8
+ "structural": {
9
+ "validate_structure": {
10
+ "pass": true,
11
+ "note": "recorded at apply gate (task 7.2)"
12
+ },
13
+ "validate_routing": {
14
+ "checks_total": 6,
15
+ "positive_triggers": 3,
16
+ "anti_triggers": 2,
17
+ "single_responsibility": true
18
+ },
19
+ "evals": {
20
+ "count": 3,
21
+ "assertions": 9,
22
+ "anti_trigger_coverage": true
23
+ }
24
+ },
25
+ "behavioral_dxm": "1×0.33",
26
+ "ship_gate": {
27
+ "criterion": "d = +1 and m >= 0.2",
28
+ "applies_to": "behavioral stage"
29
+ },
30
+ "behavioral": {
31
+ "at": "2026-09-12T09:39:58.960Z",
32
+ "evals": 3,
33
+ "assertions": 9,
34
+ "baseline": 0.5556,
35
+ "with_skill": 0.8889,
36
+ "d": 1,
37
+ "m": 0.3333,
38
+ "ship": "pass"
39
+ }
40
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "skill_name": "qmd-research",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "Research the specifications and architecture regarding how submodule pointer sync is enforced.",
7
+ "expected_output": "Agent activates qmd-research, selects hybrid query mode with authored intent/lex/vec lines, retrieves relevant documents with qmd get, and cites docid and line numbers.",
8
+ "files": [],
9
+ "assertions": [
10
+ "Skill activates on conceptual research request",
11
+ "Mode selection authors intent and lexical/semantic lines",
12
+ "Claims cite retrieved docids with line numbers",
13
+ "No index mutation commands run"
14
+ ]
15
+ },
16
+ {
17
+ "id": 2,
18
+ "prompt": "Find the exact definition of the function `writeProvenanceManifest` in `project/install.ts`.",
19
+ "expected_output": "Agent does NOT activate qmd-research. Exact symbol and file lookups are handled via grep or Read; qmd-research is for conceptual research and collection management.",
20
+ "files": [],
21
+ "assertions": [
22
+ "Anti-trigger fires: request routes to grep/Read, not qmd-research",
23
+ "No QMD queries executed for exact symbol lookup"
24
+ ]
25
+ },
26
+ {
27
+ "id": 3,
28
+ "prompt": "Search the archive reports for lessons learned about database migrations.",
29
+ "expected_output": "Agent runs read path using qmd query scoped to openspec collection, fetches document slices, and reports findings without executing index mutations.",
30
+ "files": [],
31
+ "assertions": [
32
+ "Search scoped with -c openspec",
33
+ "Document fetched before claiming",
34
+ "Mutation path remains gated (no embed, cleanup, or update executed)"
35
+ ]
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,69 @@
1
+ # QMD Index Management & Maintenance Reference
2
+
3
+ This reference documents project-local index initialization, collection configuration, context attachment, embedding updates, and troubleshooting.
4
+
5
+ ---
6
+
7
+ ## 1. Project-Local Index Lifecycle
8
+
9
+ All index operations MUST remain strictly local to the repository root.
10
+
11
+ ```bash
12
+ # Initialize project-local index (creates .qmd/index.sqlite, gitignored)
13
+ qmd init
14
+
15
+ # View health, document counts, and active collections
16
+ qmd status
17
+ ```
18
+
19
+ NEVER create or point to a global index under `~/.qmd`.
20
+
21
+ ---
22
+
23
+ ## 2. Managing Collections
24
+
25
+ Collections group markdown files for scoped retrieval. All paths must be relative to the repository.
26
+
27
+ ```bash
28
+ # Add a collection
29
+ qmd collection add ./openspec/ --name openspec
30
+
31
+ # Add context describing collection purpose
32
+ qmd context add qmd://openspec/ "Active specifications, proposals, and change archives"
33
+
34
+ # List collections and indexed files
35
+ qmd collection list
36
+ qmd ls openspec
37
+ ```
38
+
39
+ ---
40
+
41
+ ## 3. Maintenance & Embeddings
42
+
43
+ When files change or after adding new documents, update the index:
44
+
45
+ ```bash
46
+ # Re-index all collections
47
+ qmd update
48
+
49
+ # Generate or refresh vector embeddings with AST chunking
50
+ qmd embed --chunk-strategy auto
51
+
52
+ # Clean up orphaned chunks and vacuum SQLite database
53
+ qmd cleanup
54
+ ```
55
+
56
+ ---
57
+
58
+ ## 4. Troubleshooting & Health
59
+
60
+ ### Missing or Stale Index
61
+ If `qmd status` returns an error or reports stale documents:
62
+ 1. Verify `.qmd/index.sqlite` exists: `ls -la .qmd/`.
63
+ 2. Run `qmd init` if absent.
64
+ 3. Re-index and embed: `qmd update && qmd embed --chunk-strategy auto`.
65
+
66
+ ### Missing Daemon or QMD Binary
67
+ If `qmd` is not in `$PATH` or fails to run:
68
+ - Fall back loudly to `grep` for exact keyword searches.
69
+ - State `qmd unavailable, grep fallback` in the proposal or summary.
@@ -0,0 +1,82 @@
1
+ # QMD Query Craft & Syntax Reference
2
+
3
+ This reference covers the structured query grammar, search mode selection, filtering AST, and practical examples across project corpora.
4
+
5
+ ---
6
+
7
+ ## 1. Query Grammar (`SYNTAX.md`)
8
+
9
+ A QMD query is either a single expand query or a multi-line query document.
10
+
11
+ ```text
12
+ query = expand_query | query_document ;
13
+ expand_query = text | explicit_expand ;
14
+ explicit_expand= "expand:" text ;
15
+ query_document = [ intent_line ] { typed_line } ;
16
+ intent_line = "intent:" text newline ;
17
+ typed_line = type ":" text newline ;
18
+ type = "lex" | "vec" | "hyde" ;
19
+ text = quoted_phrase | plain_text ;
20
+ ```
21
+
22
+ ### Typed Lines Explained
23
+
24
+ - **`intent:`**: High-level task definition. Explains what the agent is looking for and what nearby-but-wrong concepts to avoid. (Used by rerankers and candidate filtering).
25
+ - **`lex:`**: Lexical / BM25 search. Supports exact quoted phrases (`"exact phrase"`), term negation (`-unwanted`), and keyword combinations.
26
+ - **`vec:`**: Dense vector embedding search. Translates conceptual paraphrase into semantic embedding space.
27
+ - **`hyde:`**: Hypothetical Document Embedding. A simulated passage answering the query to bridge vocabulary mismatch.
28
+
29
+ ---
30
+
31
+ ## 2. Mode Selection & Scoping
32
+
33
+ | Goal | Mode | CLI Pattern | Latency |
34
+ |---|---|---|---|
35
+ | Exact symbol, path, title, heading | `qmd search` | `qmd search '"<term>"' -c <collection>` | Fast (~3ms) |
36
+ | Conceptual / Paraphrased topic | `qmd query` (structured) | `qmd query $'intent: ...\nlex: ...\nvec: ...'` | Medium (~50-100ms) |
37
+ | Multi-document evidence gathering | `qmd multi-get` | `qmd multi-get "<docid1>,<docid2>" --json` | Fast (<10ms) |
38
+
39
+ ### Scoping with `-c`
40
+
41
+ Always constrain search to target collections:
42
+ - `-c openspec`: Search specifications, active changes, and archived changes.
43
+ - `-c references`: Search external documentation, framework guides, and specifications.
44
+ - `-c pi-memory`: Search persistent session memory and daily developer notes.
45
+
46
+ ---
47
+
48
+ ## 3. Worked Examples on Project Corpora
49
+
50
+ ### Example 1: Finding an Architectural Specification
51
+
52
+ Goal: Locate which capability specification governs submodule pointer sync.
53
+
54
+ ```bash
55
+ qmd query $'intent: find the spec governing submodule pointer freshness and CI gates\nlex: "Submodule Pointer Sync" gitlink\nvec: committing updated submodule pointer in orchestrator' --json -n 5 -c openspec
56
+ ```
57
+
58
+ ### Example 2: Clustering Gotchas Across Archived Reports
59
+
60
+ Goal: Find past reports encountering borrow-checker or lifetime fights.
61
+
62
+ ```bash
63
+ qmd query $'intent: cluster recurring knowledge gaps across reports\nlex: "lifetime" "borrow" "clippy"\nvec: difficulties with rust borrow checker and reference lifetimes' --json -n 10 -c openspec
64
+ ```
65
+
66
+ ### Example 3: Searching Shipped Skill Patterns
67
+
68
+ Goal: Inspect how validation loops are designed in existing skills.
69
+
70
+ ```bash
71
+ qmd search '"validate-routing"' --json -n 5 -c references
72
+ ```
73
+
74
+ ---
75
+
76
+ ## 4. Retrieval Verification (`qmd bench`)
77
+
78
+ Pin search quality benchmarks against a JSON fixture file:
79
+ ```bash
80
+ qmd bench project/skills/openspec-learn/evals/retrieval-bench.json
81
+ ```
82
+ Measures Precision@k, Recall@1/3/5, MRR, and latency across BM25, vector, hybrid, and full reranked backends.