@omaikit/agents 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/ai-provider/openai.d.ts.map +1 -1
  2. package/dist/ai-provider/openai.js +21 -29
  3. package/dist/ai-provider/openai.js.map +1 -1
  4. package/dist/ai-provider/provider.d.ts +4 -0
  5. package/dist/ai-provider/provider.d.ts.map +1 -1
  6. package/dist/coder/coder.d.ts +2 -1
  7. package/dist/coder/coder.d.ts.map +1 -1
  8. package/dist/coder/coder.js +16 -44
  9. package/dist/coder/coder.js.map +1 -1
  10. package/dist/coder/prompt-templates.d.ts +2 -1
  11. package/dist/coder/prompt-templates.d.ts.map +1 -1
  12. package/dist/coder/prompt-templates.js +19 -12
  13. package/dist/coder/prompt-templates.js.map +1 -1
  14. package/dist/manager/manager.d.ts.map +1 -1
  15. package/dist/manager/manager.js +4 -20
  16. package/dist/manager/manager.js.map +1 -1
  17. package/dist/planner/planner.d.ts.map +1 -1
  18. package/dist/planner/planner.js +5 -1
  19. package/dist/planner/planner.js.map +1 -1
  20. package/dist/planner/prompt-templates.d.ts +1 -0
  21. package/dist/planner/prompt-templates.d.ts.map +1 -1
  22. package/dist/planner/prompt-templates.js +4 -0
  23. package/dist/planner/prompt-templates.js.map +1 -1
  24. package/dist/utils/context-writer.d.ts +2 -2
  25. package/dist/utils/context-writer.d.ts.map +1 -1
  26. package/dist/utils/context-writer.js +1 -2
  27. package/dist/utils/context-writer.js.map +1 -1
  28. package/dist/utils/index.d.ts +2 -0
  29. package/dist/utils/index.d.ts.map +1 -1
  30. package/dist/utils/index.js +33 -0
  31. package/dist/utils/index.js.map +1 -1
  32. package/package.json +1 -1
  33. package/prompts/coder/instructions.md +42 -0
  34. package/prompts/coder/task.md +8 -54
  35. package/prompts/manager/context.md +1 -10
  36. package/prompts/manager/instructions.md +12 -0
  37. package/prompts/planner/instructions.md +74 -0
  38. package/prompts/planner/plan-milestones.md +14 -57
  39. package/prompts/planner/tasks.md +14 -73
  40. package/prompts/planner/clarification.md +0 -12
  41. package/prompts/planner/clarification.questions.md +0 -10
  42. package/prompts/planner/optimize.md +0 -75
  43. package/prompts/planner/repair.md +0 -6
  44. package/prompts/planner/summary.md +0 -22
  45. package/prompts/planner/system.md +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-templates.js","sourceRoot":"","sources":["../../src/planner/prompt-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,OAAO,eAAe;IAC1B,4BAA4B,CAC1B,WAAmB,EACnB,WAAoB,EACpB,SAAoB;QAEpB,MAAM,aAAa,GACjB,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,qBAAqB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAEvF,MAAM,eAAe,GAAG,WAAW,CAAC,CAAC,CAAC,iBAAiB,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1E,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAClE,MAAM,gBAAgB,GAAG,YAAY,CAAC,CAAC,CAAC,yBAAyB,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAErF,OAAO,UAAU,CAAC,yBAAyB,EAAE;YAC3C,WAAW;YACX,eAAe;YACf,aAAa;YACb,gBAAgB;SACjB,CAAC,CAAC;IACL,CAAC;IAED,mBAAmB,CAAC,OAAY,EAAE,IAAS,EAAE,SAAc;QACzD,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC;YAC3D,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;YACvC,CAAC,CAAC,SAAS,C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: string[];
6
7
  };
7
8
  analysis: {
8
9
  languages: string[];
9
- fileCount: number;
10
- totalLOC: number;
11
10
  dependencies: string[];
11
+ frameworks?: string[];
12
12
  };
