@ryodeushii/ai-product-team-agents 0.0.9 → 0.1.0

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/setup/index.ts +13 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@ryodeushii/ai-product-team-agents",
4
- "version": "0.0.9",
4
+ "version": "0.1.0",
5
5
  "repository": {
6
6
  "url": "https://github.com/ryodeushii/ai-product-team-agents"
7
7
  },
@@ -90,12 +90,22 @@ export async function setupProject(
90
90
  .replaceAll("{{autonomy}}", options.autonomy ?? "checkpoint");
91
91
  await write(join(projectRoot, "AGENTS.md"), agentsTpl);
92
92
 
93
- // .agents.yml — fill template
93
+ // .agents.yml — write only on first install; never overwrite.
94
+ // This is user-owned config: --update must read it, not reset it.
94
95
  agentsYml = agentsYml.replaceAll("{{project_name}}", projectName);
95
- await write(join(projectRoot, ".agents.yml"), agentsYml);
96
+ const agentsYmlPath = join(projectRoot, ".agents.yml");
97
+ const agentsYmlExists = await lstat(agentsYmlPath).then(
98
+ () => true,
99
+ () => false,
100
+ );
101
+ if (!agentsYmlExists) {
102
+ await writeFile(agentsYmlPath, agentsYml, "utf-8");
103
+ }
96
104
 
97
105
  // copy role files into .claude/agents and .opencode/agents,
98
- // injecting resolved model: into frontmatter for each role
106
+ // injecting resolved model: into frontmatter for each role.
107
+ // Load project config AFTER writing .agents.yml so we always read
108
+ // the current user config (not an overwritten blank template).
99
109
  const rolesPath = join(frameworkRoot, "roles");
100
110
  const [framework, project] = await Promise.all([
101
111
  loadFrameworkConfig(frameworkRoot),