pirl-framework-cli 0.0.0-stage → 1.0.1
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/CHANGELOG.md +78 -0
- package/LICENSE +21 -0
- package/README.md +88 -2
- package/bundled-framework/files/.agents/evals/layer_record.py +438 -0
- package/bundled-framework/files/.agents/evals/tests/test_layer_record.py +264 -0
- package/bundled-framework/files/.agents/evals/tests/test_skills.py +210 -0
- package/bundled-framework/files/.agents/evals/tests/test_validate_layer_artifact.py +214 -0
- package/bundled-framework/files/.agents/evals/validate_layer_artifact.py +415 -0
- package/bundled-framework/files/.agents/instructions/implement.instructions.md +343 -0
- package/bundled-framework/files/.agents/instructions/layered-task-execution.instructions.md +370 -0
- package/bundled-framework/files/.agents/instructions/layout-verification.instructions.md +107 -0
- package/bundled-framework/files/.agents/instructions/plan.instructions.md +292 -0
- package/bundled-framework/files/.agents/instructions/review.instructions.md +236 -0
- package/bundled-framework/files/.agents/instructions/self-evaluation.instructions.md +146 -0
- package/bundled-framework/files/.agents/instructions/standalone-and-maintenance.instructions.md +230 -0
- package/bundled-framework/files/.agents/roles/backend-developer.role.md +45 -0
- package/bundled-framework/files/.agents/roles/business-analyst.role.md +55 -0
- package/bundled-framework/files/.agents/roles/code-analyst.role.md +63 -0
- package/bundled-framework/files/.agents/roles/code-reviewer.role.md +46 -0
- package/bundled-framework/files/.agents/roles/frontend-developer.role.md +51 -0
- package/bundled-framework/files/.agents/roles/process-auditor.role.md +62 -0
- package/bundled-framework/files/.agents/roles/solution-architect.role.md +53 -0
- package/bundled-framework/files/.agents/roles/technical-writer.role.md +68 -0
- package/bundled-framework/files/.agents/roles/ux-designer.role.md +46 -0
- package/bundled-framework/files/.skills/pirl-implement/SKILL.md +115 -0
- package/bundled-framework/files/.skills/pirl-implement/assets/implementation-record-template.md +22 -0
- package/bundled-framework/files/.skills/pirl-implement/references/implementation-record-format.md +41 -0
- package/bundled-framework/files/.skills/pirl-implement/scripts/add_implementation_record.py +58 -0
- package/bundled-framework/files/.skills/pirl-implement/scripts/new_layout_run.py +51 -0
- package/bundled-framework/files/.skills/pirl-plan/SKILL.md +100 -0
- package/bundled-framework/files/.skills/pirl-plan/assets/plan-template.md +48 -0
- package/bundled-framework/files/.skills/pirl-plan/references/plan-format.md +65 -0
- package/bundled-framework/files/.skills/pirl-plan/scripts/new_plan.py +93 -0
- package/bundled-framework/files/.skills/pirl-review/SKILL.md +106 -0
- package/bundled-framework/files/.skills/pirl-review/assets/review-template.md +92 -0
- package/bundled-framework/files/.skills/pirl-review/references/review-format.md +70 -0
- package/bundled-framework/files/.skills/pirl-review/scripts/new_review.py +83 -0
- package/bundled-framework/files/AGENTS.md +303 -0
- package/bundled-framework/files/CONTEXT.md +187 -0
- package/bundled-framework/files/LICENSE +21 -0
- package/bundled-framework/files/README.md +170 -0
- package/bundled-framework/files/gitignore.pirl-bundled +12 -0
- package/bundled-framework/manifest.json +45 -0
- package/dist/bin/main.js +128 -0
- package/dist/bin/pirl.js +6 -0
- package/dist/commands/dispatch.js +57 -0
- package/dist/commands/registry.js +39 -0
- package/dist/core/clipboard.js +70 -0
- package/dist/core/config.js +73 -0
- package/dist/core/exec.js +32 -0
- package/dist/core/paths.js +34 -0
- package/dist/core/targetRepo.js +22 -0
- package/dist/doctor/doctor.js +95 -0
- package/dist/engine/agentMerge.js +71 -0
- package/dist/engine/agents.js +67 -0
- package/dist/engine/attachments.js +251 -0
- package/dist/engine/claudeQuota.js +62 -0
- package/dist/engine/claudeRunner.js +118 -0
- package/dist/engine/claudeStream.js +205 -0
- package/dist/engine/hubData.js +176 -0
- package/dist/engine/permissions.js +67 -0
- package/dist/engine/pricing.js +24 -0
- package/dist/engine/protocol.js +98 -0
- package/dist/engine/run.js +527 -0
- package/dist/engine/runStore.js +67 -0
- package/dist/engine/types.js +3 -0
- package/dist/hub/framework.js +13 -0
- package/dist/hub/hub.js +125 -0
- package/dist/hub/services.js +38 -0
- package/dist/hub/update.js +261 -0
- package/dist/providers/claude.js +62 -0
- package/dist/providers/index.js +17 -0
- package/dist/providers/types.js +1 -0
- package/dist/ui/App.js +849 -0
- package/dist/ui/browse.js +144 -0
- package/dist/ui/components/Header.js +54 -0
- package/dist/ui/components/Input.js +76 -0
- package/dist/ui/components/Lines.js +50 -0
- package/dist/ui/components/Panels.js +73 -0
- package/dist/ui/content.js +225 -0
- package/dist/ui/frameworkConsole.js +541 -0
- package/dist/ui/inputEditor.js +86 -0
- package/dist/ui/layout.js +36 -0
- package/dist/ui/lines.js +15 -0
- package/dist/ui/listOverlay.js +97 -0
- package/dist/ui/runView.js +305 -0
- package/dist/ui/session.js +1 -0
- package/dist/ui/terminalInput.js +45 -0
- package/dist/ui/text.js +58 -0
- package/dist/ui/theme.js +139 -0
- package/dist/ui/ticker.js +48 -0
- package/package.json +67 -4
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useSyncExternalStore } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* One shared clock for everything that moves (spinners, elapsed time). Only the small components that show a
|
|
4
|
+
* moving value subscribe, so a tick redraws those cells and never the whole TUI. The timer runs only while
|
|
5
|
+
* something is subscribed: with no run working, nothing ticks.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Time per spinner frame. Each frame redraws the whole Ink frame (about 20 ms of CPU on a 160x45 window), so the
|
|
9
|
+
* spinner turns at 5 frames a second with a 6-frame cycle: it still reads as motion and costs half of 10 fps.
|
|
10
|
+
*/
|
|
11
|
+
export const SPINNER_MS = 200;
|
|
12
|
+
let interval = SPINNER_MS;
|
|
13
|
+
let now = Date.now();
|
|
14
|
+
let timer = null;
|
|
15
|
+
const listeners = new Set();
|
|
16
|
+
function start() {
|
|
17
|
+
timer = setInterval(() => {
|
|
18
|
+
now = Date.now();
|
|
19
|
+
for (const listener of listeners)
|
|
20
|
+
listener();
|
|
21
|
+
}, interval);
|
|
22
|
+
timer.unref?.();
|
|
23
|
+
}
|
|
24
|
+
function subscribe(listener) {
|
|
25
|
+
listeners.add(listener);
|
|
26
|
+
if (!timer) {
|
|
27
|
+
now = Date.now();
|
|
28
|
+
start();
|
|
29
|
+
}
|
|
30
|
+
return () => {
|
|
31
|
+
listeners.delete(listener);
|
|
32
|
+
if (listeners.size === 0 && timer) {
|
|
33
|
+
clearInterval(timer);
|
|
34
|
+
timer = null;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/** 200 ms with motion on (the spinner turns), 1000 ms with motion off (only the clock moves). */
|
|
39
|
+
export function setTickInterval(ms) {
|
|
40
|
+
if (ms === interval)
|
|
41
|
+
return;
|
|
42
|
+
interval = ms;
|
|
43
|
+
if (timer) {
|
|
44
|
+
clearInterval(timer);
|
|
45
|
+
start();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export const useNow = () => useSyncExternalStore(subscribe, () => now);
|
package/package.json
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pirl-framework-cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "PIRL CLI: a terminal UI that runs the PIRL framework (Plan – Implement – Review Layer) through the AI agent CLI you are already signed in to.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pirl",
|
|
7
|
+
"cli",
|
|
8
|
+
"tui",
|
|
9
|
+
"ai-agents",
|
|
10
|
+
"claude-code",
|
|
11
|
+
"plan",
|
|
12
|
+
"code-review",
|
|
13
|
+
"workflow"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/tdmadc107/PIRL-CLI#readme",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/tdmadc107/PIRL-CLI/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/tdmadc107/PIRL-CLI.git"
|
|
22
|
+
},
|
|
23
|
+
"author": "tdmadc107",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"type": "module",
|
|
26
|
+
"bin": {
|
|
27
|
+
"pirl": "dist/bin/pirl.js"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist/**/*.js",
|
|
31
|
+
"bundled-framework",
|
|
32
|
+
"CHANGELOG.md"
|
|
33
|
+
],
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=22"
|
|
36
|
+
},
|
|
37
|
+
"pirl": {
|
|
38
|
+
"frameworkVersion": "1.1.0"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"bundle-framework": "node scripts/bundle-framework.mjs",
|
|
42
|
+
"build": "npm run bundle-framework && tsc -p tsconfig.build.json",
|
|
43
|
+
"dev": "npm run bundle-framework && tsx src/bin/pirl.ts",
|
|
44
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
45
|
+
"test": "npm run bundle-framework && vitest run",
|
|
46
|
+
"prepack": "npm run build",
|
|
47
|
+
"setup": "node scripts/setup.mjs",
|
|
48
|
+
"prepublishOnly": "npm run typecheck && npm test",
|
|
49
|
+
"pack:check": "node scripts/pack-check.mjs"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"cross-spawn": "7.0.6",
|
|
53
|
+
"ink": "7.1.1",
|
|
54
|
+
"react": "19.2.9",
|
|
55
|
+
"string-width": "8.3.0",
|
|
56
|
+
"wrap-ansi": "10.0.2"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@types/cross-spawn": "6.0.6",
|
|
60
|
+
"@types/node": "22.20.5",
|
|
61
|
+
"@types/react": "19.2.18",
|
|
62
|
+
"tsx": "4.23.15",
|
|
63
|
+
"typescript": "5.9.3",
|
|
64
|
+
"vitest": "4.1.12"
|
|
65
|
+
},
|
|
66
|
+
"publishConfig": {
|
|
67
|
+
"access": "public"
|
|
68
|
+
}
|
|
69
|
+
}
|