0agent 1.0.86 → 1.0.87
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/daemon.mjs +40 -10
- package/package.json +1 -1
package/dist/daemon.mjs
CHANGED
|
@@ -6441,16 +6441,46 @@ content = element.text if element else page.get_all_text()` : `content = page.ge
|
|
|
6441
6441
|
if (isCodingTask) {
|
|
6442
6442
|
lines.push(
|
|
6443
6443
|
``,
|
|
6444
|
-
`\u2550\u2550\u2550 CODING DISCIPLINE \u2550\u2550\u2550`,
|
|
6445
|
-
`
|
|
6446
|
-
|
|
6447
|
-
`
|
|
6448
|
-
`
|
|
6449
|
-
`
|
|
6450
|
-
`
|
|
6451
|
-
`
|
|
6452
|
-
|
|
6453
|
-
`
|
|
6444
|
+
`\u2550\u2550\u2550 CODING DISCIPLINE (Claude Code level) \u2550\u2550\u2550`,
|
|
6445
|
+
`You are an expert software engineer. Write production-quality code. Follow these rules precisely:`,
|
|
6446
|
+
``,
|
|
6447
|
+
`EXPLORATION:`,
|
|
6448
|
+
` 1. Read before write. ALWAYS read a file before modifying it. Understand the codebase first.`,
|
|
6449
|
+
` 2. Search broadly: use shell_exec with rg/grep to find related files, imports, callers, tests.`,
|
|
6450
|
+
` 3. Read the test file for any module you're changing. Understand expected behavior.`,
|
|
6451
|
+
` 4. Read package.json/tsconfig/config files to understand the project setup.`,
|
|
6452
|
+
``,
|
|
6453
|
+
`EDITING:`,
|
|
6454
|
+
` 5. Use file_op(op:"edit") for surgical changes. Never rewrite entire files.`,
|
|
6455
|
+
` 6. Each edit must be a minimal, precise find-and-replace. Include enough context to be unique.`,
|
|
6456
|
+
` 7. When creating new files, follow existing patterns EXACTLY: naming, exports, imports, structure.`,
|
|
6457
|
+
` 8. Match the codebase: tabs vs spaces, semicolons, quote style, import order, error handling.`,
|
|
6458
|
+
``,
|
|
6459
|
+
`IMPLEMENTATION:`,
|
|
6460
|
+
` 9. Incremental loop: one logical change \u2192 run tests \u2192 fix failures \u2192 commit \u2192 next change.`,
|
|
6461
|
+
` 10. Keep functions under 40 lines. Extract helpers when complexity grows.`,
|
|
6462
|
+
` 11. No TODO comments in committed code. Implement it or leave it out.`,
|
|
6463
|
+
` 12. Handle errors properly. No empty catch {}. No swallowed promises. Propagate with context.`,
|
|
6464
|
+
` 13. Validate at system boundaries (user input, API responses). Trust internal code.`,
|
|
6465
|
+
` 14. Don't add features beyond what was asked. A bug fix doesn't need surrounding cleanup.`,
|
|
6466
|
+
``,
|
|
6467
|
+
`TESTING:`,
|
|
6468
|
+
` 15. Run the FULL test suite before declaring done, not just your new tests.`,
|
|
6469
|
+
` 16. Write tests for non-trivial logic. Tests verify behavior, not implementation.`,
|
|
6470
|
+
` 17. If tests fail, READ the error. Diagnose. Don't blindly retry or change random things.`,
|
|
6471
|
+
``,
|
|
6472
|
+
`GIT:`,
|
|
6473
|
+
` 18. Each commit = one logical change. Clear message explaining WHY, not just WHAT.`,
|
|
6474
|
+
` 19. Never amend unless asked. Never force-push. Never skip hooks.`,
|
|
6475
|
+
` 20. Stage specific files, not git add -A (avoid committing .env, credentials, binaries).`,
|
|
6476
|
+
``,
|
|
6477
|
+
`SECURITY:`,
|
|
6478
|
+
` 21. No command injection, XSS, SQL injection, path traversal, or OWASP top 10.`,
|
|
6479
|
+
` 22. Sanitize user input at boundaries. Use parameterized queries. Escape shell args.`,
|
|
6480
|
+
` 23. Never log passwords, tokens, or secrets. Never commit them to git.`,
|
|
6481
|
+
``,
|
|
6482
|
+
`OUTPUT: After completing, publish an HTML summary via surge_publish if the user would benefit`,
|
|
6483
|
+
`from a shareable artifact. Include the live link in your response.`
|
|
6454
6484
|
);
|
|
6455
6485
|
}
|
|
6456
6486
|
if (isJustdoTask) {
|