agent-as-a-tutor 1.2.0 → 1.2.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.
Files changed (2) hide show
  1. package/bin/cli.js +19 -8
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -108,7 +108,10 @@ console.log(`${CYAN}◇${RESET} ${BOLD}Installation Scope:${RESET} ${BOLD}${rel
108
108
  console.log(`${CYAN}│${RESET}`);
109
109
 
110
110
  // 1. Verify source exists
111
- const sourceSkillDir = path.join(PKG_ROOT, 'skills', 'strict-tutor');
111
+ let sourceSkillDir = path.join(PKG_ROOT, '.agents', 'skills', 'strict-tutor');
112
+ if (!fs.existsSync(sourceSkillDir)) {
113
+ sourceSkillDir = path.join(PKG_ROOT, 'skills', 'strict-tutor');
114
+ }
112
115
  if (!fs.existsSync(sourceSkillDir)) {
113
116
  console.log(`${RED}└ Error: Cannot find source skill directory at ${sourceSkillDir}${RESET}`);
114
117
  process.exit(1);
@@ -136,22 +139,30 @@ function copyDirRecursive(src, dest, overwrite, onFile) {
136
139
 
137
140
  console.log(`${CYAN}◇${RESET} ${BOLD}Installing to agent directories...${RESET}`);
138
141
 
139
- // Target directories: Primary .agents/skills (Agent customization root) + skills (compatibility)
142
+ // Target directory: .agents/skills (Agent customization root)
140
143
  const targetAgentSkillsDir = path.join(targetDir, '.agents', 'skills', 'strict-tutor');
141
- const targetLegacySkillsDir = path.join(targetDir, 'skills', 'strict-tutor');
142
144
 
143
145
  // Track installed files for pretty reporting
144
146
  const installedFiles = new Set();
145
147
 
146
- // 1. Install into .agents/skills/strict-tutor (Primary agent customization root)
148
+ // Install into .agents/skills/strict-tutor
147
149
  copyDirRecursive(sourceSkillDir, targetAgentSkillsDir, isForce, (f) => {
148
150
  installedFiles.add(path.relative(targetDir, f));
149
151
  });
150
152
 
151
- // 2. Mirror into skills/strict-tutor for backward compatibility
152
- copyDirRecursive(sourceSkillDir, targetLegacySkillsDir, isForce, (f) => {
153
- installedFiles.add(path.relative(targetDir, f));
154
- });
153
+ // Clean up redundant legacy skills/ directory in target if it exists (outside of PKG_ROOT)
154
+ const targetLegacySkillsDir = path.join(targetDir, 'skills', 'strict-tutor');
155
+ if (targetDir !== PKG_ROOT && fs.existsSync(targetLegacySkillsDir)) {
156
+ try {
157
+ fs.rmSync(targetLegacySkillsDir, { recursive: true, force: true });
158
+ const legacySkillsDir = path.join(targetDir, 'skills');
159
+ if (fs.existsSync(legacySkillsDir) && fs.readdirSync(legacySkillsDir).length === 0) {
160
+ fs.rmdirSync(legacySkillsDir);
161
+ }
162
+ } catch {
163
+ // Ignore cleanup errors
164
+ }
165
+ }
155
166
 
156
167
  // Seed installation
157
168
  const sourceSeed = path.join(PKG_ROOT, 'process', '_seeds', 'learning-session.md.seed');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-as-a-tutor",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Strict Socratic Tutor enforcing the 5-Step Understanding Framework, Anti-Cargo-Culting rules, and Evidence-First Quality Gates for AI Coding Agents.",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {