Skip to content

G5: docs/hooks.md architecture umbrella + loop_limit clamp - #950

Merged
cursor[bot] merged 1 commit into
mainfrom
jkt/auto/hooks-g5-docs-overhaul-4399
Jul 18, 2026
Merged

cursor[bot] merged 1 commit into
mainfrom
jkt/auto/hooks-g5-docs-overhaul-4399

Conversation

@jonathanKingston

Copy link
Copy Markdown
Collaborator

Summary

Implements G5 from the hooks plan: docs overhaul — docs/hooks.md architecture umbrella; stale paths fixed; loop_limit clamp divergence documented.

Stacked on #949 (G4) → #947 (G3) → … → #913 (A1). Tip of the A→…→G hooks stack.

Acceptance criteria (from plan G5 row)

  • docs/hooks.md architecture doc
  • Fix stale paths
  • Document the loop_limit clamp divergence

Deliverables

  • New docs/hooks.md (registry, dialects, async/budget/epoch, cards, sandbox, Sources/dry-run, schemas/snapshots)
  • Cross-links from cursor/claude/copse docs + plan Related
  • Stale skills/cursor-hooks.ts path fixed in docs/security-review-ga.md

Tests

  • Pure docs; npm run check green (2967 tests)

Test plan

  • npm run check
  • CI green
Open in Web Open in Cursor 

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

E2E screenshot updates

Merge conflict needs a human (39)

Screenshot conflicts with main are resolved automatically, but these non-screenshot files conflict and can't be auto-merged. Resolve them by hand (merge or rebase main) — the screenshot reconcile was skipped:

  • docs/cursor-hooks.md
  • docs/plans/hooks-and-feature-packs.md
  • docs/ui-taste.md
  • packages/agent/src/hooks/canonical-event-catalogue.test.ts
  • packages/agent/src/hooks/canonical-events.ts
  • packages/agent/src/hooks/command-executor.ts
  • packages/agent/src/hooks/hook-registry.ts
  • packages/agent/src/run-agent-loop.ts
  • src/main/ipc/register-handlers.ts
  • src/main/services/agent-service.ts
  • src/main/services/diff-queue.ts
  • src/main/services/hook-run-recorder.ts
  • src/main/services/hooks/after-file-edit.ts
  • src/main/services/hooks/before-submit-prompt.test.ts
  • src/main/services/hooks/before-submit-prompt.ts
  • src/main/services/hooks/claude-adapter.test.ts
  • src/main/services/hooks/claude-adapter.ts
  • src/main/services/hooks/command-hook-runner.test.ts
  • src/main/services/hooks/command-hook-runner.ts
  • src/main/services/hooks/continuation-ledger.ts
  • src/main/services/hooks/cursor-adapter.test.ts
  • src/main/services/hooks/cursor-adapter.ts
  • src/main/services/hooks/dialect-adapter.ts
  • src/main/services/hooks/dialect-registry.ts
  • src/main/services/hooks/hook-queue-channel.ts
  • src/main/services/hooks/hook-spawn.ts
  • src/main/services/hooks/stop.ts
  • src/main/services/hooks/subagent.ts
  • src/main/services/hooks/tool-gate.ts
  • src/main/services/security/permission-gate-hooks.test.ts
  • src/main/services/security/permission-gate.ts
  • src/renderer/controller/agent.ts
  • src/renderer/controller/message-queue.test.ts
  • src/renderer/controller/message-queue.ts
  • src/shared/threads/spine-schema.ts
  • src/shared/types/cursor-hooks.ts
  • src/shared/types/hooks.ts
  • src/shared/types/stream.ts
  • tests/e2e/helpers/seed-config.ts

These PNGs live under tests/e2e/screenshots/ for human visual review; CI asserts DOM structure, not pixel diffs.

@jonathanKingston
jonathanKingston force-pushed the jkt/auto/hooks-g4-payload-snapshots-4399 branch from fc55891 to ccbe2fb Compare July 18, 2026 15:46
@jonathanKingston
jonathanKingston force-pushed the jkt/auto/hooks-g5-docs-overhaul-4399 branch from 349602e to 6d85bca Compare July 18, 2026 15:49
@jonathanKingston
jonathanKingston marked this pull request as ready for review July 18, 2026 15:49
@cursor

cursor Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_7876e097-6f5b-4438-be68-070d0e04cca5)

@cursor

cursor Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_32ef78df-1f87-409b-9352-606d0eb9e128)

@cursor cursor Bot 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.

Stale comment

Did not approve: Cursor Bugbot completed with status skipping (usage limit reached), so automated review did not run. Human review is needed before merge; no additional reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor
cursor Bot requested a review from AutomatedTester July 18, 2026 15:53

@cursor cursor Bot 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.

Stale comment

Did not approve: Cursor Bugbot skipped (usage limit reached), so automated review did not complete. This is docs-only G5 work; CI is still running but human review is needed without Bugbot coverage.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@jonathanKingston
jonathanKingston force-pushed the jkt/auto/hooks-g4-payload-snapshots-4399 branch from ccbe2fb to 0be3b08 Compare July 18, 2026 16:24
@jonathanKingston
jonathanKingston force-pushed the jkt/auto/hooks-g5-docs-overhaul-4399 branch from 2cf804a to eae45de Compare July 18, 2026 16:24
@cursor

cursor Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_c7dfb3d7-fa1c-44e8-9b38-b5bb128ca0d7)

@cursor

cursor Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_db0be92c-a8e9-424f-8e40-312f8bc4830f)

@cursor cursor Bot 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.

Stale comment

Did not approve: Cursor Bugbot completed as skipped (usage limit reached) and did not produce a clean automated review. Human review is needed before merge; AutomatedTester is already requested as reviewer.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor
cursor Bot force-pushed the jkt/auto/hooks-g4-payload-snapshots-4399 branch from 553ddd8 to 48d9c5f Compare July 18, 2026 16:35
jonathanKingston added a commit that referenced this pull request Jul 18, 2026
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
Implements **P1** from `docs/plans/hooks-and-feature-packs.md` (stacked
on G5 / #950).

## Summary
- Pack manifest schema (`schemas/copse-pack.schema.json`) and typed
loaders under `packages/agent/src/packs/`
- `PackRegistry` with enable/disable atomicity and decision-17 history
isolation test
- First-party skeleton pack `copse.noop` folded into
`createHookRegistry` when enabled
- Docs: `docs/packs.md`; plan P1 marked ✅

## Out of scope (later P*)
- P2 level-2 panels, P3 Settings UI, P4 todos pack extraction, P5
review/comparison packs

## Test plan
- [x] `npm run check`
- [ ] Reviewer: confirm decision 17 test and noop pack wiring
<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-8caab6bd-d95d-439e-a65b-bd4c12d04399"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-8caab6bd-d95d-439e-a65b-bd4c12d04399"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Jonathan Kingston <jonathanKingston@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Base automatically changed from jkt/auto/hooks-g4-payload-snapshots-4399 to main July 18, 2026 17:36
Cherry-picked onto current main; plan-doc G table conflict resolved to
keep the G5-landed rows.

Co-authored-by: Jonathan Kingston <jonathanKingston@users.noreply.github.com>
@cursor
cursor Bot force-pushed the jkt/auto/hooks-g5-docs-overhaul-4399 branch from 594aaef to da68929 Compare July 18, 2026 17:45
@cursor

cursor Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_81a9a530-3262-411f-8893-3fb15b5c5cf5)

@cursor cursor Bot 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.

Did not approve: Cursor Bugbot completed as skipped (usage limit reached), so automated review did not run. Human review is needed before merge; AutomatedTester is already requested as reviewer.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor
cursor Bot merged commit 7eebf83 into main Jul 18, 2026
20 checks passed
@cursor
cursor Bot deleted the jkt/auto/hooks-g5-docs-overhaul-4399 branch July 18, 2026 18:34
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