riskrails 0.0.0-stage → 3.0.1
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/.agents/plugins/marketplace.json +20 -0
- package/.claude-plugin/marketplace.json +21 -0
- package/.claude-plugin/plugin.json +21 -0
- package/.codex-plugin/plugin.json +37 -0
- package/LICENSE +21 -0
- package/README.md +302 -2
- package/agents/Explore.md.tmpl +21 -0
- package/agents/ai-discovery.md.tmpl +65 -0
- package/agents/ai-reviewer.md.tmpl +146 -0
- package/agents/architect.md.tmpl +22 -0
- package/agents/log-reader.md.tmpl +23 -0
- package/agents/superseded/reviewer.md +16 -0
- package/ai/agents/context.md +59 -0
- package/ai/agents/discovery.md +56 -0
- package/ai/agents/implementer.md +67 -0
- package/ai/agents/manager.md +5 -0
- package/ai/agents/planner.md +71 -0
- package/ai/agents/release.md +43 -0
- package/ai/agents/reviewer.md +106 -0
- package/ai/agents/risk.md +46 -0
- package/ai/agents/security.md +53 -0
- package/ai/agents/tester.md +30 -0
- package/ai/policies/context-management.md +85 -0
- package/ai/policies/database.md +42 -0
- package/ai/policies/git.md +35 -0
- package/ai/policies/model-routing.md +112 -0
- package/ai/policies/production.md +42 -0
- package/ai/policies/release.md +48 -0
- package/ai/policies/review-economy.md +214 -0
- package/ai/policies/tooling.md +105 -0
- package/ai/templates/architecture-decision.md +29 -0
- package/ai/templates/impact-report.md +35 -0
- package/ai/templates/implementation-plan.md +54 -0
- package/ai/templates/release-report.md +52 -0
- package/ai/templates/review-report.md +30 -0
- package/ai/templates/task-context.md +18 -0
- package/ai/using-riskrails.md +75 -0
- package/ai/workflows/bugfix.md +4 -0
- package/ai/workflows/feature.md +4 -0
- package/ai/workflows/hotfix.md +4 -0
- package/ai/workflows/investigation.md +4 -0
- package/ai/workflows/refactoring.md +4 -0
- package/ai/workflows.md +81 -0
- package/bin/claude-1m +38 -0
- package/bin/riskrails.js +1434 -0
- package/codex/hooks.json +126 -0
- package/hooks/AGENTS.md +6 -0
- package/hooks/CLAUDE.md +6 -0
- package/hooks/ai-git-guard-defaults.json +28 -0
- package/hooks/ai-guard.py +113 -0
- package/hooks/ai-path-guard-defaults.json +50 -0
- package/hooks/cap-large-read.py +113 -0
- package/hooks/codex-hooks.json +126 -0
- package/hooks/context-guard.py +828 -0
- package/hooks/dialog-gate.py +105 -0
- package/hooks/guard/__init__.py +1 -0
- package/hooks/guard/common.py +638 -0
- package/hooks/guard/decision.py +123 -0
- package/hooks/guard/dialog.py +598 -0
- package/hooks/guard/ere.py +592 -0
- package/hooks/guard/git.py +291 -0
- package/hooks/guard/paths.py +1433 -0
- package/hooks/guard/scope.py +387 -0
- package/hooks/hooks.json +157 -0
- package/hooks/lib/ai-hook-common.sh +285 -0
- package/hooks/memory-pre-push.py +28 -0
- package/hooks/project-scaffold.py +292 -0
- package/hooks/project-scaffold.sh +14 -0
- package/hooks/runtime-gate.py +1214 -0
- package/hooks/update_notice.py +135 -0
- package/instructions/routing.md +137 -0
- package/instructions/runtimes.json +48 -0
- package/instructions/stub.md +93 -0
- package/package.json +13 -4
- package/profiles/balanced-max.json +14 -0
- package/profiles/codex-balanced-max.json +97 -0
- package/profiles/codex-plus.json +96 -0
- package/profiles/codex-pro.json +96 -0
- package/profiles/max.json +79 -0
- package/profiles/max20.json +23 -0
- package/profiles/pro.json +76 -0
- package/scripts/ai-path +104 -0
- package/scripts/merge-codex-config.py +361 -0
- package/scripts/render-codex-agents.py +185 -0
- package/scripts/resolve-profile.py +140 -0
- package/settings.common.json +126 -0
- package/settings.gate.json +64 -0
- package/skills/AGENTS.md +6 -0
- package/skills/CLAUDE.md +6 -0
- package/skills/ai-audit/SKILL.md +9 -0
- package/skills/ai-audit/templates/ai-sdlc-adoption-plan.md +87 -0
- package/skills/ai-audit/templates/play-scoring-rubric.md +122 -0
- package/skills/ai-init/SKILL.md +9 -0
- package/skills/ai-init/scaffold-ai.sh +10 -0
- package/skills/ai-init/templates/.ai/AGENTS.md +67 -0
- package/skills/ai-init/templates/.ai/VERSION +1 -0
- package/skills/ai-init/templates/.ai/policies/coding.md +32 -0
- package/skills/ai-init/templates/.ai/policies/dialog.json +1 -0
- package/skills/ai-init/templates/.ai/policies/path-guard.json +5 -0
- package/skills/ai-init/templates/.ai/policies/risk-tiers.json +628 -0
- package/skills/ai-init/templates/.ai/policies/risk-tiers.md +180 -0
- package/skills/ai-init/templates/.ai/policies/safety.md +84 -0
- package/skills/ai-init/templates/.ai/policies/security.md +69 -0
- package/skills/ai-init/templates/.ai/policies/testing.md +118 -0
- package/skills/ai-init/templates/.ai/policies/weight.json +49 -0
- package/skills/ai-init/templates/.ai/policies/weight.md +32 -0
- package/skills/ai-init/templates/.ai/project/architecture.md +40 -0
- package/skills/ai-init/templates/.ai/project/business-rules.md +21 -0
- package/skills/ai-init/templates/.ai/project/dependencies.md +27 -0
- package/skills/ai-init/templates/.ai/project/glossary.md +8 -0
- package/skills/ai-init/templates/.ai/project/initial-assessment.md +8 -0
- package/skills/ai-init/templates/.ai/project/integrations.md +20 -0
- package/skills/ai-init/templates/.ai/project/known-risks.md +16 -0
- package/skills/ai-init/templates/.ai/project/legacy.md +28 -0
- package/skills/ai-init/templates/.ai/project/modules.md +18 -0
- package/skills/ai-init/templates/.ai/project/overview.md +27 -0
- package/skills/ai-init/templates/.ai/reports/.gitkeep +0 -0
- package/skills/ai-init/templates/.ai/rules/README.md +24 -0
- package/skills/ai-init/templates/.ai/state/README.md +67 -0
- package/skills/ai-init/templates/AGENTS.block.md +13 -0
- package/skills/ai-init/templates/AGENTS.minimal.md +23 -0
- package/skills/ai-init/templates/CLAUDE.block.md +13 -0
- package/skills/ai-init/templates/CLAUDE.minimal.md +23 -0
- package/skills/ai-init/templates/GEMINI.block.md +13 -0
- package/skills/ai-init/templates/GEMINI.minimal.md +23 -0
- package/skills/ai-init/templates/gitignore.snippet +5 -0
- package/skills/ai-init/templates/junie-guidelines.block.md +13 -0
- package/skills/ai-init/templates/junie-guidelines.minimal.md +23 -0
- package/skills/ai-status/SKILL.md +9 -0
- package/skills/ai-task/SKILL.md +9 -0
- package/skills/ai-task/memory_compact.py +968 -0
- package/skills/ai-task/memory_format.py +775 -0
- package/skills/ai-task/memory_store.py +528 -0
- package/skills/ai-task/memory_sync.py +1571 -0
- package/skills/ai-task/sensors.py +424 -0
- package/skills/ai-task/state.py +5207 -0
- package/skills/ai-task/weight.py +300 -0
- package/skills/project-init/SKILL.md +9 -0
- package/skills/project-init/templates/AGENTS.md +27 -0
- package/skills/project-init/templates/CLAUDE.md +27 -0
- package/skills/project-init/templates/GEMINI.md +27 -0
- package/skills/project-init/templates/adr.md +29 -0
- package/skills/project-init/templates/constitution.md +15 -0
- package/skills/project-init/templates/gitignore.snippet +4 -0
- package/skills/project-init/templates/intent.md +35 -0
- package/skills/project-init/templates/junie-guidelines.md +27 -0
- package/skills/project-init/templates/memory-README.md +21 -0
- package/skills/project-init/templates/plan.md +25 -0
- package/skills/project-init/templates/project-config.toml +18 -0
- package/skills/project-init/templates/project-settings.json +5 -0
- package/skills/project-init/templates/sdlc-README.md +24 -0
- package/skills/project-init/templates/spec.md +30 -0
- package/skills/project-update/SKILL.md +9 -0
- package/skills/project-update/adopt-map.json +91 -0
- package/skills/project-update/adopt.py +2211 -0
- package/skills/project-update/history/blobs/01c32f8ff038787e49070b8b0eb160eb4b4704a020b050678292051fc73a4fc6 +106 -0
- package/skills/project-update/history/blobs/06e9d52c1720fca412803e3b07c4b228ff113e303f4c7ab94665319d832bbfb7 +1 -0
- package/skills/project-update/history/blobs/099f3debfe1ce808502661de4a31c3a349f149f5fe7246691d41a4966179a63c +5 -0
- package/skills/project-update/history/blobs/0b0a7e354e1d1c86351700d5fb63d16426536875f5fecb759d15e326b7f30289 +180 -0
- package/skills/project-update/history/blobs/0bb70da941a7fc0ae2a0dbfcf06441a40f0653b3b9c573328ad9fb6d66f2e133 +27 -0
- package/skills/project-update/history/blobs/0cb92e5048badfab2cb78ff030c824f8cccaf45b83b8587bcb20ab795e8d36ae +89 -0
- package/skills/project-update/history/blobs/0e221e9337f050ffe0e834be12c1a5b46d82dec446b57ebcfbaa0ec8996bd54c +372 -0
- package/skills/project-update/history/blobs/0ec82daa4a17bcd5bf9d4df20ce90fd09312d3d439f7064baf7c8dd77a6c44fc +27 -0
- package/skills/project-update/history/blobs/0f00cbb216a20c7f67749ffb88835bcaaa29cc1a4c15d468edb3c6039bd291d3 +53 -0
- package/skills/project-update/history/blobs/0fab5540c131185e2ccdc10baad52783d7d4ff164843cae7f1b7f310c7d102ec +73 -0
- package/skills/project-update/history/blobs/10159baf262b43a92d95db59dae1f72c645127301661e0a3ce4e38b295a97c58 +1 -0
- package/skills/project-update/history/blobs/1121cfccd5913f0a63fec40a6ffd44ea64f9dc135c66634ba001d10bcf4302a2 +1 -0
- package/skills/project-update/history/blobs/12288b1b5573ee6e9e18eccdc6f5ae6cef9bee7576f79fde175ad1ac53dae134 +145 -0
- package/skills/project-update/history/blobs/164cd34c182de88c33de7df35beb29200d792419e1c13a5f0b2104f944e57be7 +1 -0
- package/skills/project-update/history/blobs/17f88e362fa19b7f2741ea1393164dc75b9c300b8727322f91fe205a985e088f +5 -0
- package/skills/project-update/history/blobs/17fa7392d1466e286d5aa83a19e364835c1977750ae1f186aec59e2046d688ea +106 -0
- package/skills/project-update/history/blobs/1987654b78c747f378109dbde1d51c4f31fd0eabc878ff16b3bcfaeaf99c8ff4 +28 -0
- package/skills/project-update/history/blobs/19b1a6390e96136619d23bc2ef9afed8f15e62107de7c1052bc5ea23e5bb5692 +64 -0
- package/skills/project-update/history/blobs/1a8995e5f7e51b5be74fca82551e5d9e4d970c546d9fd6eecb6809a7f6af8821 +69 -0
- package/skills/project-update/history/blobs/1ad77786ae3fed570aafe7612eac1d94ef1f52c3106fd64733951592dea759ff +62 -0
- package/skills/project-update/history/blobs/1b554eff73a270086f8cf8cba73f7d9ce162c6b6b9c288b822db36841b8a9228 +16 -0
- package/skills/project-update/history/blobs/1c2c3e5bbb132a152163ebeb678d57f0f7162a56ea92b84acc43cd2dedd4a935 +20 -0
- package/skills/project-update/history/blobs/1d1d907449ec74594d0ee923ac142ae746b9aedf0a1eda9469f075a44d23e3d7 +13 -0
- package/skills/project-update/history/blobs/1fdc406be22d9ea39f41e738c6bbd36a31ef4adc84ece06cfceebddaa86c9798 +75 -0
- package/skills/project-update/history/blobs/21319ce04158178b1d66ee8514e32c43bb1b4cd9cee11a456a9a863a5998c6ce +53 -0
- package/skills/project-update/history/blobs/23a42febbacaa7b52a802d428033a99c0694391c81d51fe3b6e1dff608a641d5 +67 -0
- package/skills/project-update/history/blobs/28a0455a7b17204171c49891c39043040c8608f4e6f04caf09de3fe8aea68553 +27 -0
- package/skills/project-update/history/blobs/30b6dcbdcfbb8e9223af11edacc387b1102868261bbe7051c2d85ad1a18384e5 +27 -0
- package/skills/project-update/history/blobs/31bb922076c8dadb4a84bb6a03d331dafc7157893aaf2f92b13792270fbece9b +56 -0
- package/skills/project-update/history/blobs/3775eed295a794dda73b14f88af70bc2c99b5590f81da53f165423e4337dceed +13 -0
- package/skills/project-update/history/blobs/3a492555cac3198136e239539466fb768cf672d5a972f5afd7d57c038d3cfed6 +104 -0
- package/skills/project-update/history/blobs/3dd55bf5f9d9471c68af3353166da11593a11e639f7557397ce46787291fa629 +32 -0
- package/skills/project-update/history/blobs/3f40640377c8501ecb50dc044fc7951a9b96caac5335e92e0d54d0c1764de8f2 +30 -0
- package/skills/project-update/history/blobs/40ac73f706ba7d2578627f420076cdb9fa6aa146e16d0da6c6a5c63f65c2b03c +66 -0
- package/skills/project-update/history/blobs/4355a46b19d348dc2f57c046f8ef63d4538ebb936000f3c9ee954a27460dd865 +1 -0
- package/skills/project-update/history/blobs/465bd61887bae3c68b751ea02af09d00f570086617ff8e1362acf6ed0868396b +39 -0
- package/skills/project-update/history/blobs/4d1f9073276936834747199393159f1badc0277b5bb394f78f408d52c36c4e35 +13 -0
- package/skills/project-update/history/blobs/4e67b352e2d7a29a83c4fa9f80a0d3ed9272da0f976a084c344b55e349f741b2 +75 -0
- package/skills/project-update/history/blobs/504ac6f9c5efb8ecb404bb62fbb08c819e8cff0c6b522efeeeb383cb30d2778e +18 -0
- package/skills/project-update/history/blobs/514c8c4bc97f23fe2739954bad34024922464f54b3a057f00ac54d631a4d875d +26 -0
- package/skills/project-update/history/blobs/53376d1fca268d8fdb59a5a0d0e0a4fe2d3bc2a7689a79c00a227f41bd5a2165 +27 -0
- package/skills/project-update/history/blobs/5353ca529c46f2443e12947ec205a6887fb594a4de1f87f0eb1c0e6c0f826133 +49 -0
- package/skills/project-update/history/blobs/53c234e5e8472b6ac51c1ae1cab3fe06fad053beb8ebfd8977b010655bfdd3c3 +1 -0
- package/skills/project-update/history/blobs/54eefe3d8cd6cd1ed56764e7bd412a4c919a28fc64b56b69dcafeecd7a921678 +67 -0
- package/skills/project-update/history/blobs/5551499579a0bceb74a79731d30213b1ddf9168b92f6d3dd0aecad91d8aff464 +23 -0
- package/skills/project-update/history/blobs/5c0619c1ee059477c9d92cf70b72da5d238d9176fc27ab0d38104ecba795624c +3 -0
- package/skills/project-update/history/blobs/5cbaaabe2c8d0e24582877aab05eeaaf4d53cb5e9515e81cd18368d13d2fe79e +40 -0
- package/skills/project-update/history/blobs/5ccacb666c22a8b6401563bf69ab0ed6bd1df7c93aeb46eacff7d2ff8653cd40 +27 -0
- package/skills/project-update/history/blobs/5e38d93c4f82300cc5d331f4ce3022d2872db15d108ae23bf33e2169a19b42f2 +15 -0
- package/skills/project-update/history/blobs/5f65bc7ab3fc3c4e75ae05d49eaf4331fafc398c661abe33c69f7380a720344c +32 -0
- package/skills/project-update/history/blobs/616a6da3c59073926c5ece428efa251fbe539d25a53bcf50be67522f44848368 +628 -0
- package/skills/project-update/history/blobs/61d0e67d59802a695f546e0a77e11a4daf1fafe77f50bead5f94bc7f08fb8457 +30 -0
- package/skills/project-update/history/blobs/62010250361ebe8644722d60397ce01e9b8abbfd497ede2c9f79b2ae4bce465d +374 -0
- package/skills/project-update/history/blobs/63c6dd07369cd71fad62a22f0ce352792cac0ed5c2998f8e7a4f4d0a64db7803 +102 -0
- package/skills/project-update/history/blobs/65acd4be95c695d0cc20cb5f4faffe0f44e0873b385c124140b223c41328cb56 +13 -0
- package/skills/project-update/history/blobs/664937c4293d82108a19302d4a55d15e3e1686091e5f3e40fd5510dca2d10af5 +27 -0
- package/skills/project-update/history/blobs/6a89cada6dc06bf5e0622a89fe7a8a6745e73c0e01505b7efe462f97d81c0956 +32 -0
- package/skills/project-update/history/blobs/6af1b12f814384e517e8f09131b0524930ac1c849350db765d8a77c7a59905b9 +8 -0
- package/skills/project-update/history/blobs/6b30b86994c130697aea047256ef20ef724f6fea42a4490dc220919e57453659 +354 -0
- package/skills/project-update/history/blobs/6c7b1b9b733f3ec7d8e038e62f484419c5e888cd094f64c1f1471b9cd9bb3fe8 +571 -0
- package/skills/project-update/history/blobs/6f098b31327fe52bfe1418b9f53af40e8734f027c7f1e21b02c1db1fabacdf15 +68 -0
- package/skills/project-update/history/blobs/70850fc7be7307455233177c1fd85e7f1d94c36430a0efc8e7f205b350505226 +31 -0
- package/skills/project-update/history/blobs/732b736e9877263621a0d616d8c466dd3a77eda5092db4e1def0dfb09c573e2a +51 -0
- package/skills/project-update/history/blobs/74549e7a525fdbce4a697fdabfab9b648730118b236123028820b5358002b404 +177 -0
- package/skills/project-update/history/blobs/7578025c0ce0a64dd37fe4c999541db5681199763df8b373ed0bfba11e2f581e +17 -0
- package/skills/project-update/history/blobs/77bd4e864d23176abc6bb8af8fba77775d88a0b135f5c985574d796a396d431d +76 -0
- package/skills/project-update/history/blobs/7be527cd648b27cca6e267de30f8e33a2ce17d5631a82694f23ae5c0623efe1f +15 -0
- package/skills/project-update/history/blobs/7cc03a94f8421069d92b6d89503beaa045d8162c303abfd996b2c019c9daad57 +27 -0
- package/skills/project-update/history/blobs/7de1555df0c2700329e815b93b32c571c3ea54dc967b89e81ab73b9972b72d1d +1 -0
- package/skills/project-update/history/blobs/7ee99edafe7cec45ff577376c0d0178fdb2690134d4656488f46e129aba3cc5a +67 -0
- package/skills/project-update/history/blobs/7eee4ea9f6e778ff691c263621e717c021505b86386034cc64f8ebbfc9d8fe65 +13 -0
- package/skills/project-update/history/blobs/7f3859c34035fe32abf937eebdd7240ac72ab32d254286cff7d939cf0cf6eaef +48 -0
- package/skills/project-update/history/blobs/80cf708a42ad6d7851f4063e0d9127b850f274dcb6633c9a9773d01173d437f8 +628 -0
- package/skills/project-update/history/blobs/815d78ce95d18454cf0842335f81755bf3aceb87ee9d2197e121d3ff734cd2b5 +13 -0
- package/skills/project-update/history/blobs/84c3815fd46498443568285c8d839257ecb91b6f0639690cbdc38ba382fc349d +569 -0
- package/skills/project-update/history/blobs/89e7198e1dd42778a6a9af6c7381216aecf561a366426bd914bc57f099ddd390 +10 -0
- package/skills/project-update/history/blobs/8a839b7c0f1ec1cc6217d5275b0cd13860a888eb23eef1a0792a4e78f2bd9faf +35 -0
- package/skills/project-update/history/blobs/8ad13d2ca4504cfd8e4ab7fe3a49129b228d9979461f0f758a71daeec78b6ae1 +118 -0
- package/skills/project-update/history/blobs/8b3ef9586491a426767c01da5d01bdd6b0655c576c68c4cc6dfb093367817dc0 +67 -0
- package/skills/project-update/history/blobs/8c97cfd63ee3dfba7aa61d9104e87fdbb086d3bf46cf648d349636912836c6d9 +18 -0
- package/skills/project-update/history/blobs/8fc1a5443a2b52a7a5945e2b972579202bd5e3f8c881a22cc1c97b52b7b2da6b +4 -0
- package/skills/project-update/history/blobs/917df3320d778ddbaa5c5c7742bc4046bf803c36ed2b050f30844ed206783469 +1 -0
- package/skills/project-update/history/blobs/9272fe1cc7ffa1805756c8b80bd14e8de69d03899b94fb0f49db6aa0bcb53b90 +33 -0
- package/skills/project-update/history/blobs/930ccfac4ba1306341e32279278410b451246a52223c42e0597b5ee83706ff00 +48 -0
- package/skills/project-update/history/blobs/933629cd5c872a11837046b13051a9b02bbc1033e3ba74f41966af2ed4edee5d +23 -0
- package/skills/project-update/history/blobs/935af1019931058ec3a0b834fe230e127ec914f75edcc4a6c589cfe733b0b979 +13 -0
- package/skills/project-update/history/blobs/962fd396da83337c3fadcc642d45e98429b18e79bb81f58915baaf2b9bffd3c5 +27 -0
- package/skills/project-update/history/blobs/965a03be82000866cb5275acda18ebb2172c9a50f0011df2fa475f74a1124c35 +3 -0
- package/skills/project-update/history/blobs/990a23740f15f50ec90f37bcabd1b1a8eedf102922a949343fdaf41a9fee07fe +27 -0
- package/skills/project-update/history/blobs/a00db51859bb7943174017a34b4a100f98e53d6c3b32f73d8f87d6072016a709 +5 -0
- package/skills/project-update/history/blobs/a1167f89faf809477a967aeefe514f443be57502f0afc832039a28ac5575216a +64 -0
- package/skills/project-update/history/blobs/a13cb0db5372c3ce3e71470165c17a2db76e7a2415717ba27fccd1b0593c61c4 +66 -0
- package/skills/project-update/history/blobs/a1558cb6add0a4d6264757c29ef7172c74626fe0034973983a3a39459cf9a1cb +106 -0
- package/skills/project-update/history/blobs/a1ed0b4f3b73b1a29adfdf0d4d495553ba48707aa5a676496ebc28f993a57dcb +24 -0
- package/skills/project-update/history/blobs/a349aaad234825ea429df33cafb7928579c0cb5b1801f0a237e103aa8d159642 +29 -0
- package/skills/project-update/history/blobs/a5ef05d1ec2323ffd61ae60f98f3dacd212cae507b798d7421c3a9f418806506 +49 -0
- package/skills/project-update/history/blobs/a883fab03be6557be0a4205f6e025ee5571098b0931f3bb60f28a9028bb87353 +25 -0
- package/skills/project-update/history/blobs/a8cf15b33301a76e1d899064d5cb95914cc49412ab223f00394b702c4a4508f1 +24 -0
- package/skills/project-update/history/blobs/aa67a169b0bba217aa0aa88a65346920c84c42447c36ba5f7ea65f422c1fe5d8 +1 -0
- package/skills/project-update/history/blobs/ab0ce5062b41aaff12b0525d56b42de6b9dee9ce9e1de2938f72675435013c6a +18 -0
- package/skills/project-update/history/blobs/ab13c708e91c1de2adbc9ccdb1caec5c320197708bcaaa6d5cfd30c18a7dac34 +21 -0
- package/skills/project-update/history/blobs/ad4c4f81855725f7fe6e0e3d8f557df0de5fc063465d428546f69c54020c69d9 +64 -0
- package/skills/project-update/history/blobs/ae49c96abe45e56e88ae5e28e046212f7114d6413785cbe998f692d2914792be +24 -0
- package/skills/project-update/history/blobs/ae5ce131d6bae401199ff32d8c3dc4d8aec188010a9111624ac64506e2116ff4 +84 -0
- package/skills/project-update/history/blobs/ae9a22907ba9acbb7e80fac1ba4e3d1ff09e5f1df5c4456afb9099d7090fcaa6 +64 -0
- package/skills/project-update/history/blobs/b486fe10685d437b73c8fa2a3141621e29c36d70ec88b2a36e4573133504507b +30 -0
- package/skills/project-update/history/blobs/b7b697fc987617449ba10634f12f70326281cc182f8b7f20f9e047a75f3f182b +17 -0
- package/skills/project-update/history/blobs/b80e6b2b93a4b8a5a0f8eabc2a745247ad53df3235bb84c63fdd3f10ccc1ae99 +21 -0
- package/skills/project-update/history/blobs/b81eabd9248527e9abe1b6df7cf75ac772236b049008190d2a235e2eb22a931f +23 -0
- package/skills/project-update/history/blobs/b9da99bf05f0f08663469288f694f153fb6f2d806cdedf2cdb10cee3d3722295 +18 -0
- package/skills/project-update/history/blobs/ba9bb685dc2bb6de0ed5a8d601ef7ecedb517bb737565f75f6d4fff4ab4cd79c +24 -0
- package/skills/project-update/history/blobs/be29b8681b3de26b0120209971aaf0fab05c77baf8a4d65198929ef611f4fc55 +23 -0
- package/skills/project-update/history/blobs/be8c1556e8b0de1ce0f0fb0ca39f9f3b56ced57116b65a2812421c77cfff7585 +103 -0
- package/skills/project-update/history/blobs/c076d603cffc731823d2acf096bcc17cca1d99eee24b0aa313776d7d01571b4f +13 -0
- package/skills/project-update/history/blobs/c735911eb1a744f78213a9f7577b425c1605843f6d05fed798d7f41b47fa1e0c +13 -0
- package/skills/project-update/history/blobs/c9152d6dc2a5ddaadd870611675a24f89b442e2831a9207a14f2d438788553b0 +27 -0
- package/skills/project-update/history/blobs/c9ddacab2a6943af94c927799ba314877c1f19d40949e927c2d3825689005288 +13 -0
- package/skills/project-update/history/blobs/ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356 +1 -0
- package/skills/project-update/history/blobs/ca4499d829268c8766fb3b825a515e88dc55c237e9d202816b50959b4dac031f +13 -0
- package/skills/project-update/history/blobs/cb2178079b6eda906eee8f3510b72d5c03ae5fe2195f5ee3c859756dd42f9b32 +84 -0
- package/skills/project-update/history/blobs/cb8b8328efd818835822dc60537e3ecdb648d4ca04e21a7c47c88bf1198a5474 +63 -0
- package/skills/project-update/history/blobs/cc808d5b940109f1703abfb3ca0334a3fcfd34267feefb2323627d0decc8b89a +52 -0
- package/skills/project-update/history/blobs/cdc2432f3581ad9dbf5bc215de1e0cb0b49a44e1303b4222a4df4c72d0e96cc3 +27 -0
- package/skills/project-update/history/blobs/d7b96902bf9d2078df1e09901327b02f565b174777af34a2b24be660cad81d01 +33 -0
- package/skills/project-update/history/blobs/d8011741c086a124cf69b2988e0452ee2eb4ccccc6a6696b02069ddf7db35bd1 +330 -0
- package/skills/project-update/history/blobs/d9abea96dbe584fd77c27d5ed0523eb20d048f2d146e4909d16b2a7948db38c5 +8 -0
- package/skills/project-update/history/blobs/da848b831443484c831fa630666c004e07c1c9669dd247e8e4066979c8599080 +13 -0
- package/skills/project-update/history/blobs/da90fc7cceda6ced501d32924126593b9bf90c59fc067abab9abbc68d43be8b2 +97 -0
- package/skills/project-update/history/blobs/dd174b27e5b3a2414d0605484f4e92423e2553931263f05ef15677b4aa389bab +72 -0
- package/skills/project-update/history/blobs/ddc088b8a289151c50bf073797c245c254939217970e6d58b75c3d7193b12466 +27 -0
- package/skills/project-update/history/blobs/de0685f9bc2ac22c1b0178d6a1fc8d07fa23451f29d0c36571cbf85c69716fc2 +13 -0
- package/skills/project-update/history/blobs/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 +0 -0
- package/skills/project-update/history/blobs/e584f106c4e65b1bdce69b78d05713347717bdc2228998982313e3eb15b52943 +76 -0
- package/skills/project-update/history/blobs/e639e99d3f59015dc21472de081ca7766231135399ac3a6f439e841e458251f4 +32 -0
- package/skills/project-update/history/blobs/e66a657a3977884b69435b51f77782e48f37f57c865b6c9ba294e8796b37c378 +101 -0
- package/skills/project-update/history/blobs/e7c01b6590c4e308cd2681beaa3b2242cd1e10a5ba851d9f756f4d49d301d144 +22 -0
- package/skills/project-update/history/blobs/e7cc8b00983d6022206aa576187a2d4dccc656aaea41b26dc32123b4b064e965 +349 -0
- package/skills/project-update/history/blobs/e8df28f07cb784d768bcafbced70fd15771afa61dbec7dc4c1c3f858f9002fec +13 -0
- package/skills/project-update/history/blobs/e9adb7a9905eb719ac78ab96671f055da53e5001810f5ad6d6c94306b0323fe7 +74 -0
- package/skills/project-update/history/blobs/ebbc147c88c417b18ddc4d0530d87e4aa26b0659e085339f45015cf0be2b61a5 +579 -0
- package/skills/project-update/history/blobs/ee7c8321fff228d967c5d200c316967195d93a26196383f57f474e837b1b3d33 +13 -0
- package/skills/project-update/history/blobs/f00317bd27dc8184222e4b8ffe97f27e72d442d36a2bd67552f57f802590dd79 +25 -0
- package/skills/project-update/history/blobs/f0b5c2c2211c8d67ed15e75e656c7862d086e9245420892a7de62cd9ec582a06 +1 -0
- package/skills/project-update/history/blobs/f12f2ac77324b23aa9ef2c5096a2c08788570b32b0c0322671b0889e7a80d8bd +18 -0
- package/skills/project-update/history/blobs/f5594606990239af05aa73ba00efc8292c3ecfe0be408c9acd343abcbc9d2155 +156 -0
- package/skills/project-update/history/blobs/fae3064e648cdc55be4aeb1177525b302a5e34ebd752e4a904f47dc0f4557b96 +71 -0
- package/skills/project-update/history/blobs/fce1ab62e4626119169fb2324a06526805227076359c844690f6374ae28e6804 +51 -0
- package/skills/project-update/history/blobs/fe513647c66e8883b326ea884a7e9cb045ce54c49b03d2e75a0b73c4756c423e +67 -0
- package/skills/project-update/history/blobs/fff19a00920c2d001d1614d0d7375c89e1e8c062d6de1f01501c24773acef973 +148 -0
- package/skills/project-update/history/index.json +429 -0
- package/skills/project-update/migrations/0001_schema_version.py +13 -0
- package/skills/project-update/migrations/0002_task_journal.py +123 -0
- package/skills/project-update/migrations/0003_context_diet.py +65 -0
- package/skills/project-update/migrations/0004_deterministic_gates.py +57 -0
- package/skills/project-update/migrations/0005_runtimes_and_plans.py +35 -0
- package/skills/project-update/migrations/0006_shared_files.py +154 -0
- package/skills/project-update/migrations/0007_weight_model.py +188 -0
- package/skills/project-update/migrations/0008_renames.py +43 -0
- package/skills/project-update/migrations/0009_state_file.py +25 -0
- package/skills/project-update/migrations/0010_dialog_switch.py +30 -0
- package/skills/project-update/migrations/README.md +61 -0
- package/skills/project-update/migrations/__init__.py +181 -0
- package/skills/project-update/render_instructions.py +615 -0
- package/skills/project-update/update.py +1685 -0
- package/skills/rr-build/SKILL.md +194 -0
- package/skills/rr-build-all/SKILL.md +190 -0
- package/skills/rr-plan/SKILL.md +110 -0
- package/skills/rr-review/SKILL.md +109 -0
- package/skills/rr-setup/SKILL.md +244 -0
- package/skills/rr-setup/scaffold_ai.py +303 -0
- package/skills/rr-setup/setup.py +541 -0
- package/skills/rr-ship/SKILL.md +118 -0
- package/skills/rr-spec/SKILL.md +108 -0
- package/skills/rr-status/SKILL.md +73 -0
- package/skills/rr-status/status.py +171 -0
- package/skills/sdlc-intent/SKILL.md +9 -0
- package/skills/sdlc-plan/SKILL.md +9 -0
- package/skills/sdlc-spec/SKILL.md +9 -0
- package/skills/usage-report/SKILL.md +10 -0
- package/skills/usage-report/prices.json +41 -0
- package/skills/usage-report/usage-report.py +926 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-reviewer
|
|
3
|
+
description: Adversarial review of a change in a project with .ai/ — assumes the implementation is wrong and looks for unintended behaviour change, hidden coupling, race conditions, retry and idempotency problems, contract breaks, scope creep and weakened checks. Read-only; returns findings by severity, never a patch.
|
|
4
|
+
tools: Read, Grep, Glob, Bash
|
|
5
|
+
disallowedTools: Edit, Write, NotebookEdit
|
|
6
|
+
model: {{STRONG_MODEL}}
|
|
7
|
+
effort: {{STRONG_EFFORT}}
|
|
8
|
+
color: red
|
|
9
|
+
---
|
|
10
|
+
You review as an adversary. Assume the implementation is wrong and find out why.
|
|
11
|
+
A review that finds nothing on a change to shared or critical code is usually a
|
|
12
|
+
review that read the diff instead of the system.
|
|
13
|
+
|
|
14
|
+
Read first, when they exist: `.ai/policies/coding.md`,
|
|
15
|
+
`.ai/policies/production.md`, `.ai/policies/review-economy.md`,
|
|
16
|
+
`.ai/agents/reviewer.md`, and the task's plan and context under
|
|
17
|
+
`.ai/reports/<task-id>/`. In a repository without `.ai/`, review against the
|
|
18
|
+
project's own instruction file instead — `CLAUDE.md`, `AGENTS.md`, or both — and
|
|
19
|
+
say so.
|
|
20
|
+
|
|
21
|
+
A shared file under `.ai/` — a policy, agent contract, workflow or template — is
|
|
22
|
+
read from the project's `.ai/<path>` when it exists, else from
|
|
23
|
+
`{{AI_SHARED}}/<path>`; `.ai/` paths inside those files resolve the same way.
|
|
24
|
+
|
|
25
|
+
## Budget
|
|
26
|
+
|
|
27
|
+
Read `.ai/reports/<task-id>/review-ledger.md` before planning your own work, and
|
|
28
|
+
treat it as binding. A claim already marked CONFIRMED there is **out of budget**:
|
|
29
|
+
do not re-derive it, and say in EXAMINED AND CLEAN that you inherited it. Re-open
|
|
30
|
+
a row only when the code under it changed, and say which change re-opened it.
|
|
31
|
+
Spend what you save on the parts nobody has probed yet.
|
|
32
|
+
|
|
33
|
+
Rows written by `sensors.py` are measurements, not opinions, and each names the
|
|
34
|
+
tree it was taken on: the suite's result, the linter and type checker, the diff
|
|
35
|
+
against the tier's budget, the tier re-scored from the real diff, whether every
|
|
36
|
+
step named a test that exists, whether the named tests fail without the change,
|
|
37
|
+
and repeated blocks. Inherit all of them. `.ai/reports/<task-id>/sensors.json`
|
|
38
|
+
has the same in full, including a `red` row, which is a finding somebody has
|
|
39
|
+
already localised for you — start there rather than looking for it again.
|
|
40
|
+
|
|
41
|
+
If the request names a dimension — semantics and types, resources and failure
|
|
42
|
+
modes, the record — review **only** that dimension and say so in the verdict.
|
|
43
|
+
Another agent has the rest, in parallel.
|
|
44
|
+
|
|
45
|
+
If the request is a **re-review after remediation**, answer exactly two questions:
|
|
46
|
+
does each named finding close against the real code, and what did the remediation
|
|
47
|
+
introduce? A re-review that re-reads the whole change is a first review wearing
|
|
48
|
+
the wrong name, and costs the same.
|
|
49
|
+
|
|
50
|
+
Read the diff; run only the tests the step names, through `step_test_command`; no
|
|
51
|
+
scripts, mutation or timing loops in a scratchpad or temp dir. About 40 tool calls
|
|
52
|
+
in light and guarded, about 80 in full, then FINDINGS and VERDICT, with
|
|
53
|
+
`not reached (budget): …` under EXAMINED AND CLEAN.
|
|
54
|
+
|
|
55
|
+
## Boundary
|
|
56
|
+
|
|
57
|
+
The brief names the task's mode; `.ai/state/state.json` (or the legacy `current.json`) has it otherwise. In
|
|
58
|
+
light and guarded mode your inputs are the task goal, the diff, the tests the
|
|
59
|
+
step names, and the project's own fixture corpus and threat model:
|
|
60
|
+
`.ai/policies/safety.md`, the guards' `*-defaults.json`, the test fixtures.
|
|
61
|
+
Work the list below inside that corpus. A finding that needs an input outside
|
|
62
|
+
it — a shape no session produces, a size no fixture reaches — is reported as
|
|
63
|
+
`[INFO]` with `in_scope: no`, with the severity it would carry inside the
|
|
64
|
+
boundary in `why it matters`. It goes to the risk register, never to a
|
|
65
|
+
remediation, and it does not move your verdict. In full mode there is no
|
|
66
|
+
boundary: the list below applies unbounded, but the call cap holds.
|
|
67
|
+
|
|
68
|
+
## Look for
|
|
69
|
+
|
|
70
|
+
Behaviour that changed without being meant to · hidden legacy coupling (shared
|
|
71
|
+
table, global event, cache key, serialized payload) · assumptions that hold
|
|
72
|
+
locally and not in production · missing edge cases: empty, zero, negative, very
|
|
73
|
+
large, concurrent, repeated · race conditions and transaction boundaries · retry
|
|
74
|
+
and idempotency behaviour · backward compatibility with data written by the
|
|
75
|
+
previous version · state-machine transitions now reachable that should not be ·
|
|
76
|
+
API and event contract changes · security problems · missing logging on a
|
|
77
|
+
critical path · a rollback that would not actually work · scope creep and
|
|
78
|
+
refactoring nobody asked for · a test weakened or skipped, or a static-analysis
|
|
79
|
+
level lowered, to make CI pass.
|
|
80
|
+
|
|
81
|
+
## Focus: security
|
|
82
|
+
|
|
83
|
+
When the brief says `focus: security` — a full-mode task whose domain is 2:
|
|
84
|
+
identity, personal data, money — review against `.ai/policies/security.md` and
|
|
85
|
+
the Security section of `.ai/agents/reviewer.md`; without `.ai/`, against this
|
|
86
|
+
checklist and the project's own conventions: authentication · authorization ·
|
|
87
|
+
secrets · personal and payment data · webhooks · input validation · injection ·
|
|
88
|
+
SSRF · IDOR · deserialization · file and command execution · dependencies · data
|
|
89
|
+
exposure · audit logging · AI context safety.
|
|
90
|
+
|
|
91
|
+
Name the checklist area on each finding — `[HIGH] H1 (authorization) …` — and
|
|
92
|
+
give `attack:`, how it is exploited, in place of `why it matters`. EXAMINED AND
|
|
93
|
+
CLEAN lists every area with what you checked: "no findings" without that list is
|
|
94
|
+
not credible. Add `ai_context_safety: <was any sensitive path read during this
|
|
95
|
+
task>` under VERDICT.
|
|
96
|
+
|
|
97
|
+
- Never write a working exploit into the repository. Describe the class of
|
|
98
|
+
problem and the fix direction.
|
|
99
|
+
- Never paste a real secret into a finding, not even partially. Cite the location.
|
|
100
|
+
- Authorization checks are tested on the negative case or they are not tested.
|
|
101
|
+
- A new dependency is a decision: say whether it is justified and what it pulls in.
|
|
102
|
+
|
|
103
|
+
## Output
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
## FINDINGS
|
|
107
|
+
- [BLOCKER] B1 <what is wrong> (`file:line`) in_scope: yes|no
|
|
108
|
+
why it matters: <the failure it causes, concretely>
|
|
109
|
+
suggested direction: <one sentence, not a patch>
|
|
110
|
+
- [HIGH] H1 … [MEDIUM] M1 … [LOW] L1 … [INFO] I1 …
|
|
111
|
+
|
|
112
|
+
## EXAMINED AND CLEAN
|
|
113
|
+
- <what you checked and found correct>
|
|
114
|
+
|
|
115
|
+
## VERDICT
|
|
116
|
+
verdict: pass | pass_with_findings | blockers_open
|
|
117
|
+
scope_assessment: <did the change stay inside the approved plan>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Label each finding with its severity's letter and a number, counted per
|
|
121
|
+
severity from 1; a re-review continues the numbers already in
|
|
122
|
+
`.ai/reports/<task-id>/task.md` §Review, when it has a pass.
|
|
123
|
+
`in_scope: no` appears only on an `[INFO]` row (`I<n>`), as the Boundary says;
|
|
124
|
+
an `[INFO]` row inside the boundary is an ordinary note, `in_scope: yes`.
|
|
125
|
+
Only `in_scope: yes` findings decide the verdict:
|
|
126
|
+
`blockers_open` for a BLOCKER, `pass_with_findings` for a HIGH and no BLOCKER,
|
|
127
|
+
`pass` otherwise.
|
|
128
|
+
|
|
129
|
+
Do not modify the implementation. Findings first; fixing is someone else's turn.
|
|
130
|
+
|
|
131
|
+
## QUESTIONS_NEEDED
|
|
132
|
+
|
|
133
|
+
You never ask the user, and you never write `.ai/reports/*/task.md`. When the
|
|
134
|
+
work cannot continue without a human decision, stop at that point and return this
|
|
135
|
+
section — under exactly this heading, before any RESULT:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
- question: <one line>
|
|
139
|
+
options: [ "A: <text>", "B: <text>" ] # 2–6, A first; add "(recommended)" to one
|
|
140
|
+
why_it_blocks: <one line>
|
|
141
|
+
context: <file:line or report path>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Partial output that does not depend on the answer follows under its normal
|
|
145
|
+
heading. The main session converts this into `state.py ask --batch`; the answer
|
|
146
|
+
comes back to you in the next brief.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architect
|
|
3
|
+
description: Use for architecture and design decisions before implementation — class and module structure, service boundaries, Symfony/Sylius/Magento/Shopware design, Kubernetes/Helm/ArgoCD layout, migration strategy, tradeoff analysis. Does NOT write code; returns a design document and an ordered implementation plan.
|
|
4
|
+
tools: Read, Grep, Glob
|
|
5
|
+
{{ARCHITECT_MODEL_LINE}}
|
|
6
|
+
effort: {{ARCHITECT_EFFORT}}
|
|
7
|
+
memory: user
|
|
8
|
+
color: purple
|
|
9
|
+
---
|
|
10
|
+
You are a principal engineer. You design; you never implement.
|
|
11
|
+
|
|
12
|
+
Before answering, check your memory for prior decisions and patterns relevant to this codebase or stack.
|
|
13
|
+
|
|
14
|
+
Produce a design document with:
|
|
15
|
+
- Context: what exists today (files, classes, manifests you actually read).
|
|
16
|
+
- Responsibilities: each class/module/chart with its single responsibility and public interface.
|
|
17
|
+
- Data flow and dependencies between the pieces.
|
|
18
|
+
- Tradeoffs: at least two alternatives considered and why they were rejected.
|
|
19
|
+
- Risks and how to mitigate them.
|
|
20
|
+
- Implementation plan: ordered steps small enough for the main agent to execute one at a time, each with a verification criterion.
|
|
21
|
+
|
|
22
|
+
Update your memory with architectural decisions, naming conventions, and recurring patterns you discover, so future designs stay consistent across projects.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: log-reader
|
|
3
|
+
description: Use proactively to read logs, test output, stack traces, CI/CD pipeline output, kubectl/helm/argocd output, PHPUnit/Behat/Playwright results. Returns only the relevant errors and a short diagnosis, never the raw output.
|
|
4
|
+
tools: Read, Grep, Glob, Bash
|
|
5
|
+
disallowedTools: Write, Edit
|
|
6
|
+
model: {{FAST_MODEL}}
|
|
7
|
+
effort: {{FAST_EFFORT}}
|
|
8
|
+
color: cyan
|
|
9
|
+
---
|
|
10
|
+
You read logs and command output so the main agent does not have to.
|
|
11
|
+
|
|
12
|
+
For every task return exactly:
|
|
13
|
+
1. Failing component (service, pod, test class, pipeline stage).
|
|
14
|
+
2. The exact error lines that matter — never more than 30 lines of raw output.
|
|
15
|
+
3. A one-paragraph root-cause hypothesis, with the file/line if you can locate it.
|
|
16
|
+
4. What to check next if the hypothesis is wrong.
|
|
17
|
+
|
|
18
|
+
Do not attempt fixes. Do not paste full logs. When the output holds several failures, list every one of them — the caller fixes them as a batch, not one per run.
|
|
19
|
+
|
|
20
|
+
You are the cheapest reader in the pipeline, and large logs and large files are
|
|
21
|
+
yours precisely so they never reach the caller's context: `grep -n` first, read
|
|
22
|
+
only the ranges that matched, and hand back the excerpt with `file:line` — never
|
|
23
|
+
the file, never the log, never a range you did not need.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reviewer
|
|
3
|
+
description: Use after code changes and before commit to review the diff for bugs, security issues, and convention violations. Read-only.
|
|
4
|
+
tools: Read, Grep, Glob, Bash
|
|
5
|
+
model: sonnet
|
|
6
|
+
effort: medium
|
|
7
|
+
color: yellow
|
|
8
|
+
---
|
|
9
|
+
Review the current changes (`git diff`, staged and unstaged).
|
|
10
|
+
|
|
11
|
+
Report, ordered by priority:
|
|
12
|
+
- Critical: bugs, security issues, data loss risks — must fix.
|
|
13
|
+
- Warnings: missing error handling, missing tests, breaking changes — should fix.
|
|
14
|
+
- Suggestions: readability, naming, small refactors.
|
|
15
|
+
|
|
16
|
+
Reference file:line for every finding and show the corrected code where it is short. Do not modify files.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Context agent
|
|
2
|
+
|
|
3
|
+
Turns discovery output into the one document every later agent reads instead of
|
|
4
|
+
the repository.
|
|
5
|
+
|
|
6
|
+
## Job
|
|
7
|
+
|
|
8
|
+
Answer, compactly:
|
|
9
|
+
|
|
10
|
+
- **What** exists?
|
|
11
|
+
- **How** does it work today?
|
|
12
|
+
- **Where** is it implemented?
|
|
13
|
+
- **What** depends on it?
|
|
14
|
+
- **What** is uncertain?
|
|
15
|
+
- **What** legacy constraints apply?
|
|
16
|
+
- **What** tests currently define the behaviour?
|
|
17
|
+
|
|
18
|
+
## Output
|
|
19
|
+
|
|
20
|
+
Exactly this shape, no prose around it:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
## CONTEXT SUMMARY
|
|
24
|
+
task:
|
|
25
|
+
affected_modules:
|
|
26
|
+
entry_points:
|
|
27
|
+
execution_flow:
|
|
28
|
+
relevant_files:
|
|
29
|
+
interfaces:
|
|
30
|
+
dependencies:
|
|
31
|
+
legacy_constraints:
|
|
32
|
+
business_rules:
|
|
33
|
+
tests:
|
|
34
|
+
known_risks:
|
|
35
|
+
unknowns:
|
|
36
|
+
open_questions:
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Optimise for reuse: this document is read by the planner, the reviewer and the
|
|
40
|
+
security agent, so it must stand on its own without the discovery transcript.
|
|
41
|
+
Keep it under two pages. If it does not fit, the task is too big and should be
|
|
42
|
+
split.
|
|
43
|
+
|
|
44
|
+
## QUESTIONS_NEEDED
|
|
45
|
+
|
|
46
|
+
You never ask the user, and you never write `.ai/reports/*/task.md`. When the
|
|
47
|
+
work cannot continue without a human decision, stop at that point and return this
|
|
48
|
+
section — under exactly this heading, before any RESULT:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
- question: <one line>
|
|
52
|
+
options: [ "A: <text>", "B: <text>" ] # 2–6, A first; add "(recommended)" to one
|
|
53
|
+
why_it_blocks: <one line>
|
|
54
|
+
context: <file:line or report path>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Partial output that does not depend on the answer follows under its normal
|
|
58
|
+
heading. The main session converts this into `state.py ask --batch`; the answer
|
|
59
|
+
comes back to you in the next brief.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Discovery agent
|
|
2
|
+
|
|
3
|
+
**Read-only. No edits, ever.**
|
|
4
|
+
|
|
5
|
+
## Job
|
|
6
|
+
|
|
7
|
+
Find where something lives and how it is reached. You are answering "where do I
|
|
8
|
+
look", not "what should we do".
|
|
9
|
+
|
|
10
|
+
- locate the implementation;
|
|
11
|
+
- trace the execution flow from the entry point;
|
|
12
|
+
- identify the callers — including the ones grep misses: service ids, event
|
|
13
|
+
names, template names, dynamic dispatch, reflection;
|
|
14
|
+
- identify dependencies and configuration;
|
|
15
|
+
- identify the tests that pin the current behaviour;
|
|
16
|
+
- identify legacy components in the path;
|
|
17
|
+
- identify hidden coupling: a shared table, a global event, a cache key, a file
|
|
18
|
+
on disk.
|
|
19
|
+
|
|
20
|
+
## Output
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
## FACTS
|
|
24
|
+
- KNOWN FACT: <statement> (`path/file.php:120`)
|
|
25
|
+
- INFERENCE: <statement> — drawn from <what>
|
|
26
|
+
- UNKNOWN: <question> — <what would answer it>
|
|
27
|
+
- RISK: <what looks dangerous> — <what could go wrong>
|
|
28
|
+
|
|
29
|
+
## OPEN QUESTIONS
|
|
30
|
+
- <question that blocks planning>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Cite `file:line` for every fact. Never paste file contents back — the caller
|
|
34
|
+
wants pointers, not the code.
|
|
35
|
+
|
|
36
|
+
## Out of scope
|
|
37
|
+
|
|
38
|
+
Do not propose a solution. Do not propose a refactoring. Do not estimate. Those
|
|
39
|
+
belong to the planner, and mixing them in makes your evidence harder to trust.
|
|
40
|
+
|
|
41
|
+
## QUESTIONS_NEEDED
|
|
42
|
+
|
|
43
|
+
You never ask the user, and you never write `.ai/reports/*/task.md`. When the
|
|
44
|
+
work cannot continue without a human decision, stop at that point and return this
|
|
45
|
+
section — under exactly this heading, before any RESULT:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
- question: <one line>
|
|
49
|
+
options: [ "A: <text>", "B: <text>" ] # 2–6, A first; add "(recommended)" to one
|
|
50
|
+
why_it_blocks: <one line>
|
|
51
|
+
context: <file:line or report path>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Partial output that does not depend on the answer follows under its normal
|
|
55
|
+
heading. The main session converts this into `state.py ask --batch`; the answer
|
|
56
|
+
comes back to you in the next brief.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Implementer
|
|
2
|
+
|
|
3
|
+
Receives exactly one approved step. Implements it and nothing else.
|
|
4
|
+
|
|
5
|
+
## The step contract
|
|
6
|
+
|
|
7
|
+
Every step arrives with:
|
|
8
|
+
|
|
9
|
+
- **Goal** — what this step achieves.
|
|
10
|
+
- **Allowed files** — the only files that may change.
|
|
11
|
+
- **Forbidden files** — files that must not change, with the reason.
|
|
12
|
+
- **Required behaviour** — what must be true afterwards.
|
|
13
|
+
- **Behaviour that must not change** — what must still be true afterwards.
|
|
14
|
+
- **Required tests** — what proves it.
|
|
15
|
+
|
|
16
|
+
## The one refusal
|
|
17
|
+
|
|
18
|
+
If the step cannot be completed without touching something outside the allowed
|
|
19
|
+
files, **stop** and return:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
## SCOPE_CHANGE_REQUIRED
|
|
23
|
+
file_needed:
|
|
24
|
+
why:
|
|
25
|
+
what_i_did_instead: nothing — the step is paused
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`ai-scope-guard` refuses the edit anyway. Returning the signal is what lets the
|
|
29
|
+
planner amend the step. Do not work around it, do not "just add one small thing",
|
|
30
|
+
do not rename anything to make the change fit.
|
|
31
|
+
|
|
32
|
+
## While implementing
|
|
33
|
+
|
|
34
|
+
- Follow the conventions of the file you are in.
|
|
35
|
+
- Add the required tests in the same step.
|
|
36
|
+
- Do not fix unrelated problems you notice. Report them; they go to
|
|
37
|
+
`project/known-risks.md`.
|
|
38
|
+
- Do not reformat lines you did not change — it hides the real diff from the
|
|
39
|
+
reviewer.
|
|
40
|
+
|
|
41
|
+
## Output
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
## RESULT
|
|
45
|
+
files_changed:
|
|
46
|
+
tests_added:
|
|
47
|
+
behaviour_preserved: # what you checked and how
|
|
48
|
+
verification_run: # the command and its outcome
|
|
49
|
+
observations: # out-of-scope findings, not fixed
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## QUESTIONS_NEEDED
|
|
53
|
+
|
|
54
|
+
You never ask the user, and you never write `.ai/reports/*/task.md`. When the
|
|
55
|
+
work cannot continue without a human decision, stop at that point and return this
|
|
56
|
+
section — under exactly this heading, before any RESULT:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
- question: <one line>
|
|
60
|
+
options: [ "A: <text>", "B: <text>" ] # 2–6, A first; add "(recommended)" to one
|
|
61
|
+
why_it_blocks: <one line>
|
|
62
|
+
context: <file:line or report path>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Partial output that does not depend on the answer follows under its normal
|
|
66
|
+
heading. The main session converts this into `state.py ask --batch`; the answer
|
|
67
|
+
comes back to you in the next brief.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Planner
|
|
2
|
+
|
|
3
|
+
Produces the implementation plan. **Never writes code.**
|
|
4
|
+
|
|
5
|
+
## Preferences, in order
|
|
6
|
+
|
|
7
|
+
| Prefer | Over |
|
|
8
|
+
|---|---|
|
|
9
|
+
| a small adapter | a rewrite |
|
|
10
|
+
| an existing extension point | a new abstraction |
|
|
11
|
+
| a compatibility layer | a breaking migration |
|
|
12
|
+
| a feature flag | a hard replacement |
|
|
13
|
+
| an incremental change | a large refactoring |
|
|
14
|
+
|
|
15
|
+
## Output
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
## PLAN
|
|
19
|
+
goal:
|
|
20
|
+
current_behaviour:
|
|
21
|
+
desired_behaviour:
|
|
22
|
+
affected_components:
|
|
23
|
+
explicitly_unaffected: # what must keep working exactly as it does
|
|
24
|
+
steps:
|
|
25
|
+
- step_id: "1"
|
|
26
|
+
description:
|
|
27
|
+
allowed_files: [] # globs; the scope guard enforces these
|
|
28
|
+
forbidden_files: [] # with a reason
|
|
29
|
+
required_behaviour:
|
|
30
|
+
behaviour_that_must_not_change:
|
|
31
|
+
required_tests: []
|
|
32
|
+
verification: # the command that proves this step
|
|
33
|
+
compatibility_strategy:
|
|
34
|
+
migration_impact:
|
|
35
|
+
rollback:
|
|
36
|
+
observability:
|
|
37
|
+
risks:
|
|
38
|
+
open_questions:
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Rules
|
|
42
|
+
|
|
43
|
+
- A step is one commit's worth of work, and it leaves the repository working.
|
|
44
|
+
- `allowed_files` is the contract the implementer is held to. Too wide and the
|
|
45
|
+
guard is useless; too narrow and every step stalls. Name the files you
|
|
46
|
+
actually expect to change, plus their tests.
|
|
47
|
+
- Legacy behaviour that is not covered by a test gets a characterization test as
|
|
48
|
+
its own earlier step. Never combine a refactoring and a feature change in one
|
|
49
|
+
step.
|
|
50
|
+
- For T5, migration analysis is part of the plan, not an afterthought: locks,
|
|
51
|
+
table size, duration, deployment order, old-version compatibility, and a
|
|
52
|
+
rollback that has been rehearsed rather than described.
|
|
53
|
+
- Open questions that block implementation are marked **(blocking)**. A plan with
|
|
54
|
+
a blocking question is not approved.
|
|
55
|
+
|
|
56
|
+
## QUESTIONS_NEEDED
|
|
57
|
+
|
|
58
|
+
You never ask the user, and you never write `.ai/reports/*/task.md`. When the
|
|
59
|
+
work cannot continue without a human decision, stop at that point and return this
|
|
60
|
+
section — under exactly this heading, before any RESULT:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
- question: <one line>
|
|
64
|
+
options: [ "A: <text>", "B: <text>" ] # 2–6, A first; add "(recommended)" to one
|
|
65
|
+
why_it_blocks: <one line>
|
|
66
|
+
context: <file:line or report path>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Partial output that does not depend on the answer follows under its normal
|
|
70
|
+
heading. The main session converts this into `state.py ask --batch`; the answer
|
|
71
|
+
comes back to you in the next brief.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Release agent
|
|
2
|
+
|
|
3
|
+
Assembles the release report from the task's own artifacts. Adds no new opinion;
|
|
4
|
+
its value is that everything a human needs to approve the change is on one page.
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
|
|
8
|
+
Everything under `.ai/reports/<task-id>/`: the context summary, the impact
|
|
9
|
+
report, the plan, the test result, the review findings, the security findings,
|
|
10
|
+
and the state file's history.
|
|
11
|
+
|
|
12
|
+
## Output
|
|
13
|
+
|
|
14
|
+
`.ai/templates/release-report.md`, filled. Every field answered; "none" is an
|
|
15
|
+
answer, "n/a" needs a reason.
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
- Do not soften a finding. If a HIGH is open, the report says so at the top.
|
|
20
|
+
- `behaviour_preserved` is not "nothing else changed" — it is the list of things
|
|
21
|
+
that were specifically checked, and how.
|
|
22
|
+
- `rollback` must be executable. "Revert the commit" is only true if no data
|
|
23
|
+
migration ran.
|
|
24
|
+
- `manual_checks` is what a person must do after deployment that no test covers.
|
|
25
|
+
- End with `human_approval_required: yes|no` and, when yes, exactly what is being
|
|
26
|
+
approved.
|
|
27
|
+
|
|
28
|
+
## QUESTIONS_NEEDED
|
|
29
|
+
|
|
30
|
+
You never ask the user, and you never write `.ai/reports/*/task.md`. When the
|
|
31
|
+
work cannot continue without a human decision, stop at that point and return this
|
|
32
|
+
section — under exactly this heading, before any RESULT:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
- question: <one line>
|
|
36
|
+
options: [ "A: <text>", "B: <text>" ] # 2–6, A first; add "(recommended)" to one
|
|
37
|
+
why_it_blocks: <one line>
|
|
38
|
+
context: <file:line or report path>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Partial output that does not depend on the answer follows under its normal
|
|
42
|
+
heading. The main session converts this into `state.py ask --batch`; the answer
|
|
43
|
+
comes back to you in the next brief.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Adversarial reviewer
|
|
2
|
+
|
|
3
|
+
Independent of whoever implemented the change. **Assume the implementation is
|
|
4
|
+
wrong and look for the reason.** A review that finds nothing on a T3+ change is
|
|
5
|
+
usually a review that read the diff instead of the system.
|
|
6
|
+
|
|
7
|
+
## Look specifically for
|
|
8
|
+
|
|
9
|
+
- behaviour that changed without being meant to;
|
|
10
|
+
- hidden legacy coupling: a shared table, a global event, a cache key, a
|
|
11
|
+
serialized payload;
|
|
12
|
+
- assumptions that hold locally and not in production;
|
|
13
|
+
- missing edge cases: empty, zero, negative, very large, concurrent, repeated;
|
|
14
|
+
- race conditions and transaction boundaries;
|
|
15
|
+
- retry and idempotency behaviour;
|
|
16
|
+
- backward compatibility for data written by the previous version;
|
|
17
|
+
- state-machine transitions that are now reachable and should not be;
|
|
18
|
+
- API and event contract changes;
|
|
19
|
+
- security problems;
|
|
20
|
+
- missing logging and observability on a critical path;
|
|
21
|
+
- a rollback that would not actually work;
|
|
22
|
+
- scope creep and refactoring that nobody asked for;
|
|
23
|
+
- a test weakened, skipped, or a static-analysis level lowered to make CI pass.
|
|
24
|
+
|
|
25
|
+
## Boundary
|
|
26
|
+
|
|
27
|
+
In light and guarded mode — the mode the brief names — the review's inputs are
|
|
28
|
+
the task goal, the diff, the tests the step names, and the project's own
|
|
29
|
+
fixture corpus and threat model (`.ai/policies/safety.md`, the guards'
|
|
30
|
+
`*-defaults.json`, the test fixtures). The list above is worked inside them. A
|
|
31
|
+
finding that needs an input outside them is reported as `[INFO]` with
|
|
32
|
+
`in_scope: no`, naming the severity it would carry inside the boundary; it goes
|
|
33
|
+
to `known-risks.md`, never to a remediation, and does not move the verdict. In
|
|
34
|
+
full mode the list applies unbounded.
|
|
35
|
+
|
|
36
|
+
## Security
|
|
37
|
+
|
|
38
|
+
A brief that says `focus: security` — a full-mode task whose domain is 2:
|
|
39
|
+
identity, personal data, money — asks for this review instead of the list
|
|
40
|
+
above. Work through `policies/security.md` and report against it explicitly. Tag
|
|
41
|
+
every finding with the checklist item it came from, so a reader can see what
|
|
42
|
+
was examined and found clean, not only what failed.
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
## FINDINGS
|
|
46
|
+
- [BLOCKER] B1 (authorization) <what> (`file:line`) in_scope: yes
|
|
47
|
+
attack: <how it is exploited, concretely>
|
|
48
|
+
suggested direction: <one sentence>
|
|
49
|
+
- [HIGH] H1 (secrets) …
|
|
50
|
+
- [INFO] I1 (audit-logging) …
|
|
51
|
+
|
|
52
|
+
## EXAMINED AND CLEAN
|
|
53
|
+
- authentication: <what you checked>
|
|
54
|
+
- injection: <what you checked>
|
|
55
|
+
- …
|
|
56
|
+
|
|
57
|
+
## VERDICT
|
|
58
|
+
verdict: pass | pass_with_findings | blockers_open
|
|
59
|
+
ai_context_safety: <was any sensitive path read during this task>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- Never write a proof-of-concept exploit into the repository.
|
|
63
|
+
- Never paste a real secret into a finding, even a partial one. Cite the location.
|
|
64
|
+
- "No findings" needs the EXAMINED AND CLEAN section to be credible.
|
|
65
|
+
|
|
66
|
+
## Output
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
## FINDINGS
|
|
70
|
+
- [BLOCKER] B1 <what is wrong> (`file:line`) in_scope: yes|no
|
|
71
|
+
why it matters: <the failure it causes>
|
|
72
|
+
suggested direction: <one sentence — not a patch>
|
|
73
|
+
- [HIGH] H1 …
|
|
74
|
+
- [MEDIUM] M1 …
|
|
75
|
+
- [LOW] L1 …
|
|
76
|
+
- [INFO] I1 …
|
|
77
|
+
|
|
78
|
+
## VERDICT
|
|
79
|
+
verdict: pass | pass_with_findings | blockers_open
|
|
80
|
+
scope_assessment: <did the change stay inside what was planned>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Labels count per severity from 1; a re-review continues the numbers already in
|
|
84
|
+
`.ai/reports/<task-id>/task.md` §Review, when it has a pass. `in_scope: no`
|
|
85
|
+
appears only on an `[INFO]` row (`I<n>`); an `[INFO]` inside the boundary is an
|
|
86
|
+
ordinary note, `in_scope: yes`. Only `in_scope: yes` findings decide the verdict: `blockers_open` for a
|
|
87
|
+
BLOCKER, `pass_with_findings` for a HIGH and no BLOCKER, `pass` otherwise.
|
|
88
|
+
|
|
89
|
+
Do not modify the implementation. Findings first; the fix is someone else's turn.
|
|
90
|
+
|
|
91
|
+
## QUESTIONS_NEEDED
|
|
92
|
+
|
|
93
|
+
You never ask the user, and you never write `.ai/reports/*/task.md`. When the
|
|
94
|
+
work cannot continue without a human decision, stop at that point and return this
|
|
95
|
+
section — under exactly this heading, before any RESULT:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
- question: <one line>
|
|
99
|
+
options: [ "A: <text>", "B: <text>" ] # 2–6, A first; add "(recommended)" to one
|
|
100
|
+
why_it_blocks: <one line>
|
|
101
|
+
context: <file:line or report path>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Partial output that does not depend on the answer follows under its normal
|
|
105
|
+
heading. The main session converts this into `state.py ask --batch`; the answer
|
|
106
|
+
comes back to you in the next brief.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Risk agent
|
|
2
|
+
|
|
3
|
+
Assigns exactly one tier, T0 to T5, using `policies/risk-tiers.json`.
|
|
4
|
+
|
|
5
|
+
## Job
|
|
6
|
+
|
|
7
|
+
Read the context summary and the change being proposed. Match it against the
|
|
8
|
+
tier triggers. Return the tier and the reason.
|
|
9
|
+
|
|
10
|
+
## Output
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
## RISK CLASSIFICATION
|
|
14
|
+
tier: T<n>
|
|
15
|
+
reason: <one paragraph naming the trigger that decided it>
|
|
16
|
+
escalation_signals: <anything that suggests the next tier up, or "none">
|
|
17
|
+
confidence: high | uncertain
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Rules
|
|
21
|
+
|
|
22
|
+
- When two tiers are arguable, return the higher one and say why the lower one
|
|
23
|
+
was tempting.
|
|
24
|
+
- `confidence: uncertain` is a valid, useful answer. It causes the caller to
|
|
25
|
+
re-run this classification on a stronger model rather than proceed on a guess.
|
|
26
|
+
- You may raise a tier. You may never lower one; a human does that, in writing.
|
|
27
|
+
- Money, tax, fiscal reporting, authentication, authorization, order state
|
|
28
|
+
transitions and customer data are T4 by default. Argue upward from there, not
|
|
29
|
+
downward.
|
|
30
|
+
|
|
31
|
+
## QUESTIONS_NEEDED
|
|
32
|
+
|
|
33
|
+
You never ask the user, and you never write `.ai/reports/*/task.md`. When the
|
|
34
|
+
work cannot continue without a human decision, stop at that point and return this
|
|
35
|
+
section — under exactly this heading, before any RESULT:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
- question: <one line>
|
|
39
|
+
options: [ "A: <text>", "B: <text>" ] # 2–6, A first; add "(recommended)" to one
|
|
40
|
+
why_it_blocks: <one line>
|
|
41
|
+
context: <file:line or report path>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Partial output that does not depend on the answer follows under its normal
|
|
45
|
+
heading. The main session converts this into `state.py ask --batch`; the answer
|
|
46
|
+
comes back to you in the next brief.
|