codeloop 0.1.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.
Files changed (73) hide show
  1. package/dist/commands/configure.d.ts +2 -0
  2. package/dist/commands/configure.d.ts.map +1 -0
  3. package/dist/commands/configure.js +97 -0
  4. package/dist/commands/configure.js.map +1 -0
  5. package/dist/commands/init.d.ts +2 -0
  6. package/dist/commands/init.d.ts.map +1 -0
  7. package/dist/commands/init.js +241 -0
  8. package/dist/commands/init.js.map +1 -0
  9. package/dist/commands/login.d.ts +2 -0
  10. package/dist/commands/login.d.ts.map +1 -0
  11. package/dist/commands/login.js +60 -0
  12. package/dist/commands/login.js.map +1 -0
  13. package/dist/commands/signup.d.ts +2 -0
  14. package/dist/commands/signup.d.ts.map +1 -0
  15. package/dist/commands/signup.js +62 -0
  16. package/dist/commands/signup.js.map +1 -0
  17. package/dist/commands/status.d.ts +2 -0
  18. package/dist/commands/status.d.ts.map +1 -0
  19. package/dist/commands/status.js +82 -0
  20. package/dist/commands/status.js.map +1 -0
  21. package/dist/index.d.ts +3 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +35 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/templates/claude-agents.d.ts +5 -0
  26. package/dist/templates/claude-agents.d.ts.map +1 -0
  27. package/dist/templates/claude-agents.js +59 -0
  28. package/dist/templates/claude-agents.js.map +1 -0
  29. package/dist/templates/claude-prompts.d.ts +4 -0
  30. package/dist/templates/claude-prompts.d.ts.map +1 -0
  31. package/dist/templates/claude-prompts.js +41 -0
  32. package/dist/templates/claude-prompts.js.map +1 -0
  33. package/dist/templates/config.d.ts +2 -0
  34. package/dist/templates/config.d.ts.map +1 -0
  35. package/dist/templates/config.js +32 -0
  36. package/dist/templates/config.js.map +1 -0
  37. package/dist/templates/cursor-rules.d.ts +7 -0
  38. package/dist/templates/cursor-rules.d.ts.map +1 -0
  39. package/dist/templates/cursor-rules.js +179 -0
  40. package/dist/templates/cursor-rules.js.map +1 -0
  41. package/dist/templates/cursor-skills.d.ts +5 -0
  42. package/dist/templates/cursor-skills.d.ts.map +1 -0
  43. package/dist/templates/cursor-skills.js +157 -0
  44. package/dist/templates/cursor-skills.js.map +1 -0
  45. package/dist/templates/mcp-config.d.ts +23 -0
  46. package/dist/templates/mcp-config.d.ts.map +1 -0
  47. package/dist/templates/mcp-config.js +23 -0
  48. package/dist/templates/mcp-config.js.map +1 -0
  49. package/dist/templates/specs.d.ts +4 -0
  50. package/dist/templates/specs.d.ts.map +1 -0
  51. package/dist/templates/specs.js +68 -0
  52. package/dist/templates/specs.js.map +1 -0
  53. package/dist/utils/api-client.d.ts +64 -0
  54. package/dist/utils/api-client.d.ts.map +1 -0
  55. package/dist/utils/api-client.js +66 -0
  56. package/dist/utils/api-client.js.map +1 -0
  57. package/dist/utils/detect-project.d.ts +6 -0
  58. package/dist/utils/detect-project.d.ts.map +1 -0
  59. package/dist/utils/detect-project.js +51 -0
  60. package/dist/utils/detect-project.js.map +1 -0
  61. package/dist/utils/file-writer.d.ts +3 -0
  62. package/dist/utils/file-writer.d.ts.map +1 -0
  63. package/dist/utils/file-writer.js +19 -0
  64. package/dist/utils/file-writer.js.map +1 -0
  65. package/dist/utils/key-storage.d.ts +5 -0
  66. package/dist/utils/key-storage.d.ts.map +1 -0
  67. package/dist/utils/key-storage.js +93 -0
  68. package/dist/utils/key-storage.js.map +1 -0
  69. package/dist/utils/ui.d.ts +7 -0
  70. package/dist/utils/ui.d.ts.map +1 -0
  71. package/dist/utils/ui.js +24 -0
  72. package/dist/utils/ui.js.map +1 -0
  73. package/package.json +43 -0
package/dist/index.js ADDED
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from "commander";
3
+ import { signupCommand } from "./commands/signup.js";
4
+ import { loginCommand } from "./commands/login.js";
5
+ import { initCommand } from "./commands/init.js";
6
+ import { statusCommand } from "./commands/status.js";
7
+ import { configureCommand } from "./commands/configure.js";
8
+ const program = new Command();
9
+ program
10
+ .name("codeloop")
11
+ .description("CodeLoop — automated verification for AI coding agents")
12
+ .version("0.1.0");
13
+ program
14
+ .command("signup")
15
+ .description("Create a new CodeLoop account and get an API key")
16
+ .action(signupCommand);
17
+ program
18
+ .command("login")
19
+ .description("Log in to your CodeLoop account and generate an API key")
20
+ .action(loginCommand);
21
+ program
22
+ .command("init")
23
+ .description("Initialize CodeLoop in the current project (creates config, MCP registration, rules)")
24
+ .action(initCommand);
25
+ program
26
+ .command("status")
27
+ .description("Check your API key status, plan, and usage")
28
+ .action(statusCommand);
29
+ program
30
+ .command("configure")
31
+ .alias("config")
32
+ .description("Interactively edit CodeLoop configuration for this project")
33
+ .action(configureCommand);
34
+ program.parse();
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,wDAAwD,CAAC;KACrE,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,kDAAkD,CAAC;KAC/D,MAAM,CAAC,aAAa,CAAC,CAAC;AAEzB,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,yDAAyD,CAAC;KACtE,MAAM,CAAC,YAAY,CAAC,CAAC;AAExB,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CACV,sFAAsF,CACvF;KACA,MAAM,CAAC,WAAW,CAAC,CAAC;AAEvB,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CACV,4CAA4C,CAC7C;KACA,MAAM,CAAC,aAAa,CAAC,CAAC;AAEzB,OAAO;KACJ,OAAO,CAAC,WAAW,CAAC;KACpB,KAAK,CAAC,QAAQ,CAAC;KACf,WAAW,CAAC,4DAA4D,CAAC;KACzE,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAE5B,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const CODELOOP_LOOP_MD = "You are a QA loop runner. Use CodeLoop MCP tools to verify code quality.\n\nProcess:\n1. Call codeloop_verify to run all checks\n2. Call codeloop_diagnose to classify failures\n3. Fix only confirmed issues\n4. Repeat verification\n5. Call codeloop_gate_check to evaluate completion\n6. Stop when all gates pass or escalation is needed\n\nNever mark a task complete without evidence from CodeLoop.\n";
2
+ export declare const CODELOOP_QA_MD = "You are a QA verification specialist. Run CodeLoop visual review\nand design comparison. Report structured issues with severity,\nevidence, and fix hints.\n";
3
+ export declare const CODELOOP_ADVISOR_MD = "You are an infrastructure and tooling advisor. Use CodeLoop\nrecommendation tools to suggest the best tools based on the\nproject stack, budget, and constraints. Always explain your\nreasoning and include tradeoffs.\n";
4
+ export declare const CLAUDE_MD = "# CodeLoop Integration\n\nCodeLoop provides automated verification for AI-generated code via MCP tools. Follow these rules to ensure code quality.\n\n## After implementing or modifying any feature:\n1. Call codeloop_verify to run all checks on the current project\n2. Read the structured output carefully \u2014 trust deterministic results first, visual diffs second, model opinions third\n3. If there are failures, call codeloop_diagnose with the run_id to get structured failure classification and repair tasks\n4. Fix ONLY the confirmed issues listed in the repair tasks \u2014 do not guess or fix unrelated code\n5. After fixing, call codeloop_verify again to confirm the fixes worked\n6. Repeat until all failures are resolved or a blocker is identified\n\n## Before marking any task or feature as complete:\n1. Call codeloop_gate_check with the run_id, spec path, and acceptance path\n2. If the result says \"continue_fixing\", keep fixing and re-verifying\n3. If the result says \"escalate\", stop and report the blockers to the developer\n4. Only declare the task complete when gate_check returns \"ready_for_review\" with confidence >= 85%\n\n## When you have attempted to fix an issue 2 or more times and tests still fail:\n- You MUST call codeloop_diagnose before making another fix attempt\n- Read the repair tasks carefully \u2014 the structured analysis is more reliable than guessing from raw output\n\n## For multi-section projects:\n- Call codeloop_section_status to see current progress and which section to work on next\n- If integration_due is true, run codeloop_verify with scope \"full\" first and fix any regressions\n- After ALL sections pass, run codeloop_release_readiness for a final quality assessment\n\n## When choosing tools or infrastructure:\n- Call codeloop_recommend_tool with the relevant category and detected stack\n- Present results with reasoning, tradeoffs, and pricing\n\n## Never:\n- Mark a task complete without evidence from codeloop_gate_check\n- Ignore codeloop_verify results\n- Modify files outside the allowed_file_scope from repair tasks\n- Continue fixing after 8 failed repair attempts \u2014 escalate instead\n";
5
+ //# sourceMappingURL=claude-agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-agents.d.ts","sourceRoot":"","sources":["../../src/templates/claude-agents.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,mZAW5B,CAAC;AAEF,eAAO,MAAM,cAAc,iKAG1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,8NAI/B,CAAC;AAEF,eAAO,MAAM,SAAS,ynEAoCrB,CAAC"}
@@ -0,0 +1,59 @@
1
+ export const CODELOOP_LOOP_MD = `You are a QA loop runner. Use CodeLoop MCP tools to verify code quality.
2
+
3
+ Process:
4
+ 1. Call codeloop_verify to run all checks
5
+ 2. Call codeloop_diagnose to classify failures
6
+ 3. Fix only confirmed issues
7
+ 4. Repeat verification
8
+ 5. Call codeloop_gate_check to evaluate completion
9
+ 6. Stop when all gates pass or escalation is needed
10
+
11
+ Never mark a task complete without evidence from CodeLoop.
12
+ `;
13
+ export const CODELOOP_QA_MD = `You are a QA verification specialist. Run CodeLoop visual review
14
+ and design comparison. Report structured issues with severity,
15
+ evidence, and fix hints.
16
+ `;
17
+ export const CODELOOP_ADVISOR_MD = `You are an infrastructure and tooling advisor. Use CodeLoop
18
+ recommendation tools to suggest the best tools based on the
19
+ project stack, budget, and constraints. Always explain your
20
+ reasoning and include tradeoffs.
21
+ `;
22
+ export const CLAUDE_MD = `# CodeLoop Integration
23
+
24
+ CodeLoop provides automated verification for AI-generated code via MCP tools. Follow these rules to ensure code quality.
25
+
26
+ ## After implementing or modifying any feature:
27
+ 1. Call codeloop_verify to run all checks on the current project
28
+ 2. Read the structured output carefully — trust deterministic results first, visual diffs second, model opinions third
29
+ 3. If there are failures, call codeloop_diagnose with the run_id to get structured failure classification and repair tasks
30
+ 4. Fix ONLY the confirmed issues listed in the repair tasks — do not guess or fix unrelated code
31
+ 5. After fixing, call codeloop_verify again to confirm the fixes worked
32
+ 6. Repeat until all failures are resolved or a blocker is identified
33
+
34
+ ## Before marking any task or feature as complete:
35
+ 1. Call codeloop_gate_check with the run_id, spec path, and acceptance path
36
+ 2. If the result says "continue_fixing", keep fixing and re-verifying
37
+ 3. If the result says "escalate", stop and report the blockers to the developer
38
+ 4. Only declare the task complete when gate_check returns "ready_for_review" with confidence >= 85%
39
+
40
+ ## When you have attempted to fix an issue 2 or more times and tests still fail:
41
+ - You MUST call codeloop_diagnose before making another fix attempt
42
+ - Read the repair tasks carefully — the structured analysis is more reliable than guessing from raw output
43
+
44
+ ## For multi-section projects:
45
+ - Call codeloop_section_status to see current progress and which section to work on next
46
+ - If integration_due is true, run codeloop_verify with scope "full" first and fix any regressions
47
+ - After ALL sections pass, run codeloop_release_readiness for a final quality assessment
48
+
49
+ ## When choosing tools or infrastructure:
50
+ - Call codeloop_recommend_tool with the relevant category and detected stack
51
+ - Present results with reasoning, tradeoffs, and pricing
52
+
53
+ ## Never:
54
+ - Mark a task complete without evidence from codeloop_gate_check
55
+ - Ignore codeloop_verify results
56
+ - Modify files outside the allowed_file_scope from repair tasks
57
+ - Continue fixing after 8 failed repair attempts — escalate instead
58
+ `;
59
+ //# sourceMappingURL=claude-agents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-agents.js","sourceRoot":"","sources":["../../src/templates/claude-agents.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;CAW/B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;CAG7B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;CAIlC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCxB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const PROMPT_LOOP = "# /codeloop-loop\n\nRun the full CodeLoop verify-diagnose-fix cycle on the current project.\n\n## Instructions\n\n1. Call `codeloop_verify` with scope \"full\" to run all checks\n2. If failures are found, call `codeloop_diagnose` with the run_id\n3. Fix only the confirmed issues from the repair tasks\n4. Call `codeloop_verify` again to check fixes\n5. Repeat steps 2-4 until all failures are resolved\n6. Call `codeloop_gate_check` with the run_id, spec path, and acceptance path\n7. Report the final result with confidence score and evidence summary\n\nDo not stop until gate_check returns \"ready_for_review\" with confidence >= 85%, or you need to escalate a blocker.\n";
2
+ export declare const PROMPT_VERIFY = "# /codeloop-verify\n\nRun a quick CodeLoop verification on the current project.\n\n## Instructions\n\n1. Call `codeloop_verify` with scope \"full\" and platform \"auto\"\n2. Read the structured output carefully\n3. Summarize: total checks, pass count, fail count, warnings\n4. If there are failures, suggest calling `codeloop_diagnose` for detailed analysis\n5. If all checks pass, confirm the project is in good shape\n";
3
+ export declare const PROMPT_REVIEW = "# /codeloop-review\n\nRun a CodeLoop visual review on the current project's UI.\n\n## Instructions\n\n1. Call `codeloop_visual_review` to analyze screenshots for UI issues\n2. If a design reference exists, also call `codeloop_design_compare` to check visual fidelity\n3. Report any visual issues with severity and fix suggestions\n4. If baselines exist and diffs exceed the threshold, flag visual regressions\n5. Summarize the overall visual quality assessment\n";
4
+ //# sourceMappingURL=claude-prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-prompts.d.ts","sourceRoot":"","sources":["../../src/templates/claude-prompts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,uqBAevB,CAAC;AAEF,eAAO,MAAM,aAAa,yaAWzB,CAAC;AAEF,eAAO,MAAM,aAAa,mdAWzB,CAAC"}
@@ -0,0 +1,41 @@
1
+ export const PROMPT_LOOP = `# /codeloop-loop
2
+
3
+ Run the full CodeLoop verify-diagnose-fix cycle on the current project.
4
+
5
+ ## Instructions
6
+
7
+ 1. Call \`codeloop_verify\` with scope "full" to run all checks
8
+ 2. If failures are found, call \`codeloop_diagnose\` with the run_id
9
+ 3. Fix only the confirmed issues from the repair tasks
10
+ 4. Call \`codeloop_verify\` again to check fixes
11
+ 5. Repeat steps 2-4 until all failures are resolved
12
+ 6. Call \`codeloop_gate_check\` with the run_id, spec path, and acceptance path
13
+ 7. Report the final result with confidence score and evidence summary
14
+
15
+ Do not stop until gate_check returns "ready_for_review" with confidence >= 85%, or you need to escalate a blocker.
16
+ `;
17
+ export const PROMPT_VERIFY = `# /codeloop-verify
18
+
19
+ Run a quick CodeLoop verification on the current project.
20
+
21
+ ## Instructions
22
+
23
+ 1. Call \`codeloop_verify\` with scope "full" and platform "auto"
24
+ 2. Read the structured output carefully
25
+ 3. Summarize: total checks, pass count, fail count, warnings
26
+ 4. If there are failures, suggest calling \`codeloop_diagnose\` for detailed analysis
27
+ 5. If all checks pass, confirm the project is in good shape
28
+ `;
29
+ export const PROMPT_REVIEW = `# /codeloop-review
30
+
31
+ Run a CodeLoop visual review on the current project's UI.
32
+
33
+ ## Instructions
34
+
35
+ 1. Call \`codeloop_visual_review\` to analyze screenshots for UI issues
36
+ 2. If a design reference exists, also call \`codeloop_design_compare\` to check visual fidelity
37
+ 3. Report any visual issues with severity and fix suggestions
38
+ 4. If baselines exist and diffs exceed the threshold, flag visual regressions
39
+ 5. Summarize the overall visual quality assessment
40
+ `;
41
+ //# sourceMappingURL=claude-prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-prompts.js","sourceRoot":"","sources":["../../src/templates/claude-prompts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;CAe1B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;CAW5B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;CAW5B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function createDefaultConfig(apiKey?: string, platforms?: string[]): Record<string, unknown>;
2
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/templates/config.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CACjC,MAAM,GAAE,MAAW,EACnB,SAAS,GAAE,MAAM,EAAa,GAC7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA8BzB"}
@@ -0,0 +1,32 @@
1
+ export function createDefaultConfig(apiKey = "", platforms = ["auto"]) {
2
+ return {
3
+ api_key: apiKey,
4
+ vision_model: "auto",
5
+ platforms,
6
+ screenshot_viewports: ["375x812", "390x844", "1440x900"],
7
+ design_match_threshold: 0.85,
8
+ max_loop_iterations: 10,
9
+ auto_verify_on_complete: true,
10
+ auto_gate_check: true,
11
+ recommendations: {
12
+ enabled: true,
13
+ external_tools: true,
14
+ sponsored: false,
15
+ preferences: {
16
+ budget: "low",
17
+ self_hosted: false,
18
+ open_source_only: false,
19
+ gdpr_sensitive: false,
20
+ preferred_cloud: "",
21
+ region: "",
22
+ },
23
+ },
24
+ evidence: {
25
+ capture_screenshots: true,
26
+ capture_traces: true,
27
+ capture_videos: false,
28
+ baseline_auto_update: false,
29
+ },
30
+ };
31
+ }
32
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/templates/config.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,mBAAmB,CACjC,SAAiB,EAAE,EACnB,YAAsB,CAAC,MAAM,CAAC;IAE9B,OAAO;QACL,OAAO,EAAE,MAAM;QACf,YAAY,EAAE,MAAM;QACpB,SAAS;QACT,oBAAoB,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC;QACxD,sBAAsB,EAAE,IAAI;QAC5B,mBAAmB,EAAE,EAAE;QACvB,uBAAuB,EAAE,IAAI;QAC7B,eAAe,EAAE,IAAI;QACrB,eAAe,EAAE;YACf,OAAO,EAAE,IAAI;YACb,cAAc,EAAE,IAAI;YACpB,SAAS,EAAE,KAAK;YAChB,WAAW,EAAE;gBACX,MAAM,EAAE,KAAK;gBACb,WAAW,EAAE,KAAK;gBAClB,gBAAgB,EAAE,KAAK;gBACvB,cAAc,EAAE,KAAK;gBACrB,eAAe,EAAE,EAAE;gBACnB,MAAM,EAAE,EAAE;aACX;SACF;QACD,QAAQ,EAAE;YACR,mBAAmB,EAAE,IAAI;YACzB,cAAc,EAAE,IAAI;YACpB,cAAc,EAAE,KAAK;YACrB,oBAAoB,EAAE,KAAK;SAC5B;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const CORE_MDC = "---\ndescription: CodeLoop core verification rules for all projects\nglobs: [\"**/*\"]\n---\n\n# CodeLoop Verification Rules\n\n## After implementing or modifying any feature:\n1. Call codeloop_verify to run all checks on the current project\n2. Read the structured output carefully \u2014 trust deterministic results first, visual diffs second, model opinions third\n3. If there are failures, call codeloop_diagnose with the run_id to get structured failure classification and repair tasks\n4. Fix ONLY the confirmed issues listed in the repair tasks \u2014 do not guess or fix unrelated code\n5. After fixing, call codeloop_verify again to confirm the fixes worked\n6. Repeat until all failures are resolved or a blocker is identified\n\n## Before marking any task or feature as complete:\n1. Call codeloop_gate_check with the run_id, spec path, and acceptance path\n2. If the result says \"continue_fixing\", keep fixing and re-verifying\n3. If the result says \"escalate\", stop and report the blockers to the developer\n4. Only declare the task complete when gate_check returns \"ready_for_review\" with confidence >= 85%\n\n## When you have attempted to fix an issue 2 or more times and tests still fail:\n- You MUST call codeloop_diagnose before making another fix attempt\n- Read the repair tasks carefully \u2014 the structured analysis is more reliable than guessing from raw output\n\n## Never:\n- Mark a task complete without evidence from codeloop_gate_check\n- Ignore codeloop_verify results\n- Modify files outside the allowed_file_scope from repair tasks\n- Continue fixing after 8 failed repair attempts \u2014 escalate instead\n";
2
+ export declare const LOOP_MDC = "---\ndescription: CodeLoop multi-section development loop\nglobs: [\"docs/specs/_master.md\"]\n---\n\n# Multi-Section Development Loop\n\nWhen a master spec exists at docs/specs/_master.md:\n\n1. Call codeloop_section_status to see current progress and which section to work on next\n2. If integration_due is true, run codeloop_verify with scope \"full\" first and fix any regressions\n3. Read the spec file for the current section (the path is in the section_status response)\n4. Read the acceptance criteria file for the current section\n5. Implement the section according to the spec\n6. Run codeloop_verify \u2192 codeloop_diagnose \u2192 fix \u2192 repeat until codeloop_gate_check passes with confidence >= 85%\n7. Call codeloop_section_status again to get the next section\n8. If more sections remain, proceed to the next section IMMEDIATELY\n9. Do NOT stop between sections for human review\n10. After ALL sections pass individually:\n - Run codeloop_verify with scope \"full\" (entire app)\n - Run codeloop_release_readiness\n11. Only THEN report to the developer with the full evidence summary and confidence scores\n";
3
+ export declare const RECOMMENDATIONS_MDC = "---\ndescription: CodeLoop recommendation triggers\nglobs: [\"**/*\"]\n---\n\n# When to use CodeLoop recommendations\n\nWhen the developer or task involves choosing infrastructure, tools, or services:\n- If the task mentions hosting, deployment, server, email service, analytics, marketing, monitoring, auth provider, database, or file storage\n- Call codeloop_recommend_tool with the relevant category and detected stack\n- Present the results with reasoning, tradeoffs, and pricing \u2014 never just a name\n\nWhen a design reference image exists in artifacts/references/ but codeloop_design_compare has not been run:\n- Suggest running codeloop_design_compare to check visual fidelity\n\nWhen visual changes have been made but codeloop_visual_review has not been run:\n- Suggest running codeloop_visual_review to check for UI issues\n";
4
+ export declare const FLUTTER_MDC = "---\ndescription: CodeLoop Flutter-specific verification guidance\nglobs: [\"pubspec.yaml\", \"**/*.dart\", \"lib/**\", \"test/**\"]\n---\n\n# Flutter Verification Rules\n\nWhen the project contains a pubspec.yaml, apply these additional verification steps:\n\n## Before calling codeloop_verify:\n- Ensure `flutter pub get` has been run after any pubspec.yaml change\n- Platform parameter should be set to \"flutter\"\n\n## After codeloop_verify completes:\n- Check that `flutter analyze` reported zero issues (warnings and info are acceptable, errors are not)\n- Check that `flutter test` passed all widget and unit tests\n- If golden tests exist, verify no unexpected diffs in `test/goldens/`\n\n## When creating or modifying Dart files:\n- Run `dart format .` before verification to avoid style-only failures\n- Ensure all public APIs have documentation comments\n- Prefer `const` constructors for stateless widgets\n\n## Screenshot viewports for Flutter:\n- iOS: 375x812 (iPhone SE), 390x844 (iPhone 14), 428x926 (iPhone 14 Pro Max)\n- Android: 360x800 (compact), 412x915 (medium), 600x1024 (tablet)\n- Use codeloop_visual_review with these viewport sizes after UI changes\n\n## Common Flutter failure patterns:\n- \"No pubspec.yaml found\" \u2192 wrong working directory, navigate to the Flutter project root\n- \"flutter not found\" \u2192 Flutter SDK not in PATH, check the developer's environment\n- Widget overflow errors \u2192 check constraints and use Expanded/Flexible wrappers\n- State management issues \u2192 verify provider/bloc/riverpod setup in the widget tree\n";
5
+ export declare const WEB_MDC = "---\ndescription: CodeLoop web-specific verification guidance\nglobs: [\"package.json\", \"**/*.ts\", \"**/*.tsx\", \"**/*.js\", \"**/*.jsx\", \"**/*.vue\", \"**/*.svelte\"]\n---\n\n# Web Verification Rules\n\nWhen the project is a web application (Next.js, React, Vue, Svelte, Angular), apply these additional verification steps:\n\n## Before calling codeloop_verify:\n- Ensure `npm install` or equivalent has been run after any package.json change\n- Platform parameter should be set to \"web\"\n\n## After codeloop_verify completes:\n- Check that the build succeeds without errors (`npm run build` or framework equivalent)\n- Check that all test suites pass (`npm test`, `vitest run`, `jest`, etc.)\n- Check for TypeScript errors if the project uses TypeScript\n\n## Responsive testing:\n- Mobile: 375x812 (iPhone SE portrait)\n- Tablet: 768x1024 (iPad portrait)\n- Desktop: 1440x900 (standard laptop)\n- Use codeloop_visual_review with these viewport sizes after UI changes\n\n## Accessibility checks:\n- Color contrast should meet WCAG AA (4.5:1 for normal text, 3:1 for large text)\n- Interactive elements need keyboard focus indicators\n- Images need alt text, form inputs need labels\n- Touch targets should be at least 44x44px on mobile\n\n## Common web failure patterns:\n- \"Module not found\" \u2192 missing dependency, run npm install\n- Hydration mismatch (Next.js/React SSR) \u2192 server/client rendering inconsistency\n- \"Cannot find module\" in tests \u2192 check jest/vitest config moduleNameMapper\n- Port already in use \u2192 kill the existing dev server process\n";
6
+ export declare const MOBILE_MDC = "---\ndescription: CodeLoop mobile-specific verification guidance (iOS/Android native)\nglobs: [\"Podfile\", \"build.gradle\", \"build.gradle.kts\", \"**/*.swift\", \"**/*.kt\", \"**/*.java\", \"*.xcodeproj/**\", \"*.xcworkspace/**\"]\n---\n\n# Mobile Verification Rules\n\nWhen the project is a native mobile app (iOS with CocoaPods/Xcode or Android with Gradle), apply these additional verification steps:\n\n## Before calling codeloop_verify:\n- For iOS: ensure `pod install` has been run after any Podfile change\n- For Android: ensure Gradle sync is complete after any build.gradle change\n- Platform parameter should be set to \"mobile\"\n\n## iOS-specific checks:\n- Xcode build must succeed without errors (`xcodebuild build`)\n- Unit tests must pass (`xcodebuild test`)\n- Check for signing issues \u2014 these require developer intervention, escalate immediately\n- Storyboard/XIB changes should be verified with codeloop_visual_review\n\n## Android-specific checks:\n- Gradle build must succeed (`./gradlew assembleDebug`)\n- Unit tests must pass (`./gradlew test`)\n- Check for manifest merge conflicts\n- Lint warnings from Android Lint should be reviewed\n\n## Screenshot viewports for mobile:\n- iOS: 375x812 (iPhone SE), 390x844 (iPhone 14), 428x926 (iPhone Pro Max)\n- Android: 360x800 (compact), 412x915 (medium), 600x1024 (tablet)\n\n## Common mobile failure patterns:\n- \"Signing requires a development team\" \u2192 escalate to developer, cannot fix programmatically\n- \"Pod not found\" \u2192 run `pod install --repo-update`\n- Gradle daemon issues \u2192 `./gradlew --stop` then retry\n- Simulator/emulator not found \u2192 check available devices with `xcrun simctl list` or `emulator -list-avds`\n";
7
+ //# sourceMappingURL=cursor-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-rules.d.ts","sourceRoot":"","sources":["../../src/templates/cursor-rules.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,mnDA8BpB,CAAC;AAEF,eAAO,MAAM,QAAQ,knCAsBpB,CAAC;AAEF,eAAO,MAAM,mBAAmB,00BAiB/B,CAAC;AAEF,eAAO,MAAM,WAAW,kjDAiCvB,CAAC;AAEF,eAAO,MAAM,OAAO,wjDAmCnB,CAAC;AAEF,eAAO,MAAM,UAAU,gsDAmCtB,CAAC"}
@@ -0,0 +1,179 @@
1
+ export const CORE_MDC = `---
2
+ description: CodeLoop core verification rules for all projects
3
+ globs: ["**/*"]
4
+ ---
5
+
6
+ # CodeLoop Verification Rules
7
+
8
+ ## After implementing or modifying any feature:
9
+ 1. Call codeloop_verify to run all checks on the current project
10
+ 2. Read the structured output carefully — trust deterministic results first, visual diffs second, model opinions third
11
+ 3. If there are failures, call codeloop_diagnose with the run_id to get structured failure classification and repair tasks
12
+ 4. Fix ONLY the confirmed issues listed in the repair tasks — do not guess or fix unrelated code
13
+ 5. After fixing, call codeloop_verify again to confirm the fixes worked
14
+ 6. Repeat until all failures are resolved or a blocker is identified
15
+
16
+ ## Before marking any task or feature as complete:
17
+ 1. Call codeloop_gate_check with the run_id, spec path, and acceptance path
18
+ 2. If the result says "continue_fixing", keep fixing and re-verifying
19
+ 3. If the result says "escalate", stop and report the blockers to the developer
20
+ 4. Only declare the task complete when gate_check returns "ready_for_review" with confidence >= 85%
21
+
22
+ ## When you have attempted to fix an issue 2 or more times and tests still fail:
23
+ - You MUST call codeloop_diagnose before making another fix attempt
24
+ - Read the repair tasks carefully — the structured analysis is more reliable than guessing from raw output
25
+
26
+ ## Never:
27
+ - Mark a task complete without evidence from codeloop_gate_check
28
+ - Ignore codeloop_verify results
29
+ - Modify files outside the allowed_file_scope from repair tasks
30
+ - Continue fixing after 8 failed repair attempts — escalate instead
31
+ `;
32
+ export const LOOP_MDC = `---
33
+ description: CodeLoop multi-section development loop
34
+ globs: ["docs/specs/_master.md"]
35
+ ---
36
+
37
+ # Multi-Section Development Loop
38
+
39
+ When a master spec exists at docs/specs/_master.md:
40
+
41
+ 1. Call codeloop_section_status to see current progress and which section to work on next
42
+ 2. If integration_due is true, run codeloop_verify with scope "full" first and fix any regressions
43
+ 3. Read the spec file for the current section (the path is in the section_status response)
44
+ 4. Read the acceptance criteria file for the current section
45
+ 5. Implement the section according to the spec
46
+ 6. Run codeloop_verify → codeloop_diagnose → fix → repeat until codeloop_gate_check passes with confidence >= 85%
47
+ 7. Call codeloop_section_status again to get the next section
48
+ 8. If more sections remain, proceed to the next section IMMEDIATELY
49
+ 9. Do NOT stop between sections for human review
50
+ 10. After ALL sections pass individually:
51
+ - Run codeloop_verify with scope "full" (entire app)
52
+ - Run codeloop_release_readiness
53
+ 11. Only THEN report to the developer with the full evidence summary and confidence scores
54
+ `;
55
+ export const RECOMMENDATIONS_MDC = `---
56
+ description: CodeLoop recommendation triggers
57
+ globs: ["**/*"]
58
+ ---
59
+
60
+ # When to use CodeLoop recommendations
61
+
62
+ When the developer or task involves choosing infrastructure, tools, or services:
63
+ - If the task mentions hosting, deployment, server, email service, analytics, marketing, monitoring, auth provider, database, or file storage
64
+ - Call codeloop_recommend_tool with the relevant category and detected stack
65
+ - Present the results with reasoning, tradeoffs, and pricing — never just a name
66
+
67
+ When a design reference image exists in artifacts/references/ but codeloop_design_compare has not been run:
68
+ - Suggest running codeloop_design_compare to check visual fidelity
69
+
70
+ When visual changes have been made but codeloop_visual_review has not been run:
71
+ - Suggest running codeloop_visual_review to check for UI issues
72
+ `;
73
+ export const FLUTTER_MDC = `---
74
+ description: CodeLoop Flutter-specific verification guidance
75
+ globs: ["pubspec.yaml", "**/*.dart", "lib/**", "test/**"]
76
+ ---
77
+
78
+ # Flutter Verification Rules
79
+
80
+ When the project contains a pubspec.yaml, apply these additional verification steps:
81
+
82
+ ## Before calling codeloop_verify:
83
+ - Ensure \`flutter pub get\` has been run after any pubspec.yaml change
84
+ - Platform parameter should be set to "flutter"
85
+
86
+ ## After codeloop_verify completes:
87
+ - Check that \`flutter analyze\` reported zero issues (warnings and info are acceptable, errors are not)
88
+ - Check that \`flutter test\` passed all widget and unit tests
89
+ - If golden tests exist, verify no unexpected diffs in \`test/goldens/\`
90
+
91
+ ## When creating or modifying Dart files:
92
+ - Run \`dart format .\` before verification to avoid style-only failures
93
+ - Ensure all public APIs have documentation comments
94
+ - Prefer \`const\` constructors for stateless widgets
95
+
96
+ ## Screenshot viewports for Flutter:
97
+ - iOS: 375x812 (iPhone SE), 390x844 (iPhone 14), 428x926 (iPhone 14 Pro Max)
98
+ - Android: 360x800 (compact), 412x915 (medium), 600x1024 (tablet)
99
+ - Use codeloop_visual_review with these viewport sizes after UI changes
100
+
101
+ ## Common Flutter failure patterns:
102
+ - "No pubspec.yaml found" → wrong working directory, navigate to the Flutter project root
103
+ - "flutter not found" → Flutter SDK not in PATH, check the developer's environment
104
+ - Widget overflow errors → check constraints and use Expanded/Flexible wrappers
105
+ - State management issues → verify provider/bloc/riverpod setup in the widget tree
106
+ `;
107
+ export const WEB_MDC = `---
108
+ description: CodeLoop web-specific verification guidance
109
+ globs: ["package.json", "**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.vue", "**/*.svelte"]
110
+ ---
111
+
112
+ # Web Verification Rules
113
+
114
+ When the project is a web application (Next.js, React, Vue, Svelte, Angular), apply these additional verification steps:
115
+
116
+ ## Before calling codeloop_verify:
117
+ - Ensure \`npm install\` or equivalent has been run after any package.json change
118
+ - Platform parameter should be set to "web"
119
+
120
+ ## After codeloop_verify completes:
121
+ - Check that the build succeeds without errors (\`npm run build\` or framework equivalent)
122
+ - Check that all test suites pass (\`npm test\`, \`vitest run\`, \`jest\`, etc.)
123
+ - Check for TypeScript errors if the project uses TypeScript
124
+
125
+ ## Responsive testing:
126
+ - Mobile: 375x812 (iPhone SE portrait)
127
+ - Tablet: 768x1024 (iPad portrait)
128
+ - Desktop: 1440x900 (standard laptop)
129
+ - Use codeloop_visual_review with these viewport sizes after UI changes
130
+
131
+ ## Accessibility checks:
132
+ - Color contrast should meet WCAG AA (4.5:1 for normal text, 3:1 for large text)
133
+ - Interactive elements need keyboard focus indicators
134
+ - Images need alt text, form inputs need labels
135
+ - Touch targets should be at least 44x44px on mobile
136
+
137
+ ## Common web failure patterns:
138
+ - "Module not found" → missing dependency, run npm install
139
+ - Hydration mismatch (Next.js/React SSR) → server/client rendering inconsistency
140
+ - "Cannot find module" in tests → check jest/vitest config moduleNameMapper
141
+ - Port already in use → kill the existing dev server process
142
+ `;
143
+ export const MOBILE_MDC = `---
144
+ description: CodeLoop mobile-specific verification guidance (iOS/Android native)
145
+ globs: ["Podfile", "build.gradle", "build.gradle.kts", "**/*.swift", "**/*.kt", "**/*.java", "*.xcodeproj/**", "*.xcworkspace/**"]
146
+ ---
147
+
148
+ # Mobile Verification Rules
149
+
150
+ When the project is a native mobile app (iOS with CocoaPods/Xcode or Android with Gradle), apply these additional verification steps:
151
+
152
+ ## Before calling codeloop_verify:
153
+ - For iOS: ensure \`pod install\` has been run after any Podfile change
154
+ - For Android: ensure Gradle sync is complete after any build.gradle change
155
+ - Platform parameter should be set to "mobile"
156
+
157
+ ## iOS-specific checks:
158
+ - Xcode build must succeed without errors (\`xcodebuild build\`)
159
+ - Unit tests must pass (\`xcodebuild test\`)
160
+ - Check for signing issues — these require developer intervention, escalate immediately
161
+ - Storyboard/XIB changes should be verified with codeloop_visual_review
162
+
163
+ ## Android-specific checks:
164
+ - Gradle build must succeed (\`./gradlew assembleDebug\`)
165
+ - Unit tests must pass (\`./gradlew test\`)
166
+ - Check for manifest merge conflicts
167
+ - Lint warnings from Android Lint should be reviewed
168
+
169
+ ## Screenshot viewports for mobile:
170
+ - iOS: 375x812 (iPhone SE), 390x844 (iPhone 14), 428x926 (iPhone Pro Max)
171
+ - Android: 360x800 (compact), 412x915 (medium), 600x1024 (tablet)
172
+
173
+ ## Common mobile failure patterns:
174
+ - "Signing requires a development team" → escalate to developer, cannot fix programmatically
175
+ - "Pod not found" → run \`pod install --repo-update\`
176
+ - Gradle daemon issues → \`./gradlew --stop\` then retry
177
+ - Simulator/emulator not found → check available devices with \`xcrun simctl list\` or \`emulator -list-avds\`
178
+ `;
179
+ //# sourceMappingURL=cursor-rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-rules.js","sourceRoot":"","sources":["../../src/templates/cursor-rules.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BvB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBvB,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;CAiBlC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC1B,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCtB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCzB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const SKILL_LOOP = "---\nname: codeloop-loop\ndescription: Run the full CodeLoop verify-diagnose-fix cycle until all quality gates pass. Use when implementing a feature end-to-end or completing a development section that requires verified, production-ready code.\n---\n\n# CodeLoop Loop\n\nOrchestrates the complete verification cycle for a feature or section.\n\n## When to use\n\n- After implementing a feature or completing a code change that needs verification\n- When working through a multi-section development plan\n- When you need evidence-based confirmation that code is ready for review\n\n## Instructions\n\n1. Call `codeloop_verify` with the appropriate scope (\"full\" for entire project, \"affected\" for changed files only) and platform (\"auto\" to detect, or \"flutter\"/\"web\"/\"mobile\" explicitly)\n\n2. Read the structured output. If all checks pass, proceed to step 5.\n\n3. If there are failures, call `codeloop_diagnose` with the `run_id` from the verify result. Read the categorized issues and repair tasks carefully.\n\n4. Fix ONLY the issues listed in the repair tasks. Do not guess or fix unrelated code. After fixing, go back to step 1 and re-verify. Repeat up to 8 times.\n\n5. Call `codeloop_gate_check` with the `run_id`, the spec path, and the acceptance criteria path.\n\n6. If gate_check returns:\n - `\"ready_for_review\"` with confidence >= 85% \u2014 the task is complete\n - `\"continue_fixing\"` \u2014 go back to step 1\n - `\"escalate\"` \u2014 stop and report blockers to the developer\n\n7. If working through a multi-section plan, call `codeloop_section_status` to get the next section and repeat the entire cycle.\n\n## Important\n\n- Never mark a task complete without evidence from `codeloop_gate_check`\n- After 8 failed repair attempts, escalate instead of continuing\n- Trust deterministic results (test pass/fail) over model opinions\n";
2
+ export declare const SKILL_VERIFY = "---\nname: codeloop-verify\ndescription: Run a single CodeLoop verification pass to check if the current code compiles, passes tests, and meets quality standards. Use after any code change to get structured pass/fail results.\n---\n\n# CodeLoop Verify\n\nRuns a single verification pass and returns structured results.\n\n## When to use\n\n- After making code changes and wanting a quick check\n- Before committing code to ensure nothing is broken\n- When you need structured test/lint/build output instead of raw terminal output\n\n## Instructions\n\n1. Call `codeloop_verify` with parameters:\n - `scope`: \"full\" (all checks) or \"affected\" (only changed files)\n - `platform`: \"auto\" (detect from project), \"flutter\", \"web\", or \"mobile\"\n\n2. The tool returns a structured report containing:\n - Pass/fail counts for each check category\n - Artifact paths for logs and screenshots\n - A next-step suggestion\n\n3. If there are failures, consider using the codeloop-loop skill for the full diagnose-fix cycle, or call `codeloop_diagnose` manually with the `run_id`.\n\n4. If all checks pass, you can proceed with confidence or run `codeloop_gate_check` for formal completion evidence.\n\n## Output format\n\nThe verification result includes:\n- `run_id`: unique identifier for this run (needed by diagnose and gate_check)\n- `summary`: overall pass/fail with counts\n- `checks`: detailed results per category (build, tests, lint, format)\n- `artifacts`: paths to generated logs and screenshots\n- `suggestion`: recommended next action\n";
3
+ export declare const SKILL_VISUAL_REVIEW = "---\nname: codeloop-visual-review\ndescription: Capture screenshots of the current UI and analyze them for visual issues, layout problems, and design fidelity. Use after UI changes to catch visual regressions.\n---\n\n# CodeLoop Visual Review\n\nCaptures and analyzes UI screenshots for visual quality.\n\n## When to use\n\n- After making UI/styling changes and wanting to verify visual correctness\n- When a design reference image is available and you want to compare against it\n- When checking responsive layout across different viewport sizes\n- When verifying accessibility-related visual aspects (contrast, sizing)\n\n## Instructions\n\n### For visual review (no reference image):\n\n1. Call `codeloop_visual_review` with:\n - `run_id`: from a recent `codeloop_verify` run (optional)\n - `viewport_sizes`: array of viewport dimensions (e.g., [\"375x812\", \"1440x900\"])\n - `ux_checklist_path`: path to UX checklist if one exists\n\n2. The tool captures screenshots at each viewport size and uses a vision model to identify issues.\n\n### For design comparison (with reference image):\n\n1. Call `codeloop_design_compare` with:\n - `reference_image_path`: path to the design mockup or Figma export\n - `screen_name`: identifier for the screen being compared\n - `platform`: the platform being tested\n - `viewport_sizes`: viewport dimensions to test\n\n2. The tool returns a match score, list of differences, and comparison screenshots.\n\n## Tips\n\n- Store design references in `artifacts/references/` for easy access\n- Run visual review after every UI change, not just at the end\n- Use the UX checklist template at `docs/ux-checklists/_template.md` for consistent checks\n";
4
+ export declare const SKILL_RECOMMEND = "---\nname: codeloop-recommend\ndescription: Get evidence-based recommendations for third-party tools and services based on the project stack, budget, and constraints. Use when choosing hosting, databases, email services, analytics, or any infrastructure.\n---\n\n# CodeLoop Recommend\n\nProvides structured tool and service recommendations.\n\n## When to use\n\n- When the developer asks about hosting, deployment, or infrastructure options\n- When choosing between email services, analytics tools, auth providers, or databases\n- When evaluating tools for monitoring, file storage, or marketing\n- When the task requires selecting a third-party service and you want objective comparison\n\n## Instructions\n\n1. Call `codeloop_recommend_tool` with:\n - `category`: the type of tool needed (e.g., \"hosting\", \"email\", \"database\", \"analytics\", \"auth\", \"monitoring\", \"file-storage\")\n - `stack`: key-value pairs describing the current tech stack\n - `budget`: \"free\", \"low\", \"medium\", or \"enterprise\"\n - `constraints`: any specific requirements (e.g., `{\"gdpr\": true, \"region\": \"eu\"}`)\n\n2. The tool returns ranked recommendations with reasoning, pricing, tradeoffs, and starter tasks.\n\n3. Present the results with reasoning and tradeoffs \u2014 never just recommend a name without context.\n\n## Tips\n\n- Always include the current stack so recommendations account for compatibility\n- Set budget to match the developer's stated constraints\n- Use constraints for regulatory requirements (GDPR, SOC2, HIPAA)\n";
5
+ //# sourceMappingURL=cursor-skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-skills.d.ts","sourceRoot":"","sources":["../../src/templates/cursor-skills.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,u1DAuCtB,CAAC;AAEF,eAAO,MAAM,YAAY,4hDAsCxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,uqDA0C/B,CAAC;AAEF,eAAO,MAAM,eAAe,ihDAiC3B,CAAC"}
@@ -0,0 +1,157 @@
1
+ export const SKILL_LOOP = `---
2
+ name: codeloop-loop
3
+ description: Run the full CodeLoop verify-diagnose-fix cycle until all quality gates pass. Use when implementing a feature end-to-end or completing a development section that requires verified, production-ready code.
4
+ ---
5
+
6
+ # CodeLoop Loop
7
+
8
+ Orchestrates the complete verification cycle for a feature or section.
9
+
10
+ ## When to use
11
+
12
+ - After implementing a feature or completing a code change that needs verification
13
+ - When working through a multi-section development plan
14
+ - When you need evidence-based confirmation that code is ready for review
15
+
16
+ ## Instructions
17
+
18
+ 1. Call \`codeloop_verify\` with the appropriate scope ("full" for entire project, "affected" for changed files only) and platform ("auto" to detect, or "flutter"/"web"/"mobile" explicitly)
19
+
20
+ 2. Read the structured output. If all checks pass, proceed to step 5.
21
+
22
+ 3. If there are failures, call \`codeloop_diagnose\` with the \`run_id\` from the verify result. Read the categorized issues and repair tasks carefully.
23
+
24
+ 4. Fix ONLY the issues listed in the repair tasks. Do not guess or fix unrelated code. After fixing, go back to step 1 and re-verify. Repeat up to 8 times.
25
+
26
+ 5. Call \`codeloop_gate_check\` with the \`run_id\`, the spec path, and the acceptance criteria path.
27
+
28
+ 6. If gate_check returns:
29
+ - \`"ready_for_review"\` with confidence >= 85% — the task is complete
30
+ - \`"continue_fixing"\` — go back to step 1
31
+ - \`"escalate"\` — stop and report blockers to the developer
32
+
33
+ 7. If working through a multi-section plan, call \`codeloop_section_status\` to get the next section and repeat the entire cycle.
34
+
35
+ ## Important
36
+
37
+ - Never mark a task complete without evidence from \`codeloop_gate_check\`
38
+ - After 8 failed repair attempts, escalate instead of continuing
39
+ - Trust deterministic results (test pass/fail) over model opinions
40
+ `;
41
+ export const SKILL_VERIFY = `---
42
+ name: codeloop-verify
43
+ description: Run a single CodeLoop verification pass to check if the current code compiles, passes tests, and meets quality standards. Use after any code change to get structured pass/fail results.
44
+ ---
45
+
46
+ # CodeLoop Verify
47
+
48
+ Runs a single verification pass and returns structured results.
49
+
50
+ ## When to use
51
+
52
+ - After making code changes and wanting a quick check
53
+ - Before committing code to ensure nothing is broken
54
+ - When you need structured test/lint/build output instead of raw terminal output
55
+
56
+ ## Instructions
57
+
58
+ 1. Call \`codeloop_verify\` with parameters:
59
+ - \`scope\`: "full" (all checks) or "affected" (only changed files)
60
+ - \`platform\`: "auto" (detect from project), "flutter", "web", or "mobile"
61
+
62
+ 2. The tool returns a structured report containing:
63
+ - Pass/fail counts for each check category
64
+ - Artifact paths for logs and screenshots
65
+ - A next-step suggestion
66
+
67
+ 3. If there are failures, consider using the codeloop-loop skill for the full diagnose-fix cycle, or call \`codeloop_diagnose\` manually with the \`run_id\`.
68
+
69
+ 4. If all checks pass, you can proceed with confidence or run \`codeloop_gate_check\` for formal completion evidence.
70
+
71
+ ## Output format
72
+
73
+ The verification result includes:
74
+ - \`run_id\`: unique identifier for this run (needed by diagnose and gate_check)
75
+ - \`summary\`: overall pass/fail with counts
76
+ - \`checks\`: detailed results per category (build, tests, lint, format)
77
+ - \`artifacts\`: paths to generated logs and screenshots
78
+ - \`suggestion\`: recommended next action
79
+ `;
80
+ export const SKILL_VISUAL_REVIEW = `---
81
+ name: codeloop-visual-review
82
+ description: Capture screenshots of the current UI and analyze them for visual issues, layout problems, and design fidelity. Use after UI changes to catch visual regressions.
83
+ ---
84
+
85
+ # CodeLoop Visual Review
86
+
87
+ Captures and analyzes UI screenshots for visual quality.
88
+
89
+ ## When to use
90
+
91
+ - After making UI/styling changes and wanting to verify visual correctness
92
+ - When a design reference image is available and you want to compare against it
93
+ - When checking responsive layout across different viewport sizes
94
+ - When verifying accessibility-related visual aspects (contrast, sizing)
95
+
96
+ ## Instructions
97
+
98
+ ### For visual review (no reference image):
99
+
100
+ 1. Call \`codeloop_visual_review\` with:
101
+ - \`run_id\`: from a recent \`codeloop_verify\` run (optional)
102
+ - \`viewport_sizes\`: array of viewport dimensions (e.g., ["375x812", "1440x900"])
103
+ - \`ux_checklist_path\`: path to UX checklist if one exists
104
+
105
+ 2. The tool captures screenshots at each viewport size and uses a vision model to identify issues.
106
+
107
+ ### For design comparison (with reference image):
108
+
109
+ 1. Call \`codeloop_design_compare\` with:
110
+ - \`reference_image_path\`: path to the design mockup or Figma export
111
+ - \`screen_name\`: identifier for the screen being compared
112
+ - \`platform\`: the platform being tested
113
+ - \`viewport_sizes\`: viewport dimensions to test
114
+
115
+ 2. The tool returns a match score, list of differences, and comparison screenshots.
116
+
117
+ ## Tips
118
+
119
+ - Store design references in \`artifacts/references/\` for easy access
120
+ - Run visual review after every UI change, not just at the end
121
+ - Use the UX checklist template at \`docs/ux-checklists/_template.md\` for consistent checks
122
+ `;
123
+ export const SKILL_RECOMMEND = `---
124
+ name: codeloop-recommend
125
+ description: Get evidence-based recommendations for third-party tools and services based on the project stack, budget, and constraints. Use when choosing hosting, databases, email services, analytics, or any infrastructure.
126
+ ---
127
+
128
+ # CodeLoop Recommend
129
+
130
+ Provides structured tool and service recommendations.
131
+
132
+ ## When to use
133
+
134
+ - When the developer asks about hosting, deployment, or infrastructure options
135
+ - When choosing between email services, analytics tools, auth providers, or databases
136
+ - When evaluating tools for monitoring, file storage, or marketing
137
+ - When the task requires selecting a third-party service and you want objective comparison
138
+
139
+ ## Instructions
140
+
141
+ 1. Call \`codeloop_recommend_tool\` with:
142
+ - \`category\`: the type of tool needed (e.g., "hosting", "email", "database", "analytics", "auth", "monitoring", "file-storage")
143
+ - \`stack\`: key-value pairs describing the current tech stack
144
+ - \`budget\`: "free", "low", "medium", or "enterprise"
145
+ - \`constraints\`: any specific requirements (e.g., \`{"gdpr": true, "region": "eu"}\`)
146
+
147
+ 2. The tool returns ranked recommendations with reasoning, pricing, tradeoffs, and starter tasks.
148
+
149
+ 3. Present the results with reasoning and tradeoffs — never just recommend a name without context.
150
+
151
+ ## Tips
152
+
153
+ - Always include the current stack so recommendations account for compatibility
154
+ - Set budget to match the developer's stated constraints
155
+ - Use constraints for regulatory requirements (GDPR, SOC2, HIPAA)
156
+ `;
157
+ //# sourceMappingURL=cursor-skills.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-skills.js","sourceRoot":"","sources":["../../src/templates/cursor-skills.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCzB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsC3B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0ClC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC9B,CAAC"}
@@ -0,0 +1,23 @@
1
+ export declare const CURSOR_MCP_CONFIG: {
2
+ mcpServers: {
3
+ codeloop: {
4
+ command: string;
5
+ args: string[];
6
+ env: {
7
+ CODELOOP_API_KEY: string;
8
+ };
9
+ };
10
+ };
11
+ };
12
+ export declare const CLAUDE_MCP_CONFIG: {
13
+ mcpServers: {
14
+ codeloop: {
15
+ command: string;
16
+ args: string[];
17
+ env: {
18
+ CODELOOP_API_KEY: string;
19
+ };
20
+ };
21
+ };
22
+ };
23
+ //# sourceMappingURL=mcp-config.d.ts.map