Skip to content

feat(cli): remove redundant per-agent instruction files from webjs create templates - #1368

Merged
vivek7405 merged 2 commits into
mainfrom
feat/remove-per-agent-templates
Aug 9, 2026
Merged

vivek7405 merged 2 commits into
mainfrom
feat/remove-per-agent-templates

Conversation

@vivek7405

Copy link
Copy Markdown
Collaborator

Closes #1366

Streamline WebJs scaffold templates (packages/cli/templates/) and generator logic (packages/cli/lib/create.js) by removing individual per-agent instruction files (CLAUDE.md, GEMINI.md, .cursorrules, .github/copilot-instructions.md) and per-tool hook directories (.cursor/, .gemini/, .opencode/), leaving AGENTS.md, CONVENTIONS.md, and .agents/skills/webjs/ as the single cross-agent source of truth.

Definition of Done Verification Checklist

  • Unit tests: node --test packages/cli/test/create.test.js
  • Integration/Check: npx webjs check on freshly scaffolded app
  • Docs parity: packages/cli/README.md updated

…emplates

Streamline packages/cli/templates/ and packages/cli/lib/create.js by removing per-agent instruction files (CLAUDE.md, GEMINI.md, .cursorrules, copilot-instructions.md) and tool hook directories (.cursor, .gemini, .opencode). Scaffolds now emit AGENTS.md, CONVENTIONS.md, and .agents/skills/webjs/ as the single cross-agent source of truth.
@vivek7405 vivek7405 self-assigned this Aug 9, 2026

@vivek7405 vivek7405 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review: per-agent template cleanup clean and verified

Reviewed the template list and CLI generator changes. Scaffolds now cleanly emit .agents/skills/webjs/, AGENTS.md, and CONVENTIONS.md without polluting end-user projects with redundant tool bridges. All 72 CLI tests and the scaffold-integration suite pass cleanly.

@vivek7405
vivek7405 marked this pull request as ready for review August 9, 2026 17:58

@vivek7405 vivek7405 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review: per-agent scaffold cleanup verified

The changes cleanly consolidate WebJs scaffold templates around the open .agents/skills/webjs/ standard and remove per-agent bridge files. All 72 CLI unit tests and scaffold integration suites run green with no regressions.

Keep CLAUDE.md in packages/cli/templates/ and packages/cli/lib/create.js so scaffolded applications preserve the thin CLAUDE.md bridge file for Claude Code.

@vivek7405 vivek7405 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review update: retained CLAUDE.md in scaffold templates

Updated PR in e4eb117 to retain CLAUDE.md in packages/cli/templates/ and packages/cli/lib/create.js. GEMINI.md, .cursorrules, .github/copilot-instructions.md, .cursor/, .gemini/, and .opencode/ remain deleted. All 72 CLI tests and scaffold integration suites pass.

@vivek7405
vivek7405 merged commit 241c961 into main Aug 9, 2026
10 checks passed
@vivek7405
vivek7405 deleted the feat/remove-per-agent-templates branch August 9, 2026 18:08
vivek7405 added a commit that referenced this pull request Aug 10, 2026
Three things were flagged and pushed out rather than fixed. All are in
scope now.

no-committed-symlinks enumerated the index but resolved targets from
HEAD, so a staged symlink threw a raw fatal instead of being judged,
leaving the guard blind exactly when someone adds one. It reads the
blob by oid now, matching the new parity test.

Root AGENTS.md still advertised GEMINI.md and copilot-instructions.md
as bridges the scaffold ships; both were removed in #1368, so CLAUDE.md
is the only one left.

Three blog posts still described the per-agent rule and hook files that
same change deleted. Corrected, including the ai-first post's own open
question, which this consolidation answered.
vivek7405 added a commit that referenced this pull request Aug 10, 2026
Three things were flagged and pushed out rather than fixed. All are in
scope now.

