claude-code-pilot 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +11 -11
  2. package/bin/install.js +20 -2
  3. package/manifest.json +5 -1
  4. package/package.json +18 -6
  5. package/src/agents/a11y-architect.md +141 -0
  6. package/src/agents/code-architect.md +71 -0
  7. package/src/agents/code-explorer.md +69 -0
  8. package/src/agents/code-simplifier.md +47 -0
  9. package/src/agents/comment-analyzer.md +45 -0
  10. package/src/agents/csharp-reviewer.md +101 -0
  11. package/src/agents/dart-build-resolver.md +201 -0
  12. package/src/agents/pr-test-analyzer.md +45 -0
  13. package/src/agents/silent-failure-hunter.md +50 -0
  14. package/src/agents/type-design-analyzer.md +41 -0
  15. package/src/available-rules/README.md +3 -1
  16. package/src/available-rules/dart/coding-style.md +159 -0
  17. package/src/available-rules/dart/hooks.md +66 -0
  18. package/src/available-rules/dart/patterns.md +261 -0
  19. package/src/available-rules/dart/security.md +135 -0
  20. package/src/available-rules/dart/testing.md +215 -0
  21. package/src/available-rules/web/coding-style.md +105 -0
  22. package/src/available-rules/web/design-quality.md +72 -0
  23. package/src/available-rules/web/hooks.md +129 -0
  24. package/src/available-rules/web/patterns.md +88 -0
  25. package/src/available-rules/web/performance.md +73 -0
  26. package/src/available-rules/web/security.md +66 -0
  27. package/src/available-rules/web/testing.md +64 -0
  28. package/src/commands/ccp/ai-integration-phase.md +36 -0
  29. package/src/commands/ccp/audit-fix.md +33 -0
  30. package/src/commands/ccp/code-review-fix.md +52 -0
  31. package/src/commands/ccp/eval-review.md +32 -0
  32. package/src/commands/ccp/extract_learnings.md +22 -0
  33. package/src/commands/ccp/import.md +37 -0
  34. package/src/commands/ccp/ingest-docs.md +42 -0
  35. package/src/commands/ccp/intel.md +179 -0
  36. package/src/commands/ccp/plan-review-convergence.md +58 -0
  37. package/src/commands/ccp/scan.md +26 -0
  38. package/src/commands/ccp/sketch-wrap-up.md +31 -0
  39. package/src/commands/ccp/sketch.md +54 -0
  40. package/src/commands/ccp/spec-phase.md +62 -0
  41. package/src/commands/ccp/spike-wrap-up.md +31 -0
  42. package/src/commands/ccp/spike.md +51 -0
  43. package/src/commands/ccp/ultraplan-phase.md +33 -0
  44. package/src/hooks/ccp-read-injection-scanner.js +152 -0
  45. package/src/hooks/kit-check-update.js +59 -7
  46. package/src/hooks/run-with-flags-shell.sh +1 -0
  47. package/src/hooks/run-with-flags.js +48 -1
  48. package/src/hooks/session-end.js +88 -1
  49. package/src/lib/hook-flags.js +14 -0
  50. package/src/pilot/references/agent-contracts.md +79 -0
  51. package/src/pilot/references/ai-evals.md +156 -0
  52. package/src/pilot/references/ai-frameworks.md +186 -0
  53. package/src/pilot/references/doc-conflict-engine.md +91 -0
  54. package/src/pilot/references/gate-prompts.md +100 -0
  55. package/src/pilot/references/gates.md +70 -0
  56. package/src/pilot/references/mandatory-initial-read.md +2 -0
  57. package/src/pilot/references/project-skills-discovery.md +19 -0
  58. package/src/pilot/references/revision-loop.md +97 -0
  59. package/src/pilot/references/sketch-interactivity.md +41 -0
  60. package/src/pilot/references/sketch-theme-system.md +94 -0
  61. package/src/pilot/references/sketch-tooling.md +45 -0
  62. package/src/pilot/references/sketch-variant-patterns.md +81 -0
  63. package/src/pilot/references/thinking-models-debug.md +44 -0
  64. package/src/pilot/references/thinking-models-execution.md +50 -0
  65. package/src/pilot/references/thinking-models-planning.md +62 -0
  66. package/src/pilot/references/thinking-models-research.md +50 -0
  67. package/src/pilot/references/thinking-models-verification.md +55 -0
  68. package/src/pilot/templates/AI-SPEC.md +246 -0
  69. package/src/pilot/templates/spec.md +307 -0
  70. package/src/pilot/workflows/ai-integration-phase.md +284 -0
  71. package/src/pilot/workflows/audit-fix.md +175 -0
  72. package/src/pilot/workflows/code-review-fix.md +497 -0
  73. package/src/pilot/workflows/eval-review.md +155 -0
  74. package/src/pilot/workflows/extract_learnings.md +242 -0
  75. package/src/pilot/workflows/import.md +246 -0
  76. package/src/pilot/workflows/ingest-docs.md +328 -0
  77. package/src/pilot/workflows/plan-review-convergence.md +329 -0
  78. package/src/pilot/workflows/scan.md +102 -0
  79. package/src/pilot/workflows/sketch-wrap-up.md +285 -0
  80. package/src/pilot/workflows/sketch.md +360 -0
  81. package/src/pilot/workflows/spec-phase.md +262 -0
  82. package/src/pilot/workflows/spike-wrap-up.md +306 -0
  83. package/src/pilot/workflows/spike.md +452 -0
  84. package/src/pilot/workflows/ultraplan-phase.md +189 -0
  85. package/src/skills/accessibility/SKILL.md +146 -0
  86. package/src/skills/agent-eval/SKILL.md +145 -0
  87. package/src/skills/agent-introspection-debugging/SKILL.md +153 -0
  88. package/src/skills/android-clean-architecture/SKILL.md +339 -0
  89. package/src/skills/api-connector-builder/SKILL.md +120 -0
  90. package/src/skills/code-tour/SKILL.md +236 -0
  91. package/src/skills/compose-multiplatform-patterns/SKILL.md +299 -0
  92. package/src/skills/csharp-testing/SKILL.md +321 -0
  93. package/src/skills/dart-flutter-patterns/SKILL.md +563 -0
  94. package/src/skills/dashboard-builder/SKILL.md +108 -0
  95. package/src/skills/dotnet-patterns/SKILL.md +321 -0
  96. package/src/skills/frontend-design/SKILL.md +145 -0
  97. package/src/skills/frontend-slides/SKILL.md +184 -0
  98. package/src/skills/frontend-slides/STYLE_PRESETS.md +330 -0
  99. package/src/skills/gateguard/SKILL.md +121 -0
  100. package/src/skills/github-ops/SKILL.md +144 -0
  101. package/src/skills/hookify-rules/SKILL.md +128 -0
  102. package/src/skills/knowledge-ops/SKILL.md +154 -0
  103. package/src/skills/liquid-glass-design/SKILL.md +279 -0
  104. package/src/skills/nestjs-patterns/SKILL.md +230 -0
  105. package/src/skills/security-bounty-hunter/SKILL.md +99 -0
  106. package/src/skills/swift-actor-persistence/SKILL.md +143 -0
  107. package/src/skills/swift-protocol-di-testing/SKILL.md +190 -0
  108. package/src/skills/swiftui-patterns/SKILL.md +259 -0
  109. package/src/skills/terminal-ops/SKILL.md +109 -0
  110. package/src/skills/ui-demo/SKILL.md +465 -0
@@ -0,0 +1,321 @@
1
+ ---
2
+ name: dotnet-patterns
3
+ description: Idiomatic C# and .NET patterns, conventions, dependency injection, async/await, and best practices for building robust, maintainable .NET applications.
4
+ origin: ECC
5
+ ---
6
+
7
+ # .NET Development Patterns
8
+
9
+ Idiomatic C# and .NET patterns for building robust, performant, and maintainable applications.
10
+
11
+ ## When to Activate
12
+
13
+ - Writing new C# code
14
+ - Reviewing C# code
15
+ - Refactoring existing .NET applications
16
+ - Designing service architectures with ASP.NET Core
17
+
18
+ ## Core Principles
19
+
20
+ ### 1. Prefer Immutability
21
+
22
+ Use records and init-only properties for data models. Mutability should be an explicit, justified choice.
23
+
24
+ ```csharp
25
+ // Good: Immutable value object
26
+ public sealed record Money(decimal Amount, string Currency);
27
+
28
+ // Good: Immutable DTO with init setters
29
+ public sealed class CreateOrderRequest
30
+ {
31
+ public required string CustomerId { get; init; }
32
+ public required IReadOnlyList<OrderItem> Items { get; init; }
33
+ }
34
+
35
+ // Bad: Mutable model with public setters
36
+ public class Order
37
+ {
38
+ public string CustomerId { get; set; }
39
+ public List<OrderItem> Items { get; set; }
40
+ }
41
+ ```
42
+
43
+ ### 2. Explicit Over Implicit
44
+
45
+ Be clear about nullability, access modifiers, and intent.
46
+
47
+ ```csharp
48
+ // Good: Explicit access modifiers and nullability
49
+ public sealed class UserService
50
+ {
51
+ private readonly IUserRepository _repository;
52
+ private readonly ILogger<UserService> _logger;
53
+
54
+ public UserService(IUserRepository repository, ILogger<UserService> logger)
55
+ {
56
+ _repository = repository ?? throw new ArgumentNullException(nameof(repository));
57
+ _logger = logger ?? throw new ArgumentNullException(nameof(logger));
58
+ }
59
+
60
+ public async Task<User?> FindByIdAsync(Guid id, CancellationToken cancellationToken)
61
+ {
62
+ return await _repository.FindByIdAsync(id, cancellationToken);
63
+ }
64
+ }
65
+ ```
66
+
67
+ ### 3. Depend on Abstractions
68
+
69
+ Use interfaces for service boundaries. Register via DI container.
70
+
71
+ ```csharp
72
+ // Good: Interface-based dependency
73
+ public interface IOrderRepository
74
+ {
75
+ Task<Order?> FindByIdAsync(Guid id, CancellationToken cancellationToken);
76
+ Task<IReadOnlyList<Order>> FindByCustomerAsync(string customerId, CancellationToken cancellationToken);
77
+ Task AddAsync(Order order, CancellationToken cancellationToken);
78
+ }
79
+
80
+ // Registration
81
+ builder.Services.AddScoped<IOrderRepository, SqlOrderRepository>();
82
+ ```
83
+
84
+ ## Async/Await Patterns
85
+
86
+ ### Proper Async Usage
87
+
88
+ ```csharp
89
+ // Good: Async all the way, with CancellationToken
90
+ public async Task<OrderSummary> GetOrderSummaryAsync(
91
+ Guid orderId,
92
+ CancellationToken cancellationToken)
93
+ {
94
+ var order = await _repository.FindByIdAsync(orderId, cancellationToken)
95
+ ?? throw new NotFoundException($"Order {orderId} not found");
96
+
97
+ var customer = await _customerService.GetAsync(order.CustomerId, cancellationToken);
98
+
99
+ return new OrderSummary(order, customer);
100
+ }
101
+
102
+ // Bad: Blocking on async
103
+ public OrderSummary GetOrderSummary(Guid orderId)
104
+ {
105
+ var order = _repository.FindByIdAsync(orderId, CancellationToken.None).Result; // Deadlock risk
106
+ return new OrderSummary(order);
107
+ }
108
+ ```
109
+
110
+ ### Parallel Async Operations
111
+
112
+ ```csharp
113
+ // Good: Concurrent independent operations
114
+ public async Task<DashboardData> LoadDashboardAsync(CancellationToken cancellationToken)
115
+ {
116
+ var ordersTask = _orderService.GetRecentAsync(cancellationToken);
117
+ var metricsTask = _metricsService.GetCurrentAsync(cancellationToken);
118
+ var alertsTask = _alertService.GetActiveAsync(cancellationToken);
119
+
120
+ await Task.WhenAll(ordersTask, metricsTask, alertsTask);
121
+
122
+ return new DashboardData(
123
+ Orders: await ordersTask,
124
+ Metrics: await metricsTask,
125
+ Alerts: await alertsTask);
126
+ }
127
+ ```
128
+
129
+ ## Options Pattern
130
+
131
+ Bind configuration sections to strongly-typed objects.
132
+
133
+ ```csharp
134
+ public sealed class SmtpOptions
135
+ {
136
+ public const string SectionName = "Smtp";
137
+
138
+ public required string Host { get; init; }
139
+ public required int Port { get; init; }
140
+ public required string Username { get; init; }
141
+ public bool UseSsl { get; init; } = true;
142
+ }
143
+
144
+ // Registration
145
+ builder.Services.Configure<SmtpOptions>(
146
+ builder.Configuration.GetSection(SmtpOptions.SectionName));
147
+
148
+ // Usage via injection
149
+ public class EmailService(IOptions<SmtpOptions> options)
150
+ {
151
+ private readonly SmtpOptions _smtp = options.Value;
152
+ }
153
+ ```
154
+
155
+ ## Result Pattern
156
+
157
+ Return explicit success/failure instead of throwing for expected failures.
158
+
159
+ ```csharp
160
+ public sealed record Result<T>
161
+ {
162
+ public bool IsSuccess { get; }
163
+ public T? Value { get; }
164
+ public string? Error { get; }
165
+
166
+ private Result(T value) { IsSuccess = true; Value = value; }
167
+ private Result(string error) { IsSuccess = false; Error = error; }
168
+
169
+ public static Result<T> Success(T value) => new(value);
170
+ public static Result<T> Failure(string error) => new(error);
171
+ }
172
+
173
+ // Usage
174
+ public async Task<Result<Order>> PlaceOrderAsync(CreateOrderRequest request)
175
+ {
176
+ if (request.Items.Count == 0)
177
+ return Result<Order>.Failure("Order must contain at least one item");
178
+
179
+ var order = Order.Create(request);
180
+ await _repository.AddAsync(order, CancellationToken.None);
181
+ return Result<Order>.Success(order);
182
+ }
183
+ ```
184
+
185
+ ## Repository Pattern with EF Core
186
+
187
+ ```csharp
188
+ public sealed class SqlOrderRepository : IOrderRepository
189
+ {
190
+ private readonly AppDbContext _db;
191
+
192
+ public SqlOrderRepository(AppDbContext db) => _db = db;
193
+
194
+ public async Task<Order?> FindByIdAsync(Guid id, CancellationToken cancellationToken)
195
+ {
196
+ return await _db.Orders
197
+ .Include(o => o.Items)
198
+ .AsNoTracking()
199
+ .FirstOrDefaultAsync(o => o.Id == id, cancellationToken);
200
+ }
201
+
202
+ public async Task<IReadOnlyList<Order>> FindByCustomerAsync(
203
+ string customerId,
204
+ CancellationToken cancellationToken)
205
+ {
206
+ return await _db.Orders
207
+ .Where(o => o.CustomerId == customerId)
208
+ .OrderByDescending(o => o.CreatedAt)
209
+ .AsNoTracking()
210
+ .ToListAsync(cancellationToken);
211
+ }
212
+
213
+ public async Task AddAsync(Order order, CancellationToken cancellationToken)
214
+ {
215
+ _db.Orders.Add(order);
216
+ await _db.SaveChangesAsync(cancellationToken);
217
+ }
218
+ }
219
+ ```
220
+
221
+ ## Middleware and Pipeline
222
+
223
+ ```csharp
224
+ // Custom middleware
225
+ public sealed class RequestTimingMiddleware
226
+ {
227
+ private readonly RequestDelegate _next;
228
+ private readonly ILogger<RequestTimingMiddleware> _logger;
229
+
230
+ public RequestTimingMiddleware(RequestDelegate next, ILogger<RequestTimingMiddleware> logger)
231
+ {
232
+ _next = next;
233
+ _logger = logger;
234
+ }
235
+
236
+ public async Task InvokeAsync(HttpContext context)
237
+ {
238
+ var stopwatch = Stopwatch.StartNew();
239
+ try
240
+ {
241
+ await _next(context);
242
+ }
243
+ finally
244
+ {
245
+ stopwatch.Stop();
246
+ _logger.LogInformation(
247
+ "Request {Method} {Path} completed in {ElapsedMs}ms with status {StatusCode}",
248
+ context.Request.Method,
249
+ context.Request.Path,
250
+ stopwatch.ElapsedMilliseconds,
251
+ context.Response.StatusCode);
252
+ }
253
+ }
254
+ }
255
+ ```
256
+
257
+ ## Minimal API Patterns
258
+
259
+ ```csharp
260
+ // Organized with route groups
261
+ var orders = app.MapGroup("/api/orders")
262
+ .RequireAuthorization()
263
+ .WithTags("Orders");
264
+
265
+ orders.MapGet("/{id:guid}", async (
266
+ Guid id,
267
+ IOrderRepository repository,
268
+ CancellationToken cancellationToken) =>
269
+ {
270
+ var order = await repository.FindByIdAsync(id, cancellationToken);
271
+ return order is not null
272
+ ? TypedResults.Ok(order)
273
+ : TypedResults.NotFound();
274
+ });
275
+
276
+ orders.MapPost("/", async (
277
+ CreateOrderRequest request,
278
+ IOrderService service,
279
+ CancellationToken cancellationToken) =>
280
+ {
281
+ var result = await service.PlaceOrderAsync(request, cancellationToken);
282
+ return result.IsSuccess
283
+ ? TypedResults.Created($"/api/orders/{result.Value!.Id}", result.Value)
284
+ : TypedResults.BadRequest(result.Error);
285
+ });
286
+ ```
287
+
288
+ ## Guard Clauses
289
+
290
+ ```csharp
291
+ // Good: Early returns with clear validation
292
+ public async Task<ProcessResult> ProcessPaymentAsync(
293
+ PaymentRequest request,
294
+ CancellationToken cancellationToken)
295
+ {
296
+ ArgumentNullException.ThrowIfNull(request);
297
+
298
+ if (request.Amount <= 0)
299
+ throw new ArgumentOutOfRangeException(nameof(request.Amount), "Amount must be positive");
300
+
301
+ if (string.IsNullOrWhiteSpace(request.Currency))
302
+ throw new ArgumentException("Currency is required", nameof(request.Currency));
303
+
304
+ // Happy path continues here without nesting
305
+ var gateway = _gatewayFactory.Create(request.Currency);
306
+ return await gateway.ChargeAsync(request, cancellationToken);
307
+ }
308
+ ```
309
+
310
+ ## Anti-Patterns to Avoid
311
+
312
+ | Anti-Pattern | Fix |
313
+ |---|---|
314
+ | `async void` methods | Return `Task` (except event handlers) |
315
+ | `.Result` or `.Wait()` | Use `await` |
316
+ | `catch (Exception) { }` | Handle or rethrow with context |
317
+ | `new Service()` in constructors | Use constructor injection |
318
+ | `public` fields | Use properties with appropriate accessors |
319
+ | `dynamic` in business logic | Use generics or explicit types |
320
+ | Mutable `static` state | Use DI scoping or `ConcurrentDictionary` |
321
+ | `string.Format` in loops | Use `StringBuilder` or interpolated string handlers |
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: frontend-design
3
+ description: Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.
4
+ origin: ECC
5
+ ---
6
+
7
+ # Frontend Design
8
+
9
+ Use this when the task is not just "make it work" but "make it look designed."
10
+
11
+ This skill is for product pages, dashboards, app shells, components, or visual systems that need a clear point of view instead of generic AI-looking UI.
12
+
13
+ ## When To Use
14
+
15
+ - building a landing page, dashboard, or app surface from scratch
16
+ - upgrading a bland interface into something intentional and memorable
17
+ - translating a product concept into a concrete visual direction
18
+ - implementing a frontend where typography, composition, and motion matter
19
+
20
+ ## Core Principle
21
+
22
+ Pick a direction and commit to it.
23
+
24
+ Safe-average UI is usually worse than a strong, coherent aesthetic with a few bold choices.
25
+
26
+ ## Design Workflow
27
+
28
+ ### 1. Frame the interface first
29
+
30
+ Before coding, settle:
31
+
32
+ - purpose
33
+ - audience
34
+ - emotional tone
35
+ - visual direction
36
+ - one thing the user should remember
37
+
38
+ Possible directions:
39
+
40
+ - brutally minimal
41
+ - editorial
42
+ - industrial
43
+ - luxury
44
+ - playful
45
+ - geometric
46
+ - retro-futurist
47
+ - soft and organic
48
+ - maximalist
49
+
50
+ Do not mix directions casually. Choose one and execute it cleanly.
51
+
52
+ ### 2. Build the visual system
53
+
54
+ Define:
55
+
56
+ - type hierarchy
57
+ - color variables
58
+ - spacing rhythm
59
+ - layout logic
60
+ - motion rules
61
+ - surface / border / shadow treatment
62
+
63
+ Use CSS variables or the project's token system so the interface stays coherent as it grows.
64
+
65
+ ### 3. Compose with intention
66
+
67
+ Prefer:
68
+
69
+ - asymmetry when it sharpens hierarchy
70
+ - overlap when it creates depth
71
+ - strong whitespace when it clarifies focus
72
+ - dense layouts only when the product benefits from density
73
+
74
+ Avoid defaulting to a symmetrical card grid unless it is clearly the right fit.
75
+
76
+ ### 4. Make motion meaningful
77
+
78
+ Use animation to:
79
+
80
+ - reveal hierarchy
81
+ - stage information
82
+ - reinforce user action
83
+ - create one or two memorable moments
84
+
85
+ Do not scatter generic micro-interactions everywhere. One well-directed load sequence is usually stronger than twenty random hover effects.
86
+
87
+ ## Strong Defaults
88
+
89
+ ### Typography
90
+
91
+ - pick fonts with character
92
+ - pair a distinctive display face with a readable body face when appropriate
93
+ - avoid generic defaults when the page is design-led
94
+
95
+ ### Color
96
+
97
+ - commit to a clear palette
98
+ - one dominant field with selective accents usually works better than evenly weighted rainbow palettes
99
+ - avoid cliché purple-gradient-on-white unless the product genuinely calls for it
100
+
101
+ ### Background
102
+
103
+ Use atmosphere:
104
+
105
+ - gradients
106
+ - meshes
107
+ - textures
108
+ - subtle noise
109
+ - patterns
110
+ - layered transparency
111
+
112
+ Flat empty backgrounds are rarely the best answer for a product-facing page.
113
+
114
+ ### Layout
115
+
116
+ - break the grid when the composition benefits from it
117
+ - use diagonals, offsets, and grouping intentionally
118
+ - keep reading flow obvious even when the layout is unconventional
119
+
120
+ ## Anti-Patterns
121
+
122
+ Never default to:
123
+
124
+ - interchangeable SaaS hero sections
125
+ - generic card piles with no hierarchy
126
+ - random accent colors without a system
127
+ - placeholder-feeling typography
128
+ - motion that exists only because animation was easy to add
129
+
130
+ ## Execution Rules
131
+
132
+ - preserve the established design system when working inside an existing product
133
+ - match technical complexity to the visual idea
134
+ - keep accessibility and responsiveness intact
135
+ - frontends should feel deliberate on desktop and mobile
136
+
137
+ ## Quality Gate
138
+
139
+ Before delivering:
140
+
141
+ - the interface has a clear visual point of view
142
+ - typography and spacing feel intentional
143
+ - color and motion support the product instead of decorating it randomly
144
+ - the result does not read like generic AI UI
145
+ - the implementation is production-grade, not just visually interesting
@@ -0,0 +1,184 @@
1
+ ---
2
+ name: frontend-slides
3
+ description: Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.
4
+ origin: ECC
5
+ ---
6
+
7
+ # Frontend Slides
8
+
9
+ Create zero-dependency, animation-rich HTML presentations that run entirely in the browser.
10
+
11
+ Inspired by the visual exploration approach showcased in work by zarazhangrui (credit: @zarazhangrui).
12
+
13
+ ## When to Activate
14
+
15
+ - Creating a talk deck, pitch deck, workshop deck, or internal presentation
16
+ - Converting `.ppt` or `.pptx` slides into an HTML presentation
17
+ - Improving an existing HTML presentation's layout, motion, or typography
18
+ - Exploring presentation styles with a user who does not know their design preference yet
19
+
20
+ ## Non-Negotiables
21
+
22
+ 1. **Zero dependencies**: default to one self-contained HTML file with inline CSS and JS.
23
+ 2. **Viewport fit is mandatory**: every slide must fit inside one viewport with no internal scrolling.
24
+ 3. **Show, don't tell**: use visual previews instead of abstract style questionnaires.
25
+ 4. **Distinctive design**: avoid generic purple-gradient, Inter-on-white, template-looking decks.
26
+ 5. **Production quality**: keep code commented, accessible, responsive, and performant.
27
+
28
+ Before generating, read `STYLE_PRESETS.md` for the viewport-safe CSS base, density limits, preset catalog, and CSS gotchas.
29
+
30
+ ## Workflow
31
+
32
+ ### 1. Detect Mode
33
+
34
+ Choose one path:
35
+ - **New presentation**: user has a topic, notes, or full draft
36
+ - **PPT conversion**: user has `.ppt` or `.pptx`
37
+ - **Enhancement**: user already has HTML slides and wants improvements
38
+
39
+ ### 2. Discover Content
40
+
41
+ Ask only the minimum needed:
42
+ - purpose: pitch, teaching, conference talk, internal update
43
+ - length: short (5-10), medium (10-20), long (20+)
44
+ - content state: finished copy, rough notes, topic only
45
+
46
+ If the user has content, ask them to paste it before styling.
47
+
48
+ ### 3. Discover Style
49
+
50
+ Default to visual exploration.
51
+
52
+ If the user already knows the desired preset, skip previews and use it directly.
53
+
54
+ Otherwise:
55
+ 1. Ask what feeling the deck should create: impressed, energized, focused, inspired.
56
+ 2. Generate **3 single-slide preview files** in `.ecc-design/slide-previews/`.
57
+ 3. Each preview must be self-contained, show typography/color/motion clearly, and stay under roughly 100 lines of slide content.
58
+ 4. Ask the user which preview to keep or what elements to mix.
59
+
60
+ Use the preset guide in `STYLE_PRESETS.md` when mapping mood to style.
61
+
62
+ ### 4. Build the Presentation
63
+
64
+ Output either:
65
+ - `presentation.html`
66
+ - `[presentation-name].html`
67
+
68
+ Use an `assets/` folder only when the deck contains extracted or user-supplied images.
69
+
70
+ Required structure:
71
+ - semantic slide sections
72
+ - a viewport-safe CSS base from `STYLE_PRESETS.md`
73
+ - CSS custom properties for theme values
74
+ - a presentation controller class for keyboard, wheel, and touch navigation
75
+ - Intersection Observer for reveal animations
76
+ - reduced-motion support
77
+
78
+ ### 5. Enforce Viewport Fit
79
+
80
+ Treat this as a hard gate.
81
+
82
+ Rules:
83
+ - every `.slide` must use `height: 100vh; height: 100dvh; overflow: hidden;`
84
+ - all type and spacing must scale with `clamp()`
85
+ - when content does not fit, split into multiple slides
86
+ - never solve overflow by shrinking text below readable sizes
87
+ - never allow scrollbars inside a slide
88
+
89
+ Use the density limits and mandatory CSS block in `STYLE_PRESETS.md`.
90
+
91
+ ### 6. Validate
92
+
93
+ Check the finished deck at these sizes:
94
+ - 1920x1080
95
+ - 1280x720
96
+ - 768x1024
97
+ - 375x667
98
+ - 667x375
99
+
100
+ If browser automation is available, use it to verify no slide overflows and that keyboard navigation works.
101
+
102
+ ### 7. Deliver
103
+
104
+ At handoff:
105
+ - delete temporary preview files unless the user wants to keep them
106
+ - open the deck with the platform-appropriate opener when useful
107
+ - summarize file path, preset used, slide count, and easy theme customization points
108
+
109
+ Use the correct opener for the current OS:
110
+ - macOS: `open file.html`
111
+ - Linux: `xdg-open file.html`
112
+ - Windows: `start "" file.html`
113
+
114
+ ## PPT / PPTX Conversion
115
+
116
+ For PowerPoint conversion:
117
+ 1. Prefer `python3` with `python-pptx` to extract text, images, and notes.
118
+ 2. If `python-pptx` is unavailable, ask whether to install it or fall back to a manual/export-based workflow.
119
+ 3. Preserve slide order, speaker notes, and extracted assets.
120
+ 4. After extraction, run the same style-selection workflow as a new presentation.
121
+
122
+ Keep conversion cross-platform. Do not rely on macOS-only tools when Python can do the job.
123
+
124
+ ## Implementation Requirements
125
+
126
+ ### HTML / CSS
127
+
128
+ - Use inline CSS and JS unless the user explicitly wants a multi-file project.
129
+ - Fonts may come from Google Fonts or Fontshare.
130
+ - Prefer atmospheric backgrounds, strong type hierarchy, and a clear visual direction.
131
+ - Use abstract shapes, gradients, grids, noise, and geometry rather than illustrations.
132
+
133
+ ### JavaScript
134
+
135
+ Include:
136
+ - keyboard navigation
137
+ - touch / swipe navigation
138
+ - mouse wheel navigation
139
+ - progress indicator or slide index
140
+ - reveal-on-enter animation triggers
141
+
142
+ ### Accessibility
143
+
144
+ - use semantic structure (`main`, `section`, `nav`)
145
+ - keep contrast readable
146
+ - support keyboard-only navigation
147
+ - respect `prefers-reduced-motion`
148
+
149
+ ## Content Density Limits
150
+
151
+ Use these maxima unless the user explicitly asks for denser slides and readability still holds:
152
+
153
+ | Slide type | Limit |
154
+ |------------|-------|
155
+ | Title | 1 heading + 1 subtitle + optional tagline |
156
+ | Content | 1 heading + 4-6 bullets or 2 short paragraphs |
157
+ | Feature grid | 6 cards max |
158
+ | Code | 8-10 lines max |
159
+ | Quote | 1 quote + attribution |
160
+ | Image | 1 image constrained by viewport |
161
+
162
+ ## Anti-Patterns
163
+
164
+ - generic startup gradients with no visual identity
165
+ - system-font decks unless intentionally editorial
166
+ - long bullet walls
167
+ - code blocks that need scrolling
168
+ - fixed-height content boxes that break on short screens
169
+ - invalid negated CSS functions like `-clamp(...)`
170
+
171
+ ## Related ECC Skills
172
+
173
+ - `frontend-patterns` for component and interaction patterns around the deck
174
+ - `liquid-glass-design` when a presentation intentionally borrows Apple glass aesthetics
175
+ - `e2e-testing` if you need automated browser verification for the final deck
176
+
177
+ ## Deliverable Checklist
178
+
179
+ - presentation runs from a local file in a browser
180
+ - every slide fits the viewport without scrolling
181
+ - style is distinctive and intentional
182
+ - animation is meaningful, not noisy
183
+ - reduced motion is respected
184
+ - file paths and customization points are explained at handoff