Skip to content

feat(cli): emit antigravity agents as portable .agents/agents/<name>/agent.md - #960

Open
tkman59 wants to merge 1 commit into
feat/511-antigravity-memory-hookfrom
feat/511-antigravity-agents
Open

tkman59 wants to merge 1 commit into
feat/511-antigravity-memory-hookfrom
feat/511-antigravity-agents

Conversation

@tkman59

@tkman59 tkman59 commented Oct 5, 2026 •

Copy link
Copy Markdown

🎯 What & why

aidd setup --ai antigravity now installs AIDD's agents where agy discovers them. Phase 4 of #511, stacked on #958.

🛠️ How it works

  • Path. build.ts writes each plugin agent to .agents/agents/<plugin>-<agent>/agent.md. That nested layout is the one agy documents; AIDD never writes <name>.md. Body links are resolved from the nested directory.

  • Frontmatter rebuilt, not copied. portable-agent.ts is meant to be reused by feat(cli): emit portable Markdown agents under .agents/agents #916 for Codex flat and Kimi. It keeps:

    • name;
    • the source description (a blank one throws InvalidAgentFrontmatterError, naming the agent);
    • model: inherit;
    • tools as a YAML list, only when the source declares tools.

    Every other key is dropped.

  • Why rebuild. Measured on agy 1.2.17 with /agents: an agent with model: opus and one with tools: view_file, grep_search are both absent from the list, without any error. An agent with no tools, or with Claude tool names in a YAML list, is listed.

  • No AgentsCapability. That capability would also enable the raw fallback route (flatSectionFile), which copies Claude frontmatter to .agents/agents/<plugin>/<file>.md, a file agy would drop. setup takes the built-tree route, which reads this artifact. The plan is updated to match.

  • Bundle budget 766 → 771 KB. Measured with tsup on the stack:

    Branch Bundle Budget
    next (stack base) 755.6 KB 756 KB
    feat(cli): add Antigravity CLI as a flat host for skills #957 757.9 KB 766 KB
    feat(cli): merge plugin hooks into antigravity's .agents/hooks.json #958 762.4 KB 766 KB
    this PR 764.2 KB 771 KB

    This PR adds 1.8 KB; check-bundle-size.mjs records each branch's own figure.

  • Bracketed values are quoted. serializeFrontmatter writes a value raw only when it parses as a JSON array, so a description like [WIP] foo [x] stays a string and Cursor's globs keep their inline array.

🧪 How to verify

  • cd cli && pnpm test: 7093 passed, 1 skipped. CI cli / Smoke green.
  • Golden: only antigravity:flat moves, with 4 fixture agents at .agents/agents/<name>/agent.md.
  • Live, 2026-10-05, agy 1.2.17, fresh git repo:
    1. aidd setup --source local --path <framework> --ai antigravity --plugins recommended --yes writes .agents/agents/aidd-dev-{checker,executor}/agent.md, recorded in .aidd/manifest.json.
    2. agy --add-dir <repo> --output-format json -p "/agents" exits 0 with "agents":["aidd-dev-checker","aidd-dev-executor"]. The invented name aidd-dev-ghost is absent.
    3. aidd clean --force removes them, and .agents/ is gone.

⚠️ Heads-up

🔗 Linked issue

Refs #511, #916

✅ I certify

  • I DO CERTIFY I READ EACH LINE OF THE PULL REQUEST BECAUSE I AM A SOFTWARE ENGINEER, NOT A AI PUPPY.

🤖 Generated with Claude Code

@tkman59
tkman59 marked this pull request as ready for review October 7, 2026 20:38
@tkman59
tkman59 requested a review from a team as a code owner October 7, 2026 20:38
@tkman59
tkman59 force-pushed the feat/511-antigravity-memory-hook branch 2 times, most recently from 710ca6b to f7fe515 Compare October 13, 2026 20:48
@tkman59
tkman59 force-pushed the feat/511-antigravity-agents branch 2 times, most recently from 50b904d to c554f27 Compare October 13, 2026 21:22
@tkman59
tkman59 force-pushed the feat/511-antigravity-memory-hook branch from f7fe515 to 90beffc Compare October 13, 2026 21:22

@blafourcade blafourcade left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed line by line; agents verified live on agy 1.3.5 (an installed aidd-dev-checker answers with its own role).

Major: the bundle numbers do not match

  • The description says the budget goes 734 -> 742 KB. The code goes 756 -> 766 (#957), then 766 -> 771 here, and the comment in check-bundle-size.mjs says 763.0 KB.
  • The +5.1 KB in that comment also covers the hooks merge from #958, so this PR carries growth it did not cause. Please reconcile the description, the comment and the per-PR split.

Nit

  • portable-agent.ts goes through serializeFrontmatter, which writes a string starting with [ and ending with ] unquoted. Shared code and no shipped agent is affected, but a description like [WIP] foo [x] or non-string tools items have no test.

Checked and fine

  • /agents lists inherit, flash and pro agents and drops opus and comma-string tools, exactly as the frontmatter rebuild assumes.
  • Body links resolve from the nested directory; a blank description throws with the agent name.

…agent.md

Antigravity's flat build now writes each plugin agent to
.agents/agents/<plugin>-<agent>/agent.md, the nested layout agy documents,
with its links resolved from that directory.

The frontmatter is rebuilt rather than copied, by a builder Codex flat and
Kimi can reuse: name, the source description, model: inherit, and tools as
a YAML list when declared. agy 1.2.17 silently drops an agent whose model
is opus or whose tools is a comma string. A blank description stops the
build with the agent named.

The profile declares no AgentsCapability: that would also enable the raw
fallback route, which copies Claude frontmatter verbatim.

The bundle budget moves from 766 KB to 771 KB, measured at 764.2 KB: +1.8 KB
over the hooks merge's 762.4 KB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tkman59
tkman59 force-pushed the feat/511-antigravity-memory-hook branch from 90beffc to b864c7f Compare October 14, 2026 20:52
@tkman59
tkman59 force-pushed the feat/511-antigravity-agents branch from c554f27 to 32e3886 Compare October 14, 2026 20:52
@tkman59

tkman59 commented Oct 15, 2026

Copy link
Copy Markdown
Author

Thanks, addressed in the agents commit (stack replayed).

@tkman59
tkman59 requested a review from blafourcade October 15, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants