# triroop-engineering-marketplace

A Claude Code plugin marketplace **and** npm installer for Triroop Techconsult's Engineering System (ES) architecture conventions. Two distribution paths, one source of truth (`plugins/engineering-system/`):

- **Claude Code plugin marketplace** — full-fidelity install (skills + `/es-flow` command + the auto-context hook) for Claude Code specifically.
- **`@triroop/engineering-system` npm package** — a zero-dependency CLI that writes the same ES content into whatever agentic tool's native format your project needs: Claude Code, GitHub Copilot, Codex, Antigravity, or any other tool that reads `AGENTS.md`.

## Plugins (Claude Code marketplace)

- **[engineering-system](plugins/engineering-system/)** — Engineering System (ES) architecture skills: feature-contract, frontend/backend architecture, API design, proxy/auth infrastructure, validation, database/ORM, deployment, Next.js project setup, SEO, testing strategy, and the request-handling workflow (`/es-flow`).

### Using this marketplace

From any project, in a Claude Code session:

```
/plugin marketplace add <path-or-url-to-this-repo>
/plugin install engineering-system@triroop-engineering-marketplace
```

For local development against a repo already on disk, you can point directly at this folder's path instead of a URL.

### Adding a new plugin

1. Create `plugins/<plugin-name>/` with a `.claude-plugin/plugin.json` manifest (see `plugins/engineering-system/.claude-plugin/plugin.json` for an example).
2. Add an entry to `.claude-plugin/marketplace.json` under `"plugins"` with `"source": "./plugins/<plugin-name>"`.
3. Commit and have installers run `/plugin marketplace update triroop-engineering-marketplace`.

## `@triroop/engineering-system` (npm CLI)

Installs the same ES skill content into a target project in whatever format each tool actually reads — it's a one-shot file writer, not a runtime dependency.

Running `npm install @triroop/engineering-system` also triggers this automatically (via a `postinstall` script, writing for all supported tools into the project you ran `npm install` from). Re-run `init` manually any time you want to target a different directory/tool subset, or to refresh files after the package updates. Set `ES_SKIP_POSTINSTALL=1` to disable the automatic run.

```
npx @triroop/engineering-system init                    # writes for all supported tools
npx @triroop/engineering-system init --tool claude       # just Claude Code
npx @triroop/engineering-system init --tool copilot
npx @triroop/engineering-system init --tool codex,antigravity
npx @triroop/engineering-system init --dir ../other-repo
```

| Tool | Output | Notes |
|---|---|---|
| `claude` | `.claude/skills/*/SKILL.md`, `.claude/commands/es-flow.md` | Project-scoped skills + command. The `UserPromptSubmit` auto-context hook only ships via the plugin marketplace above (project-level hooks would require writing into `.claude/settings.json`, which this CLI deliberately avoids touching). |
| `copilot` | `.github/instructions/engineering-system.instructions.md` | Uses Copilot's `applyTo: "**"` scoped-instructions format. |
| `codex` | `AGENTS.md` (managed block) | Codex CLI's native repo-context convention. Re-running updates the block in place; hand-written content elsewhere in `AGENTS.md` is preserved. |
| `antigravity` | `AGENTS.md` (managed block) | **Best-effort**: Antigravity's exact instruction-file convention isn't independently verified here — this assumes it follows the same emerging `AGENTS.md` standard as Codex. Confirm against Antigravity's current docs before relying on it. |

Package is currently `"private": true` (no publish target/registry decided yet). Bump the version and flip that flag when ready to publish to the `@triroop` npm scope.

### Package layout

```
package.json          # @triroop/engineering-system manifest (bin: engineering-system)
bin/cli.js             # CLI entry point (init command, --tool/--dir flags)
bin/postinstall.js      # runs init automatically after `npm install`, using INIT_CWD
lib/install.js          # shared write logic (installClaude/Copilot/AgentsMd + runInit)
lib/skills.js           # reads plugins/engineering-system/**/SKILL.md, no other deps
```
