@phi-code-admin/phi-code 0.69.0 → 0.71.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/agents/review.md +6 -2
- package/extensions/phi/orchestrator.ts +23 -8
- package/package.json +2 -2
package/agents/review.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review
|
|
3
3
|
description: Senior code reviewer. Audits quality, security, performance, and correctness.
|
|
4
|
-
tools: read, grep, find, ls, bash, memory_search, memory_write, ontology_add
|
|
4
|
+
tools: read, write, edit, grep, find, ls, bash, memory_search, memory_write, ontology_add
|
|
5
5
|
model: default
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -31,9 +31,13 @@ Focus your review on the files mentioned in previous task results. Don't audit t
|
|
|
31
31
|
- **Specific references**: File path, line number, exact code snippet. Generic advice is useless
|
|
32
32
|
- **Severity levels**: Critical (must fix before deploy), High (fix soon), Medium (improve), Low (nice-to-have)
|
|
33
33
|
- **Actionable suggestions**: Don't just say "this is bad" — show the fix
|
|
34
|
-
- **
|
|
34
|
+
- **Fix what you find**: When you discover bugs, fix them using `edit` (preferred for surgical changes) or `write` (for larger rewrites). Don't just report — act
|
|
35
35
|
- **Focused scope**: Review what was changed, not the entire project
|
|
36
36
|
|
|
37
|
+
## File Writing
|
|
38
|
+
- Use the `write` tool to create review reports and documentation
|
|
39
|
+
- NEVER use `bash` with `cat > file` as a workaround — always use the `write` tool directly
|
|
40
|
+
|
|
37
41
|
## Output Format
|
|
38
42
|
|
|
39
43
|
### 🔴 Critical / High
|
|
@@ -707,6 +707,12 @@ After implementation, use \`memory_write\` to save a summary of what was built,
|
|
|
707
707
|
- NEVER run a server with \`&\` without cleanup. Always use: \`timeout 15 bash -c 'node src/index.js & PID=$!; sleep 2; curl ...; kill $PID'\`
|
|
708
708
|
- ALWAYS kill background processes after testing
|
|
709
709
|
- If a test hangs, use \`timeout\` to prevent deadlock
|
|
710
|
+
- NEVER put tool calls inside thinking blocks. Always use the proper JSON tool call format
|
|
711
|
+
- NEVER modify source code permanently for testing. Use environment variables: \`PORT=3001 node server.js\` instead of editing files
|
|
712
|
+
- NEVER create .env files with fake credentials. Use inline env vars: \`API_KEY=test node server.js\`
|
|
713
|
+
- For port conflicts on Windows, use: \`netstat -ano | findstr :PORT\` and \`taskkill /PID <pid> /F\`
|
|
714
|
+
- For port conflicts on Linux/Mac, use: \`lsof -ti:PORT | xargs kill -9\`
|
|
715
|
+
- Always clean up after tests: kill background processes, remove temp files
|
|
710
716
|
|
|
711
717
|
After testing, use \`memory_write\` to save test results, bugs found, and lessons learned.`,
|
|
712
718
|
},
|
|
@@ -871,16 +877,25 @@ Tag the note with relevant keywords for vector search.`,
|
|
|
871
877
|
pi.on("agent_end", async (event, ctx) => {
|
|
872
878
|
if (!orchestrationActive || !phasePending) return;
|
|
873
879
|
|
|
874
|
-
// Capture
|
|
880
|
+
// Capture the most informative assistant message for context passing
|
|
881
|
+
// The last message is often trivial ("Good, file created."). Find the longest
|
|
882
|
+
// text-only assistant message instead — that's usually the real analysis/plan.
|
|
875
883
|
const messages = event.messages || [];
|
|
876
|
-
const
|
|
877
|
-
let
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
884
|
+
const assistantMessages = messages.filter(m => m.role === 'assistant');
|
|
885
|
+
let bestOutput = '';
|
|
886
|
+
let bestLength = 0;
|
|
887
|
+
for (const msg of assistantMessages) {
|
|
888
|
+
if (!msg.content) continue;
|
|
889
|
+
const textParts = Array.isArray(msg.content)
|
|
890
|
+
? msg.content.filter((c: any) => c.type === 'text').map((c: any) => c.text)
|
|
891
|
+
: [String(msg.content)];
|
|
892
|
+
const combined = textParts.join('\n');
|
|
893
|
+
if (combined.length > bestLength) {
|
|
894
|
+
bestLength = combined.length;
|
|
895
|
+
bestOutput = combined;
|
|
896
|
+
}
|
|
883
897
|
}
|
|
898
|
+
const lastOutput = bestOutput.slice(0, 4000);
|
|
884
899
|
|
|
885
900
|
// Inject previous phase output into next phase
|
|
886
901
|
if (lastOutput && phaseQueue.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phi-code-admin/phi-code",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.71.0",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"phi-code-tui": "^0.56.3",
|
|
62
62
|
"proper-lockfile": "^4.1.2",
|
|
63
63
|
"sigma-agents": "^0.1.6",
|
|
64
|
-
"sigma-memory": "0.2.
|
|
64
|
+
"sigma-memory": "0.2.1",
|
|
65
65
|
"sigma-skills": "^0.1.2",
|
|
66
66
|
"strip-ansi": "^7.1.0",
|
|
67
67
|
"undici": "^7.19.1",
|