Make the repo an APM producer (ai-toolkit) with .apm/ as source of truth#15
Conversation
| # The installable prompt primitives live under .apm/prompts/ and are generated | ||
| # from the browsable prompts/ collection by scripts/generate-apm-primitives.sh. | ||
| name: gpt-prompts | ||
| version: 1.0.0 |
There was a problem hiding this comment.
Can we make this somehow sync up with the GH release version?
| # https://microsoft.github.io/apm/producer/ | ||
| # | ||
| # This manifest turns the repository into an APM producer. Consumers can run | ||
| # apm install DevSecNinja/gpt-prompts |
There was a problem hiding this comment.
I wonder if we should limit ourselves to gpt-prompts and maybe we should rename the project as well as the GitHub project? What is the most common name for these kind of repos?
There was a problem hiding this comment.
Pull request overview
This PR turns the prompt collection into an APM (Agent Package Manager) producer, keeping prompts/** as the single source of truth while committing generated .apm/prompts/*.prompt.md artifacts and updating CI to keep them in sync.
Changes:
- Add
apm.ymlproducer manifest and documentation for producing/consuming APM primitives. - Introduce
scripts/generate-apm-primitives.shto deterministically generate.apm/prompts/*.prompt.mdfromprompts/**. - Update the existing index-generation workflow and docs to include
.apm/promptsgeneration and syncing.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/generate-apm-primitives.sh | New generator that transforms prompts/** into APM prompt primitives under .apm/prompts/. |
| apm.yml | Adds the APM producer manifest (includes .apm/ artifacts via includes: auto). |
| .github/workflows/generate-index.yml | Runs APM primitive generation alongside index generation and commits .apm/prompts updates. |
| docs/apm.md | Adds a producer guide explaining artifacts, generation, and consumption paths. |
| README.md | Documents APM installation and links to the producer guide. |
| CONTRIBUTING.md | Adds a contribution tip to regenerate and commit .apm/prompts artifacts. |
| INDEX.md | Updates the auto-generated “Last updated” timestamp. |
| .apm/prompts/analysis-data-analysis.prompt.md | Generated APM primitive for the Analysis prompt. |
| .apm/prompts/coding-code-review-assistant.prompt.md | Generated APM primitive for the Coding prompt. |
| .apm/prompts/coding-debug-helper.prompt.md | Generated APM primitive for the Coding prompt. |
| .apm/prompts/home-assistant-automation-renamer.prompt.md | Generated APM primitive for the Home Assistant prompt. |
| .apm/prompts/home-assistant-notification-optimizer.prompt.md | Generated APM primitive for the Home Assistant prompt. |
| .apm/prompts/productivity-email-follow-up-tracker.prompt.md | Generated APM primitive for the Productivity prompt. |
| .apm/prompts/productivity-focus-time-blocker.prompt.md | Generated APM primitive for the Productivity prompt. |
| .apm/prompts/productivity-ooo-task-handoff-planner.prompt.md | Generated APM primitive for the Productivity prompt. |
| .apm/prompts/productivity-outlook-inbox-zero-triage.prompt.md | Generated APM primitive for the Productivity prompt. |
| .apm/prompts/writing-technical-documentation.prompt.md | Generated APM primitive for the Writing prompt. |
| `apm install` deploys each prompt to every detected harness, for example: | ||
|
|
||
| | Harness | Where the prompt lands | How to invoke | | ||
| |---------|------------------------|---------------| | ||
| | GitHub Copilot | `.github/prompts/<name>.prompt.md` | prompts picker | | ||
| | Claude Code | `.claude/commands/<name>.md` | `/<name>` | | ||
| | Cursor | `.cursor/commands/<name>.md` | `/<name>` | | ||
| | OpenCode | `.opencode/commands/<name>.md` | `/<name>` | | ||
| | Gemini | `.gemini/commands/<name>.toml` | `/<name>` | | ||
| | Windsurf | `.windsurf/workflows/<name>.md` | workflows menu | |
|
@copilot can you process the review comments? |
Processed the review comments in ee245dc:
|
Make .apm/ the single source of truth for APM primitives instead of generating it from a parallel prompts/** tree. The browsable index (INDEX.md + README) is now generated FROM .apm/, eliminating the double-generation flow and making it trivial to grow into instructions, agents and hooks under .apm/. - Migrate all 10 prompts into native APM source primitives under .apm/prompts/ with description/category (+ optional title, tags, model, platform, example, notes). Prompt bodies preserved byte-for-byte. - Remove prompts/**, scripts/generate-apm-primitives.sh, and the feedback-link script/workflow (per-file feedback links dropped in favor of the future site). - Rewrite generate-index.sh to read .apm/ frontmatter; rewrite validate-prompts.sh to validate .apm/ primitives. - Rename package to ai-toolkit (apm.yml, README, docs, devcontainer, welcome, contributing, templates, copilot-instructions). - Document the version-sync lag and recommend workflow_dispatch pre-bump for pinned installs. Note: GitHub repo must be renamed to ai-toolkit for `apm install DevSecNinja/ai-toolkit` to resolve. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Pushed Architecture inverted: What changed:
Resolving the three threads:
|
Adopt the central DevSecNinja/.github release-please reusable workflow to drive semver bumping, CHANGELOG.md generation, tagging and GitHub Releases from Conventional Commits. - Add .github/workflows/release-please.yml calling the reusable workflow @v1.7.0 with App-token auth (vars.RELEASE_PLEASE_APP_ID + secrets.RELEASE_PLEASE_APP_PRIVATE_KEY). - Add release-please-config.json (release-type: simple) and .release-please-manifest.json pinned at 1.0.0. - Bump apm.yml version inside the release PR via the config's extra-files (generic updater keyed off the `x-release-please-version` annotation), so the tagged commit always carries the matching version — fixing the pinned-install staleness of the old post-release sync. - Remove the superseded sync-apm-version.yml workflow and sync-apm-version.sh script. - Document the release-please flow in docs/apm.md and update copilot-instructions.md. Note: requires the GitHub App installed on the repo, the RELEASE_PLEASE_APP_ID variable + RELEASE_PLEASE_APP_PRIVATE_KEY secret, and "Allow GitHub Actions to create and approve pull requests" enabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Pushed Added:
Version-sync, properly fixed: Docs: rewrote the Versioning section in
Note: the manifest/ |
Pin the release-please manifest and apm.yml at 0.0.0 so the first release-please run bumps to 0.1.0 (a feat commit pre-1.0.0 bumps the minor under this config). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@copilot Can you review this PR? |
Review completed. I found two issues worth fixing before merge:
I also ran |
|
@copilot Can you fix the findings mentioned in the last comment? |
Fixed both findings:
|
Turns this repo into an APM (Agent Package Manager) producer named
ai-toolkit, so consumers can install every primitive as native harness commands (Copilot, Claude, Cursor, OpenCode, Gemini, Windsurf):Architecture:
.apm/is the single source of truthPrimitives are authored directly under
.apm/prompts/in native APM format.INDEX.mdand the README index are generated from.apm/— there is no parallel browsable tree to keep in sync. This makes it trivial to grow into.apm/instructions/,.apm/agents/,.apm/hooks/and.apm/skills/: just add the folder.(This supersedes the original approach in this PR, which kept
prompts/**as source and generated.apm/— a double tree that would compound complexity as scope grows. See the discussion in the review threads.)Changes
.apm/prompts/*.prompt.md— 10 prompt primitives migrated from the oldprompts/**tree, bodies preserved byte-for-byte. Requireddescription+categoryfrontmatter; optionaltitle/tags/model/platform/example/notes.apm.yml— producer manifest (name: ai-toolkit,includes: auto).versionbumped by release-please viaextra-files.scripts/generate-index.sh— rewritten to generateINDEX.md+ README index from.apm/frontmatter. Output is fully deterministic (no timestamp), so re-running produces no diff and PR index runs don't attempt spurious commits/pushes.tests/validate-prompts.sh— rewritten to validate.apm/primitives (frontmatter,description,category, non-empty body)..github/workflows/markdown-validation.yml— path filters point at.apm/prompts/**/*.prompt.md(the new source of truth) so validation runs for changes to shipped primitives.prompts/**,scripts/generate-apm-primitives.sh, and the feedback-link script/workflow..github/workflows/release-please.yml(centralDevSecNinja/.github@v1.7.0reusable, App-token auth),release-please-config.json(release-type: simple, bumpsapm.ymlviaextra-files),.release-please-manifest.json. Replaces the old post-releasesync-apm-version.yml/.sh, fixing the pinned-install version-staleness.docs/apm.md— producer guide: source-of-truth model, generation, consumption, per-harness landing paths, release-please versioning.README.md(keyword-rich, harness-neutral),CONTRIBUTING.md,PROMPT_TEMPLATE.md, the add-prompt prompt,copilot-instructions.md, devcontainer + welcome.Versioning / first release
Manifest +
apm.ymlare seeded at0.0.0so the first release-please run cuts0.1.0(afeat:commit pre-1.0.0 bumps the minor under this config). The release PR opens as a draft (draft-pull-request: true).Manual prerequisites for release-please (per the org onboarding guide)
DevSecNinja Release PleaseGitHub App on the repo.RELEASE_PLEASE_APP_ID(variable) +RELEASE_PLEASE_APP_PRIVATE_KEY(secret).Notes for reviewers
.apm/prompts/**directly and rerunbash scripts/generate-index.sh.validate-prompts.shnow covers.apm/prompts/**and.github/prompts/**.<category><name>(e.g.coding-code-review-assistant) to avoid cross-category collisions.