code-ai-installer 4.0.1-b → 4.0.1-c

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 (128) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +5 -5
  3. package/dist/catalog.js +1 -1
  4. package/dist/contentTransformer.d.ts +1 -1
  5. package/dist/contentTransformer.js +39 -0
  6. package/dist/index.js +10 -5
  7. package/dist/mcp/cli.js +4 -4
  8. package/dist/mcp/scorecard.d.ts +2 -2
  9. package/dist/mcp/task_state.d.ts +2 -2
  10. package/dist/mcp/tools/advance_gate.js +1 -1
  11. package/dist/mcp/tools/classify_gate.d.ts +2 -2
  12. package/dist/mcp/tools/classify_gate.js +2 -2
  13. package/dist/mcp/tools/load_role.d.ts +2 -2
  14. package/dist/mcp/tools/load_role.js +2 -2
  15. package/dist/mcp/tools/report_exception.d.ts +3 -3
  16. package/dist/mcp/tools/report_exception.js +4 -4
  17. package/dist/mcp/tools/request_decision.d.ts +3 -3
  18. package/dist/mcp/tools/request_decision.js +5 -5
  19. package/dist/mcp/tools/review_proposal.d.ts +1 -1
  20. package/dist/mcp/tools/review_proposal.js +6 -6
  21. package/dist/mcp/tools/sign_off.d.ts +2 -2
  22. package/dist/mcp/tools/sign_off.js +7 -7
  23. package/dist/mcp/tools/verify_claim.d.ts +1 -1
  24. package/dist/mcp/tools/verify_claim.js +1 -1
  25. package/dist/mcp_setup.d.ts +84 -31
  26. package/dist/mcp_setup.js +182 -66
  27. package/dist/platforms/adapters.js +54 -19
  28. package/dist/shared/frontmatter.js +1 -1
  29. package/dist/shared/persona.d.ts +1 -1
  30. package/dist/shared/persona.js +1 -1
  31. package/dist/shared/pipeline.d.ts +10 -10
  32. package/dist/shared/pipeline.js +7 -7
  33. package/dist/shared/tools.d.ts +15 -15
  34. package/dist/shared/tools.js +3 -3
  35. package/dist/shared/vocabulary.d.ts +4 -4
  36. package/dist/shared/vocabulary.js +4 -4
  37. package/dist/types.d.ts +1 -1
  38. package/domains/analytics/.agents/workflows/analytics-pipeline-rules.md +13 -3
  39. package/domains/analytics/.agents/workflows/analyze.md +1 -0
  40. package/domains/analytics/.agents/workflows/quick-insight.md +1 -0
  41. package/domains/analytics/locales/en/.agents/workflows/analytics-pipeline-rules.md +13 -3
  42. package/domains/analytics/locales/en/.agents/workflows/analyze.md +1 -0
  43. package/domains/analytics/locales/en/.agents/workflows/quick-insight.md +1 -0
  44. package/domains/analytics/locales/en/agents/interviewer.md +2 -1
  45. package/domains/analytics/locales/en/agents/layouter.md +2 -1
  46. package/domains/analytics/locales/en/agents/mediator.md +2 -1
  47. package/domains/analytics/locales/en/agents/researcher.md +2 -1
  48. package/domains/analytics/locales/en/agents/strategist.md +2 -1
  49. package/domains/analytics/pipeline.yaml +10 -10
  50. package/domains/content/.agents/skills/content-release-gate/SKILL.md +3 -5
  51. package/domains/content/.agents/workflows/content-pipeline-rules.md +14 -11
  52. package/domains/content/.agents/workflows/edit-content.md +0 -1
  53. package/domains/content/.agents/workflows/quick-post.md +0 -1
  54. package/domains/content/.agents/workflows/start-content.md +0 -1
  55. package/domains/content/agents/conductor.md +1 -2
  56. package/domains/content/locales/en/.agents/skills/content-release-gate/SKILL.md +3 -5
  57. package/domains/content/locales/en/.agents/workflows/content-pipeline-rules.md +14 -11
  58. package/domains/content/locales/en/.agents/workflows/edit-content.md +0 -1
  59. package/domains/content/locales/en/.agents/workflows/quick-post.md +0 -1
  60. package/domains/content/locales/en/.agents/workflows/start-content.md +0 -1
  61. package/domains/content/locales/en/agents/conductor.md +1 -2
  62. package/domains/content/pipeline.yaml +8 -8
  63. package/domains/development/.agents/skills/handoff/SKILL.md +276 -276
  64. package/domains/development/.agents/skills/lava-flow-legacy-detection/SKILL.md +197 -197
  65. package/domains/development/.agents/skills/mcp-integration/SKILL.md +211 -211
  66. package/domains/development/.agents/skills/qa-test-data-management/SKILL.md +250 -250
  67. package/domains/development/.agents/workflows/bugfix.md +16 -82
  68. package/domains/development/.agents/workflows/hotfix.md +16 -66
  69. package/domains/development/.agents/workflows/pipeline-rules.md +49 -132
  70. package/domains/development/.agents/workflows/start-task.md +17 -121
  71. package/domains/development/AGENTS.md +8 -3
  72. package/domains/development/agents/architect.md +247 -247
  73. package/domains/development/agents/conductor.md +363 -363
  74. package/domains/development/agents/devops.md +297 -297
  75. package/domains/development/agents/reviewer.md +293 -293
  76. package/domains/development/agents/senior_full_stack.md +295 -295
  77. package/domains/development/agents/tester.md +395 -395
  78. package/domains/development/locales/en/.agents/skills/handoff/SKILL.md +276 -276
  79. package/domains/development/locales/en/.agents/skills/lava-flow-legacy-detection/SKILL.md +197 -197
  80. package/domains/development/locales/en/.agents/skills/mcp-integration/SKILL.md +211 -211
  81. package/domains/development/locales/en/.agents/skills/qa-test-data-management/SKILL.md +250 -250
  82. package/domains/development/locales/en/.agents/workflows/bugfix.md +16 -82
  83. package/domains/development/locales/en/.agents/workflows/hotfix.md +15 -65
  84. package/domains/development/locales/en/.agents/workflows/pipeline-rules.md +48 -131
  85. package/domains/development/locales/en/.agents/workflows/start-task.md +17 -121
  86. package/domains/development/locales/en/AGENTS.md +15 -0
  87. package/domains/development/locales/en/agents/architect.md +247 -247
  88. package/domains/development/locales/en/agents/conductor.md +363 -363
  89. package/domains/development/locales/en/agents/devops.md +297 -297
  90. package/domains/development/locales/en/agents/reviewer.md +293 -293
  91. package/domains/development/locales/en/agents/senior_full_stack.md +295 -295
  92. package/domains/development/locales/en/agents/tester.md +395 -395
  93. package/domains/development/locales/en/prompt-examples.md +34 -120
  94. package/domains/development/pipeline.yaml +150 -135
  95. package/domains/development/prompt-examples.md +33 -119
  96. package/domains/product/.agents/workflows/product-pipeline-rules.md +13 -2
  97. package/domains/product/.agents/workflows/quick-pm.md +1 -1
  98. package/domains/product/.agents/workflows/shape-prioritize.md +1 -0
  99. package/domains/product/.agents/workflows/ship-right-thing.md +1 -0
  100. package/domains/product/.agents/workflows/spec.md +1 -0
  101. package/domains/product/agents/tech_lead.md +1 -1
  102. package/domains/product/locales/en/.agents/workflows/product-pipeline-rules.md +13 -2
  103. package/domains/product/locales/en/.agents/workflows/quick-pm.md +1 -1
  104. package/domains/product/locales/en/.agents/workflows/shape-prioritize.md +1 -0
  105. package/domains/product/locales/en/.agents/workflows/ship-right-thing.md +1 -0
  106. package/domains/product/locales/en/.agents/workflows/spec.md +1 -0
  107. package/domains/product/locales/en/agents/conductor.md +2 -2
  108. package/domains/product/locales/en/agents/data_analyst.md +2 -1
  109. package/domains/product/locales/en/agents/designer.md +2 -1
  110. package/domains/product/locales/en/agents/discovery.md +2 -1
  111. package/domains/product/locales/en/agents/layouter.md +2 -1
  112. package/domains/product/locales/en/agents/mediator.md +2 -1
  113. package/domains/product/locales/en/agents/pm.md +2 -1
  114. package/domains/product/locales/en/agents/product_strategist.md +2 -1
  115. package/domains/product/locales/en/agents/tech_lead.md +3 -2
  116. package/domains/product/locales/en/agents/ux_designer.md +2 -1
  117. package/domains/product/pipeline.yaml +12 -12
  118. package/package.json +5 -5
  119. package/domains/analytics/CONTEXT.md +0 -25
  120. package/domains/analytics/locales/en/CONTEXT.md +0 -25
  121. package/domains/content/CONTEXT.md +0 -19
  122. package/domains/content/locales/en/CONTEXT.md +0 -19
  123. package/domains/development/.agents/workflows/auto-restart-containers.md +0 -56
  124. package/domains/development/CONTEXT.md +0 -62
  125. package/domains/development/locales/en/.agents/workflows/auto-restart-containers.md +0 -24
  126. package/domains/development/locales/en/CONTEXT.md +0 -62
  127. package/domains/product/CONTEXT.md +0 -40
  128. package/domains/product/locales/en/CONTEXT.md +0 -40