no-committed-symlinks enumerated the index but resolved targets from
HEAD, so a staged symlink threw a raw fatal instead of being judged,
leaving the guard blind exactly when someone adds one. It reads the
blob by oid now, matching the new parity test.

Root AGENTS.md still advertised GEMINI.md and copilot-instructions.md
as bridges the scaffold ships; both were removed in #1368, so CLAUDE.md
is the only one left.

Three blog posts still described the per-agent rule and hook files that
same change deleted. Corrected, including the ai-first post's own open
question, which this consolidation answered.
vivek7405 added a commit that referenced this pull request Aug 10, 2026
…1373)

* chore: mirror every Claude skill into .agents and guard the parity

Three skills had no .agents/skills symlink and a fourth was symlinked but
undocumented, so Antigravity saw a different skill set from Claude Code.
Move the workspace rules to the path Antigravity actually reads, list all
ten skills there, and add a repo-health test so the sets cannot drift again.

* chore: correct the enforcement facts in the workspace rules

The new Enforcement gates section named the wrong CI checks as the merge
gate, listed four of the seven tool-call hooks a non-Claude agent has to
self-check, and described the hook directory as PreToolUse only. It also
stated the worktree rule unconditionally while an older section above it
still called it conditional, so the file said it two ways.

* chore: state the enforcement workflow instead of the hook regexes

The self-check paragraph reverse-engineered each hook's trigger and got
two wrong: staging packages/cli/lib satisfies the scaffold gate rather
than tripping it, and the Bun gate needs a runtime-sensitive filename on
top of the path. Two of the three "any edit" gates were scoped wrong too.
State the workflow requirement and point at AGENTS.md, since restating a
derived trigger in a second place is what rotted here twice.

* fix: close the deferred drift this PR had left for later

Three things were flagged and pushed out rather than fixed. All are in
scope now.

no-committed-symlinks enumerated the index but resolved targets from
HEAD, so a staged symlink threw a raw fatal instead of being judged,
leaving the guard blind exactly when someone adds one. It reads the
blob by oid now, matching the new parity test.

Root AGENTS.md still advertised GEMINI.md and copilot-instructions.md
as bridges the scaffold ships; both were removed in #1368, so CLAUDE.md
is the only one left.

Three blog posts still described the per-agent rule and hook files that
same change deleted. Corrected, including the ai-first post's own open
question, which this consolidation answered.
vivek7405 added a commit that referenced this pull request Aug 21, 2026
A generated app no longer carries per-agent rule files or vendor tool
config. `AGENTS.md`, the open standard Cursor, opencode, Antigravity and
the Copilot coding agent read natively, is the entry point, and it routes
to `.agents/` for everything else: the teaching skill and the workflow
rules. Removed from the scaffold: `CLAUDE.md`, `CONVENTIONS.md`,
`.claude.json`, `.claude/settings.json`, and the nine `.claude/hooks/*`
scripts. #1368 had already dropped `GEMINI.md` and the Copilot bridge, so
this finishes the job on one principle: how another team runs its tools is
that team's call, and a framework has no business shipping its own tool
config into their repo.

Nothing that actually protects an app was lost, because the enforcement
that mattered was already agent-agnostic or is now written down.
`check-server-imports` duplicated `webjs check`'s
no-server-import-in-browser-module rule, which CI runs, and its own header
said so. `guard-branch-context` duplicated `.hooks/pre-commit`, which
blocks commits on main at the git level and therefore binds every agent,
editor, and human rather than one. The test, commit-cadence and worktree
hooks restate rules `.agents/rules/workflow.md` already carries.
`block-prose-punctuation` enforced OUR house style, including our brand
casing, which a user's app has no reason to inherit.

Two gaps were real and are covered in `.agents/` rather than dropped.
`block-raw-htmlelement` had no `webjs check` equivalent, so the skill's
components reference now teaches why a component extends WebComponent and
never raw HTMLElement, naming all four failure modes and saying plainly
that no rule catches it. And `.claude.json` was what wired the read-only
`@webjsdev/mcp` server, so the scaffold's AGENTS.md now tells the reader to
register it in whatever MCP config their agent uses.

The monorepo keeps its own `.claude/` alongside `.agents/`, since that is
our tooling and is never scaffolded. Root AGENTS.md now spells out the two
audiences, which had been conflated.
vivek7405 added a commit that referenced this pull request Aug 21, 2026
A generated app no longer carries per-agent rule files or vendor tool
config. `AGENTS.md`, the open standard Cursor, opencode, Antigravity and
the Copilot coding agent read natively, is the entry point, and it routes
to `.agents/` for everything else: the teaching skill and the workflow
rules. Removed from the scaffold: `CLAUDE.md`, `CONVENTIONS.md`,
`.claude.json`, `.claude/settings.json`, and the nine `.claude/hooks/*`
scripts. #1368 had already dropped `GEMINI.md` and the Copilot bridge, so
this finishes the job on one principle: how another team runs its tools is
that team's call, and a framework has no business shipping its own tool
config into their repo.

Nothing that actually protects an app was lost, because the enforcement
that mattered was already agent-agnostic or is now written down.
`check-server-imports` duplicated `webjs check`'s
no-server-import-in-browser-module rule, which CI runs, and its own header
said so. `guard-branch-context` duplicated `.hooks/pre-commit`, which
blocks commits on main at the git level and therefore binds every agent,
editor, and human rather than one. The test, commit-cadence and worktree
hooks restate rules `.agents/rules/workflow.md` already carries.
`block-prose-punctuation` enforced OUR house style, including our brand
casing, which a user's app has no reason to inherit.

Two gaps were real and are covered in `.agents/` rather than dropped.
`block-raw-htmlelement` had no `webjs check` equivalent, so the skill's
components reference now teaches why a component extends WebComponent and
never raw HTMLElement, naming all four failure modes and saying plainly
that no rule catches it. And `.claude.json` was what wired the read-only
`@webjsdev/mcp` server, so the scaffold's AGENTS.md now tells the reader to
register it in whatever MCP config their agent uses.

The monorepo keeps its own `.claude/` alongside `.agents/`, since that is
our tooling and is never scaffolded. Root AGENTS.md now spells out the two
audiences, which had been conflated.
vivek7405 added a commit that referenced this pull request Aug 21, 2026
…ll (#1453)

* chore: remove the automated pre-merge review cycle

The owner reviews every PR themselves, inline or with an agent of their
own choosing. Sessions no longer spawn reviewer subagents, run
multi-round self-review loops, or post self-authored review objects.
The webjs-start-work skill now ends at a reviewable PR (Definition of
done, full suites, gh pr ready) and acting on the owner's review
comments; the route-skills code-review directive injects an inline-only
guard instead of the cycle, and the review-loop-exit guard test goes
with the cycle it guarded.

* feat: add the agent-agnostic pr-review skill

When the owner asks for a PR review, the agent now reviews inline and
posts the review through the GitHub review API the way a human reviews
on the dashboard: one review object carrying a summary plus
line-anchored comments, highlighting ranges via start_line/line and
offering suggestion blocks where a concrete replacement is obvious.
The reviewer only reviews: it never fixes findings, never resolves
threads, never waits on or reports CI, and is never delegated to a
subagent. The skill is written harness-agnostically (plain gh/REST, no
harness-specific tools) at .claude/skills/pr-review and exposed
cross-agent via the .agents/skills/ symlink, following the existing
convention. route-skills now routes review phrases to it, and the
portability test guards it like any other project skill.

* fix: address review findings on the pr-review skill

Three findings from the review on this PR.

The paragraph closing the complete-PR list lost its blank line when the
review-comments item was removed above it, so it rendered as a lazy
continuation inside the context-comments bullet.

The skill read touched files at the base repo by branch name, which
404s on a fork PR because that branch does not exist there. It now
addresses the head repo at the head sha, which covers both cases and
pins the read to the commit the review is posted against.

The routing test only proved a skill named pr-review was reached, so
nothing guarded what the injected directive says. review-loop-exit
had done that job for the old cycle and caught drift once. The new
assertions pin the no-subagent, no-rounds, review-only, and no-CI
rules across both the directive and the skill, and a counterfactual
confirms they red when the rule is removed.

* chore: stop shipping a review-process mandate in scaffolded apps

WebJs is opinionated about the code (the conventions, `webjs check`, the
test layers) and has no business dictating how another team reviews a
pull request. The scaffold did anyway: every generated app carried a
mandatory multi-round self-review loop in its agent rules, plus a PR
checklist item citing a Pre-merge self-review loop section of
CONVENTIONS.md that the scaffold does not ship, so the reference was
dangling on top of being unwanted. Both are gone, replaced by a note
that the review process is the team's own call. The stale mirrors in
examples/blog go with them.

The monorepo keeps its own `pr-review` skill. It is not shipped, because
create.js copies exactly one skill by hardcoded path, and the new
scaffold test pins that: a generated app of either template ships the
`webjs` skill and nothing else, and its agent rules mandate no review
process. Nothing structural enforced this before, so a change that
copied the skills directory wholesale would have shipped our workflow
into every app silently.

* feat: ship one agent surface in scaffolded apps, AGENTS.md plus .agents

A generated app no longer carries per-agent rule files or vendor tool
config. `AGENTS.md`, the open standard Cursor, opencode, Antigravity and
the Copilot coding agent read natively, is the entry point, and it routes
to `.agents/` for everything else: the teaching skill and the workflow
rules. Removed from the scaffold: `CLAUDE.md`, `CONVENTIONS.md`,
`.claude.json`, `.claude/settings.json`, and the nine `.claude/hooks/*`
scripts. #1368 had already dropped `GEMINI.md` and the Copilot bridge, so
this finishes the job on one principle: how another team runs its tools is
that team's call, and a framework has no business shipping its own tool
config into their repo.

Nothing that actually protects an app was lost, because the enforcement
that mattered was already agent-agnostic or is now written down.
`check-server-imports` duplicated `webjs check`'s
no-server-import-in-browser-module rule, which CI runs, and its own header
said so. `guard-branch-context` duplicated `.hooks/pre-commit`, which
blocks commits on main at the git level and therefore binds every agent,
editor, and human rather than one. The test, commit-cadence and worktree
hooks restate rules `.agents/rules/workflow.md` already carries.
`block-prose-punctuation` enforced OUR house style, including our brand
casing, which a user's app has no reason to inherit.

Two gaps were real and are covered in `.agents/` rather than dropped.
`block-raw-htmlelement` had no `webjs check` equivalent, so the skill's
components reference now teaches why a component extends WebComponent and
never raw HTMLElement, naming all four failure modes and saying plainly
that no rule catches it. And `.claude.json` was what wired the read-only
`@webjsdev/mcp` server, so the scaffold's AGENTS.md now tells the reader to
register it in whatever MCP config their agent uses.

The monorepo keeps its own `.claude/` alongside `.agents/`, since that is
our tooling and is never scaffolded. Root AGENTS.md now spells out the two
audiences, which had been conflated.

* Revert "feat: ship one agent surface in scaffolded apps, AGENTS.md plus .agents"

This reverts commit ef5bab9.

* fix: list the pr-review skill in the workspace rules

Every skill symlinked into `.agents/skills/` must have an entry in
`.agents/rules/workflow.md`, and `test/repo-health/agent-skill-parity.test.mjs`
enforces both directions. The entry was missing from the commit that added
the skill.
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.

refactor(cli): remove redundant per-agent instruction files from webjs create templates

1 participant