docs: document intentional design decisions in atlas, todo-continuation, and delegation hooks
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/**
|
||||
* Cross-platform check if a path is inside .sisyphus/ directory.
|
||||
* Handles both forward slashes (Unix) and backslashes (Windows).
|
||||
* Uses path segment matching (not substring) to avoid false positives like "not-sisyphus/file.txt"
|
||||
*/
|
||||
export function isSisyphusPath(filePath: string): boolean {
|
||||
return /\.sisyphus[/\\]/.test(filePath)
|
||||
|
||||
@@ -20,6 +20,7 @@ export function createToolExecuteBeforeHandler(input: {
|
||||
}
|
||||
|
||||
// Check Write/Edit tools for orchestrator - inject strong warning
|
||||
// Warn-only policy: Atlas guides orchestrators toward delegation but doesn't block, allowing flexibility for urgent fixes
|
||||
if (isWriteOrEditToolName(toolInput.tool)) {
|
||||
const filePath = (toolOutput.args.filePath ?? toolOutput.args.path ?? toolOutput.args.file) as string | undefined
|
||||
if (filePath && !isSisyphusPath(filePath)) {
|
||||
|
||||
Reference in New Issue
Block a user