Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions e2e/fixtures/pieces/mock-cycle-detect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ loop_monitors:
movements:
- name: review
persona: ../agents/test-reviewer-a.md
instruction_template: |
instruction: |
Review the code.
rules:
- condition: approved
Expand All @@ -34,7 +34,7 @@ movements:
persona: ../agents/test-coder.md
edit: true
required_permission_mode: edit
instruction_template: |
instruction: |
Fix the issues found in review.
rules:
- condition: fixed
Expand Down
4 changes: 2 additions & 2 deletions e2e/fixtures/pieces/mock-max-iter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ movements:
edit: true
persona: ../agents/test-coder.md
required_permission_mode: edit
instruction_template: |
instruction: |
{task}
rules:
- condition: Done
Expand All @@ -22,7 +22,7 @@ movements:
edit: true
persona: ../agents/test-coder.md
required_permission_mode: edit
instruction_template: |
instruction: |
Continue the task.
rules:
- condition: Done
Expand Down
2 changes: 1 addition & 1 deletion e2e/fixtures/pieces/mock-no-match.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ movements:
edit: true
persona: ../agents/test-coder.md
required_permission_mode: edit
instruction_template: |
instruction: |
{task}
rules:
- condition: SpecificMatchThatWillNotOccur
Expand Down
2 changes: 1 addition & 1 deletion e2e/fixtures/pieces/mock-single-step.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ movements:
- Write
- Edit
required_permission_mode: edit
instruction_template: |
instruction: |
{task}
rules:
- condition: Done
Expand Down
16 changes: 8 additions & 8 deletions e2e/fixtures/pieces/mock-slow-multi-step.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,63 +12,63 @@ movements:
- name: step-1
edit: true
persona: ../agents/test-coder.md
instruction_template: |
instruction: |
{task}
rules:
- condition: Done
next: step-2
- name: step-2
edit: true
persona: ../agents/test-coder.md
instruction_template: |
instruction: |
Continue task execution.
rules:
- condition: Done
next: step-3
- name: step-3
edit: true
persona: ../agents/test-coder.md
instruction_template: |
instruction: |
Continue task execution.
rules:
- condition: Done
next: step-4
- name: step-4
edit: true
persona: ../agents/test-coder.md
instruction_template: |
instruction: |
Continue task execution.
rules:
- condition: Done
next: step-5
- name: step-5
edit: true
persona: ../agents/test-coder.md
instruction_template: |
instruction: |
Continue task execution.
rules:
- condition: Done
next: step-6
- name: step-6
edit: true
persona: ../agents/test-coder.md
instruction_template: |
instruction: |
Continue task execution.
rules:
- condition: Done
next: step-7
- name: step-7
edit: true
persona: ../agents/test-coder.md
instruction_template: |
instruction: |
Continue task execution.
rules:
- condition: Done
next: step-8
- name: step-8
edit: true
persona: ../agents/test-coder.md
instruction_template: |
instruction: |
Finalize task execution.
rules:
- condition: Done
Expand Down
4 changes: 2 additions & 2 deletions e2e/fixtures/pieces/mock-two-step.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ movements:
edit: true
persona: ../agents/test-coder.md
required_permission_mode: edit
instruction_template: |
instruction: |
{task}
rules:
- condition: Done
Expand All @@ -22,7 +22,7 @@ movements:
edit: true
persona: ../agents/test-coder.md
required_permission_mode: edit
instruction_template: |
instruction: |
Continue the task.
rules:
- condition: Done
Expand Down
8 changes: 4 additions & 4 deletions e2e/fixtures/pieces/multi-step-parallel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ movements:
persona: ../agents/test-coder.md
edit: true
required_permission_mode: edit
instruction_template: |
instruction: |
Create a plan for the task.
rules:
- condition: Plan complete
Expand All @@ -22,14 +22,14 @@ movements:
parallel:
- name: arch-review
persona: ../agents/test-reviewer-a.md
instruction_template: |
instruction: |
Review the architecture.
rules:
- condition: approved
- condition: needs_fix
- name: security-review
persona: ../agents/test-reviewer-b.md
instruction_template: |
instruction: |
Review security.
rules:
- condition: approved
Expand All @@ -43,7 +43,7 @@ movements:
persona: ../agents/test-coder.md
edit: true
required_permission_mode: edit
instruction_template: |
instruction: |
Fix the issues found in review.
rules:
- condition: Fix applied
Expand Down
2 changes: 1 addition & 1 deletion e2e/fixtures/pieces/report-judge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ movements:
report:
- name: report.md
format: report
instruction_template: |
instruction: |
{task}
rules:
- condition: Done
Expand Down
2 changes: 1 addition & 1 deletion e2e/fixtures/pieces/simple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ movements:
- Write
- Edit
required_permission_mode: edit
instruction_template: |
instruction: |
{task}
rules:
- condition: Task completed
Expand Down
2 changes: 1 addition & 1 deletion e2e/fixtures/pieces/structured-output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ movements:
edit: false
persona: ../agents/test-coder.md
required_permission_mode: readonly
instruction_template: |
instruction: |
Reply with exactly: "Task completed successfully."
Do not do anything else.
rules:
Expand Down
2 changes: 1 addition & 1 deletion e2e/fixtures/pieces/team-leader-refill-threshold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ movements:
- Read
- Write
- Edit
instruction_template: |
instruction: |
{task}
rules:
- condition: Task completed
Expand Down
2 changes: 1 addition & 1 deletion e2e/fixtures/pieces/team-leader-worker-pool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ movements:
- Read
- Write
- Edit
instruction_template: |
instruction: |
{task}
rules:
- condition: Task completed
Expand Down
2 changes: 1 addition & 1 deletion e2e/fixtures/pieces/team-leader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ movements:
- Read
- Write
- Edit
instruction_template: |
instruction: |
{task}
rules:
- condition: Task completed
Expand Down
2 changes: 1 addition & 1 deletion e2e/specs/codex-permission-mode.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('E2E: Codex permission mode readonly/full', () => {
' allowed_tools:',
' - Bash',
' required_permission_mode: readonly',
' instruction_template: |',
' instruction: |',
' Run this exact command in repository root:',
' /bin/sh -lc \'printf "ok\\n" > epperm-check.txt\'',
' If file creation succeeds, reply exactly: COMPLETE',
Expand Down
2 changes: 1 addition & 1 deletion e2e/specs/piece-selection-branches.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function writeMinimalPiece(piecePath: string): void {
' - Write',
' - Edit',
' required_permission_mode: edit',
' instruction_template: |',
' instruction: |',
' {task}',
' rules:',
' - condition: Done',
Expand Down
2 changes: 1 addition & 1 deletion e2e/specs/runtime-config-provider.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('E2E: runtime.prepare with provider', () => {
' - Read',
' - Bash',
' required_permission_mode: edit',
' instruction_template: |',
' instruction: |',
' {task}',
' rules:',
' - condition: Task completed',
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/arpeggio-schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ describe('PieceMovementRawSchema with arpeggio', () => {
const raw = {
name: 'normal-step',
persona: 'coder.md',
instruction_template: 'Do work',
instruction: 'Do work',
};

const result = PieceMovementRawSchema.safeParse(raw);
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('getBuiltinPiece', () => {
expect(piece!.name).toBe('default');
});

it('should resolve builtin instruction_template without projectCwd', () => {
it('should resolve builtin instruction without projectCwd', () => {
const piece = getBuiltinPiece('default', process.cwd());
expect(piece).not.toBeNull();

Expand Down
16 changes: 8 additions & 8 deletions src/__tests__/facet-resolution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ describe('normalizePieceConfig with layer resolution', () => {
expect(config.movements[0]!.knowledgeContents![0]).toBe('# Domain Knowledge');
});

it('should resolve instruction_template from section map before layer resolution', () => {
it('should resolve instruction from section map before layer resolution', () => {
const raw = {
name: 'test-piece',
instructions: {
Expand All @@ -519,7 +519,7 @@ describe('normalizePieceConfig with layer resolution', () => {
{
name: 'step1',
persona: 'coder',
instruction_template: 'implement',
instruction: 'implement',
},
],
};
Expand All @@ -530,7 +530,7 @@ describe('normalizePieceConfig with layer resolution', () => {
expect(config.movements[0]!.instruction).toBe('Mapped instruction template');
});

it('should resolve instruction_template by name via layer resolution', () => {
it('should resolve instruction by name via layer resolution', () => {
const instructionsDir = join(projectDir, '.takt', 'facets', 'instructions');
mkdirSync(instructionsDir, { recursive: true });
writeFileSync(join(instructionsDir, 'implement.md'), 'Project implement template');
Expand All @@ -541,7 +541,7 @@ describe('normalizePieceConfig with layer resolution', () => {
{
name: 'step1',
persona: 'coder',
instruction_template: 'implement',
instruction: 'implement',
},
],
};
Expand All @@ -552,7 +552,7 @@ describe('normalizePieceConfig with layer resolution', () => {
expect(config.movements[0]!.instruction).toBe('Project implement template');
});

it('should keep inline instruction_template when no facet is found', () => {
it('should keep inline instruction when no facet is found', () => {
const inlineTemplate = `Use this inline template.
Second line remains inline.`;
const raw = {
Expand All @@ -561,7 +561,7 @@ Second line remains inline.`;
{
name: 'step1',
persona: 'coder',
instruction_template: inlineTemplate,
instruction: inlineTemplate,
},
],
};
Expand All @@ -572,7 +572,7 @@ Second line remains inline.`;
expect(config.movements[0]!.instruction).toBe(inlineTemplate);
});

it('should resolve loop monitor judge instruction_template via layer resolution', () => {
it('should resolve loop monitor judge instruction via layer resolution', () => {
const instructionsDir = join(projectDir, '.takt', 'facets', 'instructions');
mkdirSync(instructionsDir, { recursive: true });
writeFileSync(join(instructionsDir, 'judge-template.md'), 'Project judge template');
Expand All @@ -599,7 +599,7 @@ Second line remains inline.`;
threshold: 2,
judge: {
persona: 'coder',
instruction_template: 'judge-template',
instruction: 'judge-template',
rules: [{ condition: 'continue', next: 'step2' }],
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/instructionBuilder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ describe('instruction-builder', () => {
expect(result).not.toContain('Custom order instruction');
});

it('should still replace {report:filename} in instruction_template', () => {
it('should still replace {report:filename} in instruction', () => {
const step = createMinimalStep('Write to {report:00-plan.md}');
const context = createMinimalContext({
reportDir: '/project/.takt/runs/20260129-test/reports',
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/knowledge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('ParallelSubMovementRawSchema knowledge field', () => {
name: 'sub-step',
persona: 'reviewer.md',
knowledge: 'security',
instruction_template: 'Review security',
instruction: 'Review security',
};

const result = ParallelSubMovementRawSchema.safeParse(raw);
Expand All @@ -144,7 +144,7 @@ describe('ParallelSubMovementRawSchema knowledge field', () => {
name: 'sub-step',
persona: 'reviewer.md',
knowledge: ['security', 'performance'],
instruction_template: 'Review',
instruction: 'Review',
};

const result = ParallelSubMovementRawSchema.safeParse(raw);
Expand Down Expand Up @@ -238,7 +238,7 @@ describe('normalizePieceConfig knowledge resolution', () => {
name: 'sec-review',
persona: 'reviewer.md',
knowledge: 'security',
instruction_template: 'Review security',
instruction: 'Review security',
},
],
rules: [{ condition: 'approved', next: 'COMPLETE' }],
Expand Down
Loading
Loading