juno-code 1.0.10 → 1.0.12

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.
package/dist/bin/cli.js CHANGED
@@ -277,6 +277,28 @@ var init_types = __esm({
277
277
  };
278
278
  }
279
279
  });
280
+
281
+ // src/templates/default-hooks.ts
282
+ function getDefaultHooks() {
283
+ return JSON.parse(JSON.stringify(DEFAULT_HOOKS));
284
+ }
285
+ var DEFAULT_HOOKS;
286
+ var init_default_hooks = __esm({
287
+ "src/templates/default-hooks.ts"() {
288
+ init_version();
289
+ DEFAULT_HOOKS = {
290
+ START_ITERATION: {
291
+ commands: [
292
+ // Monitor CLAUDE.md file size
293
+ 'file="CLAUDE.md"; lines=$(wc -l < "$file" 2>/dev/null || echo 0); chars=$(wc -m < "$file" 2>/dev/null || echo 0); if [ "$lines" -gt 450 ] || [ "$chars" -gt 60000 ]; then juno-kanban "[Critical] file $file is too large, keep it lean and useful for every run of the agent."; fi',
294
+ // Monitor AGENTS.md file size
295
+ 'file="AGENTS.md"; lines=$(wc -l < "$file" 2>/dev/null || echo 0); chars=$(wc -m < "$file" 2>/dev/null || echo 0); if [ "$lines" -gt 450 ] || [ "$chars" -gt 60000 ]; then juno-kanban "[Critical] file $file is too large, keep it lean and useful for every run of the agent."; fi',
296
+ "./.juno_task/scripts/cleanup_feedback.sh"
297
+ ]
298
+ }
299
+ };
300
+ }
301
+ });
280
302
  function createProfileManager(configDir) {
281
303
  return new ProfileManager(configDir);
282
304
  }
@@ -838,12 +860,7 @@ async function ensureHooksConfig(baseDir) {
838
860
  const configPath = path__namespace.join(configDir, "config.json");
839
861
  await fs__default.default.ensureDir(configDir);
840
862
  const configExists = await fs__default.default.pathExists(configPath);
841
- const allHookTypes = {
842
- START_RUN: { commands: [] },
843
- START_ITERATION: { commands: [] },
844
- END_ITERATION: { commands: [] },
845
- END_RUN: { commands: [] }
846
- };
863
+ const allHookTypes = getDefaultHooks();
847
864
  if (!configExists) {
848
865
  const defaultConfig = {
849
866
  ...DEFAULT_CONFIG,
@@ -889,6 +906,7 @@ var ENV_VAR_MAPPING, SubagentTypeSchema, LogLevelSchema, HookTypeSchema, HookSch
889
906
  var init_config = __esm({
890
907
  "src/core/config.ts"() {
891
908
  init_version();
909
+ init_default_hooks();
892
910
  init_profiles();
893
911
  ENV_VAR_MAPPING = {
894
912
  // Core settings
@@ -963,8 +981,8 @@ var init_config = __esm({
963
981
  // Paths
964
982
  workingDirectory: process.cwd(),
965
983
  sessionDirectory: path__namespace.join(process.cwd(), ".juno_task"),
966
- // Hooks configuration
967
- hooks: {}
984
+ // Hooks configuration - populated with default hooks template
985
+ hooks: getDefaultHooks()
968
986
  };
969
987
  GLOBAL_CONFIG_FILE_NAMES = [
970
988
  "juno-task.config.json",
@@ -12062,6 +12080,7 @@ async function promptInputOnce(question, defaultValue = "") {
12062
12080
  }
12063
12081
 
12064
12082
  // src/cli/commands/init.ts
12083
+ init_default_hooks();
12065
12084
  init_types();
12066
12085
  var SimpleInitTUI = class {
12067
12086
  context = {};
@@ -12353,6 +12372,65 @@ Items will be added here as we discover what needs to be implemented.
12353
12372
  - Task defined: ${variables.TASK}
12354
12373
  `;
12355
12374
  await fs__default.default.writeFile(path__namespace.join(junoTaskDir, "plan.md"), planContent);
12375
+ const implementContent = `# Implementation Guide
12376
+
12377
+ ## Current Focus
12378
+
12379
+ **Main Task**: ${variables.TASK}
12380
+
12381
+ ## Implementation Steps
12382
+
12383
+ ### Step 1: Analysis and Planning
12384
+ - [ ] Review existing codebase structure
12385
+ - [ ] Identify key components and dependencies
12386
+ - [ ] Document current state in @.juno_task/plan.md
12387
+ - [ ] Create detailed specifications in @.juno_task/specs/
12388
+
12389
+ ### Step 2: Design and Architecture
12390
+ - [ ] Define system architecture
12391
+ - [ ] Design data models and APIs
12392
+ - [ ] Plan integration points
12393
+ - [ ] Document architecture decisions
12394
+
12395
+ ### Step 3: Implementation
12396
+ - [ ] Implement core functionality
12397
+ - [ ] Write comprehensive tests
12398
+ - [ ] Ensure code quality and documentation
12399
+ - [ ] Follow coding standards and best practices
12400
+
12401
+ ### Step 4: Testing and Validation
12402
+ - [ ] Unit tests with >90% coverage
12403
+ - [ ] Integration tests
12404
+ - [ ] Performance testing
12405
+ - [ ] Security review
12406
+
12407
+ ### Step 5: Documentation and Deployment
12408
+ - [ ] Update all documentation
12409
+ - [ ] Create deployment guides
12410
+ - [ ] Version control and tagging
12411
+ - [ ] Final review and sign-off
12412
+
12413
+ ## Current Tasks
12414
+
12415
+ Update this section with specific tasks for the current iteration:
12416
+
12417
+ 1. **Task 1**: Study existing codebase and create specifications
12418
+ - Status: Not Started
12419
+ - Owner: ${variables.EDITOR}
12420
+ - Priority: High
12421
+
12422
+ ## Notes and Considerations
12423
+
12424
+ - Keep this file updated as implementation progresses
12425
+ - Document any blockers or issues encountered
12426
+ - Reference related specs and plan items
12427
+ - Track progress and update status regularly
12428
+
12429
+ ---
12430
+ *Last updated: ${variables.CURRENT_DATE}*
12431
+ *Primary subagent: ${variables.EDITOR}*
12432
+ `;
12433
+ await fs__default.default.writeFile(path__namespace.join(junoTaskDir, "implement.md"), implementContent);
12356
12434
  const specsDir = path__namespace.join(junoTaskDir, "specs");
12357
12435
  await fs__default.default.ensureDir(specsDir);
12358
12436
  const specsReadmeContent = `# Project Specifications
@@ -12531,6 +12609,7 @@ This project was initialized on ${variables.CURRENT_DATE} using juno-task.
12531
12609
  \u2502 \u251C\u2500\u2500 prompt.md # Main task definition with AI instructions
12532
12610
  \u2502 \u251C\u2500\u2500 init.md # Initial task breakdown and constraints
12533
12611
  \u2502 \u251C\u2500\u2500 plan.md # Dynamic planning and priority tracking
12612
+ \u2502 \u251C\u2500\u2500 implement.md # Implementation guide and current tasks
12534
12613
  \u2502 \u251C\u2500\u2500 USER_FEEDBACK.md # User feedback and issue tracking
12535
12614
  \u2502 \u251C\u2500\u2500 scripts/ # Utility scripts for project maintenance
12536
12615
  \u2502 \u2502 \u2514\u2500\u2500 clean_logs_folder.sh # Archive old log files
@@ -12673,8 +12752,10 @@ juno-task feedback
12673
12752
  \u2502 \u251C\u2500\u2500 prompt.md # Production-ready AI instructions
12674
12753
  \u2502 \u251C\u2500\u2500 init.md # Task breakdown and constraints
12675
12754
  \u2502 \u251C\u2500\u2500 plan.md # Dynamic planning and tracking
12755
+ \u2502 \u251C\u2500\u2500 implement.md # Implementation guide and current tasks
12676
12756
  \u2502 \u251C\u2500\u2500 USER_FEEDBACK.md # User feedback and issue tracking
12677
12757
  \u2502 \u251C\u2500\u2500 scripts/ # Utility scripts for project maintenance
12758
+ \u2502 \u2502 \u251C\u2500\u2500 install_requirements.sh # Install Python dependencies
12678
12759
  \u2502 \u2502 \u2514\u2500\u2500 clean_logs_folder.sh # Archive old log files (3+ days)
12679
12760
  \u2502 \u2514\u2500\u2500 specs/ # Comprehensive specifications
12680
12761
  \u2502 \u251C\u2500\u2500 README.md # Specs overview and guide
@@ -12721,8 +12802,9 @@ ${variables.GIT_URL}` : ""}
12721
12802
 
12722
12803
  1. **Review Task**: Check \`.juno_task/init.md\` for main task
12723
12804
  2. **Check Plan**: Review \`.juno_task/plan.md\` for current priorities
12724
- 3. **Provide Feedback**: Use \`juno-task feedback\` for issues or suggestions
12725
- 4. **Track Progress**: Monitor AI development through \`.juno_task/prompt.md\`
12805
+ 3. **Track Implementation**: Follow \`.juno_task/implement.md\` for current implementation steps
12806
+ 4. **Provide Feedback**: Use \`juno-task feedback\` for issues or suggestions
12807
+ 5. **Monitor Progress**: Track AI development through \`.juno_task/prompt.md\`
12726
12808
 
12727
12809
  ---
12728
12810
 
@@ -12776,7 +12858,9 @@ ${variables.EDITOR ? `using ${variables.EDITOR} as primary AI subagent` : ""}
12776
12858
  headlessMode: false,
12777
12859
  // Paths
12778
12860
  workingDirectory: targetDirectory,
12779
- sessionDirectory: path__namespace.join(targetDirectory, ".juno_task")
12861
+ sessionDirectory: path__namespace.join(targetDirectory, ".juno_task"),
12862
+ // Hooks configuration with default file size monitoring
12863
+ hooks: getDefaultHooks()
12780
12864
  };
12781
12865
  const configPath = path__namespace.join(junoTaskDir, "config.json");
12782
12866
  await fs__default.default.writeFile(configPath, JSON.stringify(configContent, null, 2));
@@ -13057,10 +13141,15 @@ var SimpleHeadlessInit = class {
13057
13141
  createSimpleVariables(targetDirectory, task, editor, gitUrl) {
13058
13142
  const projectName = path__namespace.basename(targetDirectory);
13059
13143
  const currentDate = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
13144
+ let AGENTMD = "AGENTS.md";
13145
+ if (editor == "claude") {
13146
+ AGENTMD = "CLAUDE.md";
13147
+ }
13060
13148
  return {
13061
13149
  PROJECT_NAME: projectName,
13062
13150
  TASK: task,
13063
13151
  EDITOR: editor,
13152
+ AGENTMD,
13064
13153
  CURRENT_DATE: currentDate,
13065
13154
  VERSION: "1.0.0",
13066
13155
  AUTHOR: "Development Team",