Skip to content

Commit 4fc0496

Browse files
authored
Merge pull request #870 from constructive-io/devin/1774057025-add-agent-skills
feat: add .agents/skills/ directory + fix codegen output path to .agents/skills/
2 parents b8d4ae2 + e1d7dfd commit 4fc0496

3 files changed

Lines changed: 79 additions & 2 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Constructive Monorepo Setup
2+
3+
Set up the Constructive monorepo for local development and testing.
4+
5+
## Prerequisites
6+
7+
- Node.js 20+
8+
- pnpm 9+
9+
- Docker (for PostgreSQL)
10+
- pgpm CLI (`npm install -g pgpm`)
11+
12+
## Quick Start
13+
14+
```bash
15+
# 1. Install dependencies
16+
pnpm install
17+
18+
# 2. Start PostgreSQL via pgpm Docker
19+
pgpm docker start --image docker.io/constructiveio/postgres-plus:18 --recreate
20+
21+
# 3. Load environment variables
22+
eval "$(pgpm env)"
23+
24+
# 4. Bootstrap admin users for testing
25+
pgpm admin-users bootstrap --yes
26+
pgpm admin-users add --test --yes
27+
28+
# 5. Build the monorepo
29+
pnpm build
30+
31+
# 6. Run tests in a specific package
32+
cd packages/<yourmodule>
33+
pnpm test
34+
```
35+
36+
## Docker Image
37+
38+
Use `docker.io/constructiveio/postgres-plus:18` which includes PostgreSQL with PostGIS, pgvector, pg_textsearch, pg_trgm, btree_gin, and uuid-ossp extensions.
39+
40+
For detailed Docker and pgpm usage, see the [pgpm skill](https://github.com/constructive-io/constructive-skills/tree/main/.agents/skills/pgpm) in the public skills repo.
41+
42+
## Monorepo Navigation
43+
44+
See [AGENTS.md](../../AGENTS.md) at the repo root for the full navigation guide covering:
45+
- Package layout (`packages/*`, `pgpm/*`, `graphql/*`, `postgres/*`, `graphile/*`)
46+
- Entry points (PGPM CLI, Constructive CLI, GraphQL Server)
47+
- Environment configuration patterns
48+
- Testing framework selection guide
49+
50+
## Code Generation (SDK)
51+
52+
To regenerate the GraphQL SDK after schema changes:
53+
54+
```bash
55+
# Generate types, hooks, ORM, and CLI from a running GraphQL endpoint
56+
cnc codegen
57+
```
58+
59+
Skills are auto-generated to `.agents/skills/` when `docs.skills: true` is set in the codegen config.
60+
61+
For detailed codegen configuration, see the [constructive-graphql skill](https://github.com/constructive-io/constructive-skills/tree/main/.agents/skills/constructive-graphql) — specifically the [codegen.md reference](https://github.com/constructive-io/constructive-skills/tree/main/.agents/skills/constructive-graphql/references/codegen.md).
62+
63+
## Graphile Plugin Development
64+
65+
Graphile plugins live under `graphile/*`. For PostGIS plugin development and testing, see the [constructive-graphql skill](https://github.com/constructive-io/constructive-skills/tree/main/.agents/skills/constructive-graphql) — specifically the [search-postgis.md reference](https://github.com/constructive-io/constructive-skills/tree/main/.agents/skills/constructive-graphql/references/search-postgis.md).
66+
67+
## Testing
68+
69+
See [AGENTS.md](../../AGENTS.md) for the testing framework selection guide. For comprehensive database testing patterns, see the [constructive-testing skill](https://github.com/constructive-io/constructive-skills/tree/main/.agents/skills/constructive-testing).
70+
71+
## Related Skills
72+
73+
- [pgpm](https://github.com/constructive-io/constructive-skills/tree/main/.agents/skills/pgpm) — Docker, migrations, deploy/verify/revert
74+
- [constructive-graphql](https://github.com/constructive-io/constructive-skills/tree/main/.agents/skills/constructive-graphql) — Codegen, search, PostGIS
75+
- [constructive-testing](https://github.com/constructive-io/constructive-skills/tree/main/.agents/skills/constructive-testing) — pgsql-test, drizzle-orm-test
76+
- [constructive-tooling](https://github.com/constructive-io/constructive-skills/tree/main/.agents/skills/constructive-tooling) — pnpm workspace, makage builds
77+
- [constructive-setup](https://github.com/constructive-io/constructive-skills/tree/main/.agents/skills/constructive-setup) — Full setup guide (public skills repo)

graphql/codegen/src/core/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function resolveSkillsOutputDir(
113113
: path.resolve(workspaceRoot, config.skillsPath);
114114
}
115115

116-
return path.resolve(workspaceRoot, 'skills');
116+
return path.resolve(workspaceRoot, '.agents/skills');
117117
}
118118

119119
export async function generate(

graphql/codegen/src/types/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ export interface GraphQLSDKConfigTarget {
426426
/**
427427
* Custom path for generated skill files.
428428
* When set, skills are written to this directory.
429-
* When undefined (default), skills are written to {workspaceRoot}/skills/
429+
* When undefined (default), skills are written to {workspaceRoot}/.agents/skills/
430430
* where workspaceRoot is auto-detected by walking up from the output directory
431431
* looking for pnpm-workspace.yaml, lerna.json, or package.json with workspaces.
432432
*/

0 commit comments

Comments
 (0)