@minhduydev/mdpi 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/template/.pi/VERSION +1 -1
- package/dist/template/.pi/extensions/templates-injector.ts +35 -7
- package/dist/template/.pi/prompts/INDEX.md +3 -9
- package/dist/template/.pi/skills/INDEX.md +39 -8
- package/dist/template/.pi/skills/dcp-hygiene/SKILL.md +1 -1
- package/dist/template/.pi/skills/frontend-design/SKILL.md +1 -1
- package/dist/template/.pi/skills/frontend-design/references/animation/motion-advanced.md +88 -15
- package/dist/template/.pi/skills/frontend-design/references/animation/motion-core.md +148 -13
- package/dist/template/.pi/skills/frontend-design/references/shadcn/setup.md +127 -20
- package/dist/template/.pi/skills/nextjs-app-router/SKILL.md +334 -0
- package/dist/template/.pi/skills/nextjs-cache/SKILL.md +262 -0
- package/dist/template/.pi/skills/react-best-practices/SKILL.md +79 -1
- package/dist/template/.pi/skills/react-compiler/SKILL.md +237 -0
- package/dist/template/.pi/skills/react-hook-form/SKILL.md +374 -0
- package/dist/template/.pi/skills/react-server-actions/SKILL.md +299 -0
- package/dist/template/.pi/skills/shadcn-ui/SKILL.md +404 -0
- package/dist/template/.pi/skills/tanstack-query/SKILL.md +330 -0
- package/dist/template/.pi/skills/v0/SKILL.md +264 -0
- package/dist/template/.pi/skills/zustand/SKILL.md +333 -0
- package/package.json +1 -1
- package/dist/template/.pi/prompts/loop-check.md +0 -87
- package/dist/template/.pi/prompts/loop-init.md +0 -157
- package/dist/template/.pi/prompts/loop-review.md +0 -90
- package/dist/template/.pi/skills/loop-audit/SKILL.md +0 -141
- package/dist/template/.pi/skills/loop-cost/SKILL.md +0 -130
- package/dist/template/.pi/skills/loop-engineering/SKILL.md +0 -175
- package/dist/template/.pi/templates/loop-github-action.yml +0 -162
- package/dist/template/.pi/templates/loop-orchestrator.sh +0 -514
- package/dist/template/.pi/templates/loop-orchestrator.test.ts +0 -332
- package/dist/template/.pi/templates/loop-orchestrator.ts +0 -936
- package/dist/template/.pi/templates/loop-state.json +0 -24
- package/dist/template/.pi/templates/loop-state.md +0 -98
- package/dist/template/.pi/templates/loop-vision.md +0 -110
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"loop_name": "<loop-name>",
|
|
3
|
-
"owner": "[Owner]",
|
|
4
|
-
"cadence": "[cron expression or manual]",
|
|
5
|
-
"last_run": null,
|
|
6
|
-
"in_progress": [],
|
|
7
|
-
"completed": [],
|
|
8
|
-
"escalated": [],
|
|
9
|
-
"failures": [],
|
|
10
|
-
"lessons": [],
|
|
11
|
-
"processed": [],
|
|
12
|
-
"stop_conditions_met": [],
|
|
13
|
-
"metrics": {
|
|
14
|
-
"runs": 0,
|
|
15
|
-
"killed": false,
|
|
16
|
-
"kill_reason": null,
|
|
17
|
-
"tokens_used": 0,
|
|
18
|
-
"token_cap": null,
|
|
19
|
-
"pr_opened": 0,
|
|
20
|
-
"items_fixed": 0,
|
|
21
|
-
"items_skipped": 0,
|
|
22
|
-
"items_escalated": 0
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
purpose: Human-readable working memory + dedup ledger mirror for one loop
|
|
3
|
-
updated: <auto — last modified>
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Loop State
|
|
7
|
-
|
|
8
|
-
<!--
|
|
9
|
-
Human-readable mirror of STATE.json. The machine ledger (STATE.json) is
|
|
10
|
-
authoritative for dedup; this file is for humans reading the loop's history.
|
|
11
|
-
Keep them in sync — the orchestrator writes STATE.json; update this file when
|
|
12
|
-
you review.
|
|
13
|
-
-->
|
|
14
|
-
|
|
15
|
-
**Loop name:** `<loop-name>`
|
|
16
|
-
**Owner:** `[Owner]`
|
|
17
|
-
**Cadence:** `[cron expression or "manual"]`
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Last run
|
|
22
|
-
|
|
23
|
-
<!-- When did the loop last execute, and what happened. -->
|
|
24
|
-
|
|
25
|
-
| Field | Value |
|
|
26
|
-
| --------- | ------------------------------ |
|
|
27
|
-
| Timestamp | `[ISO-8601 or null]` |
|
|
28
|
-
| Status | `[pass / fail / killed / no-op]` |
|
|
29
|
-
| Duration | `[seconds]` |
|
|
30
|
-
| Items | `[count processed this run]` |
|
|
31
|
-
| Tokens | `[tokens used this run]` |
|
|
32
|
-
|
|
33
|
-
## In progress
|
|
34
|
-
|
|
35
|
-
<!-- Items the loop is currently working on. Empty if idle. -->
|
|
36
|
-
|
|
37
|
-
| Item ID | Type | Started | Note |
|
|
38
|
-
| ------- | ---- | ------- | ---- |
|
|
39
|
-
| `<id>` | `[ci-run / pr / package@version / commit-sha]` | `[ISO-8601]` | `[note]` |
|
|
40
|
-
|
|
41
|
-
## Completed
|
|
42
|
-
|
|
43
|
-
<!-- Items the loop finished this cycle (subset of Processed items below). -->
|
|
44
|
-
|
|
45
|
-
| Item ID | Type | Completed | Outcome |
|
|
46
|
-
| ------- | ---- | --------- | ------- |
|
|
47
|
-
| `<id>` | `[type]` | `[ISO-8601]` | `[fixed / skipped / escalated / rejected]` |
|
|
48
|
-
|
|
49
|
-
## Escalated
|
|
50
|
-
|
|
51
|
-
<!-- Items the loop could not handle autonomously and escalated to a human. -->
|
|
52
|
-
|
|
53
|
-
| Item ID | Type | Escalated | Reason |
|
|
54
|
-
| ------- | ---- | --------- | ------ |
|
|
55
|
-
| `<id>` | `[type]` | `[ISO-8601]` | `[why the loop could not act]` |
|
|
56
|
-
|
|
57
|
-
## Lessons learned
|
|
58
|
-
|
|
59
|
-
<!-- Durable lessons from prior runs. One line each; link to STATE.json.lessons[]. -->
|
|
60
|
-
|
|
61
|
-
- `[Date]` — `[Lesson text]`
|
|
62
|
-
- `[Date]` — `[Lesson text]`
|
|
63
|
-
|
|
64
|
-
## Processed items
|
|
65
|
-
|
|
66
|
-
<!--
|
|
67
|
-
Dedup ledger. Keyed by STABLE item IDs so re-running the orchestrator on an
|
|
68
|
-
already-processed item skips it (idempotent). Stable ID forms:
|
|
69
|
-
- CI run ID e.g. `ci:12345678901`
|
|
70
|
-
- PR number e.g. `pr:42`
|
|
71
|
-
- package@version e.g. `pkg:lodash@4.17.21`
|
|
72
|
-
- commit SHA e.g. `sha:abc1234`
|
|
73
|
-
Deleting STATE.json reprocesses everything.
|
|
74
|
-
-->
|
|
75
|
-
|
|
76
|
-
| Item ID | Type | First seen | Last status | Retries |
|
|
77
|
-
| ------- | ---- | ---------- | ----------- | ------- |
|
|
78
|
-
| `<stable-id>` | `[ci-run / pr / package / commit]` | `[ISO-8601]` | `[fixed / skipped / failed / escalated]` | `[n]` |
|
|
79
|
-
|
|
80
|
-
## Stop conditions met
|
|
81
|
-
|
|
82
|
-
<!-- Boolean flags from the VISION.md "Hard stops" list. All false = safe to run. -->
|
|
83
|
-
|
|
84
|
-
| Stop condition | Met? |
|
|
85
|
-
| -------------- | ---- |
|
|
86
|
-
| Token budget exceeded | `[yes / no]` |
|
|
87
|
-
| Protected path modified | `[yes / no]` |
|
|
88
|
-
| Item already processed | `[yes / no]` |
|
|
89
|
-
| `gh` not authenticated | `[yes / no]` |
|
|
90
|
-
| Gate command missing/unparseable | `[yes / no]` |
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
<!--
|
|
95
|
-
This file is a mirror. The machine ledger (STATE.json) is the source of
|
|
96
|
-
truth for dedup and idempotence. Update this file when reviewing run history;
|
|
97
|
-
the orchestrator does not need to write here.
|
|
98
|
-
-->
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
purpose: Anti goal-drift contract for a loop — reread at the start of every run; the loop must not act outside this file
|
|
3
|
-
updated: <auto — last modified>
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Loop Vision
|
|
7
|
-
|
|
8
|
-
<!--
|
|
9
|
-
This file is the immutable contract for one loop. The orchestrator (and any
|
|
10
|
-
interactive run) MUST reread this file at the start of every cycle and treat
|
|
11
|
-
its boundaries as authoritative. If context summarization drops a constraint
|
|
12
|
-
mid-run, this file restores it (boundaries are re-derived from disk, not
|
|
13
|
-
from context).
|
|
14
|
-
|
|
15
|
-
Fill the bracketed placeholders via `/loop-init <name>`, then edit by hand.
|
|
16
|
-
Never let a run edit this file during a cycle (protected path — see
|
|
17
|
-
loop-guard.ts).
|
|
18
|
-
-->
|
|
19
|
-
|
|
20
|
-
**Loop name:** `<loop-name>`
|
|
21
|
-
**Owner:** `[Owner]`
|
|
22
|
-
**Cadence:** `[cron expression or "manual"]`
|
|
23
|
-
**Created:** `[Date]`
|
|
24
|
-
**Last revised:** `[Date]`
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Goal
|
|
29
|
-
|
|
30
|
-
<!-- One sentence: the outcome this loop produces, outcome-shaped not task-shaped. -->
|
|
31
|
-
|
|
32
|
-
[What does this loop achieve? e.g. "Triage failing CI runs nightly and open fix PRs for deterministic failures."]
|
|
33
|
-
|
|
34
|
-
## Scope
|
|
35
|
-
|
|
36
|
-
<!-- What the loop is allowed to touch. Be concrete: file paths, package names, commands. -->
|
|
37
|
-
|
|
38
|
-
- [Allowed action 1: e.g. edit source under `src/`]
|
|
39
|
-
- [Allowed action 2: e.g. run `npm test` / `npm run lint`]
|
|
40
|
-
- [Allowed action 3: e.g. open a PR on branch `loop/<name>/<ts>` — never `main`]
|
|
41
|
-
|
|
42
|
-
## Out-of-scope
|
|
43
|
-
|
|
44
|
-
<!-- What the loop must NEVER do, even if asked. Hard refuses. -->
|
|
45
|
-
|
|
46
|
-
- [Refuse 1: e.g. auth / payments / architecture changes]
|
|
47
|
-
- [Refuse 2: e.g. editing `package.json`, lockfiles, or this VISION.md / the gate script]
|
|
48
|
-
- [Refuse 3: e.g. merging or deploying — human approval required]
|
|
49
|
-
|
|
50
|
-
## Definition-of-done
|
|
51
|
-
|
|
52
|
-
<!-- Observable, verifiable end state. Must be checkable by the Gate command (exit 0). -->
|
|
53
|
-
|
|
54
|
-
- [ ] [Criterion 1: e.g. `npm test` exits 0]
|
|
55
|
-
- [ ] [Criterion 2: e.g. diff is limited to in-scope paths]
|
|
56
|
-
- [ ] [Criterion 3: e.g. a PR is open on `loop/<name>/<ts>` with a body citing this file]
|
|
57
|
-
|
|
58
|
-
## Gate
|
|
59
|
-
|
|
60
|
-
<!--
|
|
61
|
-
PARSE CONTRACT (machine-readable — do NOT edit this comment):
|
|
62
|
-
The orchestrator extracts the gate command from the SINGLE fenced
|
|
63
|
-
```bash block located directly under the "## Gate" heading in this file.
|
|
64
|
-
Extraction rule: require EXACTLY ONE ```bash block in this section
|
|
65
|
-
(bounded by the next "## " heading). Zero or more-than-one -> refuse
|
|
66
|
-
(gate not parseable; orchestrator records failure and does NOT ship).
|
|
67
|
-
Take that single block's content, strip trailing whitespace, run it via
|
|
68
|
-
`bash -c "<command>"`, read the exit code.
|
|
69
|
-
exit 0 -> PASS -> ship (push branch `loop/<name>/<ts>` + open PR)
|
|
70
|
-
non-zero -> FAIL -> no ship; record failure in STATE.json; cleanup worktree
|
|
71
|
-
The gate decision is computational (exit code), never an LLM's opinion.
|
|
72
|
-
Keep EXACTLY ONE ```bash block directly under ## Gate.
|
|
73
|
-
-->
|
|
74
|
-
|
|
75
|
-
Command (exit 0 = pass):
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
<GATE_COMMAND>
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Pass:** exit 0 → ship (push `loop/<name>/<ts>` branch + open PR via `gh`).
|
|
82
|
-
**Fail:** non-zero → no ship; record failure in `STATE.json.failures[]`; cleanup worktree.
|
|
83
|
-
|
|
84
|
-
## Hard stops
|
|
85
|
-
|
|
86
|
-
<!-- Conditions that abort the run immediately, no matter the gate result. -->
|
|
87
|
-
|
|
88
|
-
- [Hard stop 1: e.g. token budget exceeded (`STATE.json.metrics.tokens_used > cap`)]
|
|
89
|
-
- [Hard stop 2: e.g. gate file / VISION.md / `package.json` modified during the run]
|
|
90
|
-
- [Hard stop 3: e.g. item already in `STATE.json.processed` → idempotent skip]
|
|
91
|
-
- [Hard stop 4: e.g. `gh` not authenticated → fall back to commit-only/log, do not ship]
|
|
92
|
-
|
|
93
|
-
## Human-approval-required
|
|
94
|
-
|
|
95
|
-
<!-- Actions the loop may stage but never execute on its own. -->
|
|
96
|
-
|
|
97
|
-
- [ ] Merging a PR
|
|
98
|
-
- [ ] Deploying to production
|
|
99
|
-
- [ ] Changing dependencies (`package.json`, lockfiles, version bumps)
|
|
100
|
-
- [ ] Modifying this VISION.md or the Gate command mid-run
|
|
101
|
-
- [ ] Touching auth, payments, or architectural decisions
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
<!--
|
|
106
|
-
Reread this file at the start of every run. The loop must not act outside
|
|
107
|
-
this file. If a proposed action is not clearly inside Scope, treat it as
|
|
108
|
-
Out-of-scope and escalate (record in STATE.json.escalated[]) instead of
|
|
109
|
-
acting.
|
|
110
|
-
-->
|