opencode-agile-agent 1.0.2 → 1.0.3

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 (3) hide show
  1. package/README.md +5 -1
  2. package/bin/cli.js +14 -13
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -10,9 +10,13 @@ Scaffold the OpenCode spec-driven agent kit into any project with one confirmati
10
10
  ## Install Flow
11
11
  - The installer asks one yes/no question.
12
12
  - Framework, language, and project name are auto-detected.
13
- - Confirmed installs copy `.opencode` and generate `AGENTS.md`.
13
+ - Confirmed installs copy `.opencode` into the current project root and generate `AGENTS.md` there.
14
14
  - Declining exits immediately.
15
15
 
16
+ ## Local Install
17
+ - Run `npx opencode-agile-agent` from the repo you want to set up.
18
+ - The installer writes to the current working directory, not the package directory.
19
+
16
20
  ## What Gets Installed
17
21
  - 25 agents
18
22
  - 14 skills
package/bin/cli.js CHANGED
@@ -1,14 +1,15 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  import { fileURLToPath } from 'url';
4
4
  import { dirname, join, sep } from 'path';
5
5
  import { existsSync, mkdirSync, cpSync, writeFileSync, readFileSync, rmSync } from 'fs';
6
6
  import { createInterface } from 'readline';
7
7
 
8
- const __filename = fileURLToPath(import.meta.url);
9
- const __dirname = dirname(__filename);
10
- const rootDir = join(__dirname, '..');
11
- const templatesDir = join(rootDir, 'templates');
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = dirname(__filename);
10
+ const packageRoot = join(__dirname, '..');
11
+ const projectRoot = process.cwd();
12
+ const templatesDir = join(packageRoot, 'templates');
12
13
 
13
14
  const colors = {
14
15
  reset: '\x1b[0m',
@@ -68,7 +69,7 @@ function shouldCopyPath(path) {
68
69
  return !path.includes(`${sep}node_modules${sep}`) && !path.endsWith(`${sep}node_modules`);
69
70
  }
70
71
 
71
- function detectProjectContext() {
72
+ function detectProjectContext() {
72
73
  const defaults = {
73
74
  projectName: 'My Project',
74
75
  framework: 'Generic',
@@ -78,7 +79,7 @@ function detectProjectContext() {
78
79
  testing: 'Follow existing tests',
79
80
  };
80
81
 
81
- const packageJsonPath = join(rootDir, 'package.json');
82
+ const packageJsonPath = join(projectRoot, 'package.json');
82
83
 
83
84
  if (!existsSync(packageJsonPath)) {
84
85
  return defaults;
@@ -302,11 +303,11 @@ async function install() {
302
303
  return;
303
304
  }
304
305
 
305
- const context = detectProjectContext();
306
- log.info(`Detected project: ${context.projectName} (${context.framework}, ${context.language})`);
307
-
308
- const source = join(templatesDir, '.opencode');
309
- const target = join(rootDir, '.opencode');
306
+ const context = detectProjectContext();
307
+ log.info(`Detected project: ${context.projectName} (${context.framework}, ${context.language})`);
308
+
309
+ const source = join(templatesDir, '.opencode');
310
+ const target = join(projectRoot, '.opencode');
310
311
 
311
312
  if (!existsSync(templatesDir) || !existsSync(source)) {
312
313
  log.error('Template source not found.');
@@ -322,7 +323,7 @@ async function install() {
322
323
  mkdirSync(target, { recursive: true });
323
324
  }
324
325
 
325
- cpSync(source, target, {
326
+ cpSync(source, target, {
326
327
  recursive: true,
327
328
  overwrite: true,
328
329
  filter: shouldCopyPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-agile-agent",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "AI Agile Spec-Driven Development - Install .opencode agile agent system into any project",
5
5
  "keywords": [
6
6
  "ai",