@gitgov/core 1.5.1 → 1.6.1

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
@@ -251,6 +251,7 @@ npm test
251
251
  npm run test:coverage # Run tests with coverage report
252
252
 
253
253
  # Build-time schema and type generation
254
+ npm run sync:prompts # Sync agent prompts for npm packaging
254
255
  npm run sync:schemas # Generate JSON schemas from YAML protocols
255
256
  npm run sync:workflow-configs # Sync workflow methodology configurations
256
257
  npm run compile:types # Generate TypeScript types from JSON schemas
@@ -258,7 +259,7 @@ npm run generate:indexes # Generate organized export indexes
258
259
  npm run validate:schemas # Validate all generated schemas
259
260
 
260
261
  # Development workflow
261
- npm run prebuild # Pipeline: sync → compile → generate
262
+ npm run prebuild # Pipeline: sync:prompts → compile:types → generate:indexes
262
263
  npm run build # Clean build with TypeScript compilation
263
264
  npm run clean # Remove dist directory
264
265
  npm run clean:generated # Remove all generated schemas and types
package/dist/src/index.js CHANGED
@@ -6,6 +6,7 @@ import * as yaml from 'js-yaml';
6
6
  import { generateKeyPair, createHash, sign, verify } from 'crypto';
7
7
  import { promisify } from 'util';
8
8
  import * as path from 'path';
9
+ import { fileURLToPath } from 'url';
9
10
  import { EventEmitter } from 'events';
10
11
 
11
12
  var __defProp = Object.defineProperty;
@@ -6528,6 +6529,8 @@ var project_adapter_exports = {};
6528
6529
  __export(project_adapter_exports, {
6529
6530
  ProjectAdapter: () => ProjectAdapter
6530
6531
  });
6532
+ var __filename = fileURLToPath(import.meta.url);
6533
+ var __dirname = path.dirname(__filename);
6531
6534
  var ProjectAdapter = class {
6532
6535
  identityAdapter;
6533
6536
  backlogAdapter;
@@ -6820,14 +6823,22 @@ var ProjectAdapter = class {
6820
6823
  }
6821
6824
  }
6822
6825
  async copyAgentPrompt(gitgovPath) {
6823
- try {
6824
- const sourcePrompt = path.join(ConfigManager.findProjectRoot() || process.cwd(), "docs/gitgov_agent_prompt.md");
6825
- const targetPrompt = path.join(gitgovPath, "gitgov");
6826
- await promises.copyFile(sourcePrompt, targetPrompt);
6827
- console.log(`\u{1F4CB} @gitgov agent prompt copied to .gitgov/gitgov`);
6828
- } catch {
6829
- console.warn("Warning: Could not copy @gitgov agent prompt. Project will work but AI assistant may not have local instructions.");
6826
+ const targetPrompt = path.join(gitgovPath, "gitgov");
6827
+ const potentialSources = [
6828
+ path.join(ConfigManager.findProjectRoot() || process.cwd(), "docs/gitgov_agent_prompt.md"),
6829
+ path.join(__dirname, "../../prompts/gitgov_agent_prompt.md")
6830
+ ];
6831
+ for (const sourcePrompt of potentialSources) {
6832
+ try {
6833
+ await promises.access(sourcePrompt);
6834
+ await promises.copyFile(sourcePrompt, targetPrompt);
6835
+ console.log(`\u{1F4CB} @gitgov agent prompt copied to .gitgov/gitgov`);
6836
+ return;
6837
+ } catch {
6838
+ continue;
6839
+ }
6830
6840
  }
6841
+ console.warn("Warning: Could not copy @gitgov agent prompt. Project will work but AI assistant may not have local instructions.");
6831
6842
  }
6832
6843
  generateProjectId(name) {
6833
6844
  return name.toLowerCase().replace(/[^a-z0-9]/g, "-").replace(/-+/g, "-");