panopticon-cli 0.3.3 → 0.3.4

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/README.md CHANGED
@@ -342,20 +342,27 @@ Cloister manages specialized agents that handle specific phases of the developme
342
342
 
343
343
  #### Merge Agent Workflow
344
344
 
345
- The merge-agent is a specialist that handles the entire PR merge process:
345
+ The merge-agent is a specialist that handles **ALL** merges, not just conflicts. This ensures:
346
+ - It sees all code changes coming through the pipeline
347
+ - It builds context about the codebase over time
348
+ - When conflicts DO occur, it has better understanding for intelligent resolution
349
+ - Tests are always run before completing the merge
350
+
351
+ **Workflow:**
346
352
 
347
353
  1. **Pull latest main** - Ensures local main is up-to-date
348
- 2. **Merge main into feature branch** - Brings in any changes from main
349
- 3. **Resolve conflicts** - Uses AI to resolve merge conflicts intelligently
350
- 4. **Run tests** - Verifies the merge didn't break anything
351
- 5. **Push changes** - Pushes the resolved merge
352
- 6. **Create/Update PR** - Creates a PR if one doesn't exist
353
- 7. **Merge PR** - Merges the PR using `gh pr merge`
354
+ 2. **Analyze incoming changes** - Reviews what the feature branch contains
355
+ 3. **Perform merge** - Merges feature branch into main
356
+ 4. **Resolve conflicts** - If conflicts exist, uses AI to resolve them intelligently
357
+ 5. **Run tests** - Verifies the merge didn't break anything
358
+ 6. **Commit merge** - Commits the merge with descriptive message
359
+ 7. **Report results** - Returns success/failure with details
354
360
 
355
361
  **Triggering merge-agent:**
356
362
 
357
363
  ```bash
358
364
  # Via dashboard - click "Approve & Merge" on an issue card
365
+ # merge-agent is ALWAYS invoked, regardless of whether conflicts exist
359
366
 
360
367
  # Via CLI
361
368
  pan specialists wake merge-agent --issue MIN-123
@@ -363,9 +370,9 @@ pan specialists wake merge-agent --issue MIN-123
363
370
 
364
371
  The merge-agent uses a specialized prompt template that instructs it to:
365
372
  - Never force-push
366
- - Always run tests before merging
373
+ - Always run tests before completing
367
374
  - Document conflict resolution decisions
368
- - Update the issue status on success
375
+ - Provide detailed feedback on what was merged
369
376
 
370
377
  #### Specialist Auto-Initialization
371
378
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PANOPTICON_HOME
3
- } from "./chunk-3SI436SZ.js";
3
+ } from "./chunk-P5TQ5C3J.js";
4
4
 
5
5
  // src/lib/projects.ts
6
6
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
@@ -170,4 +170,4 @@ export {
170
170
  createDefaultProjectsConfig,
171
171
  initializeProjectsConfig
172
172
  };
173
- //# sourceMappingURL=chunk-IVAFJ6DS.js.map
173
+ //# sourceMappingURL=chunk-BH6BR26M.js.map
@@ -7,7 +7,7 @@ import {
7
7
  SKILLS_DIR,
8
8
  SOURCE_SCRIPTS_DIR,
9
9
  SYNC_TARGETS
10
- } from "./chunk-3SI436SZ.js";
10
+ } from "./chunk-P5TQ5C3J.js";
11
11
 
12
12
  // src/lib/config.ts
13
13
  import { readFileSync, writeFileSync, existsSync } from "fs";
@@ -1445,4 +1445,4 @@ export {
1445
1445
  LinkManager,
1446
1446
  getLinkManager
1447
1447
  };
1448
- //# sourceMappingURL=chunk-ZT55DPAC.js.map
1448
+ //# sourceMappingURL=chunk-C6A7S65K.js.map
@@ -3,7 +3,7 @@ import { homedir } from "os";
3
3
  import { join } from "path";
4
4
  import { fileURLToPath } from "url";
5
5
  import { dirname } from "path";
6
- var PANOPTICON_HOME = join(homedir(), ".panopticon");
6
+ var PANOPTICON_HOME = process.env.PANOPTICON_HOME || join(homedir(), ".panopticon");
7
7
  var CONFIG_DIR = PANOPTICON_HOME;
8
8
  var SKILLS_DIR = join(PANOPTICON_HOME, "skills");
9
9
  var COMMANDS_DIR = join(PANOPTICON_HOME, "commands");
@@ -100,4 +100,4 @@ export {
100
100
  SOURCE_SCRIPTS_DIR,
101
101
  INIT_DIRS
102
102
  };
103
- //# sourceMappingURL=chunk-3SI436SZ.js.map
103
+ //# sourceMappingURL=chunk-P5TQ5C3J.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/paths.ts"],"sourcesContent":["import { homedir } from 'os';\nimport { join } from 'path';\n\n// Panopticon home directory (can be overridden for testing)\nexport const PANOPTICON_HOME = process.env.PANOPTICON_HOME || join(homedir(), '.panopticon');\n\n// Subdirectories\nexport const CONFIG_DIR = PANOPTICON_HOME;\nexport const SKILLS_DIR = join(PANOPTICON_HOME, 'skills');\nexport const COMMANDS_DIR = join(PANOPTICON_HOME, 'commands');\nexport const AGENTS_DIR = join(PANOPTICON_HOME, 'agents');\nexport const BIN_DIR = join(PANOPTICON_HOME, 'bin');\nexport const BACKUPS_DIR = join(PANOPTICON_HOME, 'backups');\nexport const COSTS_DIR = join(PANOPTICON_HOME, 'costs');\nexport const HEARTBEATS_DIR = join(PANOPTICON_HOME, 'heartbeats');\n\n// Traefik directories\nexport const TRAEFIK_DIR = join(PANOPTICON_HOME, 'traefik');\nexport const TRAEFIK_DYNAMIC_DIR = join(TRAEFIK_DIR, 'dynamic');\nexport const TRAEFIK_CERTS_DIR = join(TRAEFIK_DIR, 'certs');\n\n// Legacy certs directory (for backwards compatibility)\nexport const CERTS_DIR = join(PANOPTICON_HOME, 'certs');\n\n// Config files\nexport const CONFIG_FILE = join(CONFIG_DIR, 'config.toml');\n\n// AI tool directories\nexport const CLAUDE_DIR = join(homedir(), '.claude');\nexport const CODEX_DIR = join(homedir(), '.codex');\nexport const CURSOR_DIR = join(homedir(), '.cursor');\nexport const GEMINI_DIR = join(homedir(), '.gemini');\n\n// Target sync locations\nexport const SYNC_TARGETS = {\n claude: {\n skills: join(CLAUDE_DIR, 'skills'),\n commands: join(CLAUDE_DIR, 'commands'),\n agents: join(CLAUDE_DIR, 'agents'),\n },\n codex: {\n skills: join(CODEX_DIR, 'skills'),\n commands: join(CODEX_DIR, 'commands'),\n agents: join(CODEX_DIR, 'agents'),\n },\n cursor: {\n skills: join(CURSOR_DIR, 'skills'),\n commands: join(CURSOR_DIR, 'commands'),\n agents: join(CURSOR_DIR, 'agents'),\n },\n gemini: {\n skills: join(GEMINI_DIR, 'skills'),\n commands: join(GEMINI_DIR, 'commands'),\n agents: join(GEMINI_DIR, 'agents'),\n },\n} as const;\n\nexport type Runtime = keyof typeof SYNC_TARGETS;\n\n// Templates directory (in user's ~/.panopticon)\nexport const TEMPLATES_DIR = join(PANOPTICON_HOME, 'templates');\nexport const CLAUDE_MD_TEMPLATES = join(TEMPLATES_DIR, 'claude-md', 'sections');\n\n// Source templates directory (bundled with the package)\n// This is resolved at runtime from the package root\nimport { fileURLToPath } from 'url';\nimport { dirname } from 'path';\n\nconst currentFile = fileURLToPath(import.meta.url);\nconst currentDir = dirname(currentFile);\n\n// Handle both development (src/lib/) and production (dist/) modes\n// In dev: /path/to/panopticon/src/lib/paths.ts -> /path/to/panopticon\n// In prod: /path/to/panopticon/dist/lib/paths.js -> /path/to/panopticon\nlet packageRoot: string;\nif (currentDir.includes('/src/')) {\n // Development mode - go up from src/lib to package root\n packageRoot = dirname(dirname(currentDir));\n} else {\n // Production mode - go up from dist (or dist/lib) to package root\n packageRoot = currentDir.endsWith('/lib')\n ? dirname(dirname(currentDir))\n : dirname(currentDir);\n}\n\nexport const SOURCE_TEMPLATES_DIR = join(packageRoot, 'templates');\nexport const SOURCE_TRAEFIK_TEMPLATES = join(SOURCE_TEMPLATES_DIR, 'traefik');\nexport const SOURCE_SCRIPTS_DIR = join(packageRoot, 'scripts');\n\n// All directories to create on init\nexport const INIT_DIRS = [\n PANOPTICON_HOME,\n SKILLS_DIR,\n COMMANDS_DIR,\n AGENTS_DIR,\n BIN_DIR,\n BACKUPS_DIR,\n COSTS_DIR,\n HEARTBEATS_DIR,\n TEMPLATES_DIR,\n CLAUDE_MD_TEMPLATES,\n CERTS_DIR,\n TRAEFIK_DIR,\n TRAEFIK_DYNAMIC_DIR,\n TRAEFIK_CERTS_DIR,\n];\n"],"mappings":";AAAA,SAAS,eAAe;AACxB,SAAS,YAAY;AAgErB,SAAS,qBAAqB;AAC9B,SAAS,eAAe;AA9DjB,IAAM,kB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