feat: add target-specific handoff presets
This commit is contained in:
@@ -4,7 +4,7 @@ BuildPulse is a calm planning cockpit for AI-assisted product building.
|
|||||||
It helps capture features, park distracting ideas, log progress as Pulse events, and export clean project context for AI coding agents such as Claude Code, Codex, OpenCode, OpenClaw, or future autonomous agents.
|
It helps capture features, park distracting ideas, log progress as Pulse events, and export clean project context for AI coding agents such as Claude Code, Codex, OpenCode, OpenClaw, or future autonomous agents.
|
||||||
|
|
||||||
Current release line:
|
Current release line:
|
||||||
- v0.3.1 — faster focused-handoff prep from feature and status detail surfaces
|
- v0.3.2 — target-specific handoff presets plus cleaner focused-handoff prep
|
||||||
|
|
||||||
Personal runtime target:
|
Personal runtime target:
|
||||||
- `build.friborg.uk`
|
- `build.friborg.uk`
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "buildpulse",
|
"name": "buildpulse",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"api": "node --env-file=../.env server/index.mjs",
|
"api": "node --env-file=../.env server/index.mjs",
|
||||||
|
|||||||
@@ -39,6 +39,45 @@ const renderFeature = (feature: Feature) => {
|
|||||||
const sortPulsesNewestFirst = (pulses: PulseEvent[]) =>
|
const sortPulsesNewestFirst = (pulses: PulseEvent[]) =>
|
||||||
[...pulses].sort((a, b) => b.timestamp.localeCompare(a.timestamp))
|
[...pulses].sort((a, b) => b.timestamp.localeCompare(a.timestamp))
|
||||||
|
|
||||||
|
const targetPresets: Record<string, { intro: string; workingStyle: string[]; deliverBack: string[] }> = {
|
||||||
|
OpenClaw: {
|
||||||
|
intro: 'Work like a proactive operator: act, verify, and keep the slice small enough to ship cleanly.',
|
||||||
|
workingStyle: [
|
||||||
|
'Use local repo evidence before making claims.',
|
||||||
|
'Prefer direct fixes plus a quick verification gate.',
|
||||||
|
'Keep follow-up notes short and operational.',
|
||||||
|
],
|
||||||
|
deliverBack: ['What changed', 'Files touched', 'How you verified it', 'Any blocker or parked follow-up'],
|
||||||
|
},
|
||||||
|
'Claude Code': {
|
||||||
|
intro: 'Work like a careful coding pair: make the smallest coherent change, explain tradeoffs briefly, and leave the tree tidy.',
|
||||||
|
workingStyle: [
|
||||||
|
'Prefer narrowly scoped edits over broad rewrites.',
|
||||||
|
'Call out any assumption that could affect correctness.',
|
||||||
|
'End with concise verification notes and next-risk if any.',
|
||||||
|
],
|
||||||
|
deliverBack: ['Summary', 'Files changed', 'Verification', 'Risks or follow-ups'],
|
||||||
|
},
|
||||||
|
Codex: {
|
||||||
|
intro: 'Work like a focused implementation run: minimal scope, crisp diffs, and explicit evidence before claiming success.',
|
||||||
|
workingStyle: [
|
||||||
|
'Bias toward direct implementation over long discussion.',
|
||||||
|
'Preserve existing behavior unless the task explicitly changes it.',
|
||||||
|
'Name the exact verification step you ran.',
|
||||||
|
],
|
||||||
|
deliverBack: ['Changes made', 'Touched files', 'Verification run', 'Remaining follow-up'],
|
||||||
|
},
|
||||||
|
'Generic Agent': {
|
||||||
|
intro: 'Deliver one clean, well-bounded improvement without drifting into adjacent ideas.',
|
||||||
|
workingStyle: [
|
||||||
|
'Stay anchored to the focus feature.',
|
||||||
|
'Avoid speculative architecture work.',
|
||||||
|
'Return with concrete evidence, not just intention.',
|
||||||
|
],
|
||||||
|
deliverBack: ['What changed', 'Files touched', 'How you verified it', 'Any blocker or parked follow-up'],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
export const createAgentSessionPrompt = (
|
export const createAgentSessionPrompt = (
|
||||||
state: AppState,
|
state: AppState,
|
||||||
options?: {
|
options?: {
|
||||||
@@ -48,6 +87,7 @@ export const createAgentSessionPrompt = (
|
|||||||
) => {
|
) => {
|
||||||
const grouped = groupFeatures(state.features)
|
const grouped = groupFeatures(state.features)
|
||||||
const target = options?.target || 'AI coding agent'
|
const target = options?.target || 'AI coding agent'
|
||||||
|
const preset = targetPresets[target] || targetPresets['Generic Agent']
|
||||||
const focusFeature = options?.featureId ? state.features.find((feature) => feature.id === options.featureId) ?? null : grouped.now[0] ?? null
|
const focusFeature = options?.featureId ? state.features.find((feature) => feature.id === options.featureId) ?? null : grouped.now[0] ?? null
|
||||||
const focusRelease = focusFeature?.release_id ? state.releases.find((release) => release.id === focusFeature.release_id) ?? null : null
|
const focusRelease = focusFeature?.release_id ? state.releases.find((release) => release.id === focusFeature.release_id) ?? null : null
|
||||||
const focusPhase = focusFeature?.phase_id ? state.phases.find((phase) => phase.id === focusFeature.phase_id) ?? null : null
|
const focusPhase = focusFeature?.phase_id ? state.phases.find((phase) => phase.id === focusFeature.phase_id) ?? null : null
|
||||||
@@ -75,6 +115,7 @@ export const createAgentSessionPrompt = (
|
|||||||
return [
|
return [
|
||||||
`You are the ${target} for ${state.project.name}.`,
|
`You are the ${target} for ${state.project.name}.`,
|
||||||
'',
|
'',
|
||||||
|
preset.intro,
|
||||||
'Read the project context below and ship the smallest high-quality improvement that satisfies the focus feature without scope creep.',
|
'Read the project context below and ship the smallest high-quality improvement that satisfies the focus feature without scope creep.',
|
||||||
'',
|
'',
|
||||||
'## Project',
|
'## Project',
|
||||||
@@ -118,11 +159,11 @@ export const createAgentSessionPrompt = (
|
|||||||
'- Preserve working behavior and avoid needless rewrites.',
|
'- Preserve working behavior and avoid needless rewrites.',
|
||||||
'- Prefer the smallest shippable step with clear evidence.',
|
'- Prefer the smallest shippable step with clear evidence.',
|
||||||
'',
|
'',
|
||||||
|
'## Working Style',
|
||||||
|
...preset.workingStyle.map((item) => `- ${item}`),
|
||||||
|
'',
|
||||||
'## Deliver back',
|
'## Deliver back',
|
||||||
'- What changed',
|
...preset.deliverBack.map((item) => `- ${item}`),
|
||||||
'- Files touched',
|
|
||||||
'- How you verified it',
|
|
||||||
'- Any blocker or follow-up you intentionally parked',
|
|
||||||
].join('\n')
|
].join('\n')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user