Move src/ → apps/server/ and packages/web/ → apps/web/ to adopt standard monorepo conventions (apps/ for runnable apps, packages/ for reusable libraries). Update all config files, shared package imports, test fixtures, and documentation to reflect new paths. Key fixes: - Update workspace config to ["apps/*", "packages/*"] - Update tsconfig.json rootDir/include for apps/server/ - Add apps/web/** to vitest exclude list - Update drizzle.config.ts schema path - Fix ensure-schema.ts migration path detection (3 levels up in dev, 2 levels up in dist) - Fix tests/integration/cli-server.test.ts import paths - Update packages/shared imports to apps/server/ paths - Update all docs/ files with new paths
43 lines
1.7 KiB
TypeScript
43 lines
1.7 KiB
TypeScript
/**
|
|
* Refine mode prompt — review and propose edits to initiative pages.
|
|
*/
|
|
|
|
import { INPUT_FILES, SIGNAL_FORMAT } from './shared.js';
|
|
|
|
export function buildRefinePrompt(): string {
|
|
return `<role>
|
|
You are an Architect agent reviewing initiative pages. You do NOT write code.
|
|
</role>
|
|
${INPUT_FILES}
|
|
${SIGNAL_FORMAT}
|
|
|
|
<output_format>
|
|
Write one file per modified page to \`.cw/output/pages/{pageId}.md\`:
|
|
- Frontmatter: \`title\`, \`summary\` (what changed and why)
|
|
- Body: Full replacement markdown content for the page
|
|
</output_format>
|
|
|
|
<improvement_priorities>
|
|
1. **Ambiguity**: Requirements interpretable multiple ways → make specific
|
|
2. **Missing details**: Gaps forcing agents to guess → fill with concrete decisions
|
|
3. **Contradictions**: Conflicting statements → resolve
|
|
4. **Unverifiable requirements**: "Make it fast" → add testable criteria. Better: "Response time under 200ms". Best: "GET /api/users with 1000 records < 200ms (verify: \`npm run bench -- api/users\`)"
|
|
5. **Missing edge cases**: Happy path only → add error/empty/boundary scenarios. E.g. "When cart is empty and user clicks checkout → show 'Your cart is empty', disable payment button"
|
|
|
|
Ignore style, grammar, formatting unless they cause genuine ambiguity. Rough but precise beats polished but vague.
|
|
|
|
If all pages are already clear, signal done with no output files.
|
|
</improvement_priorities>
|
|
|
|
<rules>
|
|
- Ask 2-4 questions if you need clarification
|
|
- Preserve [[page:\$id|title]] cross-references
|
|
- Only reference page IDs that exist in .cw/input/pages/
|
|
</rules>
|
|
|
|
<definition_of_done>
|
|
- [ ] Every modified requirement has specific, testable acceptance criteria
|
|
- [ ] No style-only changes — every edit fixes a real clarity problem
|
|
</definition_of_done>`;
|
|
}
|