@proletariat/cli 0.3.84 → 0.3.86
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/bin/validate-better-sqlite3.cjs +11 -0
- package/dist/commands/session/cleanup.d.ts +2 -0
- package/dist/commands/session/cleanup.js +89 -42
- package/dist/commands/session/cleanup.js.map +1 -1
- package/dist/commands/session/index.js +4 -0
- package/dist/commands/session/index.js.map +1 -1
- package/dist/commands/session/report.d.ts +27 -0
- package/dist/commands/session/report.js +217 -0
- package/dist/commands/session/report.js.map +1 -0
- package/dist/commands/telemetry/disable.js +1 -1
- package/dist/commands/telemetry/disable.js.map +1 -1
- package/dist/commands/telemetry/enable.js +1 -1
- package/dist/commands/telemetry/enable.js.map +1 -1
- package/dist/commands/ticket/create.d.ts +3 -2
- package/dist/commands/ticket/create.js +6 -69
- package/dist/commands/ticket/create.js.map +1 -1
- package/dist/commands/work/groom.d.ts +15 -0
- package/dist/commands/work/groom.js +77 -0
- package/dist/commands/work/groom.js.map +1 -0
- package/dist/commands/work/implement.d.ts +16 -0
- package/dist/commands/work/implement.js +85 -0
- package/dist/commands/work/implement.js.map +1 -0
- package/dist/commands/work/index.js +38 -34
- package/dist/commands/work/index.js.map +1 -1
- package/dist/commands/work/peek.d.ts +18 -0
- package/dist/commands/work/peek.js +78 -0
- package/dist/commands/work/peek.js.map +1 -0
- package/dist/commands/work/poke.d.ts +19 -0
- package/dist/commands/work/poke.js +79 -0
- package/dist/commands/work/poke.js.map +1 -0
- package/dist/commands/work/review.d.ts +1 -31
- package/dist/commands/work/review.js +44 -368
- package/dist/commands/work/review.js.map +1 -1
- package/dist/commands/work/spawn.js +1 -1
- package/dist/commands/work/spawn.js.map +1 -1
- package/dist/commands/work/start.d.ts +2 -0
- package/dist/commands/work/start.js +24 -19
- package/dist/commands/work/start.js.map +1 -1
- package/dist/commands/work/stop.d.ts +14 -0
- package/dist/commands/work/stop.js +103 -0
- package/dist/commands/work/stop.js.map +1 -0
- package/dist/hooks/init.d.ts +1 -1
- package/dist/hooks/init.js +1 -1
- package/dist/lib/execution/config.d.ts +17 -1
- package/dist/lib/execution/config.js +38 -0
- package/dist/lib/execution/config.js.map +1 -1
- package/dist/lib/execution/devcontainer.js +0 -1
- package/dist/lib/execution/devcontainer.js.map +1 -1
- package/dist/lib/execution/runners/docker-management.js +20 -0
- package/dist/lib/execution/runners/docker-management.js.map +1 -1
- package/dist/lib/execution/runners/prompt-builder.js +1 -2
- package/dist/lib/execution/runners/prompt-builder.js.map +1 -1
- package/dist/lib/execution/runners/shared.js +3 -1
- package/dist/lib/execution/runners/shared.js.map +1 -1
- package/dist/lib/execution/spawner.d.ts +3 -1
- package/dist/lib/execution/spawner.js +10 -4
- package/dist/lib/execution/spawner.js.map +1 -1
- package/dist/lib/execution/storage.d.ts +2 -1
- package/dist/lib/execution/storage.js +4 -3
- package/dist/lib/execution/storage.js.map +1 -1
- package/dist/lib/execution/types.d.ts +9 -0
- package/dist/lib/execution/types.js.map +1 -1
- package/dist/lib/mcp/tools/tmux.d.ts +1 -1
- package/dist/lib/mcp/tools/tmux.js +1 -1
- package/dist/lib/mcp/tools/work.js +4 -35
- package/dist/lib/mcp/tools/work.js.map +1 -1
- package/dist/lib/pmo/schema.d.ts +1 -1
- package/dist/lib/pmo/schema.js +1 -0
- package/dist/lib/pmo/schema.js.map +1 -1
- package/dist/lib/pmo/storage/base.js +59 -501
- package/dist/lib/pmo/storage/base.js.map +1 -1
- package/dist/lib/pmo/utils.d.ts +22 -0
- package/dist/lib/pmo/utils.js +31 -0
- package/dist/lib/pmo/utils.js.map +1 -1
- package/dist/lib/telemetry/analytics.d.ts +10 -13
- package/dist/lib/telemetry/analytics.js +36 -126
- package/dist/lib/telemetry/analytics.js.map +1 -1
- package/dist/lib/telemetry/feature-flags.d.ts +12 -37
- package/dist/lib/telemetry/feature-flags.js +15 -63
- package/dist/lib/telemetry/feature-flags.js.map +1 -1
- package/oclif.manifest.json +846 -583
- package/package.json +2 -3
- package/dist/commands/work/revise.d.ts +0 -20
- package/dist/commands/work/revise.js +0 -377
- package/dist/commands/work/revise.js.map +0 -1
|
@@ -393,6 +393,19 @@ export function runMigrations(db) {
|
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
+
// Migration: Add cleanup_policy column to agent_work table (PRLT-1061)
|
|
397
|
+
if (tableExists(T.agent_work)) {
|
|
398
|
+
const awCols2 = db.pragma(`table_info(${T.agent_work})`);
|
|
399
|
+
const awColNames2 = new Set(awCols2.map(c => c.name));
|
|
400
|
+
if (!awColNames2.has('cleanup_policy')) {
|
|
401
|
+
try {
|
|
402
|
+
db.exec(`ALTER TABLE ${T.agent_work} ADD COLUMN cleanup_policy TEXT NOT NULL DEFAULT 'on-exit'`);
|
|
403
|
+
}
|
|
404
|
+
catch {
|
|
405
|
+
// Column may already exist
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
396
409
|
// Migration: Rename execution.sandboxed setting to execution.permission_mode
|
|
397
410
|
if (tableExists('workspace_settings')) {
|
|
398
411
|
try {
|
|
@@ -798,14 +811,29 @@ prlt ticket edit {{TICKET_ID}} --description "..." --remove-label "needs-clarifi
|
|
|
798
811
|
{
|
|
799
812
|
id: 'implement',
|
|
800
813
|
name: 'Implement',
|
|
801
|
-
description: 'Write code to implement
|
|
814
|
+
description: 'Write code to implement, continue, revise, or test based on context',
|
|
802
815
|
prompt: `${PRLT_USAGE_RULE}
|
|
803
816
|
|
|
804
817
|
---
|
|
805
818
|
|
|
806
819
|
# Action: Implement
|
|
807
820
|
|
|
808
|
-
|
|
821
|
+
You are a context-aware implementation agent. Determine what kind of work is needed based on the current state of the ticket and codebase:
|
|
822
|
+
|
|
823
|
+
## Context Detection
|
|
824
|
+
|
|
825
|
+
Before starting, assess the situation:
|
|
826
|
+
|
|
827
|
+
1. **Check for an existing branch with commits** — if you find prior work on this ticket's branch, you are **continuing** from where the previous agent left off. Review existing commits and complete remaining work.
|
|
828
|
+
|
|
829
|
+
2. **Check for PR feedback** — if there is an open PR with review comments or requested changes, you are **revising** the implementation. Read all feedback, understand the reviewer's intent, and address each point.
|
|
830
|
+
|
|
831
|
+
3. **Check if the ticket specifically asks for tests** — if the ticket's requirements or acceptance criteria focus on writing tests, focus on test coverage.
|
|
832
|
+
|
|
833
|
+
4. **Otherwise** — this is a **fresh implementation**. Implement the ticket from scratch according to its requirements and acceptance criteria.
|
|
834
|
+
|
|
835
|
+
## Implementation Guidelines
|
|
836
|
+
|
|
809
837
|
- Follow the acceptance criteria exactly
|
|
810
838
|
- Write clean, well-tested code
|
|
811
839
|
- Update documentation if the changes affect it
|
|
@@ -855,62 +883,11 @@ ${PRLT_COMMANDS_CODE}`,
|
|
|
855
883
|
isDefault: true,
|
|
856
884
|
position: 2,
|
|
857
885
|
},
|
|
858
|
-
|
|
859
|
-
id: 'continue',
|
|
860
|
-
name: 'Continue',
|
|
861
|
-
description: 'Continue working from where you left off',
|
|
862
|
-
prompt: `${PRLT_USAGE_RULE}
|
|
863
|
-
|
|
864
|
-
---
|
|
865
|
-
|
|
866
|
-
# Action: Continue
|
|
867
|
-
|
|
868
|
-
Continue working on this ticket from where you left off.
|
|
869
|
-
- Review existing commits and changes to understand current state
|
|
870
|
-
- Check what subtasks remain incomplete
|
|
871
|
-
- Complete the remaining work
|
|
872
|
-
- Ensure all acceptance criteria are met
|
|
873
|
-
|
|
874
|
-
**IMPORTANT: Commit and push frequently!**
|
|
875
|
-
- Commit after each logical change or completed subtask
|
|
876
|
-
- Push after every 1-2 commits to save your work
|
|
877
|
-
- Don't wait until the end to commit - your work could be lost!
|
|
878
|
-
|
|
879
|
-
\`\`\`bash
|
|
880
|
-
git add -A && prlt commit "your change" && git push origin HEAD
|
|
881
|
-
\`\`\`
|
|
882
|
-
|
|
883
|
-
${PRLT_COMMANDS_COMMON}
|
|
884
|
-
${PRLT_COMMANDS_CODE}`,
|
|
885
|
-
endPrompt: `When complete:
|
|
886
|
-
1. **Commit your work** in each repository directory you modified:
|
|
887
|
-
\`\`\`bash
|
|
888
|
-
cd /workspace/<repo-name>
|
|
889
|
-
git add -A
|
|
890
|
-
prlt commit "describe your change"
|
|
891
|
-
git push origin HEAD
|
|
892
|
-
\`\`\`
|
|
893
|
-
|
|
894
|
-
2. **Mark work as ready** by running:
|
|
895
|
-
\`\`\`bash
|
|
896
|
-
prlt work ready {{TICKET_ID}} --pr
|
|
897
|
-
\`\`\`
|
|
898
|
-
This moves the ticket to review and creates a pull request.
|
|
899
|
-
|
|
900
|
-
**IMPORTANT:** Use the global \`prlt\` command (just type \`prlt\`). Do NOT use \`./bin/run.js\` or any local path.`,
|
|
901
|
-
fromState: 'In Progress',
|
|
902
|
-
toState: 'In Progress',
|
|
903
|
-
executor: 'claude',
|
|
904
|
-
environment: 'host',
|
|
905
|
-
permissionMode: 'full',
|
|
906
|
-
modifiesCode: true,
|
|
907
|
-
isDefault: true,
|
|
908
|
-
position: 3,
|
|
909
|
-
},
|
|
886
|
+
// NOTE: 'continue' action removed — absorbed by 'implement' (model detects existing branch)
|
|
910
887
|
{
|
|
911
888
|
id: 'review',
|
|
912
889
|
name: 'Code Review',
|
|
913
|
-
description: 'Review the
|
|
890
|
+
description: 'Review the PR — comment, fix, or both based on context',
|
|
914
891
|
prompt: `${PRLT_USAGE_RULE}
|
|
915
892
|
|
|
916
893
|
---
|
|
@@ -924,29 +901,40 @@ Review this ticket's implementation thoroughly:
|
|
|
924
901
|
- Check code quality and maintainability
|
|
925
902
|
- Suggest improvements if appropriate
|
|
926
903
|
|
|
904
|
+
## Context Detection
|
|
905
|
+
|
|
906
|
+
Determine the appropriate review mode based on context:
|
|
907
|
+
|
|
908
|
+
1. **Review only** (default) — Read the diff, analyze the code, and post a review comment on the PR. Do NOT modify any code.
|
|
909
|
+
2. **Review & Fix** — If the ticket description or instructions explicitly ask you to fix issues found, you may also make code changes, commit, and push.
|
|
910
|
+
|
|
911
|
+
If you are unsure, default to **review only** mode (read-only).
|
|
912
|
+
|
|
913
|
+
## Review Guidelines
|
|
914
|
+
|
|
927
915
|
After reviewing, determine your verdict:
|
|
928
916
|
- **APPROVE**: Code is ready to merge, no significant issues
|
|
929
917
|
- **REQUEST_CHANGES**: There are issues that must be fixed before merging
|
|
930
918
|
- **COMMENT**: General feedback, no blocking issues but some suggestions
|
|
931
919
|
|
|
932
|
-
##
|
|
920
|
+
## For Review Only Mode
|
|
933
921
|
|
|
934
922
|
- **DO NOT** merge the PR (\`gh pr merge\` is FORBIDDEN)
|
|
935
923
|
- **DO NOT** push any code (\`git push\` is FORBIDDEN)
|
|
936
|
-
- **DO NOT** run tests or test suites
|
|
937
924
|
- **DO NOT** modify, edit, or write any code files
|
|
938
925
|
- **DO NOT** create commits
|
|
939
926
|
- Your ONLY output should be a \`gh pr review\` comment
|
|
940
|
-
- This is a **read-only** review — read the diff, analyze it, post your review, and stop
|
|
941
927
|
|
|
942
|
-
|
|
928
|
+
## For Review & Fix Mode
|
|
929
|
+
|
|
930
|
+
- Fix any issues you find directly in the code
|
|
931
|
+
- Commit and push your fixes frequently
|
|
932
|
+
- Post a review summary describing what was found and fixed
|
|
943
933
|
|
|
944
934
|
${PRLT_COMMANDS_COMMON}
|
|
945
935
|
${PRLT_COMMANDS_REVIEW}`,
|
|
946
936
|
endPrompt: `When you have finished reviewing, post your review on the PR using \`gh pr review\`.
|
|
947
937
|
|
|
948
|
-
**CRITICAL: Do NOT modify any code. Do NOT attempt to fix any issues you find. Your ONLY job is to report findings.**
|
|
949
|
-
|
|
950
938
|
Choose the appropriate command based on your verdict:
|
|
951
939
|
|
|
952
940
|
**If approving:**
|
|
@@ -991,16 +979,12 @@ gh pr review --comment --body "## Code Review
|
|
|
991
979
|
COMMENT - Some suggestions but no blocking issues."
|
|
992
980
|
\`\`\`
|
|
993
981
|
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
**REMINDER:** Do NOT merge the PR. Do NOT run tests. Do NOT modify code. Only post the review comment above.
|
|
997
|
-
|
|
998
|
-
**After posting your review**, if you found issues that need fixing, log them on the ticket so another action can address them:
|
|
982
|
+
**After posting your review**, if you found issues that need fixing, log them on the ticket:
|
|
999
983
|
\`\`\`bash
|
|
1000
984
|
prlt ticket edit <TICKET_ID> --add-subtask "Fix: <description of issue>"
|
|
1001
985
|
\`\`\`
|
|
1002
986
|
|
|
1003
|
-
**STOP:** After posting your review and logging any findings, your task is complete. Do not take any further actions
|
|
987
|
+
**STOP:** After posting your review and logging any findings, your task is complete. Do not take any further actions.`,
|
|
1004
988
|
fromState: null,
|
|
1005
989
|
toState: null,
|
|
1006
990
|
executor: 'claude',
|
|
@@ -1010,381 +994,10 @@ prlt ticket edit <TICKET_ID> --add-subtask "Fix: <description of issue>"
|
|
|
1010
994
|
isDefault: false,
|
|
1011
995
|
position: 4,
|
|
1012
996
|
},
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
prompt: `${PRLT_USAGE_RULE}
|
|
1018
|
-
|
|
1019
|
-
---
|
|
1020
|
-
|
|
1021
|
-
# Action: Review Comment
|
|
1022
|
-
|
|
1023
|
-
Read the PR diff, analyze the changes, and post a GitHub review comment. That is your ONLY job.
|
|
1024
|
-
|
|
1025
|
-
## STRICT RULES - READ CAREFULLY
|
|
1026
|
-
|
|
1027
|
-
You are a **read-only** reviewer. You MUST follow these rules:
|
|
1028
|
-
|
|
1029
|
-
- **DO NOT** run \`gh pr merge\` — merging is FORBIDDEN
|
|
1030
|
-
- **DO NOT** run \`git push\` — pushing is FORBIDDEN
|
|
1031
|
-
- **DO NOT** run tests or test suites of any kind
|
|
1032
|
-
- **DO NOT** modify, edit, or write any code files
|
|
1033
|
-
- **DO NOT** create commits or branches
|
|
1034
|
-
- **DO NOT** run any commands that change repository state
|
|
1035
|
-
- Your **ONLY** permitted write operation is \`gh pr review\` to post your comment
|
|
1036
|
-
|
|
1037
|
-
## What To Do
|
|
1038
|
-
|
|
1039
|
-
1. Read the PR diff to understand the changes
|
|
1040
|
-
2. Analyze the code for bugs, issues, style, and correctness
|
|
1041
|
-
3. Post your review using \`gh pr review\` with the appropriate verdict
|
|
1042
|
-
4. **STOP** — do nothing else after posting the review
|
|
1043
|
-
|
|
1044
|
-
${PRLT_COMMANDS_COMMON}
|
|
1045
|
-
${PRLT_COMMANDS_REVIEW}`,
|
|
1046
|
-
endPrompt: `Post your review on the PR using \`gh pr review\`. This is the ONLY action you should take.
|
|
1047
|
-
|
|
1048
|
-
**If approving:**
|
|
1049
|
-
\`\`\`bash
|
|
1050
|
-
gh pr review --approve --body "## Review
|
|
1051
|
-
|
|
1052
|
-
### Summary
|
|
1053
|
-
- ...
|
|
1054
|
-
|
|
1055
|
-
APPROVED - Looks good to merge."
|
|
1056
|
-
\`\`\`
|
|
1057
|
-
|
|
1058
|
-
**If requesting changes:**
|
|
1059
|
-
\`\`\`bash
|
|
1060
|
-
gh pr review --request-changes --body "## Review
|
|
1061
|
-
|
|
1062
|
-
### Issues
|
|
1063
|
-
- ...
|
|
1064
|
-
|
|
1065
|
-
REQUEST CHANGES - Please address the above."
|
|
1066
|
-
\`\`\`
|
|
1067
|
-
|
|
1068
|
-
**If commenting:**
|
|
1069
|
-
\`\`\`bash
|
|
1070
|
-
gh pr review --comment --body "## Review
|
|
1071
|
-
|
|
1072
|
-
### Feedback
|
|
1073
|
-
- ...
|
|
1074
|
-
|
|
1075
|
-
COMMENT - Some suggestions, no blockers."
|
|
1076
|
-
\`\`\`
|
|
1077
|
-
|
|
1078
|
-
**CRITICAL REMINDER:** After posting your review, STOP. Do NOT merge the PR. Do NOT run tests. Do NOT modify code. Do NOT push anything. Your job is done after the \`gh pr review\` command.`,
|
|
1079
|
-
fromState: 'Done',
|
|
1080
|
-
toState: null,
|
|
1081
|
-
executor: 'claude',
|
|
1082
|
-
environment: 'host',
|
|
1083
|
-
permissionMode: 'readonly',
|
|
1084
|
-
modifiesCode: false,
|
|
1085
|
-
isDefault: true,
|
|
1086
|
-
position: 5,
|
|
1087
|
-
},
|
|
1088
|
-
{
|
|
1089
|
-
id: 'review-fix',
|
|
1090
|
-
name: 'Review & Fix',
|
|
1091
|
-
description: 'Review the implementation, fix issues, and post feedback on the PR',
|
|
1092
|
-
prompt: `${PRLT_USAGE_RULE}
|
|
1093
|
-
|
|
1094
|
-
---
|
|
1095
|
-
|
|
1096
|
-
# Action: Review & Fix
|
|
1097
|
-
|
|
1098
|
-
Review this ticket's implementation thoroughly and fix any issues found:
|
|
1099
|
-
- Check for bugs, edge cases, and potential issues
|
|
1100
|
-
- Look for security vulnerabilities
|
|
1101
|
-
- Verify it meets all acceptance criteria
|
|
1102
|
-
- Check code quality and maintainability
|
|
1103
|
-
- Fix any issues you find directly in the code
|
|
1104
|
-
|
|
1105
|
-
**IMPORTANT: Commit and push frequently!**
|
|
1106
|
-
- Commit after each fix or logical group of changes
|
|
1107
|
-
- Push after every 1-2 commits to save your work
|
|
1108
|
-
|
|
1109
|
-
\`\`\`bash
|
|
1110
|
-
git add -A && prlt commit "fix: address code review findings" && git push origin HEAD
|
|
1111
|
-
\`\`\`
|
|
1112
|
-
|
|
1113
|
-
${PRLT_COMMANDS_COMMON}
|
|
1114
|
-
${PRLT_COMMANDS_CODE}
|
|
1115
|
-
${PRLT_COMMANDS_REVIEW}`,
|
|
1116
|
-
endPrompt: `When you have finished reviewing and fixing:
|
|
1117
|
-
|
|
1118
|
-
1. **If issues were found and fixed**, post a review summary and push your fixes:
|
|
1119
|
-
\`\`\`bash
|
|
1120
|
-
gh pr review --comment --body "## Code Review & Fix Summary
|
|
1121
|
-
|
|
1122
|
-
### Issues found and fixed
|
|
1123
|
-
- ...
|
|
1124
|
-
|
|
1125
|
-
### What looks good
|
|
1126
|
-
- ...
|
|
1127
|
-
|
|
1128
|
-
### Changes made
|
|
1129
|
-
- ...
|
|
1130
|
-
"
|
|
1131
|
-
prlt commit "fix: address code review findings"
|
|
1132
|
-
git push origin HEAD
|
|
1133
|
-
\`\`\`
|
|
1134
|
-
|
|
1135
|
-
2. **If no issues were found**, approve the PR:
|
|
1136
|
-
\`\`\`bash
|
|
1137
|
-
gh pr review --approve --body "## Code Review
|
|
1138
|
-
|
|
1139
|
-
### What looks good
|
|
1140
|
-
- ...
|
|
1141
|
-
|
|
1142
|
-
### Verdict
|
|
1143
|
-
APPROVED - Code looks great, no issues found."
|
|
1144
|
-
\`\`\``,
|
|
1145
|
-
fromState: null,
|
|
1146
|
-
toState: null,
|
|
1147
|
-
executor: 'claude',
|
|
1148
|
-
environment: 'host',
|
|
1149
|
-
permissionMode: 'full',
|
|
1150
|
-
modifiesCode: true,
|
|
1151
|
-
isDefault: false,
|
|
1152
|
-
position: 6,
|
|
1153
|
-
},
|
|
1154
|
-
{
|
|
1155
|
-
id: 'revise',
|
|
1156
|
-
name: 'Revise',
|
|
1157
|
-
description: 'Pull the branch, read PR review feedback, implement fixes, and push',
|
|
1158
|
-
prompt: `${PRLT_USAGE_RULE}
|
|
1159
|
-
|
|
1160
|
-
---
|
|
1161
|
-
|
|
1162
|
-
# Action: Revise
|
|
1163
|
-
|
|
1164
|
-
Address the feedback on this ticket's pull request:
|
|
1165
|
-
|
|
1166
|
-
1. **Pull the latest branch** to ensure you have the most recent code:
|
|
1167
|
-
\`\`\`bash
|
|
1168
|
-
git pull
|
|
1169
|
-
\`\`\`
|
|
1170
|
-
|
|
1171
|
-
2. **Read all review comments and requested changes** from the PR:
|
|
1172
|
-
\`\`\`bash
|
|
1173
|
-
gh pr view
|
|
1174
|
-
gh api repos/{owner}/{repo}/pulls/{number}/comments
|
|
1175
|
-
\`\`\`
|
|
1176
|
-
|
|
1177
|
-
3. **Understand each piece of feedback** before making changes — read carefully and understand the reviewer's intent
|
|
1178
|
-
|
|
1179
|
-
4. **Implement the requested fixes** and address each review comment:
|
|
1180
|
-
- Make the necessary code changes to address each point
|
|
1181
|
-
- Respond to questions with explanations
|
|
1182
|
-
- Ensure all requested changes are addressed
|
|
1183
|
-
|
|
1184
|
-
**IMPORTANT: Commit and push frequently!**
|
|
1185
|
-
- Commit after each fix or logical group of changes
|
|
1186
|
-
- Push after every 1-2 commits to save your work
|
|
1187
|
-
|
|
1188
|
-
\`\`\`bash
|
|
1189
|
-
git add -A && prlt commit "fix: address PR review feedback" && git push origin HEAD
|
|
1190
|
-
\`\`\`
|
|
1191
|
-
|
|
1192
|
-
${PRLT_COMMANDS_COMMON}
|
|
1193
|
-
${PRLT_COMMANDS_CODE}`,
|
|
1194
|
-
endPrompt: `After addressing all feedback:
|
|
1195
|
-
|
|
1196
|
-
1. **Commit your changes**:
|
|
1197
|
-
\`\`\`bash
|
|
1198
|
-
git add -A
|
|
1199
|
-
prlt commit "fix: address PR review feedback"
|
|
1200
|
-
\`\`\`
|
|
1201
|
-
|
|
1202
|
-
2. **Push your changes**:
|
|
1203
|
-
\`\`\`bash
|
|
1204
|
-
git push origin HEAD
|
|
1205
|
-
\`\`\`
|
|
1206
|
-
|
|
1207
|
-
3. **Optionally reply to resolved review threads** using the GitHub API:
|
|
1208
|
-
\`\`\`bash
|
|
1209
|
-
gh api repos/{owner}/{repo}/pulls/{number}/comments
|
|
1210
|
-
\`\`\`
|
|
1211
|
-
|
|
1212
|
-
The PR will be updated automatically with your pushed changes.`,
|
|
1213
|
-
fromState: 'Done',
|
|
1214
|
-
toState: 'In Progress',
|
|
1215
|
-
executor: 'claude',
|
|
1216
|
-
environment: 'host',
|
|
1217
|
-
permissionMode: 'full',
|
|
1218
|
-
modifiesCode: true,
|
|
1219
|
-
isDefault: false,
|
|
1220
|
-
position: 7,
|
|
1221
|
-
},
|
|
1222
|
-
{
|
|
1223
|
-
id: 'explore-cli',
|
|
1224
|
-
name: 'Explore CLI',
|
|
1225
|
-
description: 'AI QA agent that autonomously explores the interactive CLI to discover bugs',
|
|
1226
|
-
prompt: `${PRLT_USAGE_RULE}
|
|
1227
|
-
|
|
1228
|
-
---
|
|
1229
|
-
|
|
1230
|
-
# Action: Explore CLI (Autonomous QA)
|
|
1231
|
-
|
|
1232
|
-
You are an AI QA tester for the prlt CLI. You have access to a tmux session where the CLI is running.
|
|
1233
|
-
Your job is to **systematically explore every menu, try every option, and find bugs**.
|
|
1234
|
-
|
|
1235
|
-
## Your Tools
|
|
1236
|
-
|
|
1237
|
-
- **tmux_send_keys** — send keystrokes to the tmux session (typing, arrows, Enter, Escape, Ctrl+C, etc.)
|
|
1238
|
-
- **tmux_capture_pane** — read the current terminal screen to see what's displayed
|
|
1239
|
-
- **tmux_start_session** — start a new tmux session to run the CLI in
|
|
1240
|
-
- **tmux_list_sessions** — list active tmux sessions
|
|
1241
|
-
- **ticket_create** — file a bug ticket when you find something broken
|
|
1242
|
-
|
|
1243
|
-
## Getting Started
|
|
1244
|
-
|
|
1245
|
-
1. Start a tmux session for testing:
|
|
1246
|
-
\`\`\`
|
|
1247
|
-
tmux_start_session({ session: "qa-test", command: "prlt" })
|
|
1248
|
-
\`\`\`
|
|
1249
|
-
2. Wait a moment, then capture the screen to see the main menu:
|
|
1250
|
-
\`\`\`
|
|
1251
|
-
tmux_capture_pane({ session: "qa-test" })
|
|
1252
|
-
\`\`\`
|
|
1253
|
-
3. Begin systematic exploration.
|
|
1254
|
-
|
|
1255
|
-
## Exploration Strategies
|
|
1256
|
-
|
|
1257
|
-
Work through these systematically. After each action, always capture the screen to see the result.
|
|
1258
|
-
|
|
1259
|
-
### 1. Navigate Every Top-Level Menu Item
|
|
1260
|
-
- Use arrow keys (Up/Down) to highlight each option
|
|
1261
|
-
- Press Enter to select each one
|
|
1262
|
-
- Capture the screen to see what happens
|
|
1263
|
-
- Press Escape or Ctrl+C to go back
|
|
1264
|
-
|
|
1265
|
-
### 2. Test Every Submenu Option
|
|
1266
|
-
- For each menu item, explore all sub-options
|
|
1267
|
-
- Try selecting each choice in every list/menu
|
|
1268
|
-
|
|
1269
|
-
### 3. Test Input Handling
|
|
1270
|
-
- **Valid inputs**: Normal expected values
|
|
1271
|
-
- **Empty inputs**: Just press Enter without typing anything
|
|
1272
|
-
- **Invalid inputs**: Random strings, numbers where text is expected, etc.
|
|
1273
|
-
- **Long strings**: Very long ticket titles, descriptions (100+ characters)
|
|
1274
|
-
- **Special characters**: Quotes, backslashes, Unicode (emojis, CJK characters)
|
|
1275
|
-
- **SQL injection-like**: \`'; DROP TABLE --\` style strings
|
|
1276
|
-
- **Boundary values**: 0, -1, 999999, etc. for numeric inputs
|
|
1277
|
-
|
|
1278
|
-
### 4. Test Cancellation Flows
|
|
1279
|
-
- Press Ctrl+C mid-flow (should exit gracefully, no crash)
|
|
1280
|
-
- Press Escape in menus (should go back)
|
|
1281
|
-
- Press q or Q in menus (common quit shortcut)
|
|
1282
|
-
- Rapidly press Escape multiple times
|
|
1283
|
-
|
|
1284
|
-
### 5. Test Navigation Edge Cases
|
|
1285
|
-
- Rapid arrow key presses (Up Up Up Down Down Down)
|
|
1286
|
-
- Arrow keys at the top/bottom of lists (should not crash)
|
|
1287
|
-
- Tab key in various contexts
|
|
1288
|
-
- Home/End keys
|
|
1289
|
-
|
|
1290
|
-
### 6. Test Error Recovery
|
|
1291
|
-
- Navigate to ticket operations without any tickets
|
|
1292
|
-
- Try to create items with duplicate names
|
|
1293
|
-
- Try operations on non-existent IDs
|
|
1294
|
-
|
|
1295
|
-
## What to Look For
|
|
1296
|
-
|
|
1297
|
-
- **Crashes**: Unhandled exceptions, stack traces visible on screen
|
|
1298
|
-
- **Rendering glitches**: Items cut off, wrong alignment, overlapping text, garbled output
|
|
1299
|
-
- **Wrong data**: Incorrect values displayed, stale data, missing information
|
|
1300
|
-
- **Missing options**: Menu items that should exist but don't
|
|
1301
|
-
- **Broken navigation**: Arrow keys don't work, can't go back, infinite loops
|
|
1302
|
-
- **Unhelpful errors**: Generic "Error" with no details, or raw error objects
|
|
1303
|
-
- **Hangs**: Screen freezes, no response to input (wait 10 seconds before declaring a hang)
|
|
1304
|
-
- **Screen overflow**: Content pushed off screen, no scrolling available
|
|
1305
|
-
- **Partial renders**: Screen shows half-drawn UI elements
|
|
1306
|
-
- **State corruption**: Operations succeed but data is wrong afterward
|
|
1307
|
-
|
|
1308
|
-
## Cross-Validation
|
|
1309
|
-
|
|
1310
|
-
Compare what you see on screen with what the MCP tools return:
|
|
1311
|
-
- After creating a ticket via the interactive menu, use \`ticket_list\` to verify it was created correctly
|
|
1312
|
-
- After moving a ticket, verify the status changed via \`ticket_show\`
|
|
1313
|
-
- Check that counts displayed in menus match actual data
|
|
1314
|
-
|
|
1315
|
-
## When You Find a Bug
|
|
1316
|
-
|
|
1317
|
-
1. **Document exact reproduction steps** — which keys you pressed, in what order
|
|
1318
|
-
2. **Capture the screen** showing the bug
|
|
1319
|
-
3. **File a ticket** using the ticket_create MCP tool:
|
|
1320
|
-
- Title: Clear description of the bug
|
|
1321
|
-
- Category: "bug"
|
|
1322
|
-
- Priority: P1 for crashes/data loss, P2 for rendering/UX issues, P3 for minor issues
|
|
1323
|
-
- Description: Include exact reproduction steps, screen capture, and expected vs actual behavior
|
|
1324
|
-
|
|
1325
|
-
## Session Management
|
|
1326
|
-
|
|
1327
|
-
- If the CLI crashes, restart it: kill the session and start a new one
|
|
1328
|
-
- If you get stuck, use Ctrl+C to escape, or kill and restart the session
|
|
1329
|
-
- Periodically capture the screen even when not expecting changes (catch intermittent issues)
|
|
1330
|
-
|
|
1331
|
-
## Test Prioritization
|
|
1332
|
-
|
|
1333
|
-
Start with the most commonly used flows, then move to edge cases:
|
|
1334
|
-
1. Main menu navigation
|
|
1335
|
-
2. Ticket operations (create, list, view, edit, move)
|
|
1336
|
-
3. Project operations
|
|
1337
|
-
4. Board view
|
|
1338
|
-
5. Work/session operations
|
|
1339
|
-
6. Epic and spec operations
|
|
1340
|
-
7. Settings and configuration
|
|
1341
|
-
8. Edge cases and stress testing`,
|
|
1342
|
-
endPrompt: `## Wrap-Up
|
|
1343
|
-
|
|
1344
|
-
When you've completed your exploration:
|
|
1345
|
-
|
|
1346
|
-
1. **Summarize your findings**: List all bugs found with their ticket IDs
|
|
1347
|
-
2. **Note areas not tested**: If you couldn't reach certain features, list them
|
|
1348
|
-
3. **Rate overall CLI quality**: Brief assessment of stability, UX, and completeness
|
|
1349
|
-
|
|
1350
|
-
Output a structured summary:
|
|
1351
|
-
\`\`\`
|
|
1352
|
-
## Exploratory QA Summary
|
|
1353
|
-
|
|
1354
|
-
### Bugs Filed
|
|
1355
|
-
- TKT-XXX: [brief description]
|
|
1356
|
-
- TKT-YYY: [brief description]
|
|
1357
|
-
|
|
1358
|
-
### Areas Tested
|
|
1359
|
-
- [ ] Main menu navigation
|
|
1360
|
-
- [ ] Ticket CRUD
|
|
1361
|
-
- [ ] Project operations
|
|
1362
|
-
- [ ] Board view
|
|
1363
|
-
- [ ] Work sessions
|
|
1364
|
-
- [ ] Epics & specs
|
|
1365
|
-
- [ ] Error handling
|
|
1366
|
-
- [ ] Input validation
|
|
1367
|
-
|
|
1368
|
-
### Areas Not Tested
|
|
1369
|
-
- [list any areas you couldn't reach]
|
|
1370
|
-
|
|
1371
|
-
### Overall Assessment
|
|
1372
|
-
[Brief quality assessment]
|
|
1373
|
-
\`\`\`
|
|
1374
|
-
|
|
1375
|
-
Clean up your tmux session:
|
|
1376
|
-
\`\`\`
|
|
1377
|
-
tmux_kill_session({ session: "qa-test" })
|
|
1378
|
-
\`\`\``,
|
|
1379
|
-
fromState: null,
|
|
1380
|
-
toState: null,
|
|
1381
|
-
executor: 'claude',
|
|
1382
|
-
environment: 'host',
|
|
1383
|
-
permissionMode: 'readonly',
|
|
1384
|
-
modifiesCode: false,
|
|
1385
|
-
isDefault: false,
|
|
1386
|
-
position: 9,
|
|
1387
|
-
},
|
|
997
|
+
// NOTE: 'review-comment' action removed — absorbed by 'review' (model decides mode from context)
|
|
998
|
+
// NOTE: 'review-fix' action removed — absorbed by 'review' (model decides whether to fix from context)
|
|
999
|
+
// NOTE: 'revise' action removed — absorbed by 'implement' (model detects PR feedback)
|
|
1000
|
+
// NOTE: 'explore-cli' action removed — no longer a default work primitive
|
|
1388
1001
|
{
|
|
1389
1002
|
id: 'merge',
|
|
1390
1003
|
name: 'Merge',
|
|
@@ -1448,56 +1061,7 @@ ${PRLT_COMMANDS_REVIEW}`,
|
|
|
1448
1061
|
isDefault: true,
|
|
1449
1062
|
position: 10,
|
|
1450
1063
|
},
|
|
1451
|
-
|
|
1452
|
-
id: 'test',
|
|
1453
|
-
name: 'Write Tests',
|
|
1454
|
-
description: 'Add comprehensive tests for the implementation',
|
|
1455
|
-
prompt: `${PRLT_USAGE_RULE}
|
|
1456
|
-
|
|
1457
|
-
---
|
|
1458
|
-
|
|
1459
|
-
# Action: Write Tests
|
|
1460
|
-
|
|
1461
|
-
Write comprehensive tests for this ticket's implementation:
|
|
1462
|
-
- Add unit tests for core functionality
|
|
1463
|
-
- Add integration tests where appropriate
|
|
1464
|
-
- Cover edge cases and error handling
|
|
1465
|
-
- Aim for good coverage of the changed code
|
|
1466
|
-
- Ensure all tests pass
|
|
1467
|
-
|
|
1468
|
-
**IMPORTANT: Commit and push frequently!**
|
|
1469
|
-
- Commit after each test file or logical group of tests
|
|
1470
|
-
- Push after every 1-2 commits to save your work
|
|
1471
|
-
|
|
1472
|
-
\`\`\`bash
|
|
1473
|
-
git add -A && prlt commit "add tests for X" && git push origin HEAD
|
|
1474
|
-
\`\`\`
|
|
1475
|
-
|
|
1476
|
-
${PRLT_COMMANDS_COMMON}
|
|
1477
|
-
${PRLT_COMMANDS_CODE}`,
|
|
1478
|
-
endPrompt: `When complete:
|
|
1479
|
-
1. **Commit your tests**:
|
|
1480
|
-
\`\`\`bash
|
|
1481
|
-
git add -A
|
|
1482
|
-
prlt commit "add tests for {{TICKET_ID}}"
|
|
1483
|
-
git push origin HEAD
|
|
1484
|
-
\`\`\`
|
|
1485
|
-
|
|
1486
|
-
2. **Mark work as ready** by running:
|
|
1487
|
-
\`\`\`bash
|
|
1488
|
-
prlt work ready {{TICKET_ID}} --pr
|
|
1489
|
-
\`\`\`
|
|
1490
|
-
|
|
1491
|
-
**IMPORTANT:** Use the global \`prlt\` command.`,
|
|
1492
|
-
fromState: null,
|
|
1493
|
-
toState: null,
|
|
1494
|
-
executor: 'claude',
|
|
1495
|
-
environment: 'host',
|
|
1496
|
-
permissionMode: 'full',
|
|
1497
|
-
modifiesCode: true,
|
|
1498
|
-
isDefault: false,
|
|
1499
|
-
position: 8,
|
|
1500
|
-
},
|
|
1064
|
+
// NOTE: 'test' action removed — absorbed by 'implement' (ticket says write tests)
|
|
1501
1065
|
];
|
|
1502
1066
|
// Use INSERT OR REPLACE to always update builtin actions with latest prompts
|
|
1503
1067
|
// This ensures prompt improvements are applied to existing databases
|
|
@@ -1547,10 +1111,10 @@ export function seedBuiltinWorkflowRules(db) {
|
|
|
1547
1111
|
trigger: 'manual',
|
|
1548
1112
|
},
|
|
1549
1113
|
{
|
|
1550
|
-
id: 'in-progress-
|
|
1114
|
+
id: 'in-progress-implement',
|
|
1551
1115
|
fromState: null,
|
|
1552
1116
|
toState: 'In Progress',
|
|
1553
|
-
actionId: '
|
|
1117
|
+
actionId: 'implement',
|
|
1554
1118
|
trigger: 'manual',
|
|
1555
1119
|
},
|
|
1556
1120
|
{
|
|
@@ -1560,13 +1124,7 @@ export function seedBuiltinWorkflowRules(db) {
|
|
|
1560
1124
|
actionId: 'review',
|
|
1561
1125
|
trigger: 'manual',
|
|
1562
1126
|
},
|
|
1563
|
-
|
|
1564
|
-
id: 'done-review-comment',
|
|
1565
|
-
fromState: null,
|
|
1566
|
-
toState: 'Done',
|
|
1567
|
-
actionId: 'review-comment',
|
|
1568
|
-
trigger: 'manual',
|
|
1569
|
-
},
|
|
1127
|
+
// NOTE: 'done-review-comment' rule removed — review-comment absorbed by review
|
|
1570
1128
|
];
|
|
1571
1129
|
// Verify pmo_workflow_rules table exists
|
|
1572
1130
|
const tableExists = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='pmo_workflow_rules'").get();
|