@ancleto/spec 0.6.19 → 0.6.20
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/package.json +1 -1
- package/src/cli/index.js +24 -2
package/package.json
CHANGED
package/src/cli/index.js
CHANGED
|
@@ -315,8 +315,8 @@ async function installAgentSkills(projectDir, agent) {
|
|
|
315
315
|
|
|
316
316
|
const CHANGES_ROOT = 'aspec'
|
|
317
317
|
|
|
318
|
-
const DEFAULT_ASPEC_CONFIG = `#
|
|
319
|
-
# Generado por @ancleto/spec (G5)
|
|
318
|
+
const DEFAULT_ASPEC_CONFIG = `# aspec project configuration
|
|
319
|
+
# Generado por @ancleto/spec (G5) - editalo libremente, no se sobrescribe en reinstalaciones.
|
|
320
320
|
schema: spec-driven-development
|
|
321
321
|
`
|
|
322
322
|
|
|
@@ -877,10 +877,32 @@ async function checkCommand() {
|
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
879
|
|
|
880
|
+
const warnings = await checkTierOrphan(cwd)
|
|
881
|
+
|
|
880
882
|
console.log(`ancleto: check -> ${missing} faltantes, ${orphans} huerfanos`)
|
|
883
|
+
for (const w of warnings) console.log(` ⚠ ${w}`)
|
|
881
884
|
process.exit(missing > 0 ? 1 : 0)
|
|
882
885
|
}
|
|
883
886
|
|
|
887
|
+
// Avisa si hay un tier del proyecto sin agentes locales donde aplicarlo:
|
|
888
|
+
// el tier solo se aplica a los agentes instalados en el proyecto, no a los globales.
|
|
889
|
+
async function checkTierOrphan(cwd) {
|
|
890
|
+
const warnings = []
|
|
891
|
+
const tierFile = join(cwd, '.opencode', '.ancleto-tier')
|
|
892
|
+
if (!(await exists(tierFile))) return warnings
|
|
893
|
+
const tier = (await readFile(tierFile, 'utf8')).trim()
|
|
894
|
+
if (!TIERS[tier]) return warnings
|
|
895
|
+
const localAgents = join(cwd, '.opencode', 'agents')
|
|
896
|
+
let count = 0
|
|
897
|
+
if (await exists(localAgents)) {
|
|
898
|
+
count = (await readdir(localAgents)).filter((f) => f.endsWith('.md')).length
|
|
899
|
+
}
|
|
900
|
+
if (count === 0) {
|
|
901
|
+
warnings.push(`tier "${tier}" sin agentes locales donde aplicarlo — este proyecto usa los agentes globales. Corre 'ancleto install --project .' para que el tier aplique, o borra .opencode/.ancleto-tier.`)
|
|
902
|
+
}
|
|
903
|
+
return warnings
|
|
904
|
+
}
|
|
905
|
+
|
|
884
906
|
async function doctorCommand() {
|
|
885
907
|
let fatal = false
|
|
886
908
|
|