dev-loops 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/dev-loop/defaults.yaml +477 -0
- package/AGENTS.md +25 -0
- package/CHANGELOG.md +18 -0
- package/LICENSE +21 -0
- package/README.md +178 -0
- package/agents/dev-loop.agent.md +82 -0
- package/agents/developer.agent.md +37 -0
- package/agents/docs.agent.md +33 -0
- package/agents/fixer.agent.md +53 -0
- package/agents/quality.agent.md +28 -0
- package/agents/refiner.agent.md +87 -0
- package/agents/review.agent.md +64 -0
- package/cli/index.mjs +424 -0
- package/extension/README.md +233 -0
- package/extension/checks.ts +94 -0
- package/extension/index.ts +131 -0
- package/extension/post-merge-update.ts +512 -0
- package/extension/presentation.ts +107 -0
- package/lib/dev-loops-core.mjs +284 -0
- package/package.json +103 -0
- package/scripts/README.md +1007 -0
- package/scripts/_cli-primitives.mjs +10 -0
- package/scripts/_core-helpers.mjs +30 -0
- package/scripts/docs/validate-links.mjs +567 -0
- package/scripts/docs/validate-no-duplicate-rules.mjs +250 -0
- package/scripts/github/_review-thread-mutations.mjs +214 -0
- package/scripts/github/capture-review-threads.mjs +180 -0
- package/scripts/github/create-draft-pr.mjs +108 -0
- package/scripts/github/detect-checkpoint-evidence.mjs +393 -0
- package/scripts/github/detect-linked-issue-pr.mjs +331 -0
- package/scripts/github/manage-sub-issues.mjs +394 -0
- package/scripts/github/probe-copilot-review.mjs +323 -0
- package/scripts/github/ready-for-review.mjs +93 -0
- package/scripts/github/reconcile-draft-gate.mjs +328 -0
- package/scripts/github/reply-resolve-review-thread.mjs +42 -0
- package/scripts/github/reply-resolve-review-threads.mjs +329 -0
- package/scripts/github/request-copilot-review.mjs +551 -0
- package/scripts/github/resolve-tracker-local-spec.mjs +205 -0
- package/scripts/github/stage-reviewer-draft.mjs +191 -0
- package/scripts/github/upsert-checkpoint-verdict.mjs +694 -0
- package/scripts/github/verify-fresh-review-context.mjs +125 -0
- package/scripts/github/write-gate-findings-log.mjs +212 -0
- package/scripts/loop/_checkpoint-io.mjs +55 -0
- package/scripts/loop/_checkpoint-paths.mjs +28 -0
- package/scripts/loop/_handoff-contract.mjs +230 -0
- package/scripts/loop/_inspect-run-viewer-adapter.mjs +345 -0
- package/scripts/loop/_loop-evidence.mjs +32 -0
- package/scripts/loop/_pr-runner-coordination.mjs +611 -0
- package/scripts/loop/_stale-runner-detection.mjs +145 -0
- package/scripts/loop/_steering-state-file.mjs +134 -0
- package/scripts/loop/build-handoff-envelope.mjs +181 -0
- package/scripts/loop/checkpoint-contract.mjs +49 -0
- package/scripts/loop/conductor-monitor.mjs +1850 -0
- package/scripts/loop/conductor.mjs +214 -0
- package/scripts/loop/copilot-pr-handoff.mjs +493 -0
- package/scripts/loop/debt-remediate.mjs +304 -0
- package/scripts/loop/detect-change-scope.mjs +102 -0
- package/scripts/loop/detect-copilot-loop-state.mjs +454 -0
- package/scripts/loop/detect-copilot-session-activity.mjs +186 -0
- package/scripts/loop/detect-initial-copilot-pr-state.mjs +318 -0
- package/scripts/loop/detect-internal-only-pr.mjs +270 -0
- package/scripts/loop/detect-issue-refinement-artifact.mjs +163 -0
- package/scripts/loop/detect-pr-gate-coordination-state.mjs +509 -0
- package/scripts/loop/detect-reviewer-loop-state.mjs +231 -0
- package/scripts/loop/detect-stale-runner.mjs +250 -0
- package/scripts/loop/detect-tracker-first-loop-state.mjs +76 -0
- package/scripts/loop/detect-tracker-pr-state.mjs +102 -0
- package/scripts/loop/info.mjs +267 -0
- package/scripts/loop/inspect-run-viewer/cli.mjs +117 -0
- package/scripts/loop/inspect-run-viewer/constants.mjs +80 -0
- package/scripts/loop/inspect-run-viewer/graph.mjs +757 -0
- package/scripts/loop/inspect-run-viewer/handoff-envelope-renderer.mjs +398 -0
- package/scripts/loop/inspect-run-viewer/inbox.mjs +308 -0
- package/scripts/loop/inspect-run-viewer/managed-instance.mjs +750 -0
- package/scripts/loop/inspect-run-viewer/rendering.mjs +411 -0
- package/scripts/loop/inspect-run-viewer/server.mjs +638 -0
- package/scripts/loop/inspect-run-viewer/shared.mjs +103 -0
- package/scripts/loop/inspect-run-viewer/status.mjs +715 -0
- package/scripts/loop/inspect-run-viewer-ci-changes.mjs +77 -0
- package/scripts/loop/inspect-run-viewer.mjs +82 -0
- package/scripts/loop/inspect-run.mjs +382 -0
- package/scripts/loop/outer-loop.mjs +419 -0
- package/scripts/loop/pr-runner-coordination.mjs +143 -0
- package/scripts/loop/pre-commit-branch-guard.mjs +68 -0
- package/scripts/loop/pre-flight-gate.mjs +236 -0
- package/scripts/loop/pre-pr-ready-gate.mjs +183 -0
- package/scripts/loop/pre-push-main-guard.mjs +103 -0
- package/scripts/loop/pre-write-remote-freshness-guard.mjs +32 -0
- package/scripts/loop/print-gates.mjs +42 -0
- package/scripts/loop/resolve-dev-loop-startup.mjs +533 -0
- package/scripts/loop/run-conductor-cycle.mjs +322 -0
- package/scripts/loop/run-queue.mjs +124 -0
- package/scripts/loop/run-refinement-audit.mjs +513 -0
- package/scripts/loop/run-watch-cycle.mjs +358 -0
- package/scripts/loop/steer-loop.mjs +841 -0
- package/scripts/loop/ui-designer-review-contract.mjs +76 -0
- package/scripts/loop/watch-initial-copilot-pr.mjs +253 -0
- package/scripts/projects/add-queue-item.mjs +528 -0
- package/scripts/projects/ensure-queue-board.mjs +837 -0
- package/scripts/projects/list-queue-items.mjs +489 -0
- package/scripts/projects/move-queue-item.mjs +549 -0
- package/scripts/projects/reorder-queue-item.mjs +518 -0
- package/scripts/refine/_refine-helpers.mjs +258 -0
- package/scripts/refine/prose-linkage-detector.mjs +92 -0
- package/scripts/refine/refinement-completeness-checker.mjs +88 -0
- package/scripts/refine/scope-boundary-cross-checker.mjs +163 -0
- package/scripts/refine/tree-integrity-validator.mjs +211 -0
- package/scripts/refine/verify.mjs +178 -0
- package/scripts/repo-wiki-local.mjs +156 -0
- package/scripts/repo-wiki.mjs +119 -0
- package/skills/copilot-pr-followup/SKILL.md +380 -0
- package/skills/dev-loop/SKILL.md +141 -0
- package/skills/dev-loop/scripts/dev-mode-context.mjs +152 -0
- package/skills/dev-loop/scripts/dev-mode-context.test.mjs +80 -0
- package/skills/dev-loop/scripts/init-phase.mjs +71 -0
- package/skills/dev-loop/scripts/log-bash-exit-1.mjs +25 -0
- package/skills/dev-loop/scripts/phase-files.mjs +29 -0
- package/skills/dev-loop/scripts/post-gate-verdict-fallback.mjs +480 -0
- package/skills/dev-loop/scripts/post-gate-verdict-fallback.test.mjs +732 -0
- package/skills/dev-loop/scripts/render-template.mjs +82 -0
- package/skills/dev-loop/scripts/render-template.test.mjs +63 -0
- package/skills/dev-loop/templates/bootstrap-agents.md +26 -0
- package/skills/dev-loop/templates/bootstrap-implementation-state.md +31 -0
- package/skills/dev-loop/templates/bootstrap-implementation-workflow.md +17 -0
- package/skills/dev-loop/templates/dev-mode-retrospective.md +15 -0
- package/skills/dev-loop/templates/dev-mode-review.md +17 -0
- package/skills/dev-loop/templates/dev-mode-skill-changes.md +11 -0
- package/skills/dev-loop/templates/merged-phase-plan.md +19 -0
- package/skills/dev-loop/templates/phase-doc.md +27 -0
- package/skills/dev-loop/templates/phase-summary.md +13 -0
- package/skills/dev-loop/templates/phase-variant.md +15 -0
- package/skills/dev-loop/templates/retrospective.md +11 -0
- package/skills/dev-loop/templates/review.md +32 -0
- package/skills/dev-loop/templates/ui-vision-review.md +55 -0
- package/skills/docs/acceptance-criteria-verification.md +21 -0
- package/skills/docs/anti-patterns.md +21 -0
- package/skills/docs/artifact-authority-contract.md +119 -0
- package/skills/docs/confirmation-rules.md +28 -0
- package/skills/docs/copilot-ci-status-contract.md +52 -0
- package/skills/docs/copilot-loop-operations.md +233 -0
- package/skills/docs/debt-remediation-contract.md +107 -0
- package/skills/docs/entrypoint-strategies.md +115 -0
- package/skills/docs/epic-tree-refinement-procedure.md +234 -0
- package/skills/docs/issue-intake-procedure.md +235 -0
- package/skills/docs/main-agent-contract.md +72 -0
- package/skills/docs/merge-preconditions.md +29 -0
- package/skills/docs/pr-lifecycle-contract.md +209 -0
- package/skills/docs/public-dev-loop-contract.md +497 -0
- package/skills/docs/retrospective-checkpoint-contract.md +159 -0
- package/skills/docs/stop-conditions.md +29 -0
- package/skills/docs/structural-quality.md +42 -0
- package/skills/docs/tracker-first-loop-state.md +281 -0
- package/skills/docs/validation-policy.md +27 -0
- package/skills/docs/workflow-handoff-contract.md +135 -0
- package/skills/final-approval/SKILL.md +19 -0
- package/skills/local-implementation/SKILL.md +640 -0
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
export const DEV_LOOP_CHECK_IDS = [
|
|
2
|
+
'gh-installed',
|
|
3
|
+
'gh-auth',
|
|
4
|
+
'subagent-command',
|
|
5
|
+
'git-repo',
|
|
6
|
+
];
|
|
7
|
+
|
|
8
|
+
const LOCAL_READINESS_IDS = ['subagent-command', 'git-repo'];
|
|
9
|
+
const REMOTE_READINESS_IDS = ['gh-installed', 'gh-auth', 'subagent-command', 'git-repo'];
|
|
10
|
+
const INSPECT_ACTIONS = new Set(['open', 'resume', 'status', 'stop', 'restart']);
|
|
11
|
+
|
|
12
|
+
const UNICODE_SPACE_RE = /[\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/g;
|
|
13
|
+
|
|
14
|
+
function normalizeInput(input) {
|
|
15
|
+
if (Array.isArray(input)) {
|
|
16
|
+
return input
|
|
17
|
+
.filter((part) => typeof part === 'string' || typeof part === 'number')
|
|
18
|
+
.flatMap((part) => {
|
|
19
|
+
const normalized = `${part}`.replace(UNICODE_SPACE_RE, ' ');
|
|
20
|
+
return normalized.trim().split(/\s+/).filter(Boolean);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Normalize unusual whitespace (NBSP, Unicode spaces) to regular spaces before splitting
|
|
25
|
+
return `${input ?? ''}`
|
|
26
|
+
.replace(UNICODE_SPACE_RE, ' ')
|
|
27
|
+
.trim()
|
|
28
|
+
.split(/\s+/)
|
|
29
|
+
.filter(Boolean);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function normalizeProbe(probe, availableDetail, unavailableDetail) {
|
|
33
|
+
if (typeof probe === 'boolean') {
|
|
34
|
+
return {
|
|
35
|
+
ok: probe,
|
|
36
|
+
detail: probe ? availableDetail : unavailableDetail,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const ok = probe?.ok === true;
|
|
41
|
+
return {
|
|
42
|
+
ok,
|
|
43
|
+
detail: ok
|
|
44
|
+
? availableDetail ?? probe?.availableDetail
|
|
45
|
+
: unavailableDetail ?? probe?.unavailableDetail,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function invalidCommand(message, usageAction, tokens) {
|
|
50
|
+
return {
|
|
51
|
+
kind: 'malformed',
|
|
52
|
+
message,
|
|
53
|
+
usageAction,
|
|
54
|
+
tokens,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function parseInspectCommand(tokens, { surface }) {
|
|
59
|
+
if (surface !== 'extension') {
|
|
60
|
+
return invalidCommand('Unrecognized command: inspect.', undefined, tokens);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const [, rawAction, ...rawArgs] = tokens;
|
|
64
|
+
const action = rawAction?.toLowerCase();
|
|
65
|
+
if (!INSPECT_ACTIONS.has(action)) {
|
|
66
|
+
return invalidCommand('`/dev-loops inspect` only supports: open, resume, status, stop, restart.', 'inspect', tokens);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
let repo;
|
|
70
|
+
while (rawArgs.length > 0) {
|
|
71
|
+
const token = rawArgs.shift();
|
|
72
|
+
if (token === '--repo') {
|
|
73
|
+
const value = rawArgs.shift();
|
|
74
|
+
if (typeof value !== 'string' || value.length === 0 || value.startsWith('--')) {
|
|
75
|
+
return invalidCommand('`--repo` requires `<owner/name>`.', 'inspect', tokens);
|
|
76
|
+
}
|
|
77
|
+
repo = value;
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
return invalidCommand(`Unrecognized inspect argument: ${token}.`, 'inspect', tokens);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
kind: 'inspect_action',
|
|
85
|
+
action,
|
|
86
|
+
repo,
|
|
87
|
+
tokens,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function parseDevLoopsCommand(input, { surface = 'extension' } = {}) {
|
|
92
|
+
const tokens = normalizeInput(input);
|
|
93
|
+
const [rawAction, rawScope, ...rest] = tokens;
|
|
94
|
+
const action = rawAction?.toLowerCase();
|
|
95
|
+
const extensionSurface = surface === 'extension';
|
|
96
|
+
|
|
97
|
+
if (action === 'inspect') {
|
|
98
|
+
return parseInspectCommand(tokens, { surface });
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
switch (action) {
|
|
102
|
+
case undefined:
|
|
103
|
+
case '':
|
|
104
|
+
case 'help':
|
|
105
|
+
return extensionSurface || (rest.length === 0 && rawScope === undefined)
|
|
106
|
+
? { kind: 'action', action: 'help', tokens }
|
|
107
|
+
: invalidCommand('`help` does not accept additional arguments.', 'help', tokens);
|
|
108
|
+
case 'status':
|
|
109
|
+
case 'doctor':
|
|
110
|
+
case 'gates':
|
|
111
|
+
return extensionSurface || (rest.length === 0 && rawScope === undefined)
|
|
112
|
+
? { kind: 'action', action, tokens }
|
|
113
|
+
: invalidCommand(`\`${action}\` does not accept additional arguments.`, action, tokens);
|
|
114
|
+
case 'hide':
|
|
115
|
+
if (!extensionSurface && (rest.length > 0 || rawScope !== undefined)) {
|
|
116
|
+
return invalidCommand('`hide` does not accept additional arguments.', 'hide', tokens);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return extensionSurface
|
|
120
|
+
? { kind: 'action', action: 'hide', tokens }
|
|
121
|
+
: {
|
|
122
|
+
kind: 'unsupported',
|
|
123
|
+
action: 'hide',
|
|
124
|
+
message: '`dev-loops hide` is not supported outside the Pi extension; use `/dev-loops hide` inside Pi instead.',
|
|
125
|
+
tokens,
|
|
126
|
+
};
|
|
127
|
+
default:
|
|
128
|
+
return extensionSurface
|
|
129
|
+
? { kind: 'action', action: 'help', tokens }
|
|
130
|
+
: invalidCommand(`Unrecognized command: ${rawAction}.`, undefined, tokens);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export async function collectDevLoopChecks(runtime) {
|
|
135
|
+
const [ghInstalled, ghAuthenticated, inGitRepo, subagentProbe] = await Promise.all([
|
|
136
|
+
runtime.commandExists('gh'),
|
|
137
|
+
runtime.ghAuthOk(),
|
|
138
|
+
runtime.insideGitRepo(),
|
|
139
|
+
runtime.getSubagentAvailability(),
|
|
140
|
+
]);
|
|
141
|
+
|
|
142
|
+
const subagent = normalizeProbe(
|
|
143
|
+
subagentProbe,
|
|
144
|
+
'`subagent` command is available.',
|
|
145
|
+
'Install or enable subagent support so `subagent` is available.',
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
return [
|
|
149
|
+
{
|
|
150
|
+
id: 'gh-installed',
|
|
151
|
+
label: 'GitHub CLI installed',
|
|
152
|
+
ok: ghInstalled,
|
|
153
|
+
detail: ghInstalled ? '`gh` is available.' : 'Install GitHub CLI to use remote GitHub/Copilot loops.',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: 'gh-auth',
|
|
157
|
+
label: 'GitHub CLI authenticated',
|
|
158
|
+
ok: ghInstalled && ghAuthenticated,
|
|
159
|
+
detail:
|
|
160
|
+
ghInstalled && ghAuthenticated
|
|
161
|
+
? '`gh auth status` succeeded.'
|
|
162
|
+
: ghInstalled
|
|
163
|
+
? 'Run `gh auth login` before using remote GitHub/Copilot loops.'
|
|
164
|
+
: 'GitHub CLI is not installed yet.',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: 'subagent-command',
|
|
168
|
+
label: 'Subagent command available',
|
|
169
|
+
ok: subagent.ok,
|
|
170
|
+
detail: subagent.detail,
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: 'git-repo',
|
|
174
|
+
label: 'Inside a git repository',
|
|
175
|
+
ok: inGitRepo,
|
|
176
|
+
detail: inGitRepo
|
|
177
|
+
? 'Current working directory is inside a git repo.'
|
|
178
|
+
: 'Local and GitHub loops work best inside a git repository checkout.',
|
|
179
|
+
},
|
|
180
|
+
];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export function summarizeChecks(checks) {
|
|
184
|
+
return {
|
|
185
|
+
ok: checks.filter((check) => check.ok).length,
|
|
186
|
+
total: checks.length,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function renderCheckLines(checks) {
|
|
191
|
+
return checks.flatMap((check) => {
|
|
192
|
+
const marker = check.ok ? '✅' : '⚠️';
|
|
193
|
+
return [`${marker} ${check.label}`, ` ${check.detail}`];
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function checkMap(checks) {
|
|
198
|
+
return new Map(checks.map((check) => [check.id, check]));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export function describeReadiness(checks) {
|
|
202
|
+
const byId = checkMap(checks);
|
|
203
|
+
return {
|
|
204
|
+
localReady: LOCAL_READINESS_IDS.every((id) => byId.get(id)?.ok),
|
|
205
|
+
remoteReady: REMOTE_READINESS_IDS.every((id) => byId.get(id)?.ok),
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export async function executeDevLoopsCommand({ input, surface = 'extension', runtime, stdout }) {
|
|
210
|
+
const parsed = parseDevLoopsCommand(input, { surface });
|
|
211
|
+
|
|
212
|
+
if (parsed.kind === 'inspect_action') {
|
|
213
|
+
if (surface !== 'extension' || typeof runtime?.uiLifecycle?.[parsed.action] !== 'function') {
|
|
214
|
+
return {
|
|
215
|
+
kind: 'unsupported',
|
|
216
|
+
message: 'Inspect lifecycle commands are only available inside the Pi extension.',
|
|
217
|
+
tokens: parsed.tokens,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
let repoRoot = null;
|
|
221
|
+
try {
|
|
222
|
+
repoRoot = await runtime.getRepoRoot();
|
|
223
|
+
} catch (error) {
|
|
224
|
+
return {
|
|
225
|
+
kind: 'inspect_result',
|
|
226
|
+
action: parsed.action,
|
|
227
|
+
repo: parsed.repo ?? null,
|
|
228
|
+
repoRoot: null,
|
|
229
|
+
state: 'stopped',
|
|
230
|
+
url: null,
|
|
231
|
+
detail: error instanceof Error ? error.message : String(error),
|
|
232
|
+
warning: null,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
try {
|
|
236
|
+
const result = await runtime.uiLifecycle[parsed.action]({ repoRoot, repo: parsed.repo });
|
|
237
|
+
return {
|
|
238
|
+
kind: 'inspect_result',
|
|
239
|
+
action: parsed.action,
|
|
240
|
+
repo: parsed.repo ?? null,
|
|
241
|
+
repoRoot,
|
|
242
|
+
...result,
|
|
243
|
+
};
|
|
244
|
+
} catch (error) {
|
|
245
|
+
return {
|
|
246
|
+
kind: 'inspect_result',
|
|
247
|
+
action: parsed.action,
|
|
248
|
+
repo: parsed.repo ?? null,
|
|
249
|
+
repoRoot,
|
|
250
|
+
state: 'stopped',
|
|
251
|
+
url: null,
|
|
252
|
+
detail: error instanceof Error ? error.message : String(error),
|
|
253
|
+
warning: null,
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (parsed.kind !== 'action') {
|
|
259
|
+
return parsed;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
switch (parsed.action) {
|
|
263
|
+
case 'help':
|
|
264
|
+
return { kind: 'help' };
|
|
265
|
+
case 'hide':
|
|
266
|
+
return { kind: 'hide' };
|
|
267
|
+
case 'status':
|
|
268
|
+
case 'doctor': {
|
|
269
|
+
const checks = await collectDevLoopChecks(runtime);
|
|
270
|
+
return {
|
|
271
|
+
kind: 'checks',
|
|
272
|
+
action: parsed.action,
|
|
273
|
+
checks,
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
case 'gates': {
|
|
277
|
+
const { run } = await import('../scripts/loop/print-gates.mjs');
|
|
278
|
+
await run({ repoRoot: runtime.getRepoRoot ? await runtime.getRepoRoot() : process.cwd(), stdout });
|
|
279
|
+
return { kind: 'gates' };
|
|
280
|
+
}
|
|
281
|
+
default:
|
|
282
|
+
throw new Error(`Unhandled action: ${parsed.action}`);
|
|
283
|
+
}
|
|
284
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dev-loops",
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Shared Pi workflow infrastructure for reusable local and remote development loops",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"pi-package",
|
|
8
|
+
"pi",
|
|
9
|
+
"pi-coding-agent",
|
|
10
|
+
"workflow",
|
|
11
|
+
"dev-loop",
|
|
12
|
+
"github",
|
|
13
|
+
"copilot"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=20"
|
|
17
|
+
},
|
|
18
|
+
"workspaces": [
|
|
19
|
+
"packages/*"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"verify": "npm test && npm run test:dev-loop",
|
|
23
|
+
"test": "npm run test:assets && npm run test:extension && npm run test:scripts && npm run test:core && npm run test:docs",
|
|
24
|
+
"test:assets": "node --test --test-reporter ./test/failure-summary-reporter.mjs test/dev-loop-init-phase-smoke.test.mjs test/contracts/*.test.mjs test/workflow-handoff-contract.test.mjs",
|
|
25
|
+
"test:extension": "node --import tsx --test --test-reporter ./test/failure-summary-reporter.mjs test/extension-checks.test.mjs test/extension-post-merge-update.test.mjs test/extension-command-contract.test.mjs test/extension-package-contract.test.mjs test/dev-loops-core.test.mjs test/dev-loops-cli.test.mjs",
|
|
26
|
+
"test:scripts": "node --test --test-reporter ./test/failure-summary-reporter.mjs test/github/*.test.mjs test/loop/*.test.mjs test/docs/*.test.mjs test/projects/*.test.mjs",
|
|
27
|
+
"test:core": "node --test --test-reporter ./test/failure-summary-reporter.mjs packages/core/test/*.test.mjs",
|
|
28
|
+
"test:dev-loop": "node --test --test-reporter ./test/failure-summary-reporter.mjs skills/dev-loop/scripts/dev-mode-context.test.mjs skills/dev-loop/scripts/render-template.test.mjs skills/dev-loop/scripts/post-gate-verdict-fallback.test.mjs",
|
|
29
|
+
"test:playwright:viewer": "playwright test -c playwright.inspect-run-viewer.config.mjs",
|
|
30
|
+
"test:docs": "node scripts/docs/validate-links.mjs && node scripts/docs/validate-no-duplicate-rules.mjs",
|
|
31
|
+
"repo-wiki": "node scripts/repo-wiki.mjs",
|
|
32
|
+
"repo-wiki:bootstrap": "node scripts/repo-wiki.mjs scan --repo . && node scripts/repo-wiki.mjs plan --repo . && node scripts/repo-wiki.mjs compile --repo .",
|
|
33
|
+
"repo-wiki:scan": "node scripts/repo-wiki.mjs scan --repo .",
|
|
34
|
+
"repo-wiki:plan": "node scripts/repo-wiki.mjs plan --repo .",
|
|
35
|
+
"repo-wiki:lint-docs": "node scripts/repo-wiki.mjs lint-docs --repo .",
|
|
36
|
+
"repo-wiki:compile": "node scripts/repo-wiki.mjs compile --repo .",
|
|
37
|
+
"repo-wiki:lint": "node scripts/repo-wiki.mjs lint --repo .",
|
|
38
|
+
"repo-wiki:search": "node scripts/repo-wiki.mjs search --repo .",
|
|
39
|
+
"repo-wiki:init": "node scripts/repo-wiki.mjs init --repo .",
|
|
40
|
+
"repo-wiki:local": "node scripts/repo-wiki-local.mjs",
|
|
41
|
+
"repo-wiki:local-bootstrap": "node scripts/repo-wiki-local.mjs scan --repo . && node scripts/repo-wiki-local.mjs plan --repo . && node scripts/repo-wiki-local.mjs compile --repo .",
|
|
42
|
+
"repo-wiki:local-scan": "node scripts/repo-wiki-local.mjs scan --repo .",
|
|
43
|
+
"repo-wiki:local-plan": "node scripts/repo-wiki-local.mjs plan --repo .",
|
|
44
|
+
"repo-wiki:local-lint-docs": "node scripts/repo-wiki-local.mjs lint-docs --repo .",
|
|
45
|
+
"repo-wiki:local-compile": "node scripts/repo-wiki-local.mjs compile --repo .",
|
|
46
|
+
"repo-wiki:local-lint": "node scripts/repo-wiki-local.mjs lint --repo .",
|
|
47
|
+
"repo-wiki:prepare": "node scripts/repo-wiki-local.mjs prepare"
|
|
48
|
+
},
|
|
49
|
+
"bin": {
|
|
50
|
+
"dev-loops": "./cli/index.mjs"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@mariozechner/pi-coding-agent": "*",
|
|
54
|
+
"@mariozechner/pi-tui": "*"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@playwright/test": "^1.60.0",
|
|
58
|
+
"c8": "^11.0.0",
|
|
59
|
+
"tsx": "^4.22.0"
|
|
60
|
+
},
|
|
61
|
+
"pi": {
|
|
62
|
+
"extensions": [
|
|
63
|
+
"./extension/index.ts"
|
|
64
|
+
],
|
|
65
|
+
"skills": [
|
|
66
|
+
"skills"
|
|
67
|
+
],
|
|
68
|
+
"agents": [
|
|
69
|
+
"agents"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"mermaid": "11.15.0",
|
|
74
|
+
"zod": "^4.4.3",
|
|
75
|
+
"@dev-loops/core": "^0.1.0"
|
|
76
|
+
},
|
|
77
|
+
"repository": {
|
|
78
|
+
"type": "git",
|
|
79
|
+
"url": "https://github.com/mfittko/dev-loops.git"
|
|
80
|
+
},
|
|
81
|
+
"bugs": {
|
|
82
|
+
"url": "https://github.com/mfittko/dev-loops/issues"
|
|
83
|
+
},
|
|
84
|
+
"homepage": "https://github.com/mfittko/dev-loops#readme",
|
|
85
|
+
"version": "0.1.0",
|
|
86
|
+
"files": [
|
|
87
|
+
"cli/",
|
|
88
|
+
"lib/",
|
|
89
|
+
"scripts/",
|
|
90
|
+
"extension/",
|
|
91
|
+
"skills/",
|
|
92
|
+
"agents/",
|
|
93
|
+
".pi/dev-loop/defaults.yaml",
|
|
94
|
+
"README.md",
|
|
95
|
+
"CHANGELOG.md",
|
|
96
|
+
"LICENSE",
|
|
97
|
+
"AGENTS.md"
|
|
98
|
+
],
|
|
99
|
+
"publishConfig": {
|
|
100
|
+
"access": "public",
|
|
101
|
+
"provenance": true
|
|
102
|
+
}
|
|
103
|
+
}
|