Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/workflows/marketplace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,6 @@ jobs:
bunx @openai/codex@0.162.0 plugin marketplace add "$GITHUB_WORKSPACE/.marketplace-build" --json
bunx @openai/codex@0.162.0 plugin add jdeurt-design@agents --json
bunx @openai/codex@0.162.0 plugin add jdeurt-engineering@agents --json
- name: Smoke-test packaged edit hook and private dependencies
run: |
fixture="$(mktemp -d)"
trap 'rm -rf "$fixture"' EXIT
mkdir -p "$fixture/project" "$fixture/cache"
printf 'export default [{rules:{"no-undef":"off"}}];\n' > "$fixture/project/eslint.config.mjs"
printf '{"semi":false,"singleQuote":true}\n' > "$fixture/project/.prettierrc.json"
printf 'source.js\n' > "$fixture/project/.prettierignore"
printf 'const value= 1\nconsole.log(missing)\n' > "$fixture/project/source.js"
printf '{"cwd":"%s","tool_name":"Write","tool_input":{"file_path":"%s"}}\n' "$fixture/project" "$fixture/project/source.js" |
XDG_CACHE_HOME="$fixture/cache" bun .marketplace-build/dist/codex/plugins/engineering/scripts/post-edit.ts > "$fixture/result.json"
bun -e 'const fs=require("fs");const path=process.argv[1];const result=JSON.parse(fs.readFileSync(path+"/result.json","utf8"));const note=result.hookSpecificOutput.additionalContext;if(!note.includes("no-undef")||!note.includes("re-read file")||!note.includes("Fix all findings caused by your edit"))process.exit(1);if(fs.readFileSync(path+"/project/source.js","utf8")!=="const value = 1;\nconsole.log(missing);\n")process.exit(1);const cache=path+"/cache/jdeurt-engineering";if(!fs.existsSync(cache)||!fs.readdirSync(cache).some(name=>fs.existsSync(cache+"/"+name+"/.ready")))process.exit(1);' "$fixture"
publish:
needs: check
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && github.event_name != 'merge_group'
Expand Down
74 changes: 66 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,75 @@
# Repository conventions

**Bun TypeScript is the language of choice** for this repository. Run `.ts` files directly with Bun; do not add a JavaScript compilation step. `prettier.config.mjs` is the shared ESM formatting configuration.
## Code

Prefer Bun built-ins over new dependencies: `Bun.file`/`Bun.write`, `Bun.TOML`, `Bun.YAML`, `Bun.CryptoHasher`, `Bun.spawn`/`Bun.spawnSync`, and `bun:test`. Use Node-compatible filesystem APIs for directory, symlink, and permission operations that lack a suitable Bun equivalent. Keep dependencies only where Bun does not provide the required behavior; explain that need before adding one.
Use Bun TypeScript.
Run `.ts` files directly with Bun.
Do not add JavaScript compilation.

Use the root ESLint and Prettier configuration in this repository. Engineering copies these same files into its edit hook at build time. The ESLint policy uses recommended JavaScript and Unicorn rules, TypeScript ESLint strict and stylistic type-checked rules, consistent type imports, required control-flow braces, and a 350-line limit including comments and blanks. `bun run lint` rejects all warnings. It bans unsafe narrowing assertions and chained type assertions; validate unknown input with Zod Mini or checked control flow. React Hooks `recommended-latest` and React Doctor `recommended` apply to React files. Prettier uses double quotes, semicolons, two-space indentation, 120-column formatting, ES5 trailing commas, and LF line endings. React rules do not apply to this repository's CLI tooling.
Prefer Bun built-ins to new dependencies.
Use Node-compatible filesystem APIs when Bun lacks suitable directory, symlink, or permission operations.
Keep dependencies only for behavior unavailable in Bun.
Explain the need before adding a dependency.

Preserve imported third-party content except for declared import-policy filtering, omission notices, client compatibility fields, and built plugin identities. Lint and format repository-owned code, not vendored skill assets or generated packages. Declare external skills and plugins in `imports.toml` and commit only their `.import` markers. Resolve upstream content into temporary build sources; never write imported content or an import lockfile to `main`. Default to the upstream default branch, with optional explicit refs.
Use the root `eslint.config.ts`, `prettier.config.mjs`, and `eslint-rules.ts`.
Fix violations without weakening rules.
Keep lint errors and warnings at zero.
Keep linted code files within 350 lines, including comments and blank lines.
Do not use unsafe narrowing assertions or chained type assertions.
Check unknown input with Zod Mini or checked control flow.

Run `bun run lint`, `bun run check-types`, `bun run format:check`, `bun run imports:check`, `bun run build`, `bun run check`, and `bun test` before committing. Generated plugin output and marketplace catalogs belong only in ignored build directories and the `marketplace` branch.
Add tests for authored lint behavior, including whitespace rules, casting checks, and custom rules.
Parameter-only changes to existing rules do not require new tests.
Lint repository-owned code only.
Format repository-owned code only.
Exclude vendored assets and generated packages.

Edit source on `main`. Publish generated snapshots to `marketplace` with `bun run publish:marketplace`. Keep generated content out of `main`. Distribution commits have no parents and must never be merged into `main`. Keep harness-specific configuration out of authored `plugins/` sources, including client manifests, icons, and OpenAI metadata. Implement any required harness-specific behavior as supporting functionality in the publishing pipeline. Generate Mobbin and Bun MCP configuration from the packaging registry.
Before each commit, run:

When creating or editing text intended for people or agents, apply [Coherent Editing](plugins/writing/skills/coherent-editing/SKILL.md). Keep the README brief; put maintenance and import details in `docs/maintenance.md`.
- `bun run lint`
- `bun run check-types`
- `bun run format:check`
- `bun run imports:check`
- `bun run build`
- `bun run check`
- `bun test`

Cross-skill references in skill files use the built plugin namespace and a colon, such as `jdeurt-meta:importing`. Source directories and registry plugin names remain unprefixed.
## Imports and publication

Preserve imported third-party content and licenses.
Apply only declared import-policy filtering, omission notices, client compatibility fields, and built plugin identities.

Declare external skills and plugins in `imports.toml`.
Commit only `.import` markers for imported content.
Resolve upstream content into temporary build sources.
Never write imported content or an import lockfile to `main`.
Use the upstream default branch unless an explicit ref applies.

Use feature branches for source changes.
Target `main` with source PRs.
Keep generated plugin output and catalogs in ignored build directories or the `marketplace` branch.
Publish snapshots with `bun run publish:marketplace`.

Keep generated content out of `main`.
Keep distribution commits parentless.
Never merge distribution commits into `main`.

Keep client-specific configuration out of authored `plugins/` sources.
This includes client manifests, icons, and OpenAI metadata.
Implement client behavior in the publishing pipeline.
Use Soubi for authored client packages.
Preserve native imports for their supported clients.
Generate MCP configuration from the packaging registry.

The build bundles the root lint files in Engineering's Formatting and Linting skill.

## Writing

Apply [Coherent Editing](plugins/writing/skills/coherent-editing/SKILL.md) to all text for people or agents, including product copy.
Apply `jdeurt-writing:asd-ste100` to technical writing and agent instructions.
Do not apply it to product copy for end users.

Keep the README brief.
Put maintenance and import details in `docs/maintenance.md`.
Use built plugin namespaces and colons in cross-skill references, such as `jdeurt-meta:importing`.
Keep source directories and registry plugin names unprefixed.
Loading
Loading