MCPcopy Create free account
hub / github.com/ByBrawe/opencode-loop / addGoal

Function addGoal

src/index.js:1499–1510  ·  view source on GitHub ↗
(directory, client, sessionID, args)

Source from the content-addressed store, hash-verified

1497 if (text.trim())
1498 sections.push(`Extra goal instructions from ${job.promptFile}:
1499${text.trim()}`);
1500 }
1501 if (job.goalAcceptance?.length)
1502 sections.push(`Acceptance criteria:
1503` + job.goalAcceptance.map((item, index) => `${index + 1}. ${item}`).join(`
1504`));
1505 if (job.goalChecks?.length)
1506 sections.push(`Verification commands that define useful evidence:
1507` + job.goalChecks.map((item, index) => `${index + 1}. ${item}`).join(`
1508`));
1509 if (job.verifyCommand)
1510 sections.push(`Post-turn verify command configured by the loop: ${job.verifyCommand}`);
1511 if (job.lastGoalChecks?.length)
1512 sections.push(`Latest goal check results:
1513` + job.lastGoalChecks.map((item) => `- ${item.command}: exit ${item.code}`).join(`

Callers 1

handleCommandFunction · 0.85

Calls 8

splitFirstFunction · 0.85
statusGoalFunction · 0.85
pauseGoalFunction · 0.85
resumeGoalFunction · 0.85
clearGoalFunction · 0.85
completeGoalCommandFunction · 0.85
blockGoalCommandFunction · 0.85
addLoopFunction · 0.85

Tested by

no test coverage detected