@mengde1231/rudder 0.6.20 → 0.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/migrations/manifests/0.4.0-beta.1.json +5 -5
- package/dist/migrations/manifests/0.5.14.json +9 -0
- package/dist/migrations/manifests/0.5.15.json +9 -0
- package/dist/migrations/manifests/0.5.16.json +9 -0
- package/dist/migrations/manifests/0.5.17.json +9 -0
- package/dist/migrations/manifests/0.5.19.json +9 -0
- package/dist/migrations/manifests/0.5.20.json +9 -0
- package/dist/migrations/manifests/0.5.21.json +9 -0
- package/dist/migrations/manifests/0.5.22.json +9 -0
- package/dist/migrations/manifests/0.5.23.json +9 -0
- package/dist/migrations/manifests/0.5.30.json +9 -0
- package/dist/migrations/manifests/0.6.1.json +9 -0
- package/dist/migrations/manifests/0.6.11.json +9 -0
- package/dist/migrations/manifests/0.6.20.json +9 -0
- package/dist/migrations/manifests/0.6.21.json +9 -0
- package/dist/templates/claude/agents/rudder-check.md +170 -170
- package/dist/templates/codex/agents/rudder-check.toml +95 -95
- package/dist/templates/common/skills/check.md +8 -1
- package/dist/templates/rudder/config.yaml +13 -2
- package/dist/templates/rudder/index.d.ts +1 -0
- package/dist/templates/rudder/index.d.ts.map +1 -1
- package/dist/templates/rudder/index.js +2 -0
- package/dist/templates/rudder/index.js.map +1 -1
- package/dist/templates/rudder/scripts/common/task_context.py +42 -1
- package/dist/templates/rudder/scripts/common/task_readiness.py +169 -0
- package/dist/templates/rudder/scripts/common/task_store.py +10 -2
- package/dist/templates/rudder/scripts/common/types.py +1 -0
- package/dist/templates/rudder/scripts/task.py +28 -0
- package/dist/templates/rudder/workflow.md +36 -23
- package/dist/utils/task-json.d.ts +6 -0
- package/dist/utils/task-json.d.ts.map +1 -1
- package/dist/utils/task-json.js +6 -0
- package/dist/utils/task-json.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -121,6 +121,18 @@ Nah. Personal workspace journals are per-developer. Shared specs and tasks go th
|
|
|
121
121
|
|
|
122
122
|
</details>
|
|
123
123
|
|
|
124
|
+
## A Note from the Author
|
|
125
|
+
|
|
126
|
+
**Why does the version start at 0.5?**
|
|
127
|
+
|
|
128
|
+
The version numbers aren't skipped — I iterated locally for many rounds before publishing. Rudder was born in May (the 5th month), so the major version is 0.5, with the first public release at 0.5.30.
|
|
129
|
+
|
|
130
|
+
Rudder draws from many open-source projects, and I grew up learning from the open-source community. But open-source covers a broad set of use cases — most of them aren't battle-tested in real production workflows. As a Java full-stack developer, I use Rudder daily myself and keep iterating on it. That makes it relatively more friendly to Java full-stack engineers — the Java spec templates are also being actively updated. That said, every other language works just as well — Rudder itself is completely platform-agnostic.
|
|
131
|
+
|
|
132
|
+
One person can only do so much, but every pit I fall into will be filled. Hope it helps you who are using AI to write code.
|
|
133
|
+
|
|
134
|
+
> 📖 Rudder's online documentation and user manual are being gradually improved. Stay tuned.
|
|
135
|
+
|
|
124
136
|
## Acknowledgments
|
|
125
137
|
|
|
126
138
|
Rudder wouldn't exist without the open-source coding agent community. We studied how many projects solve the same problems — context injection, workflow gates, multi-platform support — and built the version we wished we had.
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"type": "safe-file-delete",
|
|
25
25
|
"from": ".claude/commands/rudder/check-backend.md",
|
|
26
26
|
"description": "Replaced by check.md",
|
|
27
|
-
"allowed_hashes": ["4e81a28d681ea770f780df55a212fd504ce21ee49b44ba16023b74b5c243cef3"]
|
|
27
|
+
"allowed_hashes": ["4e81a28d681ea770f780df55a212fd504ce21ee49b44ba16023b74b5c243cef3", "8117a8fc9df4e392be8fe5e167c2ed3e3a70d32d2f69f726f0bdc4ee4a8581ca"]
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "safe-file-delete",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"type": "safe-file-delete",
|
|
49
49
|
"from": ".cursor/commands/rudder-check-backend.md",
|
|
50
50
|
"description": "Replaced by rudder-check.md",
|
|
51
|
-
"allowed_hashes": ["4e81a28d681ea770f780df55a212fd504ce21ee49b44ba16023b74b5c243cef3"]
|
|
51
|
+
"allowed_hashes": ["4e81a28d681ea770f780df55a212fd504ce21ee49b44ba16023b74b5c243cef3", "8117a8fc9df4e392be8fe5e167c2ed3e3a70d32d2f69f726f0bdc4ee4a8581ca"]
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"type": "safe-file-delete",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"type": "safe-file-delete",
|
|
73
73
|
"from": ".iflow/commands/rudder/check-backend.md",
|
|
74
74
|
"description": "Replaced by check.md",
|
|
75
|
-
"allowed_hashes": ["4e81a28d681ea770f780df55a212fd504ce21ee49b44ba16023b74b5c243cef3"]
|
|
75
|
+
"allowed_hashes": ["4e81a28d681ea770f780df55a212fd504ce21ee49b44ba16023b74b5c243cef3", "8117a8fc9df4e392be8fe5e167c2ed3e3a70d32d2f69f726f0bdc4ee4a8581ca"]
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
"type": "safe-file-delete",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"type": "safe-file-delete",
|
|
97
97
|
"from": ".opencode/commands/rudder/check-backend.md",
|
|
98
98
|
"description": "Replaced by check.md",
|
|
99
|
-
"allowed_hashes": ["4e81a28d681ea770f780df55a212fd504ce21ee49b44ba16023b74b5c243cef3"]
|
|
99
|
+
"allowed_hashes": ["4e81a28d681ea770f780df55a212fd504ce21ee49b44ba16023b74b5c243cef3", "8117a8fc9df4e392be8fe5e167c2ed3e3a70d32d2f69f726f0bdc4ee4a8581ca"]
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"type": "safe-file-delete",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"type": "safe-file-delete",
|
|
121
121
|
"from": ".kilocode/workflows/check-backend.md",
|
|
122
122
|
"description": "Replaced by check.md",
|
|
123
|
-
"allowed_hashes": ["4e81a28d681ea770f780df55a212fd504ce21ee49b44ba16023b74b5c243cef3"]
|
|
123
|
+
"allowed_hashes": ["4e81a28d681ea770f780df55a212fd504ce21ee49b44ba16023b74b5c243cef3", "8117a8fc9df4e392be8fe5e167c2ed3e3a70d32d2f69f726f0bdc4ee4a8581ca"]
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
"type": "safe-file-delete",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.14",
|
|
3
|
+
"description": "Patch: `task.py archive` auto-commit no longer leaks dirty changes from other task dirs into the archive commit, and source-side deletes now stage correctly (no more phantom-delete fixups).",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Bug Fixes:**\n- fix(scripts): `task.py archive` auto-commit is now scoped to just the archived task's source + destination paths (plus any child task dirs whose `task.json` was edited as part of the parent-to-children relationship update). Dirty changes in OTHER active task dirs no longer get bundled into the archive commit.\n- fix(scripts): after `shutil.move` of a tracked task dir, the source-side deletions are now explicitly staged via `git rm -r --cached --ignore-unmatch`, so the working tree stays clean against HEAD without needing a follow-up fixup commit.\n\n**Internal:**\n- `safe_archive_paths_to_add()` accepts optional `task_name` + `modified_children` parameters; backward-compatible when called with no args (legacy wide scope preserved).\n- New integration test `test/scripts/task-archive.integration.test.ts` covers scope-creep + phantom-delete regressions against the real Python script.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `trellis update` to pull in the fixed `.trellis/scripts/common/task_store.py` + `safe_commit.py`. No migration required - script signatures changed but file paths did not."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.15",
|
|
3
|
+
"description": "Patch: prevent Trellis template manifests from owning user runtime files, and force UTF-8 for Windows hook I/O.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Bug Fixes:**\n- fix(uninstall): `trellis init` now tracks platform/root template hashes from files actually written by Trellis instead of walking `.codex/`, `.claude/`, and other platform dirs that can contain user runtime data.\n- fix(uninstall): `trellis update` and `trellis uninstall` prune orphan `.trellis/.template-hashes.json` entries before planning, preserving user-owned files from manifests created by older versions.\n- fix(hooks): Windows hook templates force UTF-8 for stdin, stdout, and stderr so non-ASCII task names and prompt payloads do not fail under cp936/cp1252 code pages.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `trellis update` to pull in the manifest ownership fixes and updated hook templates. No migration required because file paths did not change."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.16",
|
|
3
|
+
"description": "Patch: align Cursor sessionStart hook output with Cursor's supported schema and remove the unsupported beforeSubmitPrompt injector.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Bug Fixes:**\n- fix(hooks): Cursor `sessionStart` hooks now emit top-level `additional_context`, matching Cursor's supported hook schema.\n- fix(hooks): Cursor templates no longer install the unsupported `beforeSubmitPrompt` workflow-state injector or `.cursor/hooks/inject-workflow-state.py`.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `trellis update` to refresh Cursor hook templates. No migration required because Trellis removes the unsupported Cursor workflow-state hook from generated templates."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.17",
|
|
3
|
+
"description": "Patch: bundle the Trellis spec bootstrap skill and update the marketplace/docs entry for project-specific spec generation.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Enhancements:**\n- feat(skills): `trellis-spec-bootstarp` is now a built-in bundled skill installed by `trellis init` and refreshed by `trellis update` for supported AI platforms.\n- feat(skills): the bundled skill helps AI bootstrap `.trellis/spec/` from the real repository with source-backed references for repository analysis, spec task planning, spec writing, and MCP setup.\n- docs(skills): replace the older marketplace-only `cc-codex-spec-bootstrap` docs entry with the built-in `trellis-spec-bootstarp` flow.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `trellis update` to install or refresh the bundled `trellis-spec-bootstarp` skill. No migration command is required."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.19",
|
|
3
|
+
"description": "Patch: stop writing the [features.multi_agent_v2] block to the generated Codex config.toml so Codex CLI 0.130 and the Codex desktop app can load the config.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Bug Fixes:**\n- fix(codex): `trellis init` / `trellis update` no longer write a `[features.multi_agent_v2]` block to `.codex/config.toml`. Codex CLI changed `features` deserialization between 0.130 and 0.131; the structured table form is only accepted by 0.131+. On 0.130 and earlier - including the Codex CLI bundled in the Codex desktop app - it failed with `data did not match any variant of untagged enum FeatureToml in features.multi_agent_v2`, aborting the entire config load and blocking Codex from starting. Codex's own default for multi_agent_v2 is used instead.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Patch on top of 0.5.18. Run `trellis update` to regenerate `.codex/config.toml` without the multi_agent_v2 block. Tune multi_agent_v2 in your user-level ~/.codex/config.toml if needed."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.20",
|
|
3
|
+
"description": "Historical manifest continuity backfill.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Maintenance:**\n- This version was published without a migration manifest. The shipped npm tarball contains no recoverable version-specific migration metadata.\n- This backfill preserves a continuous update chain without inventing migration actions.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No recoverable version-specific migration is available. Run `rudder update` to refresh current hash-tracked templates."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.21",
|
|
3
|
+
"description": "Historical manifest continuity backfill.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Maintenance:**\n- This version was published without a migration manifest. The shipped npm tarball contains no recoverable version-specific migration metadata.\n- This backfill preserves a continuous update chain without inventing migration actions.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No recoverable version-specific migration is available. Run `rudder update` to refresh current hash-tracked templates."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.22",
|
|
3
|
+
"description": "Historical manifest continuity backfill.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Maintenance:**\n- This version was published without a migration manifest. The shipped npm tarball contains no recoverable version-specific migration metadata.\n- This backfill preserves a continuous update chain without inventing migration actions.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No recoverable version-specific migration is available. Run `rudder update` to refresh current hash-tracked templates."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.23",
|
|
3
|
+
"description": "Historical manifest continuity backfill.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Maintenance:**\n- This version was published without a migration manifest. The shipped npm tarball contains no recoverable version-specific migration metadata.\n- This backfill preserves a continuous update chain without inventing migration actions.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No recoverable version-specific migration is available. Run `rudder update` to refresh current hash-tracked templates."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.30",
|
|
3
|
+
"description": "Historical manifest continuity backfill.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Maintenance:**\n- This version was published without a migration manifest. The shipped npm tarball contains no recoverable version-specific migration metadata.\n- This backfill preserves a continuous update chain without inventing migration actions.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No recoverable version-specific migration is available. Run `rudder update` to refresh current hash-tracked templates."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.6.1",
|
|
3
|
+
"description": "Historical manifest continuity backfill.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Maintenance:**\n- This version was published without a migration manifest. The shipped npm tarball contains no recoverable version-specific migration metadata.\n- This backfill preserves a continuous update chain without inventing migration actions.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No recoverable version-specific migration is available. Run `rudder update` to refresh current hash-tracked templates."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.6.11",
|
|
3
|
+
"description": "Historical manifest continuity backfill.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Maintenance:**\n- This version was published without a migration manifest. The shipped npm tarball contains no recoverable version-specific migration metadata.\n- This backfill preserves a continuous update chain without inventing migration actions.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No recoverable version-specific migration is available. Run `rudder update` to refresh current hash-tracked templates."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.6.20",
|
|
3
|
+
"description": "Historical manifest continuity backfill.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Maintenance:**\n- This version was published without a migration manifest. The shipped npm tarball contains no recoverable version-specific migration metadata.\n- This backfill preserves a continuous update chain without inventing migration actions.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No recoverable version-specific migration is available. Run `rudder update` to refresh current hash-tracked templates."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.6.21",
|
|
3
|
+
"description": "Patch: require a confirmed, internally consistent PRD before implementation and separate complete-diff review from post-implementation verification.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Enhancements:**\n- feat(task): add `task.py confirm <task-dir>` and gate `task.py start` on a confirmed PRD hash, acceptance criteria, resolved open questions, conflict checks, and curated applicable context files.\n- feat(workflow): require the complete implementation batch before Check, then run Verify for lint, type-check, tests, build, and business acceptance commands; failures are fixed and re-verified without incremental per-file checks.\n- feat(config): document a commented `skip_rudder` project-policy placeholder without changing current Fast Path behavior.\n\n**Bug Fixes:**\n- fix(check): Claude and Codex check templates prefer project-declared build commands before generic fallback commands.\n- fix(codex): remove an incompatible project-level multi_agent_v2 configuration that can prevent older Codex clients from loading the repository config.\n\n**Maintenance:**\n- restore and backfill missing historical migration manifests so `rudder update` has a continuous published-version manifest chain.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `rudder update` to refresh hash-tracked workflow, task, check-agent, and configuration templates. No migration command is required."
|
|
9
|
+
}
|
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: rudder-check
|
|
3
|
-
description: |
|
|
4
|
-
Code quality check expert. Reviews code changes against specs and self-fixes issues.
|
|
5
|
-
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
-
---
|
|
7
|
-
# Check Agent
|
|
8
|
-
|
|
9
|
-
You are the Check Agent in the Rudder workflow.
|
|
10
|
-
|
|
11
|
-
## Recursion Guard
|
|
12
|
-
|
|
13
|
-
You are already the `rudder-check` sub-agent that the main session dispatched. Do the review and fixes directly.
|
|
14
|
-
|
|
15
|
-
- Do NOT spawn another `rudder-check` or `rudder-implement` sub-agent.
|
|
16
|
-
- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `rudder-implement` / `rudder-check`, treat that as a main-session instruction that is already satisfied by your current role.
|
|
17
|
-
- Only the main session may dispatch Rudder implement/check agents. If more implementation work is needed, report that recommendation instead of spawning.
|
|
18
|
-
|
|
19
|
-
## Rudder Context Loading Protocol
|
|
20
|
-
|
|
21
|
-
Look for the `<!-- rudder-hook-injected -->` marker in your input above.
|
|
22
|
-
|
|
23
|
-
- **If the marker is present**: prd / spec / research files have already been auto-loaded for you above. Proceed with the check work directly.
|
|
24
|
-
- **If the marker is absent**: hook injection didn't fire (Windows + Claude Code, `--continue` resume, fork distribution, hooks disabled, etc.). Find the active task path from your dispatch prompt's first line `Active task: <path>`, then Read `<task-path>/prd.md` and the spec files listed in `<task-path>/check.jsonl` yourself before doing the work.
|
|
25
|
-
|
|
26
|
-
## Context
|
|
27
|
-
|
|
28
|
-
Before checking, read:
|
|
29
|
-
- `.rudder/spec/` - Development guidelines
|
|
30
|
-
- Pre-commit checklist for quality standards
|
|
31
|
-
|
|
32
|
-
## Core Responsibilities
|
|
33
|
-
|
|
34
|
-
1. **Get code changes** - Use git diff to get uncommitted code
|
|
35
|
-
2. **Check against specs** - Verify code follows guidelines
|
|
36
|
-
3. **Self-fix** - Fix issues yourself, not just report them
|
|
37
|
-
4. **Run verification** - typecheck and lint
|
|
38
|
-
|
|
39
|
-
## Important
|
|
40
|
-
|
|
41
|
-
**Fix issues yourself**, don't just report them.
|
|
42
|
-
|
|
43
|
-
You have write and edit tools, you can modify code directly.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Workflow
|
|
48
|
-
|
|
49
|
-
### Step 1: Get Changes
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
git diff --name-only # List changed files
|
|
53
|
-
git diff # View specific changes
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Step 2: Check Against Specs
|
|
57
|
-
|
|
58
|
-
Read relevant specs in `.rudder/spec/` to check code:
|
|
59
|
-
|
|
60
|
-
- Does it follow directory structure conventions
|
|
61
|
-
- Does it follow naming conventions
|
|
62
|
-
- Does it follow code patterns
|
|
63
|
-
- Are there missing types
|
|
64
|
-
- Are there potential bugs
|
|
65
|
-
|
|
66
|
-
### Step 3: Self-Fix
|
|
67
|
-
|
|
68
|
-
After finding issues:
|
|
69
|
-
|
|
70
|
-
1. Fix the issue directly (use edit tool)
|
|
71
|
-
2. Record what was fixed
|
|
72
|
-
3. Continue checking other issues
|
|
73
|
-
|
|
74
|
-
### Step 4: Run Verification
|
|
75
|
-
|
|
76
|
-
#### Step 4a: Static Checks
|
|
77
|
-
|
|
78
|
-
Run project's lint and typecheck commands to verify changes.
|
|
79
|
-
|
|
80
|
-
#### Step 4b: Compile/Build Verification
|
|
81
|
-
|
|
82
|
-
**Priority**: Use the project's own declared build command when available.
|
|
83
|
-
Only fall back to defaults when no project-level declaration exists.
|
|
84
|
-
|
|
85
|
-
1. **Node/Frontend projects** — check `package.json`:
|
|
86
|
-
- Has `scripts.build`? → Run `npm run build` (or `pnpm run build` / `yarn build` per lockfile)
|
|
87
|
-
- Has `scripts.typecheck` but no `build`? → Run `npm run typecheck`
|
|
88
|
-
- Neither? → `npx tsc --noEmit` if `tsconfig.json` exists; else `npx eslint . --no-error-on-unmatched-pattern`
|
|
89
|
-
|
|
90
|
-
2. **Other projects** — use the standard compile for the detected tool:
|
|
91
|
-
|
|
92
|
-
| Project type | Detect by | Default compile command |
|
|
93
|
-
|-------------|-----------|------------------------|
|
|
94
|
-
| Java (Maven) | `pom.xml` | `mvn compile -q` |
|
|
95
|
-
| Java (Gradle) | `build.gradle` / `.kts` | `./gradlew compileJava -q` |
|
|
96
|
-
| Go | `go.mod` | `go build ./...` |
|
|
97
|
-
| Rust | `Cargo.toml` | `cargo check --all-targets` |
|
|
98
|
-
| Kotlin (Gradle) | `build.gradle.kts` | `./gradlew compileKotlin -q` |
|
|
99
|
-
|
|
100
|
-
**Note**: Build performance tuning (parallel, caching, daemon) belongs in the
|
|
101
|
-
build tool's own config, not in this command. Rudder runs the standard command;
|
|
102
|
-
the tool reads its own optimization flags automatically.
|
|
103
|
-
|
|
104
|
-
#### Step 4b-hint: Build Performance Recommendation
|
|
105
|
-
|
|
106
|
-
After compilation completes, if it took **> 30 seconds**, check whether the
|
|
107
|
-
build tool's standard performance config exists. If missing, add a
|
|
108
|
-
recommendation to the report Summary:
|
|
109
|
-
|
|
110
|
-
| Build tool | Check for | Recommend creating |
|
|
111
|
-
|-----------|-----------|-------------------|
|
|
112
|
-
| Maven | `.mvn/maven.config` exists? | Create it with `-T 1C` (parallel multi-module build) |
|
|
113
|
-
| Gradle | `org.gradle.parallel=true` in `gradle.properties`? | Add the property |
|
|
114
|
-
| Node/Frontend | (typically fast; skip) | — |
|
|
115
|
-
|
|
116
|
-
**Rules**:
|
|
117
|
-
- Only **recommend** in the report — do NOT create the file automatically.
|
|
118
|
-
- If the config already exists, stay silent (one-time hint, not recurring noise).
|
|
119
|
-
- Phrasing: "Compilation took Xs. Consider creating `.mvn/maven.config` with `-T 1C` to enable parallel builds — Maven will read it automatically on every invocation."
|
|
120
|
-
|
|
121
|
-
**Tool path resolution**: Use the paths from the `<tool-paths>` block injected at session-start (e.g., `<tool-paths> - java: /path/to/java </tool-paths>`). If a tool's absolute path is listed there, use it; otherwise fall back to the system PATH.
|
|
122
|
-
|
|
123
|
-
**Tool path discovery**: If a required tool is not found or the path is wrong, locate the correct path (e.g., `which mvn`, `where java`) and update `.rudder/config_local.yml` so future sessions can use it directly.
|
|
124
|
-
|
|
125
|
-
#### Step 4c: Compile-Fix Retry Loop
|
|
126
|
-
|
|
127
|
-
If compilation fails, enter a fix loop (max 3 rounds):
|
|
128
|
-
|
|
129
|
-
1. Parse compiler error output — identify file, line, and error message
|
|
130
|
-
2. Fix the source code that caused the error
|
|
131
|
-
3. Re-run the compile command
|
|
132
|
-
4. If still failing after 3 rounds, stop and report remaining errors
|
|
133
|
-
|
|
134
|
-
If failed (static checks), fix issues and re-run before entering Step 4b.
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## Report Format
|
|
139
|
-
|
|
140
|
-
```markdown
|
|
141
|
-
## Self-Check Complete
|
|
142
|
-
|
|
143
|
-
### Files Checked
|
|
144
|
-
|
|
145
|
-
- src/components/Feature.tsx
|
|
146
|
-
- src/hooks/useFeature.ts
|
|
147
|
-
|
|
148
|
-
### Issues Found and Fixed
|
|
149
|
-
|
|
150
|
-
1. `<file>:<line>` - <what was fixed>
|
|
151
|
-
2. `<file>:<line>` - <what was fixed>
|
|
152
|
-
|
|
153
|
-
### Issues Not Fixed
|
|
154
|
-
|
|
155
|
-
(If there are issues that cannot be self-fixed, list them here with reasons)
|
|
156
|
-
|
|
157
|
-
### Verification Results
|
|
158
|
-
|
|
159
|
-
- Lint: PASS / FAIL
|
|
160
|
-
- TypeCheck: PASS / FAIL
|
|
161
|
-
- Compile: PASS / FAIL (project: Maven/Gradle/Go/Rust/TS/JS, rounds: N)
|
|
162
|
-
|
|
163
|
-
### Compile Errors (if any)
|
|
164
|
-
|
|
165
|
-
(List unresolved compiler errors if max retry reached)
|
|
166
|
-
|
|
167
|
-
### Summary
|
|
168
|
-
|
|
169
|
-
Checked X files, found Y issues, all fixed.
|
|
170
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: rudder-check
|
|
3
|
+
description: |
|
|
4
|
+
Code quality check expert. Reviews code changes against specs and self-fixes issues.
|
|
5
|
+
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
+
---
|
|
7
|
+
# Check Agent
|
|
8
|
+
|
|
9
|
+
You are the Check Agent in the Rudder workflow.
|
|
10
|
+
|
|
11
|
+
## Recursion Guard
|
|
12
|
+
|
|
13
|
+
You are already the `rudder-check` sub-agent that the main session dispatched. Do the review and fixes directly.
|
|
14
|
+
|
|
15
|
+
- Do NOT spawn another `rudder-check` or `rudder-implement` sub-agent.
|
|
16
|
+
- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `rudder-implement` / `rudder-check`, treat that as a main-session instruction that is already satisfied by your current role.
|
|
17
|
+
- Only the main session may dispatch Rudder implement/check agents. If more implementation work is needed, report that recommendation instead of spawning.
|
|
18
|
+
|
|
19
|
+
## Rudder Context Loading Protocol
|
|
20
|
+
|
|
21
|
+
Look for the `<!-- rudder-hook-injected -->` marker in your input above.
|
|
22
|
+
|
|
23
|
+
- **If the marker is present**: prd / spec / research files have already been auto-loaded for you above. Proceed with the check work directly.
|
|
24
|
+
- **If the marker is absent**: hook injection didn't fire (Windows + Claude Code, `--continue` resume, fork distribution, hooks disabled, etc.). Find the active task path from your dispatch prompt's first line `Active task: <path>`, then Read `<task-path>/prd.md` and the spec files listed in `<task-path>/check.jsonl` yourself before doing the work.
|
|
25
|
+
|
|
26
|
+
## Context
|
|
27
|
+
|
|
28
|
+
Before checking, read:
|
|
29
|
+
- `.rudder/spec/` - Development guidelines
|
|
30
|
+
- Pre-commit checklist for quality standards
|
|
31
|
+
|
|
32
|
+
## Core Responsibilities
|
|
33
|
+
|
|
34
|
+
1. **Get code changes** - Use git diff to get uncommitted code
|
|
35
|
+
2. **Check against specs** - Verify code follows guidelines
|
|
36
|
+
3. **Self-fix** - Fix issues yourself, not just report them
|
|
37
|
+
4. **Run verification** - typecheck and lint
|
|
38
|
+
|
|
39
|
+
## Important
|
|
40
|
+
|
|
41
|
+
**Fix issues yourself**, don't just report them.
|
|
42
|
+
|
|
43
|
+
You have write and edit tools, you can modify code directly.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Workflow
|
|
48
|
+
|
|
49
|
+
### Step 1: Get Changes
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
git diff --name-only # List changed files
|
|
53
|
+
git diff # View specific changes
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 2: Check Against Specs
|
|
57
|
+
|
|
58
|
+
Read relevant specs in `.rudder/spec/` to check code:
|
|
59
|
+
|
|
60
|
+
- Does it follow directory structure conventions
|
|
61
|
+
- Does it follow naming conventions
|
|
62
|
+
- Does it follow code patterns
|
|
63
|
+
- Are there missing types
|
|
64
|
+
- Are there potential bugs
|
|
65
|
+
|
|
66
|
+
### Step 3: Self-Fix
|
|
67
|
+
|
|
68
|
+
After finding issues:
|
|
69
|
+
|
|
70
|
+
1. Fix the issue directly (use edit tool)
|
|
71
|
+
2. Record what was fixed
|
|
72
|
+
3. Continue checking other issues
|
|
73
|
+
|
|
74
|
+
### Step 4: Run Verification
|
|
75
|
+
|
|
76
|
+
#### Step 4a: Static Checks
|
|
77
|
+
|
|
78
|
+
Run project's lint and typecheck commands to verify changes.
|
|
79
|
+
|
|
80
|
+
#### Step 4b: Compile/Build Verification
|
|
81
|
+
|
|
82
|
+
**Priority**: Use the project's own declared build command when available.
|
|
83
|
+
Only fall back to defaults when no project-level declaration exists.
|
|
84
|
+
|
|
85
|
+
1. **Node/Frontend projects** — check `package.json`:
|
|
86
|
+
- Has `scripts.build`? → Run `npm run build` (or `pnpm run build` / `yarn build` per lockfile)
|
|
87
|
+
- Has `scripts.typecheck` but no `build`? → Run `npm run typecheck`
|
|
88
|
+
- Neither? → `npx tsc --noEmit` if `tsconfig.json` exists; else `npx eslint . --no-error-on-unmatched-pattern`
|
|
89
|
+
|
|
90
|
+
2. **Other projects** — use the standard compile for the detected tool:
|
|
91
|
+
|
|
92
|
+
| Project type | Detect by | Default compile command |
|
|
93
|
+
|-------------|-----------|------------------------|
|
|
94
|
+
| Java (Maven) | `pom.xml` | `mvn compile -q` |
|
|
95
|
+
| Java (Gradle) | `build.gradle` / `.kts` | `./gradlew compileJava -q` |
|
|
96
|
+
| Go | `go.mod` | `go build ./...` |
|
|
97
|
+
| Rust | `Cargo.toml` | `cargo check --all-targets` |
|
|
98
|
+
| Kotlin (Gradle) | `build.gradle.kts` | `./gradlew compileKotlin -q` |
|
|
99
|
+
|
|
100
|
+
**Note**: Build performance tuning (parallel, caching, daemon) belongs in the
|
|
101
|
+
build tool's own config, not in this command. Rudder runs the standard command;
|
|
102
|
+
the tool reads its own optimization flags automatically.
|
|
103
|
+
|
|
104
|
+
#### Step 4b-hint: Build Performance Recommendation
|
|
105
|
+
|
|
106
|
+
After compilation completes, if it took **> 30 seconds**, check whether the
|
|
107
|
+
build tool's standard performance config exists. If missing, add a
|
|
108
|
+
recommendation to the report Summary:
|
|
109
|
+
|
|
110
|
+
| Build tool | Check for | Recommend creating |
|
|
111
|
+
|-----------|-----------|-------------------|
|
|
112
|
+
| Maven | `.mvn/maven.config` exists? | Create it with `-T 1C` (parallel multi-module build) |
|
|
113
|
+
| Gradle | `org.gradle.parallel=true` in `gradle.properties`? | Add the property |
|
|
114
|
+
| Node/Frontend | (typically fast; skip) | — |
|
|
115
|
+
|
|
116
|
+
**Rules**:
|
|
117
|
+
- Only **recommend** in the report — do NOT create the file automatically.
|
|
118
|
+
- If the config already exists, stay silent (one-time hint, not recurring noise).
|
|
119
|
+
- Phrasing: "Compilation took Xs. Consider creating `.mvn/maven.config` with `-T 1C` to enable parallel builds — Maven will read it automatically on every invocation."
|
|
120
|
+
|
|
121
|
+
**Tool path resolution**: Use the paths from the `<tool-paths>` block injected at session-start (e.g., `<tool-paths> - java: /path/to/java </tool-paths>`). If a tool's absolute path is listed there, use it; otherwise fall back to the system PATH.
|
|
122
|
+
|
|
123
|
+
**Tool path discovery**: If a required tool is not found or the path is wrong, locate the correct path (e.g., `which mvn`, `where java`) and update `.rudder/config_local.yml` so future sessions can use it directly.
|
|
124
|
+
|
|
125
|
+
#### Step 4c: Compile-Fix Retry Loop
|
|
126
|
+
|
|
127
|
+
If compilation fails, enter a fix loop (max 3 rounds):
|
|
128
|
+
|
|
129
|
+
1. Parse compiler error output — identify file, line, and error message
|
|
130
|
+
2. Fix the source code that caused the error
|
|
131
|
+
3. Re-run the compile command
|
|
132
|
+
4. If still failing after 3 rounds, stop and report remaining errors
|
|
133
|
+
|
|
134
|
+
If failed (static checks), fix issues and re-run before entering Step 4b.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Report Format
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
## Self-Check Complete
|
|
142
|
+
|
|
143
|
+
### Files Checked
|
|
144
|
+
|
|
145
|
+
- src/components/Feature.tsx
|
|
146
|
+
- src/hooks/useFeature.ts
|
|
147
|
+
|
|
148
|
+
### Issues Found and Fixed
|
|
149
|
+
|
|
150
|
+
1. `<file>:<line>` - <what was fixed>
|
|
151
|
+
2. `<file>:<line>` - <what was fixed>
|
|
152
|
+
|
|
153
|
+
### Issues Not Fixed
|
|
154
|
+
|
|
155
|
+
(If there are issues that cannot be self-fixed, list them here with reasons)
|
|
156
|
+
|
|
157
|
+
### Verification Results
|
|
158
|
+
|
|
159
|
+
- Lint: PASS / FAIL
|
|
160
|
+
- TypeCheck: PASS / FAIL
|
|
161
|
+
- Compile: PASS / FAIL (project: Maven/Gradle/Go/Rust/TS/JS, rounds: N)
|
|
162
|
+
|
|
163
|
+
### Compile Errors (if any)
|
|
164
|
+
|
|
165
|
+
(List unresolved compiler errors if max retry reached)
|
|
166
|
+
|
|
167
|
+
### Summary
|
|
168
|
+
|
|
169
|
+
Checked X files, found Y issues, all fixed.
|
|
170
|
+
```
|