Skip to content

Commit 2f12a79

Browse files
authored
refactor(ai): migrate prompts into skills and port docs to .agents (#930)
* refactor(ai): migrate prompts into skills and port docs * docs(changelog): note ai skills and .agents migration * refactor(ai): make .agents skills canonical for claude
1 parent 75839b2 commit 2f12a79

21 files changed

Lines changed: 134 additions & 347 deletions

File tree

.agents/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# .agents
2+
3+
Assistant-facing support material for this repository.
4+
5+
## Purpose
6+
7+
- Keep reusable agent docs and helper scripts in one place.
8+
- Keep task-oriented skill definitions in `.agents/skills/`.
9+
10+
## Layout
11+
12+
```text
13+
.agents/
14+
├── README.md
15+
├── assets/
16+
│ ├── find_dynamic_imports.sh
17+
│ ├── generate_comment_inventory.sh
18+
│ └── pysa_extract_callers.py
19+
└── docs/
20+
└── gfql/
21+
├── README.md
22+
├── calls_checklist.md
23+
├── conformance.md
24+
├── oracle.md
25+
└── predicates_checklist.md
26+
```
27+
28+
## Related Paths
29+
30+
- Skills: `.agents/skills/`
31+
- Skill index: `.agents/skills/SKILLS.md`
32+
- Plans (gitignored): `plans/`
33+
34+
## Quick Commands
35+
36+
```bash
37+
# Generate dynamic import inventory for refactors
38+
./.agents/assets/find_dynamic_imports.sh master plans/<task>/dynamic_imports.md
39+
40+
# Generate comment inventory for cleanup passes
41+
./.agents/assets/generate_comment_inventory.sh master plans/<task>/comment_inventory.md
42+
43+
# Extract callers from pysa call graph
44+
python3 .agents/assets/pysa_extract_callers.py pysa_results/call-graph.json PlotterBase.PlotterBase.bind
45+
```
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash
22
# Find Dynamic Imports for HOISTIMPORTS Protocol
33
#
4-
# Usage: ./ai/assets/find_dynamic_imports.sh [base_branch] [output_file]
4+
# Usage: ./.agents/assets/find_dynamic_imports.sh [base_branch] [output_file]
55
#
66
# This script automates Phase 1 of the HOISTIMPORTS protocol by extracting all
77
# dynamic imports (imports inside functions/methods/conditionals) added in a PR
88
# and formatting them with context for categorization.
99
#
1010
# Example:
11-
# ./ai/assets/find_dynamic_imports.sh master plans/my-feature/dynamic_imports.md
11+
# ./.agents/assets/find_dynamic_imports.sh master plans/my-feature/dynamic_imports.md
1212

1313
set -euo pipefail
1414

ai/assets/generate_comment_inventory.sh renamed to .agents/assets/generate_comment_inventory.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22
# Generate Comment Inventory for DECOMMENT Protocol
33
#
4-
# Usage: ./ai/assets/generate_comment_inventory.sh [base_branch] [output_file]
4+
# Usage: ./.agents/assets/generate_comment_inventory.sh [base_branch] [output_file]
55
#
66
# This script automates Phase 1 of the DECOMMENT protocol by extracting all
77
# comments added in a PR and formatting them with context for categorization.
88
#
99
# Example:
10-
# ./ai/assets/generate_comment_inventory.sh master plans/my-feature/comment_inventory.md
10+
# ./.agents/assets/generate_comment_inventory.sh master plans/my-feature/comment_inventory.md
1111

1212
set -euo pipefail
1313

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"""Extract caller information from Pysa call-graph.json
33
44
Usage:
5-
python3 ai/assets/pysa_extract_callers.py path/to/call-graph.json method1 method2 ...
5+
python3 .agents/assets/pysa_extract_callers.py path/to/call-graph.json method1 method2 ...
66
77
Example:
8-
python3 ai/assets/pysa_extract_callers.py \\
8+
python3 .agents/assets/pysa_extract_callers.py \\
99
pysa_results/call-graph.json \\
1010
PlotterBase.PlotterBase.bind \\
1111
PlotterBase.PlotterBase.nodes
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Guide for AI assistants working with GFQL (Graph Frame Query Language) in PyGrap
88
- [`calls_checklist.md`](./calls_checklist.md) — Required steps for exposing or updating GFQL `call()` functions.
99
- [`predicates_checklist.md`](./predicates_checklist.md) — End-to-end checklist for predicate implementations.
1010
- [`conformance.md`](./conformance.md) — Cypher TCK conformance harness and CI wiring.
11-
- [`../prompts/GFQL_LLM_GUIDE_MAINTENANCE.md`](../prompts/GFQL_LLM_GUIDE_MAINTENANCE.md) — Guidance for keeping AI assistants aligned with GFQL changes.
11+
- [`../../skills/gfql-llm-guide-maintenance/SKILL.md`](../../skills/gfql-llm-guide-maintenance/SKILL.md) — Guidance for keeping AI assistants aligned with GFQL changes.
1212

1313
### Essential GFQL Operations
1414
```python
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ When exposing or updating GFQL `call()` functions, the change is **multi-system*
44
runtime executors, JSON schema validators, static typing, documentation, and tests
55
all need to stay in sync. Use this playbook (paired with
66
[`predicates_checklist.md`](./predicates_checklist.md) and the guidance in
7-
[`../prompts/GFQL_LLM_GUIDE_MAINTENANCE.md`](../../prompts/GFQL_LLM_GUIDE_MAINTENANCE.md))
7+
[`../../skills/gfql-llm-guide-maintenance/SKILL.md`](../../skills/gfql-llm-guide-maintenance/SKILL.md))
88
to avoid regressions.
99

1010
> **Scope**: Items below are required for *every* new or modified `call()` entry.
@@ -90,7 +90,7 @@ to avoid regressions.
9090
## 📎 Optional (Promote When User-Facing)
9191

9292
- **Marketing / blog teaser** when the call is a marquee feature.
93-
- **LLM prompt updates** (`ai/prompts/gfql/*`) beyond baseline instructions.
93+
- **LLM prompt updates** (`.agents/skills/gfql-llm-guide-maintenance/SKILL.md`) beyond baseline instructions.
9494
- **Customer templates** or dataset refreshes referencing the new capability.
9595

9696
Keep this file synchronized with future GFQL evolutions—open a PR to amend when the onboarding surface changes.
File renamed without changes.
File renamed without changes.

.agents/skills/SKILLS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Skills Catalog
2+
3+
Each skill is a folder containing `SKILL.md` with YAML frontmatter.
4+
5+
- `conventional-commits`
6+
- `decomment`
7+
- `gfql-llm-guide-maintenance`
8+
- `hoist-imports`
9+
- `lint-types-check`
10+
- `plan`
11+
- `pyre-analysis`

0 commit comments

Comments
 (0)