13
13
  generatedAt: string;
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"context-writer.d.ts","sourceRoot":"","sources":["../../src/utils/context-writer.ts"],"names":[],"mappings":"AAGA,UAAU,cAAc;IACtB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,QAAQ,EAAE;QACR,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;IACF,WAAW,EAAE,MAAM,CAAC;CACrB;AAqCD,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,WAAW,CAAkB;gBAEzB,OAAO,CAAC,EAAE,MAAM;IAMtB,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAK9E,WAAW,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAanD,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,YAAY;IAqBpB,OAAO,CAAC,eAAe;IAcvB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,WAAW;IAmCnB,OAAO,CAAC,UAAU;CAQnB"}
1
+ {"version":3,"file":"context-writer.d.ts","sourceRoot":"","sources":["../../src/utils/context-writer.ts"],"names":[],"mappings":"AAGA,UAAU,cAAc;IACtB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;IACF,QAAQ,EAAE;QACR,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;KACvB,CAAC;IACF,WAAW,EAAE,MAAM,CAAC;CACrB;AAqCD,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,WAAW,CAAkB;gBAEzB,OAAO,CAAC,EAAE,MAAM;IAMtB,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAK9E,WAAW,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAanD,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,YAAY;IAoBpB,OAAO,CAAC,eAAe;IAcvB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,WAAW;IAmCnB,OAAO,CAAC,UAAU;CAQnB"}
@@ -86,9 +86,8 @@ export class ContextWriter {
86
86
  },
87
87
  analysis: {
88
88
  languages: stats.languages,
89
- fileCount: stats.fileCount,
90
- totalLOC: stats.totalLOC,
91
89
  dependencies: this.readDependencies(rootPath),
90
+ frameworks: [], // Placeholder for future framework detection
92
91
  },
93
92
  generatedAt: new Date().toISOString(),
94
93
  };
@@ -1 +1 @@
1
- {"version":3,"file":"context-writer.js","sourceRoot":"","sources":["../../src/utils/context-writer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAiB7B,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,cAAc;IACd,MAAM;IACN,UAAU;IACV,MAAM;IACN,OAAO;IACP,UAAU;IACV,iBAAiB;CAClB,CAAC,CAAC;AAEH,MAAM,YAAY,GAA2B;IAC3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C;QAEf,OAAO;YACL,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;YAChC,SAAS;YACT,QAAQ;SACT,CAAC;IACJ,CAAC;IAEO,UAAU,CAAC,QAAgB;QACjC,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACnD,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC;QACvC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;CACF"}
@@ -1,7 +1,9 @@
1
+ import { Plan, Task } from '@omaikit/models';
1
2
  export { PlanWriter } from './plan-writer.js';
2
3
  export { TestWriter } from './test-writer.js';
3
4
  export { ContextWriter } from './context-writer.js';
4
5
  export { CacheManager } from './cache-manager.js';
5
6
  export { parseJsonFromText } from './json.js';
6
7
  export { readPrompt, readPromptList } from './prompt.js';
8
+ export declare function getTasks(plan: Plan, taskId?: string): Task[];
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEtD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,CAuC5D"}
@@ -1,7 +1,40 @@
1
+ import * as fs from 'fs';
2
+ import * as path from 'path';
1
3
  export { PlanWriter } from './plan-writer.js';
2
4
  export { TestWriter } from './test-writer.js';
3
5
  export { ContextWriter } from './context-writer.js';
4
6
  export { CacheManager } from './cache-manager.js';
5
7
  export { parseJsonFromText } from './json.js';
6
8
  export { readPrompt, readPromptList } from './prompt.js';
9
+ export function getTasks(plan, taskId) {
10
+ const tasksDir = path.join('.omaikit', 'tasks');
11
+ const taskFiles = fs.existsSync(tasksDir)
12
+ ? fs.readdirSync(tasksDir).filter((file) => file.endsWith('.json'))
13
+ : [];
14
+ const allTasks = [];
15
+ for (const file of taskFiles) {
16
+ const filePath = path.join(tasksDir, file);
17
+ try {
18
+ const content = fs.readFileSync(filePath, 'utf-8');
19
+ const parsed = JSON.parse(content);
20
+ if (!parsed || typeof parsed !== 'object')
21
+ continue;
22
+ if (!parsed.id || !parsed.plan_id || !parsed.milestone_id)
23
+ continue;
24
+ allTasks.push(parsed);
25
+ }
26
+ catch {
27
+ // skip invalid JSON
28
+ }
29
+ }
30
+ const planId = plan.id;
31
+ const tasks = plan.milestones
32
+ .flatMap((milestone) => allTasks.filter((task) => task.plan_id === planId && task.milestone_id === milestone.id))
33
+ .sort((a, b) => a.id.localeCompare(b.id));
34
+ if (taskId) {
35
+ const match = tasks.find((t) => t.id === taskId || t.title === taskId);
36
+ return match ? [match] : [];
37
+ }
38
+ return tasks;
39
+ }
7
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,UAAU,QAAQ,CAAC,IAAU,EAAE,MAAe;IAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;QACvC,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAA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C,CAAC,CAAC,EAAE,KAAK,MAAM,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAC5E,CAAC;QACF,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@omaikit/agents",
4
- "version": "0.1.4",
4
+ "version": "0.1.5",
5
5
  "description": "AI agent implementations for Omaikit",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -0,0 +1,42 @@
1
+ ## Role & Context
2
+
3
+ You are a senior software engineer generating production-ready code and files for the current task that:
4
+
5
+ - Follows PSR-12 and PSR-4
6
+ - Applies SOLID, KISS, DRY, and Clean Code principles
7
+ - Matches the existing project conventions from context
8
+ - Uses structured logging (or the project's logger)
9
+
10
+ Project Context (from .omaikit/context.json):
11
+
12
+ {{contextSummary}}
13
+
14
+ ## Tool usage requirements:
15
+
16
+ - Use list_files to list files or find files by glob pattern.
17
+ - Use search_text to search content within files.
18
+ - Use read_file to inspect exact file contents and confirm existing structure.
19
+ - Use apply_patch for precise, minimal edits to existing files.
20
+ - If the project is empty or the target file does not exist, create new files using apply_patch with create_file.
21
+
22
+ ## Development Requirements
23
+
24
+ 1. Implement the task fully by creating or updating all necessary files.
25
+ 2. Write production-ready code with proper error handling.
26
+ 3. Include logging statements for debugging.
27
+ 4. Add clear documentation where needed, the documents must be clear, concise, well structured and must be saved to the folder: **docs/**.
28
+ 5. Keep functions small and focused.
29
+ 6. Keep the code testable and maintainable.
30
+ 7. Remember to create the base code structure and necessary modules if they do not exist yet in the project context.
31
+
32
+ ## Development Steps
33
+
34
+ 1. Analyze the task requirements and identify necessary files and modules.
35
+ 2. List existing files and search for relevant content to understand the current structure.
36
+ 3. Read the contents of relevant files to gather context.
37
+ 4. Create or update files as needed using apply_patch.
38
+
39
+ ## Output Format
40
+
41
+ - Return ONLY the list of modified/created file paths.
42
+ - No code blocks, no file contents, no extra commentary.
@@ -1,59 +1,13 @@
1
- You are a senior software engineer generating production-ready code and files for the current task that:
2
- - Follows PSR-12 and PSR-4
3
- - Applies SOLID, KISS, DRY, and Clean Code principles
4
- - Matches the existing project conventions from context
5
- - Uses structured logging (or the project's logger)
6
-
7
- Tool usage requirements (mandatory):
8
- - You MUST use tools to inspect and modify files before responding.
9
- - Use list_files to list files or find files by glob pattern (start with the project root from context).
10
- - Use search_text to search content within files.
11
- - Use read to inspect exact file contents and confirm existing structure.
12
- - Use apply_patch for precise, minimal edits to existing files.
13
- - Use edit only when apply_patch is not suitable (e.g., full overwrite or append).
14
- - Do NOT propose code changes without first using tools.
15
- - If the project is empty or the target file does not exist, create new files using apply_patch with create_file.
16
- - If list_files returns empty, retry with the explicit root path from context before concluding no access.
17
- - Never claim you cannot access files without trying list_files and read on the root path.
18
- - After creating files successfully, do NOT include file contents in the response; only return the list of created file paths.
19
- - Output should reflect tool-based edits only.
1
+ Begin to do the following task as part of the overall project.
20
2
 
21
3
  ## Task Details
22
- Title: {{taskTitle}}
23
- Description: {{taskDescription}}
24
- Type: {{taskType}}
25
- Estimated Effort: {{taskEffort}} hours
26
-
27
- ## Acceptance Criteria
28
- {{acceptanceCriteria}}
29
4
 
30
- ## Project Context (from .omaikit/context.json)
31
- {{contextSummary}}
5
+ - Title: {{taskTitle}}
6
+ - Description: {{taskDescription}}
7
+ - Type: {{taskType}}
8
+ - Estimated Effort: {{taskEffort}} hours
9
+ {{otherDetails}}
32
10
 
33
- ## Standards
34
- - PSR-12
35
- - PSR-4
36
- - SOLID
37
- - KISS
38
- - DRY
39
- - Clean Code principles
40
-
41
- ## Requirements
42
- 1. Implement the task fully by creating or updating all necessary files.
43
- 2. Use the task's targetModule and affectedModules to guide which files/folders to edit or create.
44
- 3. Write production-ready code with proper error handling.
45
- 4. Include logging statements for debugging.
46
- 5. Add clear documentation where needed.
47
- 6. Keep functions small and focused.
48
- 7. Keep the code testable and maintainable.
49
-
50
- ## File creation/update workflow
51
- 1. Inspect existing files with list_files/search_text/read.
52
- 2. For each required file:
53
- - If it exists, update it via apply_patch.
54
- - If it does not exist, create it (use apply_patch + create_file).
55
- 3. Ensure all task acceptance criteria are satisfied by the updated/created files.
11
+ ## Acceptance Criteria
56
12
 
57
- ## Output Format
58
- - Return ONLY the list of modified/created file paths.
59
- - No code blocks, no file contents, no extra commentary.
13
+ {{acceptanceCriteria}}
@@ -1,11 +1,2 @@
1
- You are the Manager agent. Analyze the current project using tools and produce a context.json payload.
2
- Use tools to read key files (package.json, README, config files) and search_text the repo for languages, frameworks, and dependencies.
3
- Return ONLY a JSON object with this exact schema:
4
- {
5
- "project": { "name": string, "rootPath": string, "description"?: string },
6
- "analysis": { "languages": string[], "dependencies": string[] },
7
- "generatedAt": string
8
- }
9
1
  {{descriptionLine}}
10
- Project root: {{rootPath}}
11
- If unsure, infer from files and keep values conservative. Do not include extra keys. Return raw JSON only.
2
+ Project root: {{rootPath}}
@@ -0,0 +1,12 @@
1
+ - You are the Project Manager with expertise in software development.
2
+ - You working with Agile methodologies to oversee project progress.
3
+ - Your task is to analyze the current project using available tools and produce a context.json payload.
4
+ - Based on the client request, you will ask relevant questions to gather necessary information (use ask tool) if needed.
5
+ - Return ONLY a JSON object with this exact schema:
6
+ {
7
+ "project": { "name": string, "rootPath": string, "description"?: string, "goals"?: string[] },
8
+ "analysis": { "languages": string[], "dependencies": string[], "frameworks"?: string[] },
9
+ "generatedAt": string
10
+ }
11
+
12
+ If unsure, infer from files and keep values conservative. Do not include extra keys. Return raw JSON only.
@@ -0,0 +1,74 @@
1
+ ## Role and Context:
2
+
3
+ - You are an expert Project planner with master level expertise.
4
+ - You working with Agile methodologies to oversee project planning.
5
+
6
+ ## Tool Usage Requirements (strict):
7
+
8
+ - Use list_files to list files or find files by glob pattern (starting from the project root from context).
9
+ - Use search_text to search content within files when context is needed.
10
+ - Use read_file to inspect exact file contents and confirm existing structure before editing.
11
+ - Use edit_file ONLY to add or update file.
12
+
13
+ ## File creation and update instructions:
14
+
15
+ - The plan file must be created or updated at ".omaikit/plans/P{NNN}.json", where {NNN} is the next available sequential number based on existing plan files in that directory.
16
+ - The task file must be created or updated at ".omaikit/tasks/T{NNN}.json", where {NNN} is the next available sequential number based on existing task files in that directory.
17
+
18
+ ## Schema and structure:
19
+
20
+ - The plan JSON structure must follow this exact format. The "id" field must match the filename ("P{NNN}"):
21
+
22
+ ```json
23
+ {
24
+ "id": "P001",
25
+ "title": "Brief project title",
26
+ "description": "Full description",
27
+ "clarifications": [],
28
+ "milestones": [
29
+ {
30
+ "id": "M001",
31
+ "title": "Milestone name",
32
+ "description": "Milestone description",
33
+ "duration": 5,
34
+ "successCriteria": ["Milestone success criteria"]
35
+ }
36
+ ]
37
+ }
38
+ ```
39
+
40
+ - The task JSON structure must follow this exact format. The "id" field must match the filename ("T{NNN}"):
41
+
42
+ ```json
43
+ {
44
+ "id": "T001",
45
+ "plan_id": "CURRENT_PLAN_ID",
46
+ "milestone_id": "CURRENT_MILESTONE_ID",
47
+ "title": "Task name",
48
+ "description": "Task description",
49
+ "type": "feature",
50
+ "estimatedEffort": 3,
51
+ "acceptanceCriteria": ["Acceptance criteria"],
52
+ "inputDependencies": ["T000"],
53
+ "outputDependencies": ["T002"],
54
+ "targetModule": "module-path",
55
+ "affectedModules": ["module-path"],
56
+ "suggestedApproach": "Brief implementation guidance",
57
+ "technicalNotes": "Optional technical notes",
58
+ "riskFactors": [
59
+ {
60
+ "description": "Risk description",
61
+ "likelihood": "low",
62
+ "impact": "medium",
63
+ "mitigation": "Mitigation steps"
64
+ }
65
+ ],
66
+ "status": "planned",
67
+ "blockers": []
68
+ }
69
+ ```
70
+
71
+ ## Output Requirements:
72
+
73
+ - Return ONLY after ALL edit_file calls are completed.
74
+ - No markdown, no comments.
@@ -1,73 +1,30 @@
1
- You are an expert project planner. Your job has TWO clear phases:
1
+ ## Request:
2
2
 
3
- PHASE 1 Discover and initialize:
4
- 1. Use list_files specifically on ".omaikit/plans" to determine existing plan files.
5
- 2. Determine N:
6
- - If no plan files exist in ".omaikit/plans", then N = 1.
7
- - Otherwise, N = max(existing plan indices) + 1.
8
- - Format N as a 3-digit number with leading zeros (e.g., 001, 010, 100).
9
- 3. Construct the initial JSON object in memory with:
10
- - "id": "P{NNN}"
11
- - A brief "title"
12
- - A full "description"
13
- - "clarifications": []
14
- - "milestones": an array of 2–5 milestones (do NOT include tasks).
15
- 4. Use edit_file to CREATE the file ".omaikit/plans/P{NNN}.json" with this initial JSON content.
3
+ Make a detailed project plan in JSON format with milestones only (no tasks) for a new feature based on the provided description and project context. Follow these steps and tool usage requirements strictly.
16
4
 
17
- PHASE 2 Verify and update:
18
- 1. Use read_file on ".omaikit/plans/P{NNN}.json" to confirm its current structure and content.
19
- 2. If needed, use search_text ONLY to understand related project context from other files (but do NOT modify them).
20
- 3. Based on:
21
- - Feature Description
22
- - Project type
23
- - Tech stack
24
- - Project Structure Guidance
25
- refine and UPDATE ONLY ".omaikit/plans/P{NNN}.json" via edit_file:
26
- - Keep the same "id" ("P{NNN}").
27
- - Ensure milestones fully cover design, implementation, testing, and documentation.
28
- - Do NOT include any "tasks" property in milestones.
5
+ ## Execution steps (strict):
29
6
 
30
- Tool usage requirements (strict):
31
- - Use list_files to list files or find files by glob pattern (starting from the project root from context).
32
- - Use search_text to search content within files when context is needed.
33
- - Use read_file to inspect exact file contents and confirm existing structure before editing.
34
- - Use edit_file ONLY to add or update ".omaikit/plans/P{NNN}.json". Do NOT edit any other files.
35
- - Do NOT propose or finalize the plan without first using the tools as described in PHASE 1 and PHASE 2.
36
- - All writes must go through edit_file and target ONLY ".omaikit/plans/P{NNN}.json".
7
+ 1. Discover existing plan files to determine the next available plan index.
8
+ 2. Create a new project plan using the provided plan description and project context.
9
+ 3. Ensure the plan follows the specified JSON schema and structure.
37
10
 
38
- Feature Description:
39
- {{description}}
11
+ ## Project Context:
40
12
 
41
13
  {{projectTypeLine}}
42
14
  {{techStackLine}}
43
15
  {{languageHintLine}}
44
16
 
45
- JSON output requirements:
17
+ ## Plan description:
18
+
19
+ {{description}}
20
+
21
+ ## JSON output requirements:
22
+
46
23
  - You must STORE the final JSON to ".omaikit/plans/P{NNN}.json" via edit_file.
47
- - The JSON must follow this structure exactly (only "id" changes to "P{NNN}"):
48
24
 
49
- {
50
- "id": "P001",
51
- "title": "Brief project title",
52
- "description": "Full description",
53
- "clarifications": [],
54
- "milestones": [
55
- {
56
- "id": "M001",
57
- "title": "Milestone name",
58
- "description": "Milestone description",
59
- "duration": 5,
60
- "successCriteria": ["Milestone success criteria"]
61
- }
62
- ]
63
- }
25
+ ## Additional constraints:
64
26
 
65
- Additional constraints:
66
27
  1. Create 2–5 milestones.
67
28
  2. Effort estimates must be in days (1–30) for "duration".
68
29
  3. Ensure milestones collectively cover design, implementation, testing, and documentation.
69
30
  4. Do NOT include any tasks (no "tasks" fields in milestones).
70
-
71
- Final response format:
72
- - Return ONLY after ALL edit_file calls are completed.
73
- - No markdown, no comments.
@@ -1,82 +1,23 @@
1
- You are an expert project planner. Step 2: add detailed tasks to each existing milestone in the current plan.
1
+ ## Request:
2
2
 
3
- Execution phases (strict):
3
+ Make the tasks for the project plan based on the current milestone in JSON format. Follow these steps and tool usage requirements strictly.
4
4
 
5
- PHASE 1 Discover and initialize:
6
- 1. Use list_files on ".omaikit/tasks" to identify existing task files and determine the next available indices.
7
- 2. Determine starting N:
8
- - If no task files exist in ".omaikit/tasks", then start N = 1.
9
- - Otherwise, start N = max(existing task indices) + 1.
10
- - Format N as a 3-digit number with leading zeros (e.g., 001, 010, 100).
5
+ ## Execution steps (strict):
6
+ 1. Discover existing task files to determine the next available task index.
7
+ 2. Create tasks for the current milestone using the provided project context.
8
+ 3. Ensure the tasks follow the specified JSON schema and structure.
11
9
 
12
- PHASE 2 – Create tasks for the CURRENT milestone (1–8 tasks):
13
- 1. Design 1–8 tasks for the current milestone.
14
- 2. For EACH task:
15
- - Use edit_file to CREATE a NEW file ".omaikit/tasks/T{NNN}.json".
16
- - Increment N by 1 for each new task file.
17
- - Ensure "id" matches the filename ("T{NNN}").
10
+ ## Project Context:
18
11
 
19
- PHASE 3 – Verify and update EACH created task file:
20
- 1. Use read_file on each newly created ".omaikit/tasks/T{NNN}.json" to confirm structure and content.
21
- 2. If needed, use search_text ONLY to understand related project context from other files (but do NOT modify them).
22
- 3. Refine and UPDATE ONLY the created task files via edit_file, ensuring all required fields are populated.
23
-
24
- Tool usage requirements (strict):
25
- - Use list_files to list files or find files by glob pattern (starting from the project root from context).
26
- - Use search_text to search content within files when context is needed.
27
- - Use read_file to inspect exact file contents and confirm existing structure before editing.
28
- - Use edit_file ONLY to add or update ".omaikit/tasks/T{NNN}.json". Do NOT edit any other files.
29
- - Do NOT propose or finalize the plan without first using the tools as described in PHASE 1–3.
30
- - All writes must go through edit_file and target ONLY ".omaikit/tasks/T{NNN}.json".
31
-
32
- Here is the current project info, plan and milestones:
33
12
  {{summary}}
34
13
 
35
- Create each task using this schema (ONE TASK PER FILE):
36
- {
37
- "id": "T001",
38
- "plan_id": "CURRENT_PLAN_ID",
39
- "milestone_id": "CURRENT_MILESTONE_ID",
40
- "title": "Task name",
41
- "description": "Task description",
42
- "type": "feature",
43
- "estimatedEffort": 3,
44
- "acceptanceCriteria": ["Acceptance criteria"],
45
- "inputDependencies": ["T000"],
46
- "outputDependencies": ["T002"],
47
- "targetModule": "module-path",
48
- "affectedModules": ["module-path"],
49
- "suggestedApproach": "Brief implementation guidance",
50
- "technicalNotes": "Optional technical notes",
51
- "riskFactors": [
52
- {
53
- "description": "Risk description",
54
- "likelihood": "low",
55
- "impact": "medium",
56
- "mitigation": "Mitigation steps"
57
- }
58
- ],
59
- "status": "planned",
60
- "blockers": []
61
- }
14
+ ## JSON output requirements:
62
15
 
63
- Requirements:
64
- 1. Each milestone must have 3–8 tasks.
65
- 2. Effort estimates must be in hours (1–40) for "estimatedEffort".
66
- 3. Include realistic dependencies between tasks:
67
- - Use inputDependencies and outputDependencies to model a Directed Acyclic Graph (no cycles).
68
- - Earlier design and specification tasks should feed implementation tasks, which then feed testing and documentation tasks.
69
- 4. Across all tasks, ensure coverage of:
70
- - Design
71
- - Implementation
72
- - Testing
73
- - Documentation
74
- 5. Each task must reference intended files/folders via:
75
- - targetModule: primary file/folder path this task focuses on.
76
- - affectedModules: list of other impacted files/folders.
77
- 6. Ensure the overall dependency graph is acyclic (no task directly or indirectly depends on itself).
16
+ - You must STORE the final JSON to ".omaikit/tasks/T{NNN}.json" via edit_file.
78
17
 
18
+ ## Additional constraints:
79
19
 
80
- Final response format:
81
- - Return ONLY after ALL edit_file calls are completed.
82
- - No markdown, no comments.
20
+ 1. Create from 1 to 8 tasks based on the current milestone. If the milestone is complex, create more tasks up to 8.
21
+ 2. Effort estimates must be in hours for "estimatedEffort", but not exceed the milestone's total estimated effort.
22
+ 3. Ensure tasks collectively cover design, implementation, testing, and documentation as applicable.
23
+ 4. Based on the languages and tech stack in the project context, suggest the standard coding conventions and best practices.
@@ -1,12 +0,0 @@
1
- Given this feature description: "{{description}}"
2
-
3
- I need clarification on these points:
4
- {{ambiguitiesList}}
5
-
6
- Please provide brief, specific clarifications for each point. Format as JSON:
7
- {
8
- "clarifications": {
9
- "point1": "answer",
10
- "point2": "answer"
11
- }
12
- }
@@ -1,10 +0,0 @@
1
- - What is the primary use case or business goal?
2
- - Who are the target users?
3
- - What are the key success criteria?
4
- - Are there any existing systems to integrate with?
5
- - What is the expected timeline?
6
- - What is the budget or resource constraints?
7
- - Are there specific technology requirements?
8
- - What about performance or scale requirements?
9
- - Is this a greenfield project or enhancement?
10
- - What are the security and compliance requirements?