fix(config): make DEFAULT_PROMPT_TEMPLATE a full lifecycle workflow prompt - #1
Open
gxPan1006 wants to merge 1 commit into
Open
fix(config): make DEFAULT_PROMPT_TEMPLATE a full lifecycle workflow prompt#1gxPan1006 wants to merge 1 commit into
gxPan1006 wants to merge 1 commit into
Conversation
…rompt The built-in default prompt was a 6-line stub: it stated the issue identifier/title/body and nothing else — no tracker state transitions, no tracker access, no commit/push/PR steps, no completion bar. Both control-plane-generated WORKFLOW.md files (project-setup embeds this default) and the runtime fallback in workflowPrompt() therefore produced agents that could not drive Cognit Flow's own issue lifecycle: cards never left their active state, so the orchestrator re-dispatched them indefinitely. Replace it with a project-agnostic full-lifecycle prompt: route-by-state, workpad comment protocol, tracker access (linear_graphql tool or LINEAR_API_KEY), hosted-upstream git topology, implement/publish steps, Merging/Rework flows, completion bar, and blocker escape hatch. No hardcoded project/repo/port specifics. Verified: tsc --noEmit clean; prompt-builder tests pass; the template renders under the strict Liquid config (strictVariables/strictFilters) for both attempt and no-attempt branches. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the built-in
DEFAULT_PROMPT_TEMPLATE— previously a 6-line stub — with a project-agnostic, full-lifecycle workflow prompt.The defect
DEFAULT_PROMPT_TEMPLATEstated only the issue identifier/title/body and gave the agent no instructions: no tracker state transitions, no tracker access mechanism, no commit/push/PR steps, no completion bar.It is used in two places, both broken by this:
control-plane/project-setup.tsembeds it as the prompt body of every auto-generatedWORKFLOW.md— so a freshly registered project ships a non-functional workflow.workflowPrompt()returns it as the runtime fallback when no workflow body is present.In both cases the dispatched agent cannot drive Cognit Flow's own model — it depends on the agent moving the tracker card through states, but the default never tells it to. Cards stay in their active state and the orchestrator re-dispatches them indefinitely.
The fix
A generic full-lifecycle prompt covering:
linear_graphqltool if present, else directLINEAR_API_KEY— with a Linear GraphQL cheat sheetoriginmay be a local mirror; discover the hosted remote, base work on its default branch)No hardcoded project/repo/port specifics — it stays project-agnostic, using template variables and runtime discovery.
Verification
tsc --noEmitcleantest/prompt-builder.test.tspasses (full suite also green: 89/89)strictVariables/strictFilters/lenientIf:false), for both theattemptand no-attemptbranches🤖 Generated with Claude Code