ai-engineering-starter-kit 0.4.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.
@@ -0,0 +1,627 @@
1
+ ---
2
+ name: ppp
3
+ version: 0.4.0
4
+ description: "Plan. Patch. Prove. A lightweight interactive workflow for normal engineering tasks: inspect code, clarify only blocking questions, plan the smallest safe complete change, prove it, patch in small loops, review production readiness, and prepare a PR."
5
+ ---
6
+
7
+ # Plan. Patch. Prove
8
+
9
+ Use this skill for normal engineering tickets, bugs, small features, tests, UI changes, and small refactors.
10
+
11
+ Core loop:
12
+
13
+ ```text
14
+ Inspect → Clarify → Plan → Prove → Patch → Review → PR
15
+ ```
16
+
17
+ The engineer remains responsible for intent, judgement, validation, architecture, and final approval. AI accelerates the work inside those boundaries.
18
+
19
+ <!-- Similar section in ppp-cloud — keep core rules consistent -->
20
+ ## Token discipline
21
+
22
+ Be concise. Inspect only relevant files, summarise instead of pasting code/logs, and avoid restating large specs or prior outputs. Prefer file paths, decisions, risks, checks run, and next actions.
23
+
24
+ Do not create task artifact files by default. Keep state in the conversation and code changes unless the user explicitly asks for notes.
25
+
26
+ ## Interaction rules
27
+
28
+ This skill is interactive. When a decision or next action is needed, show a short menu.
29
+
30
+ Rules:
31
+
32
+ - Put the recommended action as option 1.
33
+ - Keep menus to 3–5 options.
34
+ - Treat `yes`, `y`, `go`, `continue`, `proceed`, `next`, `do it`, `run it`, `1`, and `option 1` as selecting option 1.
35
+ - If the user gives free text, treat it as instructions.
36
+ - Always state the current phase: Inspecting, Clarifying, Planning, Proving, Patching, Reviewing, PR handoff, or Blocked.
37
+
38
+ Menu format:
39
+
40
+ ```text
41
+ Current phase:
42
+ <phase>
43
+
44
+ Recommended next action:
45
+ <action>
46
+
47
+ Choose an option:
48
+
49
+ 1. <recommended action> — recommended
50
+ 2. <alternative>
51
+ 3. <alternative>
52
+ 4. Stop here
53
+ ```
54
+
55
+ <!-- Similar section in ppp-cloud — keep core rules consistent -->
56
+ ## Hard rules
57
+
58
+ - Inspect relevant code before planning or editing.
59
+ - Follow repo guidance and nearby code/test conventions.
60
+ - Do not invent requirements.
61
+ - Ask only blocking/high-impact questions.
62
+ - Do not silently make product, architecture, security, auth, data migration, permission, tenancy, billing, or public API decisions.
63
+ - Do not touch unrelated files.
64
+ - Do not weaken tests or remove validation to make checks pass.
65
+ - Do not claim checks passed unless they actually ran.
66
+ - Do not shortcut required changes just to keep the diff small.
67
+ - Do not leave related code paths half-updated when correctness requires consistency.
68
+ - Stop after two focused failed fix attempts and hand useful context back to the user.
69
+
70
+ <!-- Similar section in ppp-cloud — keep core rules consistent -->
71
+ ## Repo guidance
72
+
73
+ Before planning or editing, inspect repo guidance if available:
74
+
75
+ - `.github/copilot-instructions.md`
76
+ - `.github/instructions/**/*.instructions.md`
77
+ - `AGENTS.md`
78
+ - `CONTRIBUTING.md`
79
+ - `README.md`
80
+ - package-specific README files near the changed code
81
+ - `.github/PULL_REQUEST_TEMPLATE.md`
82
+
83
+ Follow repo guidance for architecture, style, tests, validation commands, PR format, forbidden areas, and security/privacy rules. If no guidance exists, infer conventions from nearby code and tests.
84
+
85
+ If repo guidance conflicts with this skill, follow repo guidance unless it weakens safety, validation, or production readiness.
86
+
87
+ ## Task fit gate
88
+
89
+ Before implementation, decide whether the task fits PPP.
90
+
91
+ PPP is suitable when the selected work can be completed as one focused PR with clear proof.
92
+
93
+ If the task is broad or underspecified, do not implement it directly. Examples:
94
+
95
+ - “build a new analytics dashboard”
96
+ - “add reporting”
97
+ - “improve onboarding”
98
+ - “build the new permissions system”
99
+ - “migrate this service”
100
+
101
+ If too large, offer:
102
+
103
+ 1. Identify the smallest PPP-ready task — recommended
104
+ 2. Implement only the smallest useful first increment
105
+ 3. Ask for a fuller spec
106
+ 4. Stop here
107
+
108
+ If the user provides a large spec, summarise the goal briefly, identify the smallest PPP-ready task, ask the user to confirm, and proceed only with that task. For multi-PR or multi-slice work, recommend a feature-slicing workflow.
109
+
110
+ ## 1. Inspect
111
+
112
+ Read the ticket and inspect relevant code before planning.
113
+
114
+ Return a concise understanding:
115
+
116
+ ```md
117
+ ## Understanding
118
+
119
+ Intended behaviour:
120
+ - ...
121
+
122
+ Current behaviour:
123
+ - ...
124
+
125
+ Files/modules inspected:
126
+ - ...
127
+
128
+ Existing patterns to follow:
129
+ - ...
130
+
131
+ Assumptions:
132
+ - ...
133
+
134
+ Open questions:
135
+ - ...
136
+
137
+ Risks:
138
+ - ...
139
+ ```
140
+
141
+ Use a codebase inspection table when file paths or modules matter:
142
+
143
+ | Area | File/module | Status | Evidence | Notes |
144
+ |---|---|---|---|---|
145
+
146
+ Statuses:
147
+
148
+ - Confirmed — inspected and exists
149
+ - Inferred — likely, but not inspected
150
+ - Proposed new — does not exist yet and is proposed
151
+ - Missing — expected but not found
152
+
153
+ Do not present inferred paths as confirmed. If codebase inspection is unavailable, say so and provide an implementation pack that must be verified in the IDE before coding.
154
+
155
+ ## 2. Clarify
156
+
157
+ Ask only questions that materially affect implementation, proof, risk, or acceptance.
158
+
159
+ Limits:
160
+
161
+ - Default maximum: 5 questions
162
+ - Complex task maximum: 10 questions
163
+ - Never exceed 10 unless the user asks for exhaustive discovery
164
+
165
+ If a question can be resolved by inspecting code or tests, inspect instead of asking.
166
+
167
+ Prefer a recommended default when the choice is low-risk, reversible, internal, or already implied by repo patterns.
168
+
169
+ Use this format:
170
+
171
+ ```md
172
+ ## Questions before implementation
173
+
174
+ Q1. <question>
175
+ Why it matters: <reason>
176
+ Recommended answer: <safe default>
177
+
178
+ Options:
179
+ 1. Use recommended answer — recommended
180
+ 2. Provide a different answer
181
+ 3. Mark out of scope
182
+ 4. Defer and inspect existing pattern
183
+ ```
184
+
185
+ If the user accepts the recommended answer, document it as a decision and continue. If the answer affects architecture, security, data, auth, permissions, public APIs, or user-facing semantics, get clarity before proceeding.
186
+
187
+ ## 3. Plan
188
+
189
+ Propose the smallest safe complete change that satisfies the selected task.
190
+
191
+ ```md
192
+ ## Plan
193
+
194
+ Smallest safe complete change:
195
+ - ...
196
+
197
+ Files to change:
198
+ - ...
199
+
200
+ Tests/checks to add or update:
201
+ - ...
202
+
203
+ Validation:
204
+ - ...
205
+
206
+ Risks:
207
+ - ...
208
+
209
+ Will not change:
210
+ - ...
211
+ ```
212
+
213
+ The plan must follow repo conventions, components, styling, architecture, and design patterns.
214
+
215
+ Do not plan unrelated refactors. Do not avoid legitimate required files merely to keep the diff small. If the work becomes larger or riskier than expected, stop and re-plan or recommend splitting.
216
+
217
+ ## 4. Prove
218
+
219
+ Define proof before implementation.
220
+
221
+ Choose exactly one primary proof and up to three supporting checks. The primary proof must directly validate the changed behaviour. Lint/typecheck alone is not sufficient for behavioural changes unless no behavioural proof is practical.
222
+
223
+ Use the lowest-cost proof that gives meaningful confidence:
224
+
225
+ - Static/local sanity: lint, typecheck, build affected package
226
+ - Targeted unit/component test: default for logic and UI behaviour
227
+ - Focused integration/API/contract test: for cross-module or API behaviour
228
+ - E2E/manual workflow: when a real workflow is needed
229
+ - Full suite/expensive checks: only when repo convention, risk, or user request requires it
230
+
231
+ Ask before running expensive integration/E2E/full-suite checks unless the repo explicitly requires them.
232
+
233
+ ```md
234
+ ## Proof plan
235
+
236
+ Primary proof:
237
+ - ...
238
+
239
+ Supporting checks:
240
+ - ...
241
+
242
+ Commands:
243
+ - ...
244
+
245
+ Manual verification, if needed:
246
+ - ...
247
+
248
+ Not running:
249
+ - ...
250
+ ```
251
+
252
+ Prefer red-green testing where practical.
253
+
254
+ ## Automated testing and coverage
255
+
256
+ Before patching, inspect whether the affected area has automated tests or CI coverage expectations.
257
+
258
+ If unit tests exist for the affected area or new testable logic is added:
259
+
260
+ - add or update relevant unit tests;
261
+ - match or exceed the coverage standard of surrounding code;
262
+ - if no local standard exists, use 80% new-code unit coverage as a fallback target for testable logic;
263
+ - do not invent coverage numbers.
264
+
265
+ If unit tests are not practical or not applicable:
266
+
267
+ - update the next-best automated validation where appropriate;
268
+ - consider component, integration, API, E2E, snapshot, contract, build, or typecheck validation;
269
+ - explain why unit tests are not being added.
270
+
271
+ Do not write tests that only assert implementation details rather than behaviour.
272
+
273
+ If CI/CD enforces unit coverage, do not recommend a normal PR that is likely to fail coverage. Add tests or flag the blocker first.
274
+
275
+ ## 5. Patch
276
+
277
+ Implement in small validated loops:
278
+
279
+ ```text
280
+ small change → run proof/check → inspect result → fix → review diff → continue
281
+ ```
282
+
283
+ Rules:
284
+
285
+ - stay within the agreed task and plan;
286
+ - update all related code paths required for correctness;
287
+ - preserve existing behaviour unless the ticket requires changing it;
288
+ - avoid unrelated refactors and opportunistic cleanup;
289
+ - validate after meaningful changes.
290
+
291
+ If the work becomes larger, riskier, or different from the plan, stop and re-plan.
292
+
293
+ ## 6. Validate failures
294
+
295
+ If validation fails, stop adding code and diagnose.
296
+
297
+ Classify the failure before fixing:
298
+
299
+ - Implementation bug
300
+ - Test expectation wrong
301
+ - Environment/setup issue
302
+ - Missing dependency
303
+ - Product ambiguity
304
+ - Architecture/design mismatch
305
+ - Unknown
306
+
307
+ Only attempt automatic fixes for implementation bugs or clearly incorrect tests.
308
+
309
+ Maximum automatic fix attempts: 2.
310
+
311
+ For each attempt:
312
+
313
+ 1. reproduce the failure;
314
+ 2. classify it;
315
+ 3. identify the key error;
316
+ 4. inspect the relevant code/test;
317
+ 5. fix one confirmed cause;
318
+ 6. rerun the targeted check.
319
+
320
+ After two failed attempts, stop and hand back:
321
+
322
+ ```md
323
+ ## Blocked after two focused fix attempts
324
+
325
+ What I tried:
326
+ 1. ...
327
+ 2. ...
328
+
329
+ Current evidence:
330
+ - failing command:
331
+ - key error:
332
+ - likely cause:
333
+ - files touched:
334
+
335
+ Recommended next action:
336
+ Ask a peer/senior engineer to inspect, or debug manually with this evidence.
337
+
338
+ Choose an option:
339
+
340
+ 1. Produce a debugging handoff — recommended
341
+ 2. Try one more fix with your guidance
342
+ 3. Revert last attempt
343
+ 4. Stop here
344
+ ```
345
+
346
+ ## 7. Review
347
+
348
+ When implementation appears complete, review as QA and production reviewer.
349
+
350
+ ### Blocking — must fix before normal PR
351
+
352
+ - Task is not satisfied
353
+ - Acceptance criteria not covered
354
+ - Required proof/tests missing or failing
355
+ - CI/PR checks likely to fail
356
+ - Unit/automated coverage requirement not met where applicable
357
+ - Security/privacy/auth/permission risk unresolved
358
+ - Related code paths left inconsistent
359
+ - Unrelated files changed
360
+ - Engineer cannot explain the change
361
+
362
+ ### Should fix if safe and in scope
363
+
364
+ - Edge cases weakly handled
365
+ - Error/loading/empty states incomplete where relevant
366
+ - Existing patterns not followed
367
+ - Accessibility not considered for UI changes
368
+ - Performance risk not considered
369
+ - Tests assert implementation rather than behaviour
370
+ - Unnecessary complexity added
371
+
372
+ If three or more “Should fix” items apply, address them before PR unless the user explicitly chooses to defer them.
373
+
374
+ ### Nice to have / follow-up
375
+
376
+ - Additional refactoring
377
+ - Extra docs/comments
378
+ - Broader E2E coverage
379
+ - Non-blocking polish
380
+
381
+ If a blocking item fails, do not finish. Fix it if safe and in scope, rerun proof, and review again. If not safe, report the blocker.
382
+
383
+ When review fails:
384
+
385
+ ```text
386
+ Current phase:
387
+ hardening-needed
388
+
389
+ Recommended next action:
390
+ Fix failed review items.
391
+
392
+ Choose an option:
393
+
394
+ 1. Fix failed review items — recommended
395
+ 2. Show review details
396
+ 3. Mark follow-ups and stop
397
+ 4. Stop here
398
+ ```
399
+
400
+ ## 8. PR handoff
401
+
402
+ When production readiness is `Ready`, do not end without a PR next step.
403
+
404
+ Before preparing the PR, inspect repo PR guidance:
405
+
406
+ - `.github/PULL_REQUEST_TEMPLATE.md`
407
+ - `CONTRIBUTING.md`
408
+ - `AGENTS.md`
409
+ - repo/team-specific PR guidance
410
+
411
+ Follow repo PR and commit conventions if present.
412
+
413
+ ## Ticket reference
414
+
415
+ Use “ticket reference” generically. Jira is one example.
416
+
417
+ Look for a ticket reference in:
418
+
419
+ 1. branch name
420
+ 2. user task/ticket text
421
+ 3. recent commit messages if relevant
422
+ 4. ask the user
423
+
424
+ Examples:
425
+
426
+ - Jira: `AEP-2714`, `MONE-61005`
427
+ - Linear: `ENG-123`
428
+ - GitHub issue: `#1234`
429
+
430
+ Do not invent a ticket reference.
431
+
432
+ If none is found:
433
+
434
+ ```text
435
+ Current phase:
436
+ PR handoff
437
+
438
+ I could not find a ticket reference in the branch name or task context.
439
+
440
+ Recommended next action:
441
+ Enter the ticket reference so I can create the commit and PR title correctly.
442
+
443
+ Choose an option:
444
+
445
+ 1. Enter ticket reference — recommended
446
+ 2. Continue without a ticket reference
447
+ 3. Prepare PR title/body only
448
+ 4. Stop here
449
+ ```
450
+
451
+ ## Commit and PR conventions
452
+
453
+ Use repo conventions if present.
454
+
455
+ Fallback commit format with ticket reference:
456
+
457
+ ```text
458
+ <TICKET-REF> <type>(<scope>): <short description>
459
+ ```
460
+
461
+ Fallback PR title with ticket reference:
462
+
463
+ ```text
464
+ [<TICKET-REF>] <type>(<scope>): <short description>
465
+ ```
466
+
467
+ Without a ticket reference:
468
+
469
+ ```text
470
+ <type>(<scope>): <short description>
471
+ ```
472
+
473
+ Types: `feat`, `fix`, `test`, `refactor`, `chore`, `docs`.
474
+
475
+ Do not commit until:
476
+
477
+ - production readiness is `Ready`, or user explicitly asks for draft/WIP;
478
+ - ticket reference has been found or user chose to continue without one;
479
+ - commit message and PR title have been shown.
480
+
481
+ ## Git safety
482
+
483
+ Before staging or committing:
484
+
485
+ - inspect `git status`;
486
+ - stage only files relevant to this task;
487
+ - do not stage unrelated user changes;
488
+ - if unrelated modified files exist, list them and ask before proceeding;
489
+ - never force-push or amend commits unless explicitly asked.
490
+
491
+ ## PR menu
492
+
493
+ ```text
494
+ Current phase:
495
+ PR handoff
496
+
497
+ Recommended next action:
498
+ Stage changes, commit, and create PR.
499
+
500
+ Choose an option:
501
+
502
+ 1. Stage changes, commit, and create PR — recommended
503
+ 2. Explain changes before committing
504
+ 3. Show commit message and PR body first
505
+ 4. Prepare PR title/body only
506
+ 5. Stop here
507
+ ```
508
+
509
+ ### Explain changes option
510
+
511
+ If the user selects “Explain changes before committing”, provide a concise two-minute walkthrough:
512
+
513
+ - what changed and why
514
+ - how the pieces fit together
515
+ - non-obvious decisions
516
+ - proof/checks used
517
+ - what to say if asked “walk me through this” in review
518
+
519
+ After the explanation, return to the PR handoff menu.
520
+
521
+ If option 1 is selected:
522
+
523
+ 1. inspect `git status`;
524
+ 2. stage only relevant files;
525
+ 3. commit using the agreed message;
526
+ 4. create a PR using repo template if available;
527
+ 5. return the PR URL.
528
+
529
+ If the harness cannot run git or create PRs, say so and provide exact `git add`, `git commit`, and `gh pr create` commands.
530
+
531
+ ## Default PR body
532
+
533
+ If no repo template exists:
534
+
535
+ ```md
536
+ ## Summary
537
+
538
+ - ...
539
+
540
+ ## Changes
541
+
542
+ - ...
543
+
544
+ ## Testing
545
+
546
+ - ...
547
+
548
+ ## Risks / follow-ups
549
+
550
+ - ...
551
+
552
+ ## Screenshots
553
+
554
+ <include if UI changed>
555
+ ```
556
+
557
+ ## Final response
558
+
559
+ When done, return:
560
+
561
+ ```md
562
+ ## Completed
563
+
564
+ What changed:
565
+ - ...
566
+
567
+ Files changed:
568
+ - ...
569
+
570
+ Checks run:
571
+ - ...
572
+
573
+ Validation result:
574
+ - ...
575
+
576
+ Production readiness:
577
+ - Ready / Not ready
578
+
579
+ Risks / follow-ups:
580
+ - ...
581
+
582
+ ## Commit and PR handoff
583
+
584
+ Ticket reference:
585
+ - `<ticket reference or not found>`
586
+
587
+ Suggested commit message:
588
+ - ...
589
+
590
+ Suggested PR title:
591
+ - ...
592
+
593
+ Suggested PR body:
594
+ - ...
595
+
596
+ Current phase:
597
+ PR handoff
598
+
599
+ Recommended next action:
600
+ Stage changes, commit, and create PR.
601
+
602
+ Choose an option:
603
+
604
+ 1. Stage changes, commit, and create PR — recommended
605
+ 2. Explain changes before committing
606
+ 3. Show commit message and PR body first
607
+ 4. Prepare PR title/body only
608
+ 5. Stop here
609
+ ```
610
+
611
+ Do not say the work is complete if proof is missing or failing.
612
+
613
+ ## Stop conditions
614
+
615
+ Stop and ask before continuing if:
616
+
617
+ - critical requirements are unclear
618
+ - work no longer fits the agreed task
619
+ - architecture/auth/security/permission/data migration/public API changes are required
620
+ - tests fail after two focused attempts
621
+ - failure cause is unknown
622
+ - unrelated files would need to be changed
623
+ - relevant code cannot be inspected
624
+ - validation cannot be performed
625
+ - CI/coverage requirements are likely to fail and cannot be addressed within scope
626
+
627
+ When blocked, hand useful context back to the user so they can investigate or get help from a peer.