Skip to content

Commit d76e358

Browse files
authored
Merge pull request #58 from constructive-io/devin/1773785398-update-search-codegen-skills
Add graphile-search + constructive-sdk-search skills, delete graphile-pgvector, update codegen
2 parents 7a0901c + c773907 commit d76e358

16 files changed

Lines changed: 3115 additions & 400 deletions

File tree

skills/constructive-graphql-codegen/SKILL.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,13 +298,38 @@ await generate({
298298
// OR configure individually:
299299
docs: {
300300
readme: true, // README.md
301-
agents: true, // AGENTS.md (structured for LLM consumption)
301+
agents: true, // AGENTS.md (thin router — see below)
302302
mcp: false, // mcp.json (MCP tool definitions)
303303
skills: true, // skills/ (per-command .md skill files)
304304
},
305305
});
306306
```
307307

308+
### Thin AGENTS.md Pattern
309+
310+
When `docs.agents: true`, the codegen generates a thin **AGENTS.md** file that acts as a router — it lists available skills and reference files rather than duplicating their content. This keeps the AGENTS.md small and points agents to the detailed per-entity skill files in `skills/`.
311+
312+
The generated AGENTS.md includes:
313+
- A summary of available entities and operations
314+
- Links to per-entity skill files in `skills/`
315+
- **Special field categories** that flag non-standard fields:
316+
- **PostGIS fields** (geometry/geography columns)
317+
- **pgvector fields** (vector embedding columns)
318+
- **Unified Search fields** (search score, rank, similarity, distance computed fields)
319+
320+
The special field categorization helps agents understand which fields are computed search scores vs. regular data columns, and routes them to the `graphile-search` skill for search-related documentation.
321+
322+
### Filtering Search Fields in Generated Docs
323+
324+
The codegen provides a `getSearchFields()` utility that categorizes computed fields by their search adapter origin:
325+
326+
```typescript
327+
import { getSearchFields } from '@constructive-io/graphql-codegen';
328+
329+
const searchFields = getSearchFields(schema);
330+
// Returns: { tsvector: [...], bm25: [...], trgm: [...], pgvector: [...] }
331+
```
332+
308333
### Node.js HTTP Adapter
309334

310335
For Node.js apps using subdomain-based routing (e.g., `auth.localhost:3000`):
@@ -524,6 +549,7 @@ See `references/query-keys.md` for details.
524549
| No skill files generated | Set `docs: { skills: true }` |
525550
| Schema export produces empty file | Verify database/endpoint has tables in the specified schemas |
526551
| `schemaDir` generates nothing | Ensure directory contains `.graphql` files (not `.gql` or other extensions) |
552+
| Search fields not categorized in docs | Ensure `graphile-search` (`UnifiedSearchPreset`) is in PostGraphile preset |
527553

528554
## References
529555

0 commit comments

Comments
 (0)