@@ -14,12 +14,12 @@ import { z } from "zod";
14
14
  */
15
15
  /**
16
16
  * Sign-off policy for a single gate.
17
- * "den" → always asks DEN
17
+ * "user" → always asks the user
18
18
  * "mcp_auto_pass" → MCP runs a deterministic check; pass auto-signs, fail → exception
19
- * "either" → MCP attempts auto-pass; on green, no DEN attention; on red, surfaces to DEN
19
+ * "either" → MCP attempts auto-pass; on green, no the user attention; on red, surfaces to the user
20
20
  */
21
21
  export declare const SignOffPolicy: z.ZodEnum<{
22
- den: "den";
22
+ user: "user";
23
23
  mcp_auto_pass: "mcp_auto_pass";
24
24
  either: "either";
25
25
  }>;
@@ -60,7 +60,7 @@ export declare const GateConfig: z.ZodObject<{
60
60
  produced_by: z.ZodDefault<z.ZodArray<z.ZodString>>;
61
61
  signs_off: z.ZodDefault<z.ZodArray<z.ZodString>>;
62
62
  sign_off_policy: z.ZodEnum<{
63
- den: "den";
63
+ user: "user";
64
64
  mcp_auto_pass: "mcp_auto_pass";
65
65
  either: "either";
66
66
  }>;
@@ -108,7 +108,7 @@ export declare const ModeConfig: z.ZodObject<{
108
108
  produced_by: z.ZodDefault<z.ZodArray<z.ZodString>>;
109
109
  signs_off: z.ZodDefault<z.ZodArray<z.ZodString>>;
110
110
  sign_off_policy: z.ZodEnum<{
111
- den: "den";
111
+ user: "user";
112
112
  mcp_auto_pass: "mcp_auto_pass";
113
113
  either: "either";
114
114
  }>;
@@ -139,7 +139,7 @@ export declare const CircuitBreakerConfig: z.ZodObject<{
139
139
  export type CircuitBreakerConfig = z.infer<typeof CircuitBreakerConfig>;
140
140
  /**
141
141
  * Touchpoint compression budget per pipeline (from 2026-05-23 decisions drawer item #4).
142
- * Number of DEN touchpoints allowed before the pipeline is considered over-budget.
142
+ * Number of the user touchpoints allowed before the pipeline is considered over-budget.
143
143
  */
144
144
  export declare const TouchpointBudget: z.ZodObject<{
145
145
  hotfix: z.ZodDefault<z.ZodNumber>;
@@ -156,14 +156,14 @@ export type TouchpointBudget = z.infer<typeof TouchpointBudget>;
156
156
  * schema_version: 1
157
157
  * domain: development
158
158
  * default_mode: full
159
- * default_signer: den
159
+ * default_signer: user
160
160
  * modes:
161
161
  * - mode: full
162
162
  * gates:
163
163
  * - gate: PM
164
164
  * produced_by: [pm]
165
165
  * signs_off: [pm]
166
- * sign_off_policy: den
166
+ * sign_off_policy: user
167
167
  * ...
168
168
  * circuit_breaker: { enabled: true, dev_rollback_threshold: 2, ... }
169
169
  */
@@ -181,7 +181,7 @@ export declare const PipelineYaml: z.ZodObject<{
181
181
  hotfix: "hotfix";
182
182
  }>>;
183
183
  default_signer: z.ZodDefault<z.ZodEnum<{
184
- den: "den";
184
+ user: "user";
185
185
  mcp: "mcp";
186
186
  system: "system";
187
187
  }>>;
@@ -220,7 +220,7 @@ export declare const PipelineYaml: z.ZodObject<{
220
220
  produced_by: z.ZodDefault<z.ZodArray<z.ZodString>>;
221
221
  signs_off: z.ZodDefault<z.ZodArray<z.ZodString>>;
222
222
  sign_off_policy: z.ZodEnum<{
223
- den: "den";
223
+ user: "user";
224
224
  mcp_auto_pass: "mcp_auto_pass";
225
225
  either: "either";
226
226
  }>;
@@ -16,11 +16,11 @@ import { AgentName } from "./frontmatter.js";
16
16
  */
17
17
  /**
18
18
  * Sign-off policy for a single gate.
19
- * "den" → always asks DEN
19
+ * "user" → always asks the user
20
20
  * "mcp_auto_pass" → MCP runs a deterministic check; pass auto-signs, fail → exception
21
- * "either" → MCP attempts auto-pass; on green, no DEN attention; on red, surfaces to DEN
21
+ * "either" → MCP attempts auto-pass; on green, no the user attention; on red, surfaces to the user
22
22
  */
23
- export const SignOffPolicy = z.enum(["den", "mcp_auto_pass", "either"]);
23
+ export const SignOffPolicy = z.enum(["user", "mcp_auto_pass", "either"]);
24
24
  /** Reference to a named deterministic check (MCP tool name). Used by mcp_auto_pass policies. */
25
25
  export const AutoCheckRef = z.object({
26
26
  tool: z.string().min(1),
@@ -73,7 +73,7 @@ export const CircuitBreakerConfig = z.object({
73
73
  });
74
74
  /**
75
75
  * Touchpoint compression budget per pipeline (from 2026-05-23 decisions drawer item #4).
76
- * Number of DEN touchpoints allowed before the pipeline is considered over-budget.
76
+ * Number of the user touchpoints allowed before the pipeline is considered over-budget.
77
77
  */
78
78
  export const TouchpointBudget = z.object({
79
79
  hotfix: z.number().int().min(1).default(1),
@@ -91,14 +91,14 @@ export const TouchpointBudget = z.object({
91
91
  * schema_version: 1
92
92
  * domain: development
93
93
  * default_mode: full
94
- * default_signer: den
94
+ * default_signer: user
95
95
  * modes:
96
96
  * - mode: full
97
97
  * gates:
98
98
  * - gate: PM
99
99
  * produced_by: [pm]
100
100
  * signs_off: [pm]
101
- * sign_off_policy: den
101
+ * sign_off_policy: user
102
102
  * ...
103
103
  * circuit_breaker: { enabled: true, dev_rollback_threshold: 2, ... }
104
104
  */
@@ -108,7 +108,7 @@ export const PipelineYaml = z.object({
108
108
  /** Default mode chosen when the user doesn't specify one. */
109
109
  default_mode: PipelineMode.default("full"),
110
110
  /** Default signer if a gate doesn't override. */
111
- default_signer: Signer.default("den"),
111
+ default_signer: Signer.default("user"),
112
112
  modes: z.array(ModeConfig).min(1),
113
113
  circuit_breaker: CircuitBreakerConfig.default(() => CircuitBreakerConfig.parse({})),
114
114
  touchpoint_budget: TouchpointBudget.default(() => TouchpointBudget.parse({})),
@@ -419,7 +419,7 @@ export declare const RequestDecisionInput: z.ZodObject<{
419
419
  export declare const RequestDecisionOutput: z.ZodObject<{
420
420
  chosen_option_id: z.ZodString;
421
421
  signer: z.ZodEnum<{
422
- den: "den";
422
+ user: "user";
423
423
  mcp: "mcp";
424
424
  system: "system";
425
425
  }>;
@@ -465,7 +465,7 @@ export declare const RecordDecisionInput: z.ZodObject<{
465
465
  chosen_option_id: z.ZodString;
466
466
  rationale: z.ZodString;
467
467
  signer: z.ZodEnum<{
468
- den: "den";
468
+ user: "user";
469
469
  mcp: "mcp";
470
470
  system: "system";
471
471
  }>;
@@ -681,7 +681,7 @@ export declare const SignOffInput: z.ZodObject<{
681
681
  TECH_LEAD: "TECH_LEAD";
682
682
  }>;
683
683
  signer: z.ZodEnum<{
684
- den: "den";
684
+ user: "user";
685
685
  mcp: "mcp";
686
686
  system: "system";
687
687
  }>;
@@ -690,7 +690,7 @@ export declare const SignOffInput: z.ZodObject<{
690
690
  export declare const SignOffOutput: z.ZodObject<{
691
691
  signed: z.ZodLiteral<true>;
692
692
  signer: z.ZodEnum<{
693
- den: "den";
693
+ user: "user";
694
694
  mcp: "mcp";
695
695
  system: "system";
696
696
  }>;
@@ -808,7 +808,7 @@ export declare const ReportExceptionInput: z.ZodObject<{
808
808
  export declare const ReportExceptionOutput: z.ZodObject<{
809
809
  exception_id: z.ZodString;
810
810
  surfaced_to: z.ZodEnum<{
811
- den: "den";
811
+ user: "user";
812
812
  mcp: "mcp";
813
813
  system: "system";
814
814
  }>;
@@ -963,7 +963,7 @@ export declare const RecentDecisionsOutput: z.ZodObject<{
963
963
  question: z.ZodString;
964
964
  chosen_option_id: z.ZodString;
965
965
  signer: z.ZodEnum<{
966
- den: "den";
966
+ user: "user";
967
967
  mcp: "mcp";
968
968
  system: "system";
969
969
  }>;
@@ -1413,7 +1413,7 @@ export declare const ProposalReviewEvent: z.ZodObject<{
1413
1413
  superseded: "superseded";
1414
1414
  }>;
1415
1415
  decided_by: z.ZodEnum<{
1416
- den: "den";
1416
+ user: "user";
1417
1417
  auditor_auto: "auditor_auto";
1418
1418
  }>;
1419
1419
  note: z.ZodOptional<z.ZodString>;
@@ -1428,7 +1428,7 @@ export declare const ReviewProposalInput: z.ZodObject<{
1428
1428
  reject: "reject";
1429
1429
  }>;
1430
1430
  decided_by: z.ZodEnum<{
1431
- den: "den";
1431
+ user: "user";
1432
1432
  auditor_auto: "auditor_auto";
1433
1433
  }>;
1434
1434
  note: z.ZodOptional<z.ZodString>;
@@ -1969,7 +1969,7 @@ export declare const TOOL_REGISTRY: {
1969
1969
  readonly output: z.ZodObject<{
1970
1970
  chosen_option_id: z.ZodString;
1971
1971
  signer: z.ZodEnum<{
1972
- den: "den";
1972
+ user: "user";
1973
1973
  mcp: "mcp";
1974
1974
  system: "system";
1975
1975
  }>;
@@ -2015,7 +2015,7 @@ export declare const TOOL_REGISTRY: {
2015
2015
  chosen_option_id: z.ZodString;
2016
2016
  rationale: z.ZodString;
2017
2017
  signer: z.ZodEnum<{
2018
- den: "den";
2018
+ user: "user";
2019
2019
  mcp: "mcp";
2020
2020
  system: "system";
2021
2021
  }>;
@@ -2231,7 +2231,7 @@ export declare const TOOL_REGISTRY: {
2231
2231
  TECH_LEAD: "TECH_LEAD";
2232
2232
  }>;
2233
2233
  signer: z.ZodEnum<{
2234
- den: "den";
2234
+ user: "user";
2235
2235
  mcp: "mcp";
2236
2236
  system: "system";
2237
2237
  }>;
@@ -2240,7 +2240,7 @@ export declare const TOOL_REGISTRY: {
2240
2240
  readonly output: z.ZodObject<{
2241
2241
  signed: z.ZodLiteral<true>;
2242
2242
  signer: z.ZodEnum<{
2243
- den: "den";
2243
+ user: "user";
2244
2244
  mcp: "mcp";
2245
2245
  system: "system";
2246
2246
  }>;
@@ -2358,7 +2358,7 @@ export declare const TOOL_REGISTRY: {
2358
2358
  readonly output: z.ZodObject<{
2359
2359
  exception_id: z.ZodString;
2360
2360
  surfaced_to: z.ZodEnum<{
2361
- den: "den";
2361
+ user: "user";
2362
2362
  mcp: "mcp";
2363
2363
  system: "system";
2364
2364
  }>;
@@ -2513,7 +2513,7 @@ export declare const TOOL_REGISTRY: {
2513
2513
  question: z.ZodString;
2514
2514
  chosen_option_id: z.ZodString;
2515
2515
  signer: z.ZodEnum<{
2516
- den: "den";
2516
+ user: "user";
2517
2517
  mcp: "mcp";
2518
2518
  system: "system";
2519
2519
  }>;
@@ -2868,7 +2868,7 @@ export declare const TOOL_REGISTRY: {
2868
2868
  reject: "reject";
2869
2869
  }>;
2870
2870
  decided_by: z.ZodEnum<{
2871
- den: "den";
2871
+ user: "user";
2872
2872
  auditor_auto: "auditor_auto";
2873
2873
  }>;
2874
2874
  note: z.ZodOptional<z.ZodString>;
@@ -156,7 +156,7 @@ export const SignOffInput = z.object({
156
156
  task_id: TaskId,
157
157
  gate: GateName,
158
158
  signer: Signer,
159
- /** Evidence — for mcp signer this is the auto_check tool output; for den it's free-form. */
159
+ /** Evidence — for mcp signer this is the auto_check tool output; for user it's free-form. */
160
160
  evidence: z.unknown().optional(),
161
161
  });
162
162
  export const SignOffOutput = z.object({
@@ -502,7 +502,7 @@ export const ProposalReviewEvent = z.object({
502
502
  id: z.string(),
503
503
  status: ProposalStatus,
504
504
  /** Who authorized the transition. "auditor_auto" is matrix/toggle-gated in review_proposal. */
505
- decided_by: z.enum(["den", "auditor_auto"]),
505
+ decided_by: z.enum(["user", "auditor_auto"]),
506
506
  note: z.string().optional(),
507
507
  reviewed_at: z.string(),
508
508
  });
@@ -511,7 +511,7 @@ export const ReviewProposalInput = z.object({
511
511
  /** approve/reject act on a pending proposal; applied marks an approved one as written. */
512
512
  decision: z.enum(["approve", "reject", "applied"]),
513
513
  /** Authorizer. "auditor_auto" only valid for low/additive when the approval gate is OFF. */
514
- decided_by: z.enum(["den", "auditor_auto"]),
514
+ decided_by: z.enum(["user", "auditor_auto"]),
515
515
  note: z.string().optional(),
516
516
  });
517
517
  export const ReviewProposalOutput = z.object({
@@ -117,8 +117,8 @@ export declare const GateName: z.ZodEnum<{
117
117
  export type GateName = z.infer<typeof GateName>;
118
118
  /**
119
119
  * LLM MUST classify each gate before producing artifact. Per the silent-by-default contract:
120
- * - auto_resolve: green path, no DEN attention required, artifact still produced for audit
121
- * - fork: decision-point that needs DEN — surfaces via request_decision
120
+ * - auto_resolve: green path, no the user attention required, artifact still produced for audit
121
+ * - fork: decision-point that needs the user — surfaces via request_decision
122
122
  * - exception: automated check failed, breakdown written to exception channel
123
123
  */
124
124
  export declare const ClassificationOutcome: z.ZodEnum<{
@@ -170,9 +170,9 @@ export declare const SkillType: z.ZodEnum<{
170
170
  discretionary: "discretionary";
171
171
  }>;
172
172
  export type SkillType = z.infer<typeof SkillType>;
173
- /** "den" = the user. "mcp" = auto-pass via deterministic check. "system" = circuit-breaker / audit. */
173
+ /** "user" = the user. "mcp" = auto-pass via deterministic check. "system" = circuit-breaker / audit. */
174
174
  export declare const Signer: z.ZodEnum<{
175
- den: "den";
175
+ user: "user";
176
176
  mcp: "mcp";
177
177
  system: "system";
178
178
  }>;
@@ -100,8 +100,8 @@ export const GateName = z.enum(uniqueGates([
100
100
  // ─── Classification (the only decision channel before each gate transition) ──
101
101
  /**
102
102
  * LLM MUST classify each gate before producing artifact. Per the silent-by-default contract:
103
- * - auto_resolve: green path, no DEN attention required, artifact still produced for audit
104
- * - fork: decision-point that needs DEN — surfaces via request_decision
103
+ * - auto_resolve: green path, no the user attention required, artifact still produced for audit
104
+ * - fork: decision-point that needs the user — surfaces via request_decision
105
105
  * - exception: automated check failed, breakdown written to exception channel
106
106
  */
107
107
  export const ClassificationOutcome = z.enum([
@@ -169,8 +169,8 @@ export const SkillType = z.enum([
169
169
  "discretionary",
170
170
  ]);
171
171
  // ─── Signers (who can sign off a gate) ───────────────────────────────────────
172
- /** "den" = the user. "mcp" = auto-pass via deterministic check. "system" = circuit-breaker / audit. */
173
- export const Signer = z.enum(["den", "mcp", "system"]);
172
+ /** "user" = the user. "mcp" = auto-pass via deterministic check. "system" = circuit-breaker / audit. */
173
+ export const Signer = z.enum(["user", "mcp", "system"]);
174
174
  // ─── Controlled vocab seeds (extendable via request_decision) ───────────────
175
175
  /**
176
176
  * tech + topic enums are seeded at migration start (<=30 each per plan).
package/dist/types.d.ts CHANGED
@@ -29,7 +29,7 @@ export interface InstallOperation {
29
29
  optional?: boolean;
30
30
  transform?: {
31
31
  target: TargetId;
32
- assetType: "orchestrator" | "agent" | "skill";
32
+ assetType: "orchestrator" | "agent" | "skill" | "workflow";
33
33
  };
34
34
  }
35
35
  /**
@@ -11,6 +11,16 @@ description: Абсолютные правила аналитического п
11
11
 
12
12
  ---
13
13
 
14
+ ## Машина гейтов (code-ai MCP)
15
+
16
+ Аналитический пайплайн исполняется машиной состояний `code-ai` MCP; источник правды — `analytics/pipeline.yaml`. Каждый гейт проходится через MCP-поток: `current_gate` → `classify_gate` → `load_role` (роль гейта) + `get_skill` → deliverable + `submit_artifact` → `sign_off` → `advance_gate`.
17
+
18
+ - **Подпись:** в аналитике **все гейты `user`** — каждый закрывается явным "Approved" пользователя (домен суждения; детерминированных авто-чеков, как тесты в разработке, здесь нет). Авто-пас на зелёном не применяется.
19
+ - **Circuit breaker отключён** (нет полосы откатов DEV/OPS/REV/TEST); возвраты идут через reverse `$handoff` (см. протокол ниже).
20
+ - Оркестрационные скиллы `$board` / `$handoff` / `$gates` — человекочитаемый слой поверх машины (доска статусов, передача, проверка готовности). Эскалация-развилка — `request_decision`; решения уровня ADR — `record_decision`.
21
+
22
+ ---
23
+
14
24
  ## Три режима пайплайна
15
25
 
16
26
  ### 🔵 Full Pipeline (`/analyze`) — 5 сессий
@@ -65,7 +75,7 @@ CONDUCTOR → INTERVIEWER → RESEARCHER → DATA_ANALYST → STRATEGIST → MED
65
75
  ### Правило 2: User sign-off на каждом гейте
66
76
  - Переход к следующему гейту — **только** после явного "Approved" от пользователя.
67
77
  - При sign-off пользователь **верифицирует**, что AI правильно загрузил агента и его скиллы.
68
- - `ShouldAutoProceed = false` ВСЕГДА.
78
+ - Переход — только через `sign_off` по политике `user`; авто-пас на зелёном в аналитике не применяется.
69
79
 
70
80
  **Применяющие скилы:** `$gates` (запрашивает Approved), `$handoff` (ожидает Approved перед передачей).
71
81
 
@@ -122,7 +132,7 @@ CONDUCTOR → INTERVIEWER → RESEARCHER → DATA_ANALYST → STRATEGIST → MED
122
132
  | # | Блок | Когда | Что проверяет | При провале |
123
133
  |---|------|-------|---------------|-------------|
124
134
  | 1 | **Pre-flight check** | Перед записью deliverable | Процитировать последний "Approved" пользователя | Остановиться, запросить Approved |
125
- | 2 | **Skill read check** | Перед применением скилла | Прочитать SKILL.md через `view_file` | Прочитать, затем применять |
135
+ | 2 | **Skill read check** | Перед применением скилла | Загрузить скилл через `get_skill` | Загрузить, затем применять |
126
136
  | 3 | **Data verification check** | Каждый факт в deliverable | Source URL + date + confidence (✅/⚠️/🔮) | Пометить как 🔮 Assumed или удалить |
127
137
  | 4 | **Handoff file check** | Перед закрытием сессии (Full) | `docs/analytics/session-N-handoff.md` сохранён, самодостаточен | Не закрывать сессию, сохранить файл |
128
138
  | 5 | **Team mode check** | Conductor при каждом handoff | Агент работает в назначенном team mode | Вернуть и переназначить |
@@ -135,7 +145,7 @@ CONDUCTOR → INTERVIEWER → RESEARCHER → DATA_ANALYST → STRATEGIST → MED
135
145
  1. Показать deliverable и запросить "Approved".
136
146
  2. Если нет ответа — **ожидать**. Не переходить к следующему гейту.
137
147
  3. Напомнить: «Ожидаю "Approved" для перехода к [следующий гейт]».
138
- 4. **Никогда** не auto-proceed. `ShouldAutoProceed = false` ВСЕГДА.
148
+ 4. **Никогда** не двигать гейт без `sign_off` (все гейты `user` — нужен явный "Approved").
139
149
 
140
150
  ### При повторных FAIL на `$gates`
141
151
  | Итерация | Действие |
@@ -9,6 +9,7 @@ description: Полный аналитический пайплайн — 5 се
9
9
  Полный аналитический пайплайн с состязательным подходом. Две конкурирующие команды (Аналитики и Критики) независимо исследуют вопрос, Медиатор оценивает результаты, верстальщики готовят PDF-отчёт. Разбит на 5 сессий для управления контекстным окном.
10
10
 
11
11
  > **Правила пайплайна:** Этот воркфлоу подчиняется `analytics-pipeline-rules.md` — 7 обязательных правил, mechanical blocks, метрики здоровья, протокол эскалации.
12
+ > Исполняется машиной code-ai MCP: `current_gate` → `classify_gate` → `load_role`/`get_skill` → `submit_artifact` → `sign_off` → `advance_gate`; все гейты `user`. См. секцию «Машина гейтов» в `analytics-pipeline-rules.md`.
12
13
 
13
14
  ## Когда использовать
14
15
 
@@ -9,6 +9,7 @@ description: Быстрый аналитический пайплайн — 1 с
9
9
  Упрощённый аналитический пайплайн в одной сессии. Одна команда Аналитиков (без Критиков), Медиатор верифицирует логическую цепочку, верстальщики готовят PDF-отчёт. Подходит для простых вопросов и быстрых проверок.
10
10
 
11
11
  > **Правила пайплайна:** Этот воркфлоу подчиняется `analytics-pipeline-rules.md` — все 7 правил, mechanical blocks и протокол эскалации применяются полностью, как и в /analyze.
12
+ > Исполняется машиной code-ai MCP: `current_gate` → `classify_gate` → `load_role`/`get_skill` → `submit_artifact` → `sign_off` → `advance_gate`; все гейты `user`. См. секцию «Машина гейтов» в `analytics-pipeline-rules.md`.
12
13
 
13
14
  ## Когда использовать
14
15
 
@@ -11,6 +11,16 @@ description: Absolute rules of the analytical pipeline — gates, discipline, in
11
11
 
12
12
  ---
13
13
 
14
+ ## Gate machine (code-ai MCP)
15
+
16
+ The analytical pipeline is executed by the `code-ai` MCP state machine; the source of truth is `analytics/pipeline.yaml`. Every gate runs through the MCP flow: `current_gate` → `classify_gate` → `load_role` (the gate's role) + `get_skill` → deliverable + `submit_artifact` → `sign_off` → `advance_gate`.
17
+
18
+ - **Sign-off:** in analytics **all gates are `user`** — each is closed by the user's explicit "Approved" (a judgment domain; there are no deterministic auto-checks here, like tests in development). No auto-pass on green.
19
+ - **Circuit breaker is disabled** (there is no DEV/OPS/REV/TEST rollback band); returns go through reverse `$handoff` (see protocol below).
20
+ - Orchestration skills `$board` / `$handoff` / `$gates` are a human-readable layer over the machine (status board, transfer, readiness check). The escalation fork is `request_decision`; ADR-level decisions are `record_decision`.
21
+
22
+ ---
23
+
14
24
  ## Three Pipeline Modes
15
25
 
16
26
  ### 🔵 Full Pipeline (`/analyze`) — 5 sessions
@@ -65,7 +75,7 @@ User request
65
75
  ### Rule 2: User sign-off at every gate
66
76
  - Transitioning to the next gate is **only** allowed after an explicit "Approved" from the user.
67
77
  - Upon sign-off, the user **verifies** that the AI correctly loaded the agent and its skills.
68
- - `ShouldAutoProceed = false` ALWAYS.
78
+ - Transition happens only via `sign_off` under the `user` policy; no auto-pass on green in analytics.
69
79
 
70
80
  **Applied skills:** `$gates` (requests Approved), `$handoff` (waits for Approved before transfer).
71
81
 
@@ -122,7 +132,7 @@ User request
122
132
  | # | Block | When | What it checks | On failure |
123
133
  |---|-------|------|----------------|------------|
124
134
  | 1 | **Pre-flight check** | Before writing a deliverable | Quote the last user's "Approved" | Stop, request Approved |
125
- | 2 | **Skill read check** | Before applying a skill | Read SKILL.md via `view_file` | Read, then apply |
135
+ | 2 | **Skill read check** | Before applying a skill | Load the skill via `get_skill` | Load, then apply |
126
136
  | 3 | **Data verification check** | Every fact in the deliverable | Source URL + date + confidence (✅/⚠️/🔮) | Mark as 🔮 Assumed or remove |
127
137
  | 4 | **Handoff file check** | Before closing the session (Full) | `docs/analytics/session-N-handoff.md` saved, self-contained | Do not close session, save file |
128
138
  | 5 | **Team mode check** | Conductor at every handoff | Agent works in the assigned team mode | Return and reassign |
@@ -135,7 +145,7 @@ User request
135
145
  1. Show the deliverable and request "Approved".
136
146
  2. If there is no answer — **wait**. Do not proceed to the next gate.
137
147
  3. Remind: "Waiting for 'Approved' to transition to [next gate]".
138
- 4. **Never** auto-proceed. `ShouldAutoProceed = false` ALWAYS.
148
+ 4. **Never** move a gate without `sign_off` (all gates are `user` — an explicit "Approved" is required).
139
149
 
140
150
  ### Upon repeated FAILs at `$gates`
141
151
  | Iteration | Action |
@@ -9,6 +9,7 @@ description: Full analytical pipeline — 5 sessions, adversarial approach, medi
9
9
  Full analytical pipeline with an adversarial approach. Two competing teams (Analysts and Critics) independently research the question, the Mediator evaluates the results, and the design/layout team prepares a PDF report. Divided into 5 sessions to manage context window limits.
10
10
 
11
11
  > **Pipeline rules:** This workflow obeys `analytics-pipeline-rules.md` — 7 mandatory rules, mechanical blocks, health metrics, and the escalation protocol.
12
+ > Executed by the code-ai MCP machine: `current_gate` → `classify_gate` → `load_role`/`get_skill` → `submit_artifact` → `sign_off` → `advance_gate`; all gates `user`. See the "Gate machine" section in `analytics-pipeline-rules.md`.
12
13
 
13
14
  ## When to use
14
15
 
@@ -9,6 +9,7 @@ description: Quick analytical pipeline — 1 session, one team, logic mediation,
9
9
  A simplified, rapid analytical pipeline contained within a single session. One single Analysts team (no Critics); the Mediator verifies logical chaining, and the designers layout a PDF report. Designed for simple, direct questions and quick checks.
10
10
 
11
11
  > **Pipeline rules:** This workflow adheres to `analytics-pipeline-rules.md` — all 7 rules, mandatory checks, and the escalation protocol apply strictly, identical to /analyze.
12
+ > Executed by the code-ai MCP machine: `current_gate` → `classify_gate` → `load_role`/`get_skill` → `submit_artifact` → `sign_off` → `advance_gate`; all gates `user`. See the "Gate machine" section in `analytics-pipeline-rules.md`.
12
13
 
13
14
  ## When to use
14
15
 
@@ -5,7 +5,7 @@ domain: analytics
5
5
  signs_off_at:
6
6
  - INTERVIEWER
7
7
  tool_allowlist: role:interviewer
8
- budget_lines: 477
8
+ budget_lines: 478
9
9
  schema_version: 1
10
10
  ---
11
11
 
@@ -54,6 +54,7 @@ this is a defect in the Interviewer's work.
54
54
  ## Utilized Skills
55
55
 
56
56
  ### Mandatory (every time)
57
+ - **$karpathy-guidelines** — think first, do only what's needed, edit precisely, work from the result
57
58
  - **`$gates`** — verification of the deliverable against INT-xx criteria before transfer
58
59
  - **`$handoff`** — receiving handoff from COND-01 + formatting the envelope with Research Brief
59
60
  - **`$board`** — updating INT-01 status
@@ -5,7 +5,7 @@ domain: analytics
5
5
  signs_off_at:
6
6
  - LAYOUTER
7
7
  tool_allowlist: role:layouter
8
- budget_lines: 359
8
+ budget_lines: 360
9
9
  schema_version: 1
10
10
  ---
11
11
 
@@ -50,6 +50,7 @@ and getting a professional PDF without manual configuration.
50
50
  ## Utilized Skills
51
51
 
52
52
  ### Mandatory (every time)
53
+ - **$karpathy-guidelines** — think first, do only what's needed, edit precisely, work from the result
53
54
  - **`$html-pdf-report`** — full HTML generation protocol: CSS, Chart.js, Mermaid, components, testing
54
55
  - **`$gates`** — verification of deliverable against LY-xx criteria + Release Gate
55
56
  - **`$handoff`** — receipt from DS-01 + transmission to Release Gate
@@ -5,7 +5,7 @@ domain: analytics
5
5
  signs_off_at:
6
6
  - MEDIATOR
7
7
  tool_allowlist: role:mediator
8
- budget_lines: 487
8
+ budget_lines: 488
9
9
  schema_version: 1
10
10
  ---
11
11
 
@@ -52,6 +52,7 @@ analyses and a practical decision.
52
52
  ## Utilized Skills
53
53
 
54
54
  ### Mandatory (every time)
55
+ - **$karpathy-guidelines** — think first, do only what's needed, edit precisely, work from the result
55
56
  - **`$gates`** — verification of deliverable against MED-xx criteria before transmission
56
57
  - **`$handoff`** — receipt from COND-04 + formulating the envelope with Mediated Conclusion
57
58
  - **`$board`** — updating MED-01 status
@@ -5,7 +5,7 @@ domain: analytics
5
5
  signs_off_at:
6
6
  - RESEARCHER
7
7
  tool_allowlist: role:researcher
8
- budget_lines: 441
8
+ budget_lines: 442
9
9
  schema_version: 1
10
10
  ---
11
11
 
@@ -57,6 +57,7 @@ research question, at least 3 independent sources.
57
57
  ## Utilized Skills
58
58
 
59
59
  ### Mandatory (every time)
60
+ - **$karpathy-guidelines** — think first, do only what's needed, edit precisely, work from the result
60
61
  - **`$web-research`** — web search and data verification. Runs **always**. Protocol: source tiering (T1/T2/T3), 3-level confidence, audit trail, counter-search, quality metrics.
61
62
  - **`$gates`** — verification of deliverable against RES-xx criteria (web-search = Blocker, dependency check)
62
63
  - **`$handoff`** — receipt from COND-xx + transmission envelope for AN-xx
@@ -5,7 +5,7 @@ domain: analytics
5
5
  signs_off_at:
6
6
  - STRATEGIST
7
7
  tool_allowlist: role:strategist
8
- budget_lines: 444
8
+ budget_lines: 445
9
9
  schema_version: 1
10
10
  ---
11
11
 
@@ -60,6 +60,7 @@ from raw data through analytical insights to the strategic decision.
60
60
  ## Utilized Skills
61
61
 
62
62
  ### Mandatory (every time)
63
+ - **$karpathy-guidelines** — think first, do only what's needed, edit precisely, work from the result
63
64
  - **`$gates`** — verification of deliverable against ST-xx criteria (traceability, dependency check)
64
65
  - **`$handoff`** — receipt from AN-xx + constructing the envelope for Conductor
65
66
  - **`$board`** — updating ST-xx status
@@ -20,14 +20,14 @@
20
20
  # mode is deferred — the PipelineMode enum (full/bugfix/hotfix) carries dev
21
21
  # semantics, so a content/analytics fast-path needs its own design later.
22
22
  #
23
- # All gates use sign_off_policy=den: analytics has no wired deterministic auto-
23
+ # All gates use sign_off_policy=user: analytics has no wired deterministic auto-
24
24
  # check MCP tools. Circuit breaker is DISABLED (the breaker mechanic is hardwired
25
25
  # to a rollback into the DEV gate, which analytics has no analog for).
26
26
 
27
27
  schema_version: 1
28
28
  domain: analytics
29
29
  default_mode: full
30
- default_signer: den
30
+ default_signer: user
31
31
 
32
32
  modes:
33
33
  - mode: full
@@ -35,49 +35,49 @@ modes:
35
35
  - gate: INTERVIEWER
36
36
  produced_by: [interviewer]
37
37
  signs_off: [interviewer, conductor]
38
- sign_off_policy: den
38
+ sign_off_policy: user
39
39
  classify_required: true
40
40
  retryable: true
41
41
  - gate: RESEARCHER
42
42
  produced_by: [researcher]
43
43
  signs_off: [researcher, conductor]
44
- sign_off_policy: den
44
+ sign_off_policy: user
45
45
  classify_required: true
46
46
  retryable: true
47
47
  - gate: DATA_ANALYST
48
48
  produced_by: [data_analyst]
49
49
  signs_off: [data_analyst, conductor]
50
- sign_off_policy: den
50
+ sign_off_policy: user
51
51
  classify_required: true
52
52
  retryable: true
53
53
  - gate: STRATEGIST
54
54
  produced_by: [strategist]
55
55
  signs_off: [strategist, conductor]
56
- sign_off_policy: den
56
+ sign_off_policy: user
57
57
  classify_required: true
58
58
  retryable: true
59
59
  - gate: MEDIATOR
60
60
  produced_by: [mediator]
61
61
  signs_off: [mediator, conductor]
62
- sign_off_policy: den
62
+ sign_off_policy: user
63
63
  classify_required: true
64
64
  retryable: true
65
65
  - gate: DESIGNER
66
66
  produced_by: [designer]
67
67
  signs_off: [designer, conductor]
68
- sign_off_policy: den
68
+ sign_off_policy: user
69
69
  classify_required: true
70
70
  retryable: true
71
71
  - gate: LAYOUTER
72
72
  produced_by: [layouter]
73
73
  signs_off: [layouter, conductor]
74
- sign_off_policy: den
74
+ sign_off_policy: user
75
75
  classify_required: true
76
76
  retryable: true
77
77
  - gate: RELEASE_GATE
78
78
  produced_by: [conductor]
79
79
  signs_off: [conductor]
80
- sign_off_policy: den
80
+ sign_off_policy: user
81
81
  classify_required: true
82
82
  retryable: false
83
83