@agent-profile/web 0.1.5 → 0.2.0
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/build/client/_app/immutable/chunks/4FiW6_9u.js +1 -0
- package/build/client/_app/immutable/chunks/4FiW6_9u.js.br +2 -0
- package/build/client/_app/immutable/chunks/4FiW6_9u.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CF39CcoQ.js +3 -0
- package/build/client/_app/immutable/chunks/CF39CcoQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/CF39CcoQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CRcOA4L4.js +3 -0
- package/build/client/_app/immutable/chunks/CRcOA4L4.js.br +0 -0
- package/build/client/_app/immutable/chunks/CRcOA4L4.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{D0_SwbnT.js → Cc9Av3g9.js} +1 -1
- package/build/client/_app/immutable/chunks/Cc9Av3g9.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cc9Av3g9.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BN4Ca4cJ.js → DUEBfJ-c.js} +1 -1
- package/build/client/_app/immutable/chunks/DUEBfJ-c.js.br +4 -0
- package/build/client/_app/immutable/chunks/DUEBfJ-c.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DRoN73NW.js → DvNNrklS.js} +1 -1
- package/build/client/_app/immutable/chunks/DvNNrklS.js.br +2 -0
- package/build/client/_app/immutable/chunks/DvNNrklS.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.B45QQayJ.js → app.ZULfIbKE.js} +2 -2
- package/build/client/_app/immutable/entry/app.ZULfIbKE.js.br +0 -0
- package/build/client/_app/immutable/entry/app.ZULfIbKE.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.XwZvWTgq.js +1 -0
- package/build/client/_app/immutable/entry/start.XwZvWTgq.js.br +0 -0
- package/build/client/_app/immutable/entry/start.XwZvWTgq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.JRffyfUR.js → 0.BTaKrNnR.js} +1 -1
- package/build/client/_app/immutable/nodes/0.BTaKrNnR.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.BTaKrNnR.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.56EgwKsF.js → 1.B4GcuHvH.js} +1 -1
- package/build/client/_app/immutable/nodes/1.B4GcuHvH.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.B4GcuHvH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{10.Bhdlxk-S.js → 10.IHQDAuDz.js} +1 -1
- package/build/client/_app/immutable/nodes/10.IHQDAuDz.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.IHQDAuDz.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{11.DAqRx2TI.js → 11.B5APptAv.js} +1 -1
- package/build/client/_app/immutable/nodes/11.B5APptAv.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.B5APptAv.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{2.CI-wpOC8.js → 2.BHUaWFMZ.js} +2 -2
- package/build/client/_app/immutable/nodes/2.BHUaWFMZ.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.BHUaWFMZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.Bphawycs.js → 3.DIhh3cSh.js} +1 -1
- package/build/client/_app/immutable/nodes/3.DIhh3cSh.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.DIhh3cSh.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{4.BGFkNM65.js → 4.DjkBBmOF.js} +1 -1
- package/build/client/_app/immutable/nodes/4.DjkBBmOF.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.DjkBBmOF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.VTs5grF0.js → 5.BPcSAYs6.js} +1 -1
- package/build/client/_app/immutable/nodes/5.BPcSAYs6.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.BPcSAYs6.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.CndSdLIk.js → 6.DZa-5yoH.js} +1 -1
- package/build/client/_app/immutable/nodes/6.DZa-5yoH.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.DZa-5yoH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.DpFk4StA.js → 7.v6t5o5IK.js} +1 -1
- package/build/client/_app/immutable/nodes/7.v6t5o5IK.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.v6t5o5IK.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.UWqOmBTc.js +1 -0
- package/build/client/_app/immutable/nodes/8.UWqOmBTc.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.UWqOmBTc.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.xVCOCMfn.js +3 -0
- package/build/client/_app/immutable/nodes/9.xVCOCMfn.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.xVCOCMfn.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/chunks/{0-DWEpTDaF.js → 0-IAeZ4YD5.js} +8 -8
- package/build/server/chunks/{0-DWEpTDaF.js.map → 0-IAeZ4YD5.js.map} +1 -1
- package/build/server/chunks/{1-B68UkVTE.js → 1--R3gZqoU.js} +3 -3
- package/build/server/chunks/{1-B68UkVTE.js.map → 1--R3gZqoU.js.map} +1 -1
- package/build/server/chunks/10-B2v4GVik.js +9 -0
- package/build/server/chunks/{10-D7op0myD.js.map → 10-B2v4GVik.js.map} +1 -1
- package/build/server/chunks/{11-Ms74wtl9.js → 11-DbxvesJH.js} +4 -4
- package/build/server/chunks/{11-Ms74wtl9.js.map → 11-DbxvesJH.js.map} +1 -1
- package/build/server/chunks/{2-bmpngDVe.js → 2-CHviyPyI.js} +3 -3
- package/build/server/chunks/{2-bmpngDVe.js.map → 2-CHviyPyI.js.map} +1 -1
- package/build/server/chunks/3-CdNRNP5d.js +9 -0
- package/build/server/chunks/{3-BkezOAX7.js.map → 3-CdNRNP5d.js.map} +1 -1
- package/build/server/chunks/{4-CSfQwQwV.js → 4-CCj_Mhpz.js} +5 -5
- package/build/server/chunks/{4-CSfQwQwV.js.map → 4-CCj_Mhpz.js.map} +1 -1
- package/build/server/chunks/5-CqBVRlNU.js +9 -0
- package/build/server/chunks/{5-D_pZV4fS.js.map → 5-CqBVRlNU.js.map} +1 -1
- package/build/server/chunks/{6-DcbRMrH1.js → 6-BHxeFzUE.js} +3 -3
- package/build/server/chunks/{6-DcbRMrH1.js.map → 6-BHxeFzUE.js.map} +1 -1
- package/build/server/chunks/{7-BsMFIBGU.js → 7-BUFOaHdC.js} +6 -6
- package/build/server/chunks/{7-BsMFIBGU.js.map → 7-BUFOaHdC.js.map} +1 -1
- package/build/server/chunks/8-BbviFV5J.js +9 -0
- package/build/server/chunks/{8-DWleYW_e.js.map → 8-BbviFV5J.js.map} +1 -1
- package/build/server/chunks/{9-tHCipeiW.js → 9-kCTRECfO.js} +4 -4
- package/build/server/chunks/{9-tHCipeiW.js.map → 9-kCTRECfO.js.map} +1 -1
- package/build/server/chunks/{Badge-BYK3z3lr.js → Badge-DCQxSQCS.js} +2 -2
- package/build/server/chunks/{Badge-BYK3z3lr.js.map → Badge-DCQxSQCS.js.map} +1 -1
- package/build/server/chunks/{SafetyBadge-BXNCgLE-.js → SafetyBadge-BxEGojgX.js} +2 -2
- package/build/server/chunks/{SafetyBadge-BXNCgLE-.js.map → SafetyBadge-BxEGojgX.js.map} +1 -1
- package/build/server/chunks/{_layout.svelte-Cv35k3JT.js → _layout.svelte-CQM4xaaq.js} +5 -5
- package/build/server/chunks/{_layout.svelte-Cv35k3JT.js.map → _layout.svelte-CQM4xaaq.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-BftcSD3f.js → _page.svelte-1wUrXGW-.js} +3 -3
- package/build/server/chunks/{_page.svelte-BftcSD3f.js.map → _page.svelte-1wUrXGW-.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-CmuUQI4Y.js → _page.svelte-2W3EhlSt.js} +43 -20
- package/build/server/chunks/_page.svelte-2W3EhlSt.js.map +1 -0
- package/build/server/chunks/{_page.svelte-B-Kaw1RF.js → _page.svelte-B3CasgD8.js} +2 -2
- package/build/server/chunks/{_page.svelte-B-Kaw1RF.js.map → _page.svelte-B3CasgD8.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-Cat8tEeF.js → _page.svelte-B6d3qwTm.js} +4 -4
- package/build/server/chunks/{_page.svelte-Cat8tEeF.js.map → _page.svelte-B6d3qwTm.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-CIEY8g8A.js → _page.svelte-BikYFdJv.js} +4 -4
- package/build/server/chunks/{_page.svelte-CIEY8g8A.js.map → _page.svelte-BikYFdJv.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-DyI46sDh.js → _page.svelte-D8ffqrO3.js} +3 -3
- package/build/server/chunks/{_page.svelte-DyI46sDh.js.map → _page.svelte-D8ffqrO3.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-DLQqGym0.js → _page.svelte-DfUc4h7g.js} +4 -4
- package/build/server/chunks/{_page.svelte-DLQqGym0.js.map → _page.svelte-DfUc4h7g.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-DZX4Bixr.js → _page.svelte-sygmDxbg.js} +5 -5
- package/build/server/chunks/{_page.svelte-DZX4Bixr.js.map → _page.svelte-sygmDxbg.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-DHNevyzi.js → _page.svelte-wL3fdD1l.js} +4 -4
- package/build/server/chunks/{_page.svelte-DHNevyzi.js.map → _page.svelte-wL3fdD1l.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-CUnw0pLx.js → _page.svelte-xTZOj1o8.js} +3 -3
- package/build/server/chunks/{_page.svelte-CUnw0pLx.js.map → _page.svelte-xTZOj1o8.js.map} +1 -1
- package/build/server/chunks/{_server.ts-sMKRiXFg.js → _server.ts-B7znNtap.js} +4 -4
- package/build/server/chunks/{_server.ts-sMKRiXFg.js.map → _server.ts-B7znNtap.js.map} +1 -1
- package/build/server/chunks/{_server.ts-DHt1bGpF.js → _server.ts-BjPyYUki.js} +3 -3
- package/build/server/chunks/{_server.ts-DHt1bGpF.js.map → _server.ts-BjPyYUki.js.map} +1 -1
- package/build/server/chunks/{_server.ts-BUQYdxPs.js → _server.ts-C8Fe0kql.js} +2 -2
- package/build/server/chunks/{_server.ts-BUQYdxPs.js.map → _server.ts-C8Fe0kql.js.map} +1 -1
- package/build/server/chunks/{_server.ts-5396UuLQ.js → _server.ts-D1Ja2hnG.js} +2 -2
- package/build/server/chunks/{_server.ts-5396UuLQ.js.map → _server.ts-D1Ja2hnG.js.map} +1 -1
- package/build/server/chunks/{_server.ts-Dq1jAomo.js → _server.ts-DsbQ4b7x.js} +3 -3
- package/build/server/chunks/{_server.ts-Dq1jAomo.js.map → _server.ts-DsbQ4b7x.js.map} +1 -1
- package/build/server/chunks/{_server.ts-CvdpZfED.js → _server.ts-hEGlXjuB.js} +2 -2
- package/build/server/chunks/{_server.ts-CvdpZfED.js.map → _server.ts-hEGlXjuB.js.map} +1 -1
- package/build/server/chunks/{client-92HF3fc9.js → client-h6Frgnzt.js} +3 -3
- package/build/server/chunks/{client-92HF3fc9.js.map → client-h6Frgnzt.js.map} +1 -1
- package/build/server/chunks/{dev-Duv_-rxF.js → dev-BdIdjvaY.js} +216 -82
- package/build/server/chunks/dev-BdIdjvaY.js.map +1 -0
- package/build/server/chunks/{doctorSummary-Bm0dY6PW.js → doctorSummary-FyoWuR3R.js} +3 -3
- package/build/server/chunks/{doctorSummary-Bm0dY6PW.js.map → doctorSummary-FyoWuR3R.js.map} +1 -1
- package/build/server/chunks/{error.svelte-BEI8QxGW.js → error.svelte-DYzh-S9t.js} +4 -4
- package/build/server/chunks/{error.svelte-BEI8QxGW.js.map → error.svelte-DYzh-S9t.js.map} +1 -1
- package/build/server/chunks/{internal-DBeni9My.js → internal-Dz8-ksla.js} +20 -15
- package/build/server/chunks/internal-Dz8-ksla.js.map +1 -0
- package/build/server/chunks/{marketingSeo-Do5o0grg.js → marketingSeo-6Ec8IVzY.js} +2 -2
- package/build/server/chunks/{marketingSeo-Do5o0grg.js.map → marketingSeo-6Ec8IVzY.js.map} +1 -1
- package/build/server/chunks/{profileApiHelpers-BFzohffv.js → profileApiHelpers-CUuQdn1G.js} +2 -2
- package/build/server/chunks/{profileApiHelpers-BFzohffv.js.map → profileApiHelpers-CUuQdn1G.js.map} +1 -1
- package/build/server/chunks/{projectContext-Cxsfz84C.js → projectContext-fk5wtjwg.js} +988 -29
- package/build/server/chunks/projectContext-fk5wtjwg.js.map +1 -0
- package/build/server/chunks/{src2-DNqJAXv6.js → src2-BFardyAd.js} +2 -2
- package/build/server/chunks/src2-BFardyAd.js.map +1 -0
- package/build/server/chunks/{src3-jm480tTA.js → src3-vKD2iyNK.js} +134 -2
- package/build/server/chunks/src3-vKD2iyNK.js.map +1 -0
- package/build/server/index.js +4 -5
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +19 -19
- package/build/server/manifest.js.map +1 -1
- package/package.json +7 -7
- package/build/client/_app/immutable/chunks/6SrQtk22.js +0 -3
- package/build/client/_app/immutable/chunks/6SrQtk22.js.br +0 -0
- package/build/client/_app/immutable/chunks/6SrQtk22.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B1X0Iqjr.js +0 -3
- package/build/client/_app/immutable/chunks/B1X0Iqjr.js.br +0 -0
- package/build/client/_app/immutable/chunks/B1X0Iqjr.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BN4Ca4cJ.js.br +0 -0
- package/build/client/_app/immutable/chunks/BN4Ca4cJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BYeYmN2n.js +0 -1
- package/build/client/_app/immutable/chunks/BYeYmN2n.js.br +0 -2
- package/build/client/_app/immutable/chunks/BYeYmN2n.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D0_SwbnT.js.br +0 -0
- package/build/client/_app/immutable/chunks/D0_SwbnT.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DRoN73NW.js.br +0 -2
- package/build/client/_app/immutable/chunks/DRoN73NW.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.B45QQayJ.js.br +0 -0
- package/build/client/_app/immutable/entry/app.B45QQayJ.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.BIlQ_snM.js +0 -1
- package/build/client/_app/immutable/entry/start.BIlQ_snM.js.br +0 -0
- package/build/client/_app/immutable/entry/start.BIlQ_snM.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.JRffyfUR.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.JRffyfUR.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.56EgwKsF.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.56EgwKsF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.Bhdlxk-S.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.Bhdlxk-S.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.DAqRx2TI.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.DAqRx2TI.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.CI-wpOC8.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CI-wpOC8.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.Bphawycs.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.Bphawycs.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.BGFkNM65.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.BGFkNM65.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.VTs5grF0.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.VTs5grF0.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.CndSdLIk.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.CndSdLIk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.DpFk4StA.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.DpFk4StA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.Y7A99ODL.js +0 -1
- package/build/client/_app/immutable/nodes/8.Y7A99ODL.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.Y7A99ODL.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.DF3LeTGi.js +0 -3
- package/build/client/_app/immutable/nodes/9.DF3LeTGi.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.DF3LeTGi.js.gz +0 -0
- package/build/server/chunks/10-D7op0myD.js +0 -9
- package/build/server/chunks/3-BkezOAX7.js +0 -9
- package/build/server/chunks/5-D_pZV4fS.js +0 -9
- package/build/server/chunks/8-DWleYW_e.js +0 -9
- package/build/server/chunks/_page.svelte-CmuUQI4Y.js.map +0 -1
- package/build/server/chunks/dev-Duv_-rxF.js.map +0 -1
- package/build/server/chunks/internal-DBeni9My.js.map +0 -1
- package/build/server/chunks/projectContext-Cxsfz84C.js.map +0 -1
- package/build/server/chunks/src2-DNqJAXv6.js.map +0 -1
- package/build/server/chunks/src3-jm480tTA.js.map +0 -1
|
@@ -16222,9 +16222,22 @@ var ai_profile_schema_default = {
|
|
|
16222
16222
|
"properties": {
|
|
16223
16223
|
"sdd": { "type": "boolean" },
|
|
16224
16224
|
"tdd": { "type": "boolean" },
|
|
16225
|
-
"finalReview": { "type": "boolean" }
|
|
16225
|
+
"finalReview": { "type": "boolean" },
|
|
16226
|
+
"codeReview": { "type": "boolean" },
|
|
16227
|
+
"refactoring": { "type": "boolean" },
|
|
16228
|
+
"documentation": { "type": "boolean" },
|
|
16229
|
+
"subagentDrivenDevelopment": { "type": "boolean" }
|
|
16226
16230
|
}
|
|
16227
16231
|
},
|
|
16232
|
+
"capabilities": {
|
|
16233
|
+
"type": "object",
|
|
16234
|
+
"additionalProperties": false,
|
|
16235
|
+
"properties": { "delegation": {
|
|
16236
|
+
"type": "object",
|
|
16237
|
+
"additionalProperties": false,
|
|
16238
|
+
"properties": { "subagents": { "$ref": "#/definitions/subagents" } }
|
|
16239
|
+
} }
|
|
16240
|
+
},
|
|
16228
16241
|
"permissions": {
|
|
16229
16242
|
"type": "object",
|
|
16230
16243
|
"additionalProperties": false,
|
|
@@ -16310,11 +16323,315 @@ var ai_profile_schema_default = {
|
|
|
16310
16323
|
"minItems": 1,
|
|
16311
16324
|
"uniqueItems": true,
|
|
16312
16325
|
"items": { "$ref": "#/definitions/slug" }
|
|
16326
|
+
},
|
|
16327
|
+
"subagents": {
|
|
16328
|
+
"type": "object",
|
|
16329
|
+
"additionalProperties": false,
|
|
16330
|
+
"required": ["enabled"],
|
|
16331
|
+
"properties": {
|
|
16332
|
+
"enabled": { "type": "boolean" },
|
|
16333
|
+
"defaults": {
|
|
16334
|
+
"type": "object",
|
|
16335
|
+
"additionalProperties": false,
|
|
16336
|
+
"properties": {
|
|
16337
|
+
"maxConcurrent": {
|
|
16338
|
+
"type": "integer",
|
|
16339
|
+
"minimum": 1
|
|
16340
|
+
},
|
|
16341
|
+
"maxDepth": {
|
|
16342
|
+
"type": "integer",
|
|
16343
|
+
"minimum": 1
|
|
16344
|
+
}
|
|
16345
|
+
}
|
|
16346
|
+
},
|
|
16347
|
+
"agents": {
|
|
16348
|
+
"type": "array",
|
|
16349
|
+
"items": { "$ref": "#/definitions/subagent" }
|
|
16350
|
+
}
|
|
16351
|
+
},
|
|
16352
|
+
"if": {
|
|
16353
|
+
"properties": { "enabled": { "const": true } },
|
|
16354
|
+
"required": ["enabled"]
|
|
16355
|
+
},
|
|
16356
|
+
"then": {
|
|
16357
|
+
"required": ["agents"],
|
|
16358
|
+
"properties": { "agents": {
|
|
16359
|
+
"type": "array",
|
|
16360
|
+
"minItems": 1,
|
|
16361
|
+
"items": { "$ref": "#/definitions/subagent" }
|
|
16362
|
+
} }
|
|
16363
|
+
}
|
|
16364
|
+
},
|
|
16365
|
+
"subagent": { "oneOf": [{ "$ref": "#/definitions/subagentTemplateRef" }, { "$ref": "#/definitions/subagentInline" }] },
|
|
16366
|
+
"subagentTemplateRef": {
|
|
16367
|
+
"type": "object",
|
|
16368
|
+
"additionalProperties": false,
|
|
16369
|
+
"required": ["useTemplate"],
|
|
16370
|
+
"properties": { "useTemplate": {
|
|
16371
|
+
"type": "string",
|
|
16372
|
+
"enum": [
|
|
16373
|
+
"implementer",
|
|
16374
|
+
"spec-reviewer",
|
|
16375
|
+
"code-quality-reviewer"
|
|
16376
|
+
]
|
|
16377
|
+
} }
|
|
16378
|
+
},
|
|
16379
|
+
"subagentInline": {
|
|
16380
|
+
"type": "object",
|
|
16381
|
+
"additionalProperties": false,
|
|
16382
|
+
"required": [
|
|
16383
|
+
"name",
|
|
16384
|
+
"description",
|
|
16385
|
+
"purpose",
|
|
16386
|
+
"prompt",
|
|
16387
|
+
"toolScope"
|
|
16388
|
+
],
|
|
16389
|
+
"properties": {
|
|
16390
|
+
"name": {
|
|
16391
|
+
"type": "string",
|
|
16392
|
+
"minLength": 1,
|
|
16393
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$",
|
|
16394
|
+
"not": { "enum": [
|
|
16395
|
+
"default",
|
|
16396
|
+
"worker",
|
|
16397
|
+
"explorer",
|
|
16398
|
+
"explore",
|
|
16399
|
+
"plan",
|
|
16400
|
+
"general-purpose",
|
|
16401
|
+
"codebase_investigator",
|
|
16402
|
+
"remote-codebase-investigator",
|
|
16403
|
+
"generalist",
|
|
16404
|
+
"browser_agent"
|
|
16405
|
+
] }
|
|
16406
|
+
},
|
|
16407
|
+
"description": {
|
|
16408
|
+
"type": "string",
|
|
16409
|
+
"minLength": 1,
|
|
16410
|
+
"pattern": "^[^\\r\\n]+$"
|
|
16411
|
+
},
|
|
16412
|
+
"purpose": {
|
|
16413
|
+
"type": "string",
|
|
16414
|
+
"minLength": 1,
|
|
16415
|
+
"pattern": "^[^\\r\\n]+$"
|
|
16416
|
+
},
|
|
16417
|
+
"prompt": {
|
|
16418
|
+
"type": "string",
|
|
16419
|
+
"minLength": 1
|
|
16420
|
+
},
|
|
16421
|
+
"toolScope": {
|
|
16422
|
+
"type": "string",
|
|
16423
|
+
"enum": ["read-only", "workspace-write"]
|
|
16424
|
+
},
|
|
16425
|
+
"modelPreference": {
|
|
16426
|
+
"type": "string",
|
|
16427
|
+
"enum": [
|
|
16428
|
+
"inherit",
|
|
16429
|
+
"fast",
|
|
16430
|
+
"balanced",
|
|
16431
|
+
"capable"
|
|
16432
|
+
]
|
|
16433
|
+
},
|
|
16434
|
+
"maxTurns": {
|
|
16435
|
+
"type": "integer",
|
|
16436
|
+
"minimum": 1
|
|
16437
|
+
},
|
|
16438
|
+
"timeoutMinutes": {
|
|
16439
|
+
"type": "integer",
|
|
16440
|
+
"minimum": 1
|
|
16441
|
+
},
|
|
16442
|
+
"mcpServers": {
|
|
16443
|
+
"type": "array",
|
|
16444
|
+
"items": { "type": "string" },
|
|
16445
|
+
"maxItems": 0
|
|
16446
|
+
}
|
|
16447
|
+
}
|
|
16313
16448
|
}
|
|
16314
16449
|
}
|
|
16315
16450
|
};
|
|
16316
16451
|
//#endregion
|
|
16317
16452
|
//#region ../../packages/core/src/profile.ts
|
|
16453
|
+
var SUBAGENT_TEMPLATE_NAMES = [
|
|
16454
|
+
"implementer",
|
|
16455
|
+
"spec-reviewer",
|
|
16456
|
+
"code-quality-reviewer"
|
|
16457
|
+
];
|
|
16458
|
+
function isSubagentTemplateRef(entry) {
|
|
16459
|
+
return typeof entry.useTemplate === "string";
|
|
16460
|
+
}
|
|
16461
|
+
function freezeTemplate(template) {
|
|
16462
|
+
if (template.mcpServers !== void 0) Object.freeze(template.mcpServers);
|
|
16463
|
+
return Object.freeze(template);
|
|
16464
|
+
}
|
|
16465
|
+
function cloneTemplate(template) {
|
|
16466
|
+
const clone = {
|
|
16467
|
+
name: template.name,
|
|
16468
|
+
description: template.description,
|
|
16469
|
+
purpose: template.purpose,
|
|
16470
|
+
prompt: template.prompt,
|
|
16471
|
+
toolScope: template.toolScope
|
|
16472
|
+
};
|
|
16473
|
+
if (template.modelPreference !== void 0) clone.modelPreference = template.modelPreference;
|
|
16474
|
+
if (template.maxTurns !== void 0) clone.maxTurns = template.maxTurns;
|
|
16475
|
+
if (template.timeoutMinutes !== void 0) clone.timeoutMinutes = template.timeoutMinutes;
|
|
16476
|
+
if (template.mcpServers !== void 0) clone.mcpServers = [...template.mcpServers];
|
|
16477
|
+
return clone;
|
|
16478
|
+
}
|
|
16479
|
+
var SUBAGENT_TEMPLATES_RAW = {
|
|
16480
|
+
implementer: {
|
|
16481
|
+
name: "implementer",
|
|
16482
|
+
description: "Use for a bounded implementation task after the parent agent has provided the full task text, relevant spec excerpts, file ownership, constraints, and expected tests. Returns an explicit status and does not commit or push unless the parent request includes that requirement.",
|
|
16483
|
+
purpose: "Implement one scoped task with tests, self-review, and honest escalation when requirements or architecture are unclear.",
|
|
16484
|
+
prompt: `You are implementing one bounded task.
|
|
16485
|
+
|
|
16486
|
+
Work only from the task text, spec excerpts, file ownership, constraints,
|
|
16487
|
+
and allowed commands provided in the prompt. Do not assume hidden chat
|
|
16488
|
+
history. If essential context is missing, report NEEDS_CONTEXT instead of
|
|
16489
|
+
guessing.
|
|
16490
|
+
|
|
16491
|
+
Before editing, restate the goal, non-goals, acceptance criteria, and files
|
|
16492
|
+
you expect to touch. If the task is ambiguous, architectural, or broader than
|
|
16493
|
+
the prompt says, stop and report BLOCKED or NEEDS_CONTEXT.
|
|
16494
|
+
|
|
16495
|
+
Implement exactly what the task specifies. Follow the repository's SDD/TDD
|
|
16496
|
+
workflow. Add or update focused tests where practical, verify RED before
|
|
16497
|
+
behavior changes when the task changes behavior, implement the smallest
|
|
16498
|
+
passing change, then verify GREEN. Preserve existing patterns and avoid
|
|
16499
|
+
unrelated refactors.
|
|
16500
|
+
|
|
16501
|
+
Do not commit, push, create branches, install dependencies, access secrets,
|
|
16502
|
+
contact production systems, or upload source unless the parent prompt
|
|
16503
|
+
explicitly authorizes that action.
|
|
16504
|
+
|
|
16505
|
+
Before reporting back, self-review for completeness, quality, scope control,
|
|
16506
|
+
and test validity. Fix issues you find if they are inside the assigned scope.
|
|
16507
|
+
|
|
16508
|
+
Report exactly:
|
|
16509
|
+
- Status: DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT
|
|
16510
|
+
- What changed
|
|
16511
|
+
- Tests run and results
|
|
16512
|
+
- Files changed
|
|
16513
|
+
- Self-review findings
|
|
16514
|
+
- Concerns, missing context, or follow-up work`,
|
|
16515
|
+
toolScope: "workspace-write",
|
|
16516
|
+
modelPreference: "balanced",
|
|
16517
|
+
maxTurns: 18,
|
|
16518
|
+
timeoutMinutes: 20,
|
|
16519
|
+
mcpServers: []
|
|
16520
|
+
},
|
|
16521
|
+
"spec-reviewer": {
|
|
16522
|
+
name: "spec-reviewer",
|
|
16523
|
+
description: "Use after an implementation worker reports DONE or DONE_WITH_CONCERNS to verify the actual changed files against the task text, approved spec, acceptance criteria, and claimed result. Reads code and docs only; does not edit.",
|
|
16524
|
+
purpose: "Catch missing requirements, extra scope, and misunderstandings before code-quality review.",
|
|
16525
|
+
prompt: `You are reviewing whether an implementation matches its specification.
|
|
16526
|
+
|
|
16527
|
+
Work only from the full task text, approved spec excerpts, acceptance
|
|
16528
|
+
criteria, changed-file list, and implementer report provided in the prompt.
|
|
16529
|
+
Do not assume hidden chat history and do not trust the implementer report
|
|
16530
|
+
without checking the actual files.
|
|
16531
|
+
|
|
16532
|
+
Read the changed code and documentation. Compare actual behavior against the
|
|
16533
|
+
requested behavior line by line. Look for missing requirements, extra
|
|
16534
|
+
unrequested work, changed contracts, wrong interpretation, and fixture or
|
|
16535
|
+
documentation drift.
|
|
16536
|
+
|
|
16537
|
+
Do not edit files, run broad commands, install dependencies, read secrets,
|
|
16538
|
+
contact production systems, or upload source. If the prompt lacks enough
|
|
16539
|
+
context to review, report NEEDS_CONTEXT.
|
|
16540
|
+
|
|
16541
|
+
Report exactly:
|
|
16542
|
+
- Status: COMPLIANT | ISSUES_FOUND | NEEDS_CONTEXT
|
|
16543
|
+
- Requirements checked
|
|
16544
|
+
- Findings with severity, path, and line or symbol when available
|
|
16545
|
+
- Extra or out-of-scope work, if any
|
|
16546
|
+
- Missing tests or docs tied to acceptance criteria
|
|
16547
|
+
- Recommendation: proceed to code-quality review, fix first, or request context`,
|
|
16548
|
+
toolScope: "read-only",
|
|
16549
|
+
modelPreference: "capable",
|
|
16550
|
+
maxTurns: 10,
|
|
16551
|
+
timeoutMinutes: 8,
|
|
16552
|
+
mcpServers: []
|
|
16553
|
+
},
|
|
16554
|
+
"code-quality-reviewer": {
|
|
16555
|
+
name: "code-quality-reviewer",
|
|
16556
|
+
description: "Use only after spec review passes to assess maintainability, decomposition, tests, naming, risky mocks, and local code quality in the changed files. Reads code and docs only; does not edit.",
|
|
16557
|
+
purpose: "Catch maintainability and test-quality risks after the implementation is known to match the spec.",
|
|
16558
|
+
prompt: `You are reviewing code quality after spec compliance has passed.
|
|
16559
|
+
|
|
16560
|
+
Work only from the full task text, approved spec excerpts, changed-file list,
|
|
16561
|
+
spec-review result, test results, and implementer report provided in the
|
|
16562
|
+
prompt. Do not assume hidden chat history.
|
|
16563
|
+
|
|
16564
|
+
Review only the change's contribution. Do not flag pre-existing file size or
|
|
16565
|
+
architecture unless the change makes it materially worse. Check whether each
|
|
16566
|
+
touched file has a clear responsibility, whether names describe intent,
|
|
16567
|
+
whether complex predicates should be named, whether tests verify behavior
|
|
16568
|
+
rather than mocks, whether mocks preserve required real side effects, and
|
|
16569
|
+
whether new APIs exist only for tests.
|
|
16570
|
+
|
|
16571
|
+
Do not edit files, run broad commands, install dependencies, read secrets,
|
|
16572
|
+
contact production systems, or upload source. If the prompt lacks enough
|
|
16573
|
+
context to review, report NEEDS_CONTEXT.
|
|
16574
|
+
|
|
16575
|
+
Report exactly:
|
|
16576
|
+
- Status: ACCEPTABLE | ISSUES_FOUND | NEEDS_CONTEXT
|
|
16577
|
+
- Strengths
|
|
16578
|
+
- Issues grouped as Critical, Important, or Minor
|
|
16579
|
+
- Test-quality concerns
|
|
16580
|
+
- Maintainability concerns
|
|
16581
|
+
- Assessment: ready, fix first, or request context`,
|
|
16582
|
+
toolScope: "read-only",
|
|
16583
|
+
modelPreference: "capable",
|
|
16584
|
+
maxTurns: 10,
|
|
16585
|
+
timeoutMinutes: 8,
|
|
16586
|
+
mcpServers: []
|
|
16587
|
+
}
|
|
16588
|
+
};
|
|
16589
|
+
var SUBAGENT_TEMPLATES = {
|
|
16590
|
+
implementer: freezeTemplate(SUBAGENT_TEMPLATES_RAW.implementer),
|
|
16591
|
+
"spec-reviewer": freezeTemplate(SUBAGENT_TEMPLATES_RAW["spec-reviewer"]),
|
|
16592
|
+
"code-quality-reviewer": freezeTemplate(SUBAGENT_TEMPLATES_RAW["code-quality-reviewer"])
|
|
16593
|
+
};
|
|
16594
|
+
function expandSubagentEntry(entry) {
|
|
16595
|
+
if (isSubagentTemplateRef(entry)) return cloneTemplate(SUBAGENT_TEMPLATES[entry.useTemplate]);
|
|
16596
|
+
return entry;
|
|
16597
|
+
}
|
|
16598
|
+
function getSubagentTemplateRefs(profile) {
|
|
16599
|
+
const block = profile.capabilities?.delegation?.subagents;
|
|
16600
|
+
if (!block || block.enabled !== true) return [];
|
|
16601
|
+
const refs = [];
|
|
16602
|
+
for (const entry of block.agents ?? []) if (isSubagentTemplateRef(entry)) refs.push(entry.useTemplate);
|
|
16603
|
+
return refs;
|
|
16604
|
+
}
|
|
16605
|
+
function normalizeSubagentName(name) {
|
|
16606
|
+
return name.toLowerCase().replace(/_/gu, "-");
|
|
16607
|
+
}
|
|
16608
|
+
function getSubagentDefaults(profile) {
|
|
16609
|
+
const defaults = profile.capabilities?.delegation?.subagents?.defaults;
|
|
16610
|
+
return {
|
|
16611
|
+
maxConcurrent: defaults?.maxConcurrent ?? 3,
|
|
16612
|
+
maxDepth: defaults?.maxDepth ?? 1
|
|
16613
|
+
};
|
|
16614
|
+
}
|
|
16615
|
+
function getEnabledSubagents(profile) {
|
|
16616
|
+
const block = profile.capabilities?.delegation?.subagents;
|
|
16617
|
+
if (!block || block.enabled !== true) return [];
|
|
16618
|
+
return (block.agents ?? []).map((entry) => expandSubagentEntry(entry));
|
|
16619
|
+
}
|
|
16620
|
+
var SUBAGENT_BUILTIN_NAMES_NORMALIZED = new Set([
|
|
16621
|
+
"default",
|
|
16622
|
+
"worker",
|
|
16623
|
+
"explorer",
|
|
16624
|
+
"explore",
|
|
16625
|
+
"plan",
|
|
16626
|
+
"general-purpose",
|
|
16627
|
+
"codebase-investigator",
|
|
16628
|
+
"remote-codebase-investigator",
|
|
16629
|
+
"generalist",
|
|
16630
|
+
"browser-agent"
|
|
16631
|
+
]);
|
|
16632
|
+
function isSubagentBuiltinNameCollision(name) {
|
|
16633
|
+
return SUBAGENT_BUILTIN_NAMES_NORMALIZED.has(normalizeSubagentName(name));
|
|
16634
|
+
}
|
|
16318
16635
|
var compiledValidator;
|
|
16319
16636
|
var DEFAULT_SAFETY = {
|
|
16320
16637
|
mode: "guarded",
|
|
@@ -16398,6 +16715,11 @@ function validateProfileValue(value) {
|
|
|
16398
16715
|
const validate = getValidator();
|
|
16399
16716
|
if (validate(value)) {
|
|
16400
16717
|
const profile = value;
|
|
16718
|
+
const subagentIssues = validateSubagentSemantics(profile);
|
|
16719
|
+
if (subagentIssues.length > 0) return {
|
|
16720
|
+
ok: false,
|
|
16721
|
+
issues: subagentIssues.sort((left, right) => compareIssues$1(left, right))
|
|
16722
|
+
};
|
|
16401
16723
|
return {
|
|
16402
16724
|
ok: true,
|
|
16403
16725
|
profile,
|
|
@@ -16410,6 +16732,38 @@ function validateProfileValue(value) {
|
|
|
16410
16732
|
issues: toValidationIssues(validate.errors ?? [], value)
|
|
16411
16733
|
};
|
|
16412
16734
|
}
|
|
16735
|
+
function validateSubagentSemantics(profile) {
|
|
16736
|
+
const subagents = profile.capabilities?.delegation?.subagents;
|
|
16737
|
+
if (!subagents || subagents.enabled !== true) return [];
|
|
16738
|
+
const entries = subagents.agents ?? [];
|
|
16739
|
+
const issues = [];
|
|
16740
|
+
const seenRaw = /* @__PURE__ */ new Map();
|
|
16741
|
+
const seenNormalized = /* @__PURE__ */ new Map();
|
|
16742
|
+
entries.forEach((entry, index) => {
|
|
16743
|
+
const name = expandSubagentEntry(entry).name;
|
|
16744
|
+
const rawIndex = seenRaw.get(name);
|
|
16745
|
+
if (rawIndex !== void 0) issues.push({
|
|
16746
|
+
code: "schema_validation_error",
|
|
16747
|
+
path: `/capabilities/delegation/subagents/agents/${index}/name`,
|
|
16748
|
+
expected: "unique subagent name",
|
|
16749
|
+
actual: "duplicate",
|
|
16750
|
+
message: `/capabilities/delegation/subagents/agents/${index}/name duplicates the name used at index ${rawIndex}.`
|
|
16751
|
+
});
|
|
16752
|
+
else seenRaw.set(name, index);
|
|
16753
|
+
const normalized = normalizeSubagentName(name);
|
|
16754
|
+
const normalizedIndex = seenNormalized.get(normalized);
|
|
16755
|
+
if (normalizedIndex !== void 0 && normalizedIndex !== index) {
|
|
16756
|
+
if (!(rawIndex !== void 0)) issues.push({
|
|
16757
|
+
code: "schema_validation_error",
|
|
16758
|
+
path: `/capabilities/delegation/subagents/agents/${index}/name`,
|
|
16759
|
+
expected: "unique normalized subagent id",
|
|
16760
|
+
actual: "duplicate after hyphen/underscore folding",
|
|
16761
|
+
message: `/capabilities/delegation/subagents/agents/${index}/name collides with the name used at index ${normalizedIndex} after normalization.`
|
|
16762
|
+
});
|
|
16763
|
+
} else if (normalizedIndex === void 0) seenNormalized.set(normalized, index);
|
|
16764
|
+
});
|
|
16765
|
+
return issues;
|
|
16766
|
+
}
|
|
16413
16767
|
function normalizeSafety(profile) {
|
|
16414
16768
|
return {
|
|
16415
16769
|
mode: profile.safety?.mode ?? DEFAULT_SAFETY.mode,
|
|
@@ -16449,11 +16803,17 @@ function renderProfileYaml(profile) {
|
|
|
16449
16803
|
if (profile.safety.requiresSandbox !== void 0) safety["requiresSandbox"] = profile.safety.requiresSandbox;
|
|
16450
16804
|
doc["safety"] = safety;
|
|
16451
16805
|
}
|
|
16452
|
-
|
|
16806
|
+
const workflow = {
|
|
16453
16807
|
sdd: profile.workflow.sdd,
|
|
16454
16808
|
tdd: profile.workflow.tdd,
|
|
16455
16809
|
finalReview: profile.workflow.finalReview
|
|
16456
16810
|
};
|
|
16811
|
+
if (profile.workflow.codeReview !== void 0) workflow["codeReview"] = profile.workflow.codeReview;
|
|
16812
|
+
if (profile.workflow.refactoring !== void 0) workflow["refactoring"] = profile.workflow.refactoring;
|
|
16813
|
+
if (profile.workflow.documentation !== void 0) workflow["documentation"] = profile.workflow.documentation;
|
|
16814
|
+
if (profile.workflow.subagentDrivenDevelopment !== void 0) workflow["subagentDrivenDevelopment"] = profile.workflow.subagentDrivenDevelopment;
|
|
16815
|
+
doc["workflow"] = workflow;
|
|
16816
|
+
if (profile.capabilities !== void 0) doc["capabilities"] = buildCapabilitiesDoc(profile.capabilities);
|
|
16457
16817
|
if (profile.permissions !== void 0) doc["permissions"] = buildPermissionsDoc(profile.permissions);
|
|
16458
16818
|
return distExports.stringify(doc, {
|
|
16459
16819
|
lineWidth: 0,
|
|
@@ -16461,6 +16821,40 @@ function renderProfileYaml(profile) {
|
|
|
16461
16821
|
sortMapEntries: false
|
|
16462
16822
|
}).replace(/\n+$/, "") + "\n";
|
|
16463
16823
|
}
|
|
16824
|
+
function buildCapabilitiesDoc(capabilities) {
|
|
16825
|
+
const doc = {};
|
|
16826
|
+
if (capabilities.delegation !== void 0) {
|
|
16827
|
+
const delegation = {};
|
|
16828
|
+
const subagents = capabilities.delegation.subagents;
|
|
16829
|
+
if (subagents !== void 0) {
|
|
16830
|
+
const block = { enabled: subagents.enabled };
|
|
16831
|
+
if (subagents.defaults !== void 0) {
|
|
16832
|
+
const defaults = {};
|
|
16833
|
+
if (subagents.defaults.maxConcurrent !== void 0) defaults["maxConcurrent"] = subagents.defaults.maxConcurrent;
|
|
16834
|
+
if (subagents.defaults.maxDepth !== void 0) defaults["maxDepth"] = subagents.defaults.maxDepth;
|
|
16835
|
+
if (Object.keys(defaults).length > 0) block["defaults"] = defaults;
|
|
16836
|
+
}
|
|
16837
|
+
if (subagents.agents !== void 0) block["agents"] = subagents.agents.map((entry) => isSubagentTemplateRef(entry) ? { useTemplate: entry.useTemplate } : buildSubagentDoc(entry));
|
|
16838
|
+
delegation["subagents"] = block;
|
|
16839
|
+
}
|
|
16840
|
+
if (Object.keys(delegation).length > 0) doc["delegation"] = delegation;
|
|
16841
|
+
}
|
|
16842
|
+
return doc;
|
|
16843
|
+
}
|
|
16844
|
+
function buildSubagentDoc(agent) {
|
|
16845
|
+
const out = {
|
|
16846
|
+
name: agent.name,
|
|
16847
|
+
description: agent.description,
|
|
16848
|
+
purpose: agent.purpose,
|
|
16849
|
+
prompt: agent.prompt,
|
|
16850
|
+
toolScope: agent.toolScope
|
|
16851
|
+
};
|
|
16852
|
+
if (agent.modelPreference !== void 0) out["modelPreference"] = agent.modelPreference;
|
|
16853
|
+
if (agent.maxTurns !== void 0) out["maxTurns"] = agent.maxTurns;
|
|
16854
|
+
if (agent.timeoutMinutes !== void 0) out["timeoutMinutes"] = agent.timeoutMinutes;
|
|
16855
|
+
if (agent.mcpServers !== void 0) out["mcpServers"] = agent.mcpServers;
|
|
16856
|
+
return out;
|
|
16857
|
+
}
|
|
16464
16858
|
function buildPermissionsDoc(p) {
|
|
16465
16859
|
const doc = {};
|
|
16466
16860
|
if (p.filesystem !== void 0) {
|
|
@@ -16654,12 +17048,15 @@ function getDefaultTargetIds() {
|
|
|
16654
17048
|
"lockfile",
|
|
16655
17049
|
"tabnine-guidelines",
|
|
16656
17050
|
"tabnine-mcp-config",
|
|
17051
|
+
"tabnine-subagents",
|
|
16657
17052
|
"codex-config",
|
|
16658
17053
|
"codex-workflow-skills",
|
|
17054
|
+
"codex-subagents",
|
|
16659
17055
|
"claude-settings",
|
|
16660
17056
|
"claude-mcp",
|
|
16661
17057
|
"claude-md",
|
|
16662
|
-
"claude-workflow-skills"
|
|
17058
|
+
"claude-workflow-skills",
|
|
17059
|
+
"claude-subagents"
|
|
16663
17060
|
];
|
|
16664
17061
|
}
|
|
16665
17062
|
function createGeneratedTextFile(path, target, templateId, text) {
|
|
@@ -16928,6 +17325,221 @@ function compareLockOutputs(left, right) {
|
|
|
16928
17325
|
return compareText(left.path, right.path) || compareText(left.target, right.target);
|
|
16929
17326
|
}
|
|
16930
17327
|
//#endregion
|
|
17328
|
+
//#region ../../packages/compiler/src/guidance-content.ts
|
|
17329
|
+
var REACT_STACK_TOPIC = {
|
|
17330
|
+
tabnineTitle: "TypeScript and React Stack",
|
|
17331
|
+
agentsMdTitle: "Stack Guidance — React",
|
|
17332
|
+
intro: "Use the existing TypeScript and React conventions in the repository.",
|
|
17333
|
+
subsections: [
|
|
17334
|
+
{
|
|
17335
|
+
heading: "TypeScript Discipline",
|
|
17336
|
+
bullets: [
|
|
17337
|
+
"Do not use `any` without a documented reason.",
|
|
17338
|
+
"Declare explicit types for exported functions, props, and return values.",
|
|
17339
|
+
"Reuse existing types and utilities before adding new ones."
|
|
17340
|
+
]
|
|
17341
|
+
},
|
|
17342
|
+
{
|
|
17343
|
+
heading: "Component Conventions",
|
|
17344
|
+
bullets: [
|
|
17345
|
+
"Use function components with typed props.",
|
|
17346
|
+
"Co-locate components with the modules that own them.",
|
|
17347
|
+
"Keep render-only components free of side effects."
|
|
17348
|
+
]
|
|
17349
|
+
},
|
|
17350
|
+
{
|
|
17351
|
+
heading: "Hook Discipline",
|
|
17352
|
+
bullets: [
|
|
17353
|
+
"Add memoization (`useMemo`, `useCallback`) only when a measured re-render or referential-identity problem exists.",
|
|
17354
|
+
"Keep state local; do not introduce a global store by default.",
|
|
17355
|
+
"Honor the rules of hooks; never call hooks conditionally."
|
|
17356
|
+
]
|
|
17357
|
+
},
|
|
17358
|
+
{
|
|
17359
|
+
heading: "Styling",
|
|
17360
|
+
bullets: ["Follow the existing styling approach in the repository.", "Do not introduce a new CSS framework or component library."]
|
|
17361
|
+
},
|
|
17362
|
+
{
|
|
17363
|
+
heading: "API Calls",
|
|
17364
|
+
bullets: [
|
|
17365
|
+
"Reuse existing client utilities for HTTP and data access.",
|
|
17366
|
+
"Type both request payloads and response bodies.",
|
|
17367
|
+
"Handle error and loading states explicitly."
|
|
17368
|
+
]
|
|
17369
|
+
},
|
|
17370
|
+
{
|
|
17371
|
+
heading: "SDD and TDD Focus",
|
|
17372
|
+
bullets: [
|
|
17373
|
+
"Cover state transitions, API success, error, and loading paths.",
|
|
17374
|
+
"Cover accessibility-affecting behavior (focus, keyboard, ARIA).",
|
|
17375
|
+
"Add or update focused tests before changing observable behavior."
|
|
17376
|
+
]
|
|
17377
|
+
}
|
|
17378
|
+
],
|
|
17379
|
+
tabnineChecklistReference: "See `90-final-review.md` for the shared final-review checklist.",
|
|
17380
|
+
agentsMdChecklistReference: "See the `## Completion Checklist` section for shared review steps."
|
|
17381
|
+
};
|
|
17382
|
+
var CODE_REVIEW_TOPIC = {
|
|
17383
|
+
tabnineTitle: "Code Review",
|
|
17384
|
+
agentsMdTitle: "Code Review",
|
|
17385
|
+
intro: "Use these rules when reviewing a pull request or proposed change.",
|
|
17386
|
+
subsections: [
|
|
17387
|
+
{
|
|
17388
|
+
heading: "Review Focus",
|
|
17389
|
+
bullets: [
|
|
17390
|
+
"Correctness and edge cases.",
|
|
17391
|
+
"Security, including input validation and secret handling.",
|
|
17392
|
+
"Performance hotspots and obvious complexity regressions.",
|
|
17393
|
+
"Unnecessary complexity or premature abstraction.",
|
|
17394
|
+
"Consistency with existing project style.",
|
|
17395
|
+
"Missing or weakened tests.",
|
|
17396
|
+
"Weak typing or unjustified `any`.",
|
|
17397
|
+
"Accessibility-affecting behavior in user-facing changes.",
|
|
17398
|
+
"Error handling and observability gaps.",
|
|
17399
|
+
"Dependency risk and license concerns.",
|
|
17400
|
+
"Spec compliance."
|
|
17401
|
+
]
|
|
17402
|
+
},
|
|
17403
|
+
{
|
|
17404
|
+
heading: "Severity Labels",
|
|
17405
|
+
bullets: [
|
|
17406
|
+
"Blocker: must fix before merge (correctness, security, contract break).",
|
|
17407
|
+
"High: must fix before merge unless explicitly deferred.",
|
|
17408
|
+
"Medium: should fix before merge or open a tracked follow-up.",
|
|
17409
|
+
"Low: nit or polish; safe to defer."
|
|
17410
|
+
]
|
|
17411
|
+
},
|
|
17412
|
+
{
|
|
17413
|
+
heading: "Output Format",
|
|
17414
|
+
bullets: [
|
|
17415
|
+
"Summary: one paragraph of intent and overall verdict.",
|
|
17416
|
+
"Spec Compliance: cite the spec and any deviation.",
|
|
17417
|
+
"Findings: grouped by severity, each with file, function, and concrete suggestion.",
|
|
17418
|
+
"Tests: list coverage gaps and whether tests were run.",
|
|
17419
|
+
"Safety Review: secrets, production access, dependency installs, network access.",
|
|
17420
|
+
"Final recommendation: approve, request changes, or block with reason."
|
|
17421
|
+
]
|
|
17422
|
+
},
|
|
17423
|
+
{
|
|
17424
|
+
heading: "Review Discipline",
|
|
17425
|
+
bullets: [
|
|
17426
|
+
"Skip nitpicks the autoformatter or linter already handles.",
|
|
17427
|
+
"Do not propose broad rewrites; keep suggestions actionable.",
|
|
17428
|
+
"Reference the specific file, function, or component in every finding."
|
|
17429
|
+
]
|
|
17430
|
+
}
|
|
17431
|
+
],
|
|
17432
|
+
tabnineChecklistReference: "See `90-final-review.md` for the shared final-review checklist.",
|
|
17433
|
+
agentsMdChecklistReference: "See the `## Completion Checklist` section for shared review steps."
|
|
17434
|
+
};
|
|
17435
|
+
var REFACTORING_TOPIC = {
|
|
17436
|
+
tabnineTitle: "Refactoring",
|
|
17437
|
+
agentsMdTitle: "Refactoring",
|
|
17438
|
+
intro: "Use these rules when restructuring code without changing observable behavior.",
|
|
17439
|
+
subsections: [
|
|
17440
|
+
{
|
|
17441
|
+
heading: "Principles",
|
|
17442
|
+
bullets: [
|
|
17443
|
+
"Refactor to remove duplication, clarify intent, or unlock a planned change.",
|
|
17444
|
+
"Do not refactor for style preference alone or to chase a new pattern.",
|
|
17445
|
+
"Keep refactoring commits separate from behavior changes."
|
|
17446
|
+
]
|
|
17447
|
+
},
|
|
17448
|
+
{
|
|
17449
|
+
heading: "Safe Refactoring Workflow",
|
|
17450
|
+
bullets: [
|
|
17451
|
+
"Identify the code smell or constraint that motivates the change.",
|
|
17452
|
+
"Check existing abstractions before introducing a new one.",
|
|
17453
|
+
"Define expected behavior in tests before restructuring.",
|
|
17454
|
+
"Make the smallest extraction that solves the problem.",
|
|
17455
|
+
"Preserve public behavior; run tests and golden fixtures after each step.",
|
|
17456
|
+
"Summarize what was intentionally not changed in the review notes."
|
|
17457
|
+
]
|
|
17458
|
+
},
|
|
17459
|
+
{
|
|
17460
|
+
heading: "Restrictions",
|
|
17461
|
+
bullets: [
|
|
17462
|
+
"Do not rename public APIs without explicit approval.",
|
|
17463
|
+
"Do not move files across modules without explicit approval.",
|
|
17464
|
+
"Do not change schemas, endpoint contracts, or build tooling without explicit approval.",
|
|
17465
|
+
"Do not refactor and add features in the same change."
|
|
17466
|
+
]
|
|
17467
|
+
}
|
|
17468
|
+
],
|
|
17469
|
+
tabnineChecklistReference: "See `90-final-review.md` for the shared final-review checklist.",
|
|
17470
|
+
agentsMdChecklistReference: "See the `## Completion Checklist` section for shared review steps."
|
|
17471
|
+
};
|
|
17472
|
+
var DOCUMENTATION_TOPIC = {
|
|
17473
|
+
tabnineTitle: "Documentation",
|
|
17474
|
+
agentsMdTitle: "Documentation",
|
|
17475
|
+
intro: "Use these rules when adding or updating project documentation.",
|
|
17476
|
+
subsections: [
|
|
17477
|
+
{
|
|
17478
|
+
heading: "When to Update Documentation",
|
|
17479
|
+
bullets: [
|
|
17480
|
+
"Setup or onboarding steps changed.",
|
|
17481
|
+
"Workflow, command, or build step changed.",
|
|
17482
|
+
"Public API surface changed.",
|
|
17483
|
+
"Configuration or environment variables changed.",
|
|
17484
|
+
"Testing command changed.",
|
|
17485
|
+
"Deployment or release procedure changed.",
|
|
17486
|
+
"Troubleshooting guidance is newly known."
|
|
17487
|
+
]
|
|
17488
|
+
},
|
|
17489
|
+
{
|
|
17490
|
+
heading: "Style",
|
|
17491
|
+
bullets: [
|
|
17492
|
+
"Write for maintainers, not marketing.",
|
|
17493
|
+
"Provide copy-pasteable commands where applicable.",
|
|
17494
|
+
"Keep examples current; remove examples that no longer run.",
|
|
17495
|
+
"Reference file paths when they help a reader navigate."
|
|
17496
|
+
]
|
|
17497
|
+
},
|
|
17498
|
+
{
|
|
17499
|
+
heading: "README Rules",
|
|
17500
|
+
bullets: [
|
|
17501
|
+
"Keep the existing structure intact.",
|
|
17502
|
+
"Add only relevant new sections.",
|
|
17503
|
+
"Do not rewrite the README without an explicit request."
|
|
17504
|
+
]
|
|
17505
|
+
},
|
|
17506
|
+
{
|
|
17507
|
+
heading: "Code Comment Policy",
|
|
17508
|
+
bullets: [
|
|
17509
|
+
"Comment non-obvious business rules and invariants.",
|
|
17510
|
+
"Comment tricky edge cases the code alone does not reveal.",
|
|
17511
|
+
"Comment surprising technical constraints and security-sensitive behavior.",
|
|
17512
|
+
"Do not write comments that restate the code."
|
|
17513
|
+
]
|
|
17514
|
+
}
|
|
17515
|
+
],
|
|
17516
|
+
tabnineChecklistReference: "See `90-final-review.md` for the shared final-review checklist.",
|
|
17517
|
+
agentsMdChecklistReference: "See the `## Completion Checklist` section for shared review steps."
|
|
17518
|
+
};
|
|
17519
|
+
function renderTopicAsTabnineGuideline(topic) {
|
|
17520
|
+
const sections = topic.subsections.map((subsection) => `## ${subsection.heading}\n\n${subsection.bullets.map((bullet) => `- ${bullet}`).join("\n")}\n`).join("\n");
|
|
17521
|
+
return `<!-- Generated by Agent Profile Compiler. Do not edit by hand. -->
|
|
17522
|
+
|
|
17523
|
+
# ${topic.tabnineTitle}
|
|
17524
|
+
|
|
17525
|
+
${topic.intro}
|
|
17526
|
+
|
|
17527
|
+
${sections}
|
|
17528
|
+
${topic.tabnineChecklistReference}
|
|
17529
|
+
`;
|
|
17530
|
+
}
|
|
17531
|
+
function renderTopicAsAgentsMdSection(topic) {
|
|
17532
|
+
const subsections = topic.subsections.map((subsection) => `**${subsection.heading}**\n\n${subsection.bullets.map((bullet) => `- ${bullet}`).join("\n")}`).join("\n\n");
|
|
17533
|
+
return `## ${topic.agentsMdTitle}
|
|
17534
|
+
|
|
17535
|
+
${topic.intro}
|
|
17536
|
+
|
|
17537
|
+
${subsections}
|
|
17538
|
+
|
|
17539
|
+
${topic.agentsMdChecklistReference}
|
|
17540
|
+
`;
|
|
17541
|
+
}
|
|
17542
|
+
//#endregion
|
|
16931
17543
|
//#region ../../packages/compiler/src/compiler.ts
|
|
16932
17544
|
var WORKFLOW_SKILLS = [
|
|
16933
17545
|
{
|
|
@@ -16941,6 +17553,10 @@ var WORKFLOW_SKILLS = [
|
|
|
16941
17553
|
{
|
|
16942
17554
|
id: "final-review",
|
|
16943
17555
|
workflowFlag: "finalReview"
|
|
17556
|
+
},
|
|
17557
|
+
{
|
|
17558
|
+
id: "subagent-driven-change",
|
|
17559
|
+
workflowFlag: "subagentDrivenDevelopment"
|
|
16944
17560
|
}
|
|
16945
17561
|
];
|
|
16946
17562
|
var TEMPLATE_SOURCES = [
|
|
@@ -16950,6 +17566,10 @@ var TEMPLATE_SOURCES = [
|
|
|
16950
17566
|
version: "1",
|
|
16951
17567
|
source: renderAgentsMdTemplateSource()
|
|
16952
17568
|
},
|
|
17569
|
+
agentsMdTopicTemplateSource("targets/agents-md/30-stack-typescript-react@1", REACT_STACK_TOPIC),
|
|
17570
|
+
agentsMdTopicTemplateSource("targets/agents-md/60-code-review@1", CODE_REVIEW_TOPIC),
|
|
17571
|
+
agentsMdTopicTemplateSource("targets/agents-md/70-refactoring@1", REFACTORING_TOPIC),
|
|
17572
|
+
agentsMdTopicTemplateSource("targets/agents-md/80-documentation@1", DOCUMENTATION_TOPIC),
|
|
16953
17573
|
{
|
|
16954
17574
|
id: "targets/lockfile@1",
|
|
16955
17575
|
target: "lockfile",
|
|
@@ -16960,8 +17580,12 @@ var TEMPLATE_SOURCES = [
|
|
|
16960
17580
|
guidelineTemplateSource("targets/tabnine-guidelines/10-sdd-workflow@1", renderSddWorkflowGuideline),
|
|
16961
17581
|
guidelineTemplateSource("targets/tabnine-guidelines/20-tdd-workflow@1", renderTddWorkflowGuideline),
|
|
16962
17582
|
guidelineTemplateSource("targets/tabnine-guidelines/30-stack-typescript-svelte@1", renderTypeScriptSvelteGuideline),
|
|
17583
|
+
guidelineTemplateSource("targets/tabnine-guidelines/30-stack-typescript-react@1", renderTypeScriptReactGuideline),
|
|
16963
17584
|
guidelineTemplateSource("targets/tabnine-guidelines/40-stack-java-spring@1", renderJavaSpringGuideline),
|
|
16964
17585
|
guidelineTemplateSource("targets/tabnine-guidelines/50-testing-playwright-junit@1", renderPlaywrightJunitGuideline),
|
|
17586
|
+
guidelineTemplateSource("targets/tabnine-guidelines/60-code-review@1", renderCodeReviewGuideline),
|
|
17587
|
+
guidelineTemplateSource("targets/tabnine-guidelines/70-refactoring@1", renderRefactoringGuideline),
|
|
17588
|
+
guidelineTemplateSource("targets/tabnine-guidelines/80-documentation@1", renderDocumentationGuideline),
|
|
16965
17589
|
guidelineTemplateSource("targets/tabnine-guidelines/90-final-review@1", renderFinalReviewGuideline),
|
|
16966
17590
|
{
|
|
16967
17591
|
id: "targets/tabnine-mcp-config@1",
|
|
@@ -16976,8 +17600,9 @@ var TEMPLATE_SOURCES = [
|
|
|
16976
17600
|
source: renderCodexConfigToml()
|
|
16977
17601
|
},
|
|
16978
17602
|
workflowSkillTemplateSource("targets/codex-workflow-skills/sdd-change@1", "codex-workflow-skills", "sdd-change"),
|
|
16979
|
-
workflowSkillTemplateSource("targets/codex-workflow-skills/tdd-change@
|
|
17603
|
+
workflowSkillTemplateSource("targets/codex-workflow-skills/tdd-change@2", "codex-workflow-skills", "tdd-change"),
|
|
16980
17604
|
workflowSkillTemplateSource("targets/codex-workflow-skills/final-review@1", "codex-workflow-skills", "final-review"),
|
|
17605
|
+
workflowSkillTemplateSource("targets/codex-workflow-skills/subagent-driven-change@1", "codex-workflow-skills", "subagent-driven-change"),
|
|
16981
17606
|
{
|
|
16982
17607
|
id: "targets/claude-settings@1",
|
|
16983
17608
|
target: "claude-settings",
|
|
@@ -16997,8 +17622,9 @@ var TEMPLATE_SOURCES = [
|
|
|
16997
17622
|
source: renderClaudeMd()
|
|
16998
17623
|
},
|
|
16999
17624
|
workflowSkillTemplateSource("targets/claude-workflow-skills/sdd-change@1", "claude-workflow-skills", "sdd-change"),
|
|
17000
|
-
workflowSkillTemplateSource("targets/claude-workflow-skills/tdd-change@
|
|
17001
|
-
workflowSkillTemplateSource("targets/claude-workflow-skills/final-review@1", "claude-workflow-skills", "final-review")
|
|
17625
|
+
workflowSkillTemplateSource("targets/claude-workflow-skills/tdd-change@2", "claude-workflow-skills", "tdd-change"),
|
|
17626
|
+
workflowSkillTemplateSource("targets/claude-workflow-skills/final-review@1", "claude-workflow-skills", "final-review"),
|
|
17627
|
+
workflowSkillTemplateSource("targets/claude-workflow-skills/subagent-driven-change@1", "claude-workflow-skills", "subagent-driven-change")
|
|
17002
17628
|
];
|
|
17003
17629
|
function getDefaultTemplates() {
|
|
17004
17630
|
return TEMPLATE_SOURCES.map(({ id, target, version, source }) => ({
|
|
@@ -17010,21 +17636,64 @@ function getDefaultTemplates() {
|
|
|
17010
17636
|
}
|
|
17011
17637
|
function compileProfile(request) {
|
|
17012
17638
|
const targets = uniqueTargets(request.targets ?? getEnabledTargetIds(request.profile));
|
|
17013
|
-
const templates = request.templates ?? getDefaultTemplates();
|
|
17639
|
+
const templates = request.templates ?? mergeTemplates(getDefaultTemplates(), getSubagentTemplates(request.profile));
|
|
17014
17640
|
const issues = validateTargets(request.profile, targets, templates);
|
|
17015
17641
|
if (issues.length > 0) return {
|
|
17016
17642
|
ok: false,
|
|
17017
17643
|
issues: issues.sort(compareIssues)
|
|
17018
17644
|
};
|
|
17645
|
+
const files = targets.flatMap((target) => renderTarget(target, request.profile));
|
|
17646
|
+
const requiredTemplateIds = getRequiredTemplateIdSet(targets, request.profile);
|
|
17019
17647
|
return {
|
|
17020
17648
|
ok: true,
|
|
17021
|
-
files:
|
|
17022
|
-
templates: templates.filter((template) =>
|
|
17649
|
+
files: files.sort(compareGeneratedFiles),
|
|
17650
|
+
templates: templates.filter((template) => requiredTemplateIds.has(template.id)).sort(compareTemplates)
|
|
17023
17651
|
};
|
|
17024
17652
|
}
|
|
17653
|
+
function mergeTemplates(base, extra) {
|
|
17654
|
+
const seen = new Set(base.map((template) => template.id));
|
|
17655
|
+
const result = [...base];
|
|
17656
|
+
for (const template of extra) if (!seen.has(template.id)) {
|
|
17657
|
+
seen.add(template.id);
|
|
17658
|
+
result.push(template);
|
|
17659
|
+
}
|
|
17660
|
+
return result.sort(compareTemplates);
|
|
17661
|
+
}
|
|
17662
|
+
function getSubagentTemplates(profile) {
|
|
17663
|
+
const agents = getEnabledSubagents(profile);
|
|
17664
|
+
if (agents.length === 0) return [];
|
|
17665
|
+
const effective = deriveEffectivePermissions(profile);
|
|
17666
|
+
const templates = [];
|
|
17667
|
+
if (profile.clients.claude.enabled) for (const agent of agents) templates.push({
|
|
17668
|
+
id: `targets/claude-subagents/${agent.name}@1`,
|
|
17669
|
+
target: "claude-subagents",
|
|
17670
|
+
version: "1",
|
|
17671
|
+
sha256: sha256Hex(normalizeGeneratedText(renderClaudeSubagent(agent, effective)))
|
|
17672
|
+
});
|
|
17673
|
+
if (profile.clients.codex.enabled) for (const agent of agents) templates.push({
|
|
17674
|
+
id: `targets/codex-subagents/${agent.name}@1`,
|
|
17675
|
+
target: "codex-subagents",
|
|
17676
|
+
version: "1",
|
|
17677
|
+
sha256: sha256Hex(normalizeGeneratedText(renderCodexSubagent(agent, effective)))
|
|
17678
|
+
});
|
|
17679
|
+
if (profile.clients.tabnine.enabled) for (const agent of agents) {
|
|
17680
|
+
if (agent.toolScope !== "read-only") continue;
|
|
17681
|
+
templates.push({
|
|
17682
|
+
id: `targets/tabnine-subagents/${agent.name}@1`,
|
|
17683
|
+
target: "tabnine-subagents",
|
|
17684
|
+
version: "1",
|
|
17685
|
+
sha256: sha256Hex(normalizeGeneratedText(renderTabnineSubagent(agent)))
|
|
17686
|
+
});
|
|
17687
|
+
}
|
|
17688
|
+
return templates;
|
|
17689
|
+
}
|
|
17025
17690
|
function renderAgentsMd(profile) {
|
|
17026
17691
|
const effectivePermissions = deriveEffectivePermissions(profile);
|
|
17027
17692
|
const enabledClients = renderEnabledClients(profile);
|
|
17693
|
+
const reactSection = profile.stack.frameworks.includes("react") ? `\n${renderTopicAsAgentsMdSection(REACT_STACK_TOPIC)}` : "";
|
|
17694
|
+
const codeReviewSection = profile.workflow.codeReview === true ? `\n${renderTopicAsAgentsMdSection(CODE_REVIEW_TOPIC)}` : "";
|
|
17695
|
+
const refactoringSection = profile.workflow.refactoring === true ? `\n${renderTopicAsAgentsMdSection(REFACTORING_TOPIC)}` : "";
|
|
17696
|
+
const documentationSection = profile.workflow.documentation === true ? `\n${renderTopicAsAgentsMdSection(DOCUMENTATION_TOPIC)}` : "";
|
|
17028
17697
|
return normalizeGeneratedText(`# AGENTS.md
|
|
17029
17698
|
|
|
17030
17699
|
## Project
|
|
@@ -17039,7 +17708,7 @@ Description: ${escapeMarkdownText(profile.profile.description)}
|
|
|
17039
17708
|
- Frameworks: ${renderList(profile.stack.frameworks)}
|
|
17040
17709
|
- Package managers: ${renderList(profile.stack.packageManagers)}
|
|
17041
17710
|
- Testing: ${renderList(profile.stack.testing)}
|
|
17042
|
-
|
|
17711
|
+
${reactSection}
|
|
17043
17712
|
## Enabled AI Clients
|
|
17044
17713
|
|
|
17045
17714
|
${enabledClients}
|
|
@@ -17049,7 +17718,7 @@ ${enabledClients}
|
|
|
17049
17718
|
- SDD: ${renderRequired(profile.workflow.sdd)}
|
|
17050
17719
|
- TDD: ${renderRequired(profile.workflow.tdd)}
|
|
17051
17720
|
- Final implementation review: ${renderRequired(profile.workflow.finalReview)}
|
|
17052
|
-
|
|
17721
|
+
${codeReviewSection}${refactoringSection}${documentationSection}
|
|
17053
17722
|
## Permissions
|
|
17054
17723
|
|
|
17055
17724
|
| Permission | Mode |
|
|
@@ -17117,7 +17786,10 @@ function renderTarget(target, profile) {
|
|
|
17117
17786
|
case "tabnine-guidelines": return renderTabnineGuidelines(profile);
|
|
17118
17787
|
case "lockfile": return [];
|
|
17119
17788
|
case "tabnine-mcp-config": return [createGeneratedTextFile(".tabnine/mcp_servers.json", "tabnine-mcp-config", "targets/tabnine-mcp-config@1", JSON.stringify({ mcpServers: {} }, null, 2))];
|
|
17120
|
-
case "codex-config": return [createGeneratedTextFile(".codex/config.toml", "codex-config", "targets/codex-config@1", renderCodexConfigToml())];
|
|
17789
|
+
case "codex-config": return [createGeneratedTextFile(".codex/config.toml", "codex-config", "targets/codex-config@1", renderCodexConfigToml(profile))];
|
|
17790
|
+
case "codex-subagents": return renderCodexSubagentFiles(profile);
|
|
17791
|
+
case "claude-subagents": return renderClaudeSubagentFiles(profile);
|
|
17792
|
+
case "tabnine-subagents": return renderTabnineSubagentFiles(profile);
|
|
17121
17793
|
case "codex-workflow-skills": return renderWorkflowSkillFiles(profile, "codex-workflow-skills", ".agents/skills");
|
|
17122
17794
|
case "claude-settings": return [createGeneratedTextFile(".claude/settings.json", "claude-settings", "targets/claude-settings@1", renderClaudeSettingsJson())];
|
|
17123
17795
|
case "claude-mcp": return [createGeneratedTextFile(".mcp.json", "claude-mcp", "targets/claude-mcp@1", JSON.stringify({ mcpServers: {} }, null, 2))];
|
|
@@ -17131,13 +17803,20 @@ function renderTabnineGuidelines(profile) {
|
|
|
17131
17803
|
if (profile.workflow.sdd) files.push(createGeneratedTextFile(".tabnine/guidelines/10-sdd-workflow.md", common.target, "targets/tabnine-guidelines/10-sdd-workflow@1", renderSddWorkflowGuideline()));
|
|
17132
17804
|
if (profile.workflow.tdd) files.push(createGeneratedTextFile(".tabnine/guidelines/20-tdd-workflow.md", common.target, "targets/tabnine-guidelines/20-tdd-workflow@1", renderTddWorkflowGuideline()));
|
|
17133
17805
|
if (hasStack(profile, "languages", "typescript") && hasStack(profile, "frameworks", "sveltekit")) files.push(createGeneratedTextFile(".tabnine/guidelines/30-stack-typescript-svelte.md", common.target, "targets/tabnine-guidelines/30-stack-typescript-svelte@1", renderTypeScriptSvelteGuideline()));
|
|
17806
|
+
if (hasStack(profile, "frameworks", "react")) files.push(createGeneratedTextFile(".tabnine/guidelines/30-stack-typescript-react.md", common.target, "targets/tabnine-guidelines/30-stack-typescript-react@1", renderTypeScriptReactGuideline()));
|
|
17134
17807
|
if (hasStack(profile, "languages", "java") && hasStack(profile, "frameworks", "spring-boot")) files.push(createGeneratedTextFile(".tabnine/guidelines/40-stack-java-spring.md", common.target, "targets/tabnine-guidelines/40-stack-java-spring@1", renderJavaSpringGuideline()));
|
|
17135
17808
|
if (hasAnyStack(profile, "testing", ["playwright", "junit"])) files.push(createGeneratedTextFile(".tabnine/guidelines/50-testing-playwright-junit.md", common.target, "targets/tabnine-guidelines/50-testing-playwright-junit@1", renderPlaywrightJunitGuideline()));
|
|
17809
|
+
if (profile.workflow.codeReview === true) files.push(createGeneratedTextFile(".tabnine/guidelines/60-code-review.md", common.target, "targets/tabnine-guidelines/60-code-review@1", renderCodeReviewGuideline()));
|
|
17810
|
+
if (profile.workflow.refactoring === true) files.push(createGeneratedTextFile(".tabnine/guidelines/70-refactoring.md", common.target, "targets/tabnine-guidelines/70-refactoring@1", renderRefactoringGuideline()));
|
|
17811
|
+
if (profile.workflow.documentation === true) files.push(createGeneratedTextFile(".tabnine/guidelines/80-documentation.md", common.target, "targets/tabnine-guidelines/80-documentation@1", renderDocumentationGuideline()));
|
|
17136
17812
|
if (profile.workflow.finalReview) files.push(createGeneratedTextFile(".tabnine/guidelines/90-final-review.md", common.target, "targets/tabnine-guidelines/90-final-review@1", renderFinalReviewGuideline()));
|
|
17137
17813
|
return files;
|
|
17138
17814
|
}
|
|
17139
17815
|
function renderWorkflowSkillFiles(profile, target, rootPath) {
|
|
17140
|
-
return WORKFLOW_SKILLS.filter((skill) => profile.workflow[skill.workflowFlag]).map((skill) => createGeneratedTextFile(`${rootPath}/${skill.id}/SKILL.md`, target,
|
|
17816
|
+
return WORKFLOW_SKILLS.filter((skill) => profile.workflow[skill.workflowFlag]).map((skill) => createGeneratedTextFile(`${rootPath}/${skill.id}/SKILL.md`, target, getWorkflowSkillTemplateId(target, skill.id), renderWorkflowSkill(skill.id)));
|
|
17817
|
+
}
|
|
17818
|
+
function getWorkflowSkillTemplateId(target, skill) {
|
|
17819
|
+
return `targets/${target}/${skill}@${skill === "tdd-change" ? "2" : "1"}`;
|
|
17141
17820
|
}
|
|
17142
17821
|
function renderWorkflowSkill(skill) {
|
|
17143
17822
|
switch (skill) {
|
|
@@ -17168,7 +17847,7 @@ description: Use when implementing a meaningful repository change that requires
|
|
|
17168
17847
|
`;
|
|
17169
17848
|
case "tdd-change": return `---
|
|
17170
17849
|
name: tdd-change
|
|
17171
|
-
description: Use when changing behavior where a focused failing test or golden fixture
|
|
17850
|
+
description: Use when changing behavior where a focused failing test or golden fixture must prove RED before implementation and GREEN after the minimal fix.
|
|
17172
17851
|
---
|
|
17173
17852
|
|
|
17174
17853
|
<!-- Generated by Agent Profile Compiler. Do not edit by hand. -->
|
|
@@ -17178,11 +17857,24 @@ description: Use when changing behavior where a focused failing test or golden f
|
|
|
17178
17857
|
## Instructions
|
|
17179
17858
|
|
|
17180
17859
|
1. Identify the smallest observable behavior covered by the approved spec.
|
|
17181
|
-
2. Add or update
|
|
17182
|
-
3.
|
|
17183
|
-
4. Implement the smallest change that satisfies the test and spec.
|
|
17184
|
-
5. Run the
|
|
17185
|
-
6.
|
|
17860
|
+
2. Add or update one focused failing test or golden fixture before changing behavior code.
|
|
17861
|
+
3. Run the narrowest relevant test command and confirm RED: the test fails for the expected reason, not because of a typo, setup error, or unrelated failure.
|
|
17862
|
+
4. Implement the smallest change that satisfies the failing test and the spec.
|
|
17863
|
+
5. Run the same focused test command and confirm GREEN: the test passes without new warnings or unrelated failures.
|
|
17864
|
+
6. Refactor only after GREEN, then rerun the focused test command.
|
|
17865
|
+
7. Do not update golden files only to hide an unexplained behavior change.
|
|
17866
|
+
|
|
17867
|
+
## Testing Anti-Patterns
|
|
17868
|
+
|
|
17869
|
+
- Do not assert on mock elements or mock call counts when a real behavior assertion is possible.
|
|
17870
|
+
- Do not add production methods, flags, or exports that exist only for tests.
|
|
17871
|
+
- Do not mock a dependency until you understand the side effects the test needs.
|
|
17872
|
+
- Keep test doubles structurally complete enough to match the real data shape consumed by the code.
|
|
17873
|
+
- If mock setup is larger than the behavior under test, consider a narrower integration test or a simpler production boundary.
|
|
17874
|
+
|
|
17875
|
+
## Output
|
|
17876
|
+
|
|
17877
|
+
Report the RED command and expected failure, the GREEN command and passing result, any refactor rerun, and any TDD exception that required human approval.
|
|
17186
17878
|
|
|
17187
17879
|
## Safety
|
|
17188
17880
|
|
|
@@ -17211,6 +17903,55 @@ description: Use before handing off an implementation to compare the diff agains
|
|
|
17211
17903
|
## Output
|
|
17212
17904
|
|
|
17213
17905
|
Return a concise final review with spec compliance, tests run, contract impact, security impact, and remaining risks.
|
|
17906
|
+
`;
|
|
17907
|
+
case "subagent-driven-change": return `---
|
|
17908
|
+
name: subagent-driven-change
|
|
17909
|
+
description: Use when a scoped implementation can be delegated to an implementation subagent and then independently reviewed for spec compliance before code quality.
|
|
17910
|
+
---
|
|
17911
|
+
|
|
17912
|
+
<!-- Generated by Agent Profile Compiler. Do not edit by hand. -->
|
|
17913
|
+
|
|
17914
|
+
# Subagent-Driven Change
|
|
17915
|
+
|
|
17916
|
+
## Preconditions
|
|
17917
|
+
|
|
17918
|
+
Use this workflow only when the task has a clear spec, acceptance criteria, and file ownership. Keep tightly coupled or architectural decisions in the parent session unless the user explicitly asks for delegation.
|
|
17919
|
+
|
|
17920
|
+
Required subagents: \`implementer\`, \`spec-reviewer\`, and \`code-quality-reviewer\`.
|
|
17921
|
+
|
|
17922
|
+
## Fresh Context
|
|
17923
|
+
|
|
17924
|
+
Each subagent prompt must include the full task text, relevant spec excerpts, non-goals, acceptance criteria, file ownership, constraints, expected tests, and any command limits. Do not rely on hidden chat history or a previous subagent's memory.
|
|
17925
|
+
|
|
17926
|
+
## Flow
|
|
17927
|
+
|
|
17928
|
+
1. Dispatch \`implementer\` with one bounded task and the complete context it needs.
|
|
17929
|
+
2. If \`implementer\` returns \`BLOCKED\` or \`NEEDS_CONTEXT\`, resolve that before continuing.
|
|
17930
|
+
3. If \`implementer\` returns \`DONE_WITH_CONCERNS\`, read the concerns before review and decide whether to fix, narrow scope, or continue.
|
|
17931
|
+
4. Dispatch \`spec-reviewer\` with the original task, relevant spec excerpts, changed files, and implementer report.
|
|
17932
|
+
5. Fix or escalate every spec-review issue before requesting code-quality review.
|
|
17933
|
+
6. Dispatch \`code-quality-reviewer\` only after spec review reports compliance.
|
|
17934
|
+
7. Fix Critical and Important code-quality issues before handoff, or document why a finding is intentionally deferred.
|
|
17935
|
+
8. Run the relevant tests, golden tests, and doctor/check commands required by the spec before final response.
|
|
17936
|
+
|
|
17937
|
+
## Status Values
|
|
17938
|
+
|
|
17939
|
+
Implementation worker status values: \`DONE\`, \`DONE_WITH_CONCERNS\`, \`BLOCKED\`, \`NEEDS_CONTEXT\`.
|
|
17940
|
+
|
|
17941
|
+
Spec reviewer status values: \`COMPLIANT\`, \`ISSUES_FOUND\`, \`NEEDS_CONTEXT\`.
|
|
17942
|
+
|
|
17943
|
+
Code-quality reviewer status values: \`ACCEPTABLE\`, \`ISSUES_FOUND\`, \`NEEDS_CONTEXT\`.
|
|
17944
|
+
|
|
17945
|
+
## Safety
|
|
17946
|
+
|
|
17947
|
+
- Do not ask subagents to commit, push, create branches, install dependencies, read secrets, contact production systems, or upload source unless the user explicitly requested that action.
|
|
17948
|
+
- Do not accept an implementation report without reading reviewer findings.
|
|
17949
|
+
- Do not run code-quality review before spec-compliance review passes.
|
|
17950
|
+
- Keep generated files deterministic and lockfile-tracked.
|
|
17951
|
+
|
|
17952
|
+
## Output
|
|
17953
|
+
|
|
17954
|
+
Final handoff must list what changed, tests run, contract impact, security impact, remaining risks or TODOs, and whether the spec acceptance criteria are fully met.
|
|
17214
17955
|
`;
|
|
17215
17956
|
}
|
|
17216
17957
|
}
|
|
@@ -17276,6 +18017,18 @@ Test-driven development is required for this project.
|
|
|
17276
18017
|
- Do not update golden fixtures to hide an unexplained behavior change.
|
|
17277
18018
|
`;
|
|
17278
18019
|
}
|
|
18020
|
+
function renderTypeScriptReactGuideline() {
|
|
18021
|
+
return renderTopicAsTabnineGuideline(REACT_STACK_TOPIC);
|
|
18022
|
+
}
|
|
18023
|
+
function renderCodeReviewGuideline() {
|
|
18024
|
+
return renderTopicAsTabnineGuideline(CODE_REVIEW_TOPIC);
|
|
18025
|
+
}
|
|
18026
|
+
function renderRefactoringGuideline() {
|
|
18027
|
+
return renderTopicAsTabnineGuideline(REFACTORING_TOPIC);
|
|
18028
|
+
}
|
|
18029
|
+
function renderDocumentationGuideline() {
|
|
18030
|
+
return renderTopicAsTabnineGuideline(DOCUMENTATION_TOPIC);
|
|
18031
|
+
}
|
|
17279
18032
|
function renderTypeScriptSvelteGuideline() {
|
|
17280
18033
|
return `<!-- Generated by Agent Profile Compiler. Do not edit by hand. -->
|
|
17281
18034
|
|
|
@@ -17334,14 +18087,115 @@ Final implementation review is required for this project.
|
|
|
17334
18087
|
- List remaining risks or TODOs before considering the task complete.
|
|
17335
18088
|
`;
|
|
17336
18089
|
}
|
|
17337
|
-
function renderCodexConfigToml() {
|
|
17338
|
-
|
|
18090
|
+
function renderCodexConfigToml(profile) {
|
|
18091
|
+
const base = `approval_policy = "on-request"
|
|
17339
18092
|
sandbox_mode = "workspace-write"
|
|
17340
18093
|
allow_login_shell = false
|
|
17341
18094
|
|
|
17342
18095
|
[sandbox_workspace_write]
|
|
17343
18096
|
network_access = false
|
|
17344
18097
|
`;
|
|
18098
|
+
if (!profile || getEnabledSubagents(profile).length === 0) return base;
|
|
18099
|
+
const defaults = getSubagentDefaults(profile);
|
|
18100
|
+
return `${base}
|
|
18101
|
+
[agents]
|
|
18102
|
+
max_threads = ${defaults.maxConcurrent}
|
|
18103
|
+
max_depth = ${defaults.maxDepth}
|
|
18104
|
+
`;
|
|
18105
|
+
}
|
|
18106
|
+
function renderClaudeSubagentFiles(profile) {
|
|
18107
|
+
const agents = getEnabledSubagents(profile);
|
|
18108
|
+
const effective = deriveEffectivePermissions(profile);
|
|
18109
|
+
return agents.map((agent) => createGeneratedTextFile(`.claude/agents/${agent.name}.md`, "claude-subagents", `targets/claude-subagents/${agent.name}@1`, renderClaudeSubagent(agent, effective)));
|
|
18110
|
+
}
|
|
18111
|
+
function renderCodexSubagentFiles(profile) {
|
|
18112
|
+
const agents = getEnabledSubagents(profile);
|
|
18113
|
+
const effective = deriveEffectivePermissions(profile);
|
|
18114
|
+
return agents.map((agent) => createGeneratedTextFile(`.codex/agents/${agent.name}.toml`, "codex-subagents", `targets/codex-subagents/${agent.name}@1`, renderCodexSubagent(agent, effective)));
|
|
18115
|
+
}
|
|
18116
|
+
function renderTabnineSubagentFiles(profile) {
|
|
18117
|
+
return getEnabledSubagents(profile).filter((agent) => agent.toolScope === "read-only").map((agent) => createGeneratedTextFile(`.tabnine/agent/agents/${agent.name}.md`, "tabnine-subagents", `targets/tabnine-subagents/${agent.name}@1`, renderTabnineSubagent(agent)));
|
|
18118
|
+
}
|
|
18119
|
+
function titleCaseFromKebab(name) {
|
|
18120
|
+
return name.split("-").filter((part) => part.length > 0).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
18121
|
+
}
|
|
18122
|
+
function renderClaudeSubagent(agent, effective) {
|
|
18123
|
+
const lines = ["---", `name: ${yamlScalarSafe(agent.name)}`];
|
|
18124
|
+
lines.push(`description: ${yamlScalarSafe(agent.description)}`);
|
|
18125
|
+
if (agent.toolScope === "read-only") lines.push("tools: Read, Glob, Grep");
|
|
18126
|
+
else {
|
|
18127
|
+
const tools = [
|
|
18128
|
+
"Read",
|
|
18129
|
+
"Glob",
|
|
18130
|
+
"Grep"
|
|
18131
|
+
];
|
|
18132
|
+
if (effective.filesystem.write === "allow") tools.push("Edit", "Write");
|
|
18133
|
+
if (effective.shell.run === "allow") tools.push("Bash");
|
|
18134
|
+
if (effective.network.external === "allow") tools.push("WebFetch");
|
|
18135
|
+
lines.push(`tools: ${tools.join(", ")}`);
|
|
18136
|
+
}
|
|
18137
|
+
const model = agent.modelPreference ?? "inherit";
|
|
18138
|
+
lines.push(`model: ${model === "inherit" ? "inherit" : "inherit"}`);
|
|
18139
|
+
if (agent.toolScope === "read-only") lines.push("permissionMode: plan");
|
|
18140
|
+
if (agent.maxTurns !== void 0) lines.push(`maxTurns: ${agent.maxTurns}`);
|
|
18141
|
+
lines.push("---", "");
|
|
18142
|
+
lines.push("<!-- Generated by Agent Profile Compiler. Do not edit by hand. -->");
|
|
18143
|
+
lines.push("");
|
|
18144
|
+
lines.push(`# ${titleCaseFromKebab(agent.name)}`);
|
|
18145
|
+
lines.push("");
|
|
18146
|
+
lines.push(agent.prompt.trim());
|
|
18147
|
+
lines.push("");
|
|
18148
|
+
return lines.join("\n");
|
|
18149
|
+
}
|
|
18150
|
+
function renderCodexSubagent(agent, effective) {
|
|
18151
|
+
const lines = [
|
|
18152
|
+
"# Generated by Agent Profile Compiler. Do not edit by hand.",
|
|
18153
|
+
"",
|
|
18154
|
+
`name = "${escapeTomlString(agent.name)}"`,
|
|
18155
|
+
`description = "${escapeTomlString(agent.description)}"`
|
|
18156
|
+
];
|
|
18157
|
+
if (agent.toolScope === "workspace-write" && effective.filesystem.write !== "deny") lines.push(`sandbox_mode = "workspace-write"`);
|
|
18158
|
+
else lines.push(`sandbox_mode = "read-only"`);
|
|
18159
|
+
if (agent.prompt.includes(`"""`)) throw new Error(`Codex subagent ${agent.name} prompt contains a TOML triple-quote sequence; compile validation should have rejected this.`);
|
|
18160
|
+
lines.push("developer_instructions = \"\"\"");
|
|
18161
|
+
for (const promptLine of agent.prompt.trim().split(/\r?\n/u)) lines.push(promptLine);
|
|
18162
|
+
lines.push("\"\"\"");
|
|
18163
|
+
lines.push("");
|
|
18164
|
+
return lines.join("\n");
|
|
18165
|
+
}
|
|
18166
|
+
function renderTabnineSubagent(agent) {
|
|
18167
|
+
const lines = ["---", `name: ${yamlScalarSafe(agent.name)}`];
|
|
18168
|
+
lines.push(`description: ${yamlScalarSafe(agent.description)}`);
|
|
18169
|
+
lines.push("kind: local");
|
|
18170
|
+
lines.push("tools:");
|
|
18171
|
+
for (const tool of ["grep_search", "read_file"].sort()) lines.push(` - ${tool}`);
|
|
18172
|
+
if (agent.maxTurns !== void 0) lines.push(`max_turns: ${agent.maxTurns}`);
|
|
18173
|
+
if (agent.timeoutMinutes !== void 0) lines.push(`timeout_mins: ${agent.timeoutMinutes}`);
|
|
18174
|
+
lines.push("---", "");
|
|
18175
|
+
lines.push("<!-- Generated by Agent Profile Compiler. Do not edit by hand. -->");
|
|
18176
|
+
lines.push("");
|
|
18177
|
+
lines.push(`# ${titleCaseFromKebab(agent.name)}`);
|
|
18178
|
+
lines.push("");
|
|
18179
|
+
lines.push(agent.prompt.trim());
|
|
18180
|
+
lines.push("");
|
|
18181
|
+
return lines.join("\n");
|
|
18182
|
+
}
|
|
18183
|
+
function escapeTomlString(value) {
|
|
18184
|
+
return value.replace(/\\/gu, "\\\\").replace(/"/gu, "\\\"");
|
|
18185
|
+
}
|
|
18186
|
+
function yamlScalarSafe(value) {
|
|
18187
|
+
if (yamlScalarNeedsQuoting(value)) return JSON.stringify(value);
|
|
18188
|
+
return value;
|
|
18189
|
+
}
|
|
18190
|
+
function yamlScalarNeedsQuoting(value) {
|
|
18191
|
+
if (value.length === 0) return true;
|
|
18192
|
+
if (/[\r\n\t]/u.test(value)) return true;
|
|
18193
|
+
if (/^\s|\s$/u.test(value)) return true;
|
|
18194
|
+
if (/^[\-?:,\[\]{}#&*!|>'"%@`]/u.test(value)) return true;
|
|
18195
|
+
if (value.includes(": ") || value.includes(" #")) return true;
|
|
18196
|
+
if (/^(?:true|false|null|yes|no|on|off|~)$/iu.test(value)) return true;
|
|
18197
|
+
if (/^[+\-]?\d+(?:\.\d+)?(?:[eE][+\-]?\d+)?$/u.test(value)) return true;
|
|
18198
|
+
return false;
|
|
17345
18199
|
}
|
|
17346
18200
|
function renderAgentsMdTemplateSource() {
|
|
17347
18201
|
return `# AGENTS.md
|
|
@@ -17380,6 +18234,14 @@ function guidelineTemplateSource(id, render) {
|
|
|
17380
18234
|
source: render()
|
|
17381
18235
|
};
|
|
17382
18236
|
}
|
|
18237
|
+
function agentsMdTopicTemplateSource(id, topic) {
|
|
18238
|
+
return {
|
|
18239
|
+
id,
|
|
18240
|
+
target: "agents-md",
|
|
18241
|
+
version: "1",
|
|
18242
|
+
source: renderTopicAsAgentsMdSection(topic)
|
|
18243
|
+
};
|
|
18244
|
+
}
|
|
17383
18245
|
function workflowSkillTemplateSource(id, target, skill) {
|
|
17384
18246
|
return {
|
|
17385
18247
|
id,
|
|
@@ -17418,9 +18280,19 @@ function renderClaudeSettingsJson() {
|
|
|
17418
18280
|
}
|
|
17419
18281
|
function getEnabledTargetIds(profile) {
|
|
17420
18282
|
const targets = ["agents-md"];
|
|
17421
|
-
|
|
17422
|
-
if (profile.clients.
|
|
17423
|
-
|
|
18283
|
+
const subagentsEnabled = getEnabledSubagents(profile).length > 0;
|
|
18284
|
+
if (profile.clients.tabnine.enabled) {
|
|
18285
|
+
targets.push("tabnine-guidelines", "tabnine-mcp-config");
|
|
18286
|
+
if (subagentsEnabled) targets.push("tabnine-subagents");
|
|
18287
|
+
}
|
|
18288
|
+
if (profile.clients.codex.enabled) {
|
|
18289
|
+
targets.push("codex-config", "codex-workflow-skills");
|
|
18290
|
+
if (subagentsEnabled) targets.push("codex-subagents");
|
|
18291
|
+
}
|
|
18292
|
+
if (profile.clients.claude.enabled) {
|
|
18293
|
+
targets.push("claude-settings", "claude-mcp", "claude-md", "claude-workflow-skills");
|
|
18294
|
+
if (subagentsEnabled) targets.push("claude-subagents");
|
|
18295
|
+
}
|
|
17424
18296
|
return targets;
|
|
17425
18297
|
}
|
|
17426
18298
|
function validateTargets(profile, targets, templates) {
|
|
@@ -17428,6 +18300,56 @@ function validateTargets(profile, targets, templates) {
|
|
|
17428
18300
|
const templateIds = new Set(templates.map((template) => template.id));
|
|
17429
18301
|
const enabledTargets = new Set(getEnabledTargetIds(profile));
|
|
17430
18302
|
const issues = [];
|
|
18303
|
+
if (profile.workflow.subagentDrivenDevelopment === true) {
|
|
18304
|
+
const refs = new Set(getSubagentTemplateRefs(profile));
|
|
18305
|
+
const missing = SUBAGENT_TEMPLATE_NAMES.filter((name) => !refs.has(name));
|
|
18306
|
+
if (missing.length > 0) issues.push({
|
|
18307
|
+
code: "missing_required_template_reference",
|
|
18308
|
+
path: "/workflow/subagentDrivenDevelopment",
|
|
18309
|
+
expected: `useTemplate references for ${SUBAGENT_TEMPLATE_NAMES.join(", ")}`,
|
|
18310
|
+
actual: `missing ${missing.join(", ")}`,
|
|
18311
|
+
message: `workflow.subagentDrivenDevelopment requires capabilities.delegation.subagents.agents[].useTemplate references for ${missing.join(", ")}.`
|
|
18312
|
+
});
|
|
18313
|
+
}
|
|
18314
|
+
if (targets.includes("tabnine-subagents")) {
|
|
18315
|
+
const writeAgents = getEnabledSubagents(profile).filter((agent) => agent.toolScope === "workspace-write");
|
|
18316
|
+
for (const agent of writeAgents) issues.push({
|
|
18317
|
+
code: "unsafe_generated_content",
|
|
18318
|
+
path: `.tabnine/agent/agents/${agent.name}.md`,
|
|
18319
|
+
expected: "read-only Tabnine subagent",
|
|
18320
|
+
actual: "workspace-write Tabnine subagent",
|
|
18321
|
+
message: `tabnine-subagents cannot emit workspace-write agent ${agent.name} while Tabnine subagents are experimental/no-confirmation.`
|
|
18322
|
+
});
|
|
18323
|
+
}
|
|
18324
|
+
if (targets.includes("codex-subagents")) {
|
|
18325
|
+
const effective = deriveEffectivePermissions(profile);
|
|
18326
|
+
for (const agent of getEnabledSubagents(profile)) {
|
|
18327
|
+
if (agent.toolScope === "workspace-write" && effective.filesystem.write === "deny") issues.push({
|
|
18328
|
+
code: "unsafe_generated_content",
|
|
18329
|
+
path: `.codex/agents/${agent.name}.toml`,
|
|
18330
|
+
expected: "narrower than effectivePermissions",
|
|
18331
|
+
actual: "workspace-write subagent under filesystem.write=deny",
|
|
18332
|
+
message: `codex-subagents cannot emit workspace-write agent ${agent.name} because effectivePermissions.filesystem.write is deny.`
|
|
18333
|
+
});
|
|
18334
|
+
if (agent.prompt.includes(`"""`)) issues.push({
|
|
18335
|
+
code: "unsafe_generated_content",
|
|
18336
|
+
path: `.codex/agents/${agent.name}.toml`,
|
|
18337
|
+
expected: "prompt without TOML triple-quote sequence",
|
|
18338
|
+
actual: "prompt contains \"\"\" delimiter",
|
|
18339
|
+
message: `codex-subagents prompt for ${agent.name} contains a TOML triple-quote sequence that would break developer_instructions.`
|
|
18340
|
+
});
|
|
18341
|
+
}
|
|
18342
|
+
}
|
|
18343
|
+
if (targets.includes("claude-subagents")) {
|
|
18344
|
+
const effective = deriveEffectivePermissions(profile);
|
|
18345
|
+
for (const agent of getEnabledSubagents(profile)) if (agent.toolScope === "workspace-write" && effective.filesystem.write === "deny") issues.push({
|
|
18346
|
+
code: "unsafe_generated_content",
|
|
18347
|
+
path: `.claude/agents/${agent.name}.md`,
|
|
18348
|
+
expected: "narrower than effectivePermissions",
|
|
18349
|
+
actual: "workspace-write subagent under filesystem.write=deny",
|
|
18350
|
+
message: `claude-subagents cannot emit workspace-write agent ${agent.name} because effectivePermissions.filesystem.write is deny.`
|
|
18351
|
+
});
|
|
18352
|
+
}
|
|
17431
18353
|
for (const target of targets) {
|
|
17432
18354
|
if (!supportedTargets.has(target)) {
|
|
17433
18355
|
issues.push({
|
|
@@ -17449,7 +18371,7 @@ function validateTargets(profile, targets, templates) {
|
|
|
17449
18371
|
});
|
|
17450
18372
|
continue;
|
|
17451
18373
|
}
|
|
17452
|
-
for (const templateId of getRequiredTemplateIds(target)) if (!templateIds.has(templateId)) issues.push({
|
|
18374
|
+
for (const templateId of getRequiredTemplateIds(target, profile)) if (!templateIds.has(templateId)) issues.push({
|
|
17453
18375
|
code: "missing_template",
|
|
17454
18376
|
path: target,
|
|
17455
18377
|
expected: templateId,
|
|
@@ -17459,8 +18381,45 @@ function validateTargets(profile, targets, templates) {
|
|
|
17459
18381
|
}
|
|
17460
18382
|
return issues;
|
|
17461
18383
|
}
|
|
17462
|
-
function
|
|
17463
|
-
return
|
|
18384
|
+
function getRequiredTemplateIdSet(targets, profile) {
|
|
18385
|
+
return new Set(targets.flatMap((target) => getRequiredTemplateIds(target, profile)));
|
|
18386
|
+
}
|
|
18387
|
+
function getRequiredTemplateIds(target, profile) {
|
|
18388
|
+
switch (target) {
|
|
18389
|
+
case "agents-md": return ["targets/agents-md@1", ...getRequiredAgentsMdTopicTemplateIds(profile)];
|
|
18390
|
+
case "tabnine-guidelines": return getRequiredTabnineGuidelineTemplateIds(profile);
|
|
18391
|
+
case "codex-workflow-skills": return getRequiredWorkflowSkillTemplateIds(profile, "codex-workflow-skills");
|
|
18392
|
+
case "claude-workflow-skills": return getRequiredWorkflowSkillTemplateIds(profile, "claude-workflow-skills");
|
|
18393
|
+
case "claude-subagents": return getEnabledSubagents(profile).map((agent) => `targets/claude-subagents/${agent.name}@1`);
|
|
18394
|
+
case "codex-subagents": return getEnabledSubagents(profile).map((agent) => `targets/codex-subagents/${agent.name}@1`);
|
|
18395
|
+
case "tabnine-subagents": return getEnabledSubagents(profile).filter((agent) => agent.toolScope === "read-only").map((agent) => `targets/tabnine-subagents/${agent.name}@1`);
|
|
18396
|
+
default: return TEMPLATE_SOURCES.filter((template) => template.target === target).map((template) => template.id);
|
|
18397
|
+
}
|
|
18398
|
+
}
|
|
18399
|
+
function getRequiredAgentsMdTopicTemplateIds(profile) {
|
|
18400
|
+
const ids = [];
|
|
18401
|
+
if (hasStack(profile, "frameworks", "react")) ids.push("targets/agents-md/30-stack-typescript-react@1");
|
|
18402
|
+
if (profile.workflow.codeReview === true) ids.push("targets/agents-md/60-code-review@1");
|
|
18403
|
+
if (profile.workflow.refactoring === true) ids.push("targets/agents-md/70-refactoring@1");
|
|
18404
|
+
if (profile.workflow.documentation === true) ids.push("targets/agents-md/80-documentation@1");
|
|
18405
|
+
return ids;
|
|
18406
|
+
}
|
|
18407
|
+
function getRequiredTabnineGuidelineTemplateIds(profile) {
|
|
18408
|
+
const ids = ["targets/tabnine-guidelines/00-general-agent-behavior@1"];
|
|
18409
|
+
if (profile.workflow.sdd) ids.push("targets/tabnine-guidelines/10-sdd-workflow@1");
|
|
18410
|
+
if (profile.workflow.tdd) ids.push("targets/tabnine-guidelines/20-tdd-workflow@1");
|
|
18411
|
+
if (hasStack(profile, "languages", "typescript") && hasStack(profile, "frameworks", "sveltekit")) ids.push("targets/tabnine-guidelines/30-stack-typescript-svelte@1");
|
|
18412
|
+
if (hasStack(profile, "frameworks", "react")) ids.push("targets/tabnine-guidelines/30-stack-typescript-react@1");
|
|
18413
|
+
if (hasStack(profile, "languages", "java") && hasStack(profile, "frameworks", "spring-boot")) ids.push("targets/tabnine-guidelines/40-stack-java-spring@1");
|
|
18414
|
+
if (hasAnyStack(profile, "testing", ["playwright", "junit"])) ids.push("targets/tabnine-guidelines/50-testing-playwright-junit@1");
|
|
18415
|
+
if (profile.workflow.codeReview === true) ids.push("targets/tabnine-guidelines/60-code-review@1");
|
|
18416
|
+
if (profile.workflow.refactoring === true) ids.push("targets/tabnine-guidelines/70-refactoring@1");
|
|
18417
|
+
if (profile.workflow.documentation === true) ids.push("targets/tabnine-guidelines/80-documentation@1");
|
|
18418
|
+
if (profile.workflow.finalReview) ids.push("targets/tabnine-guidelines/90-final-review@1");
|
|
18419
|
+
return ids;
|
|
18420
|
+
}
|
|
18421
|
+
function getRequiredWorkflowSkillTemplateIds(profile, target) {
|
|
18422
|
+
return WORKFLOW_SKILLS.filter((skill) => profile.workflow[skill.workflowFlag]).map((skill) => getWorkflowSkillTemplateId(target, skill.id));
|
|
17464
18423
|
}
|
|
17465
18424
|
function uniqueTargets(targets) {
|
|
17466
18425
|
return Array.from(new Set(targets));
|
|
@@ -17672,5 +18631,5 @@ function truncatePreview(text, capBytes = 256 * 1024) {
|
|
|
17672
18631
|
};
|
|
17673
18632
|
}
|
|
17674
18633
|
|
|
17675
|
-
export { ProfileWriteError as P, containsSecretLikeLiteral as a, createLockfileFile as b, compileProfile as c,
|
|
17676
|
-
//# sourceMappingURL=projectContext-
|
|
18634
|
+
export { ProfileWriteError as P, containsSecretLikeLiteral as a, createLockfileFile as b, compileProfile as c, deriveEffectivePermissions as d, sha256Hex as e, computeFileEtag as f, getEnabledSubagents as g, validateProfileValue as h, isSubagentBuiltinNameCollision as i, renderProfileYaml as j, redactIfSecretLike as k, loadProjectContext as l, normalizeSafety as n, parseProfileYaml as p, resolveProjectRoot as r, safeOutputPath as s, truncatePreview as t, validateLockfileText as v, writeProfileAtomic as w };
|
|
18635
|
+
//# sourceMappingURL=projectContext-fk5wtjwg.js.map
|