trinity-method-sdk 2.0.6 → 2.0.7

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/CHANGELOG.md CHANGED
@@ -19,6 +19,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
19
 
20
20
  ### Security
21
21
 
22
+ ## [2.0.7] - 2026-01-06
23
+
24
+ ### Fixed
25
+
26
+ - **CRITICAL: Agent file extension handling** - Fixed agent updates to strip `.template` extension
27
+ - Agents were being copied with `.md.template` extension, creating duplicates alongside old `.md` files
28
+ - Now correctly strips `.template` extension during deployment to `.claude/agents/` subdirectories
29
+ - Each agent file copied individually with proper extension handling
30
+
31
+ - **CRITICAL: Template directory structure** - Fixed template updates to use correct directory structure
32
+ - Work order templates were being deployed to wrong directory (`trinity/templates/` instead of `trinity/templates/work-orders/`)
33
+ - Documentation templates (`trinity/templates/documentation/`) were not being updated at all
34
+ - Investigation templates (`trinity/templates/investigations/`) were not being updated at all
35
+ - Now correctly deploys all 3 template types to their proper subdirectories with `.template` extension stripped
36
+ - Total templates updated: 13 files (6 work-orders + 2 documentation + 5 investigations)
37
+
22
38
  ## [2.0.6] - 2026-01-06
23
39
 
24
40
  ### Fixed
@@ -26,7 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
26
42
  - **CRITICAL: Command categorization logic** - Fixed `trinity update` to correctly categorize slash commands
27
43
  - Execution commands (`audit`, `changelog`, `docs`, `readme`) were falling through to utility category
28
44
  - Investigation commands containing `investigate` were not being matched properly
29
- - Commands now deploy to correct category directories (session, planning, execution, investigation, infrastructure, utility)
45
+ - Commands now deploy to correct category directories (session, planning, execution, investigation, infrastructure, infrastructure, utility)
30
46
  - Prevents duplicate commands in wrong directories during updates
31
47
 
32
48
  ## [2.0.5] - 2026-01-06
package/README.md CHANGED
@@ -492,7 +492,7 @@ npm run build
492
492
  npm publish --access public
493
493
 
494
494
  # 3. Create git tag and push
495
- git tag -a v2.0.6 -m "Release v2.0.6"
495
+ git tag -a v2.0.7 -m "Release v2.0.7"
496
496
  git push origin main --follow-tags
497
497
  ```
498
498
 
@@ -98,7 +98,7 @@ export async function deploy(options) {
98
98
  PACKAGE_MANAGER: stack.packageManager || 'npm',
99
99
  BACKEND_FRAMEWORK: stack.framework,
100
100
  CURRENT_DATE: new Date().toISOString(),
101
- TRINITY_VERSION: pkg.version || '2.0.6',
101
+ TRINITY_VERSION: pkg.version || '2.0.7',
102
102
  };
103
103
  // STEP 4: Create directory structure
104
104
  const directoriesCreated = await createDirectories(spinner);
@@ -39,7 +39,7 @@ async function deployRootClaudeMarkdown(templatesPath, variables) {
39
39
  */
40
40
  async function deployVersionFile(pkgVersion) {
41
41
  const versionPath = validatePath('trinity/VERSION');
42
- await fs.writeFile(versionPath, pkgVersion || '2.0.6');
42
+ await fs.writeFile(versionPath, pkgVersion || '2.0.7');
43
43
  return 1;
44
44
  }
45
45
  /**
@@ -24,7 +24,7 @@ export async function installSDK(spinner) {
24
24
  if (!packageJson.dependencies) {
25
25
  packageJson.dependencies = {};
26
26
  }
27
- packageJson.dependencies['trinity-method-sdk'] = '^2.0.6';
27
+ packageJson.dependencies['trinity-method-sdk'] = '^2.0.7';
28
28
  await fs.writeJson(packageJsonPath, packageJson, { spaces: 2 });
29
29
  spinner.text = 'Installing Trinity Method SDK (this may take a moment)...';
30
30
  // Install dependencies
@@ -21,9 +21,18 @@ export async function updateAgents(spinner, stats) {
21
21
  const sourcePath = path.join(agentsTemplatePath, agentDir);
22
22
  const targetPath = path.join('.claude/agents', agentDir);
23
23
  if (await fs.pathExists(sourcePath)) {
24
- await fs.copy(sourcePath, targetPath, { overwrite: true });
24
+ await fs.ensureDir(targetPath);
25
25
  const files = await fs.readdir(sourcePath);
26
- stats.agentsUpdated += files.length;
26
+ // Copy each file individually, stripping .template extension
27
+ for (const file of files) {
28
+ if (file.endsWith('.md.template')) {
29
+ const sourceFile = path.join(sourcePath, file);
30
+ const deployedFileName = file.replace('.template', '');
31
+ const targetFile = path.join(targetPath, deployedFileName);
32
+ await fs.copy(sourceFile, targetFile, { overwrite: true });
33
+ stats.agentsUpdated++;
34
+ }
35
+ }
27
36
  }
28
37
  }
29
38
  spinner.succeed(`Agents updated (${stats.agentsUpdated} files)`);
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Update Templates Module
3
- * Handles updating work order template files
3
+ * Handles updating work order, documentation, and investigation template files
4
4
  * @module cli/commands/update/templates
5
5
  */
6
6
  import { Ora } from 'ora';
7
7
  import { UpdateStats } from './types.js';
8
8
  /**
9
- * Update work order templates from SDK to trinity/templates/
9
+ * Update template files from SDK to trinity/templates/
10
10
  * @param spinner - ora spinner instance for status display
11
11
  * @param stats - update statistics to track progress
12
12
  */
@@ -1,25 +1,40 @@
1
1
  /**
2
2
  * Update Templates Module
3
- * Handles updating work order template files
3
+ * Handles updating work order, documentation, and investigation template files
4
4
  * @module cli/commands/update/templates
5
5
  */
6
6
  import fs from 'fs-extra';
7
7
  import path from 'path';
8
8
  import { getSDKPath } from './utils.js';
9
+ /** Template directories to update */
10
+ const TEMPLATE_DIRS = ['work-orders', 'documentation', 'investigations'];
9
11
  /**
10
- * Update work order templates from SDK to trinity/templates/
12
+ * Update template files from SDK to trinity/templates/
11
13
  * @param spinner - ora spinner instance for status display
12
14
  * @param stats - update statistics to track progress
13
15
  */
14
16
  export async function updateTemplates(spinner, stats) {
15
- spinner.start('Updating work order templates...');
17
+ spinner.start('Updating templates...');
16
18
  const sdkPath = await getSDKPath();
17
- const woTemplatePath = path.join(sdkPath, 'dist/templates/work-orders');
18
- if (await fs.pathExists(woTemplatePath)) {
19
- await fs.copy(woTemplatePath, 'trinity/templates', { overwrite: true });
20
- const files = await fs.readdir(woTemplatePath);
21
- stats.templatesUpdated = files.length;
19
+ const sdkTemplatesPath = path.join(sdkPath, 'dist/templates');
20
+ for (const templateDir of TEMPLATE_DIRS) {
21
+ const sourcePath = path.join(sdkTemplatesPath, templateDir);
22
+ const targetPath = path.join('trinity/templates', templateDir);
23
+ if (await fs.pathExists(sourcePath)) {
24
+ await fs.ensureDir(targetPath);
25
+ const files = await fs.readdir(sourcePath);
26
+ // Copy each file individually, stripping .template extension
27
+ for (const file of files) {
28
+ if (file.endsWith('.md.template')) {
29
+ const sourceFile = path.join(sourcePath, file);
30
+ const deployedFileName = file.replace('.template', '');
31
+ const targetFile = path.join(targetPath, deployedFileName);
32
+ await fs.copy(sourceFile, targetFile, { overwrite: true });
33
+ stats.templatesUpdated++;
34
+ }
35
+ }
36
+ }
22
37
  }
23
- spinner.succeed(`Work order templates updated (${stats.templatesUpdated} files)`);
38
+ spinner.succeed(`Templates updated (${stats.templatesUpdated} files)`);
24
39
  }
25
40
  //# sourceMappingURL=templates.js.map
@@ -24,7 +24,7 @@ const VARIABLE_RESOLVERS = {
24
24
  DEPLOYMENT_TIMESTAMP: (v) => toString(v.DEPLOYMENT_TIMESTAMP || v.timestamp) || new Date().toISOString(),
25
25
  LANGUAGE: (v) => toString(v.LANGUAGE || v.language) || 'Unknown',
26
26
  PACKAGE_MANAGER: (v) => toString(v.PACKAGE_MANAGER || v.packageManager) || 'npm',
27
- TRINITY_VERSION: (v) => toString(v.TRINITY_VERSION) || '2.0.6',
27
+ TRINITY_VERSION: (v) => toString(v.TRINITY_VERSION) || '2.0.7',
28
28
  TECHNOLOGY_STACK: (v) => toString(v.TECHNOLOGY_STACK || v.TECH_STACK || v.techStack) || 'Unknown',
29
29
  PRIMARY_FRAMEWORK: (v) => toString(v.PRIMARY_FRAMEWORK || v.FRAMEWORK || v.framework) || 'Generic',
30
30
  CURRENT_DATE: (v) => toString(v.CURRENT_DATE) || new Date().toISOString().split('T')[0],
@@ -102,7 +102,7 @@ npm test
102
102
  "status": "success",
103
103
  "data": {
104
104
  "package": "email-validator",
105
- "versionInstalled": "2.0.6",
105
+ "versionInstalled": "2.0.7",
106
106
  "securityAudit": "passed",
107
107
  "vulnerabilities": 0,
108
108
  "testsAfterInstall": "passed",
@@ -365,11 +365,11 @@ npm audit
365
365
 
366
366
  # 3. Install
367
367
  npm install email-validator@^2.0.0
368
- # ✅ Installed v2.0.6
368
+ # ✅ Installed v2.0.7
369
369
 
370
370
  # 4. Verify
371
371
  npm ls email-validator
372
- # ✅ email-validator@2.0.6
372
+ # ✅ email-validator@2.0.7
373
373
 
374
374
  # 5. Run tests
375
375
  npm test
@@ -384,7 +384,7 @@ npm test
384
384
  "data": {
385
385
  "package": "email-validator",
386
386
  "versionRequested": "^2.0.0",
387
- "versionInstalled": "2.0.6",
387
+ "versionInstalled": "2.0.7",
388
388
  "weeklyDownloads": "5,234,567",
389
389
  "securityAudit": "passed",
390
390
  "vulnerabilities": 0,
@@ -514,7 +514,7 @@ npm install react@18.0.0 --dry-run
514
514
  "data": {
515
515
  "action": "install",
516
516
  "package": "email-validator",
517
- "versionInstalled": "2.0.6",
517
+ "versionInstalled": "2.0.7",
518
518
  "securityAudit": "passed",
519
519
  "vulnerabilities": 0,
520
520
  "testsAfterInstall": "passed",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trinity-method-sdk",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Trinity Method SDK - Investigation-first development methodology for any project",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",