@ancleto/spec 0.6.18 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli/index.js +25 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancleto/spec",
3
- "version": "0.6.18",
3
+ "version": "0.6.20",
4
4
  "description": "Orquestador SDD liviano con subagentes optimizados para costo/tokens",
5
5
  "type": "module",
6
6
  "bin": {
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 = `# OpenSpec project configuration
319
- # Generado por @ancleto/spec (G5) — editalo libremente, no se sobrescribe en reinstalaciones.
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
 
@@ -722,6 +722,7 @@ async function runRepomix(flags, tmpFile) {
722
722
 
723
723
  async function packDiscovery(flags) {
724
724
  const { outputDir } = await loadDiscoveryConfig()
725
+ try { writeDiscoveryMap(process.cwd()) } catch {}
725
726
  const tmpFile = join(tmpdir(), `ancleto-pack-${Date.now()}.txt`)
726
727
  await runRepomix(flags, tmpFile)
727
728
  let content = ''
@@ -749,7 +750,6 @@ async function packDiscovery(flags) {
749
750
  }
750
751
 
751
752
  async function discovery(flags) {
752
- try { writeDiscoveryMap(process.cwd()) } catch {}
753
753
  if (flags.includes('--check')) {
754
754
  await checkDiscovery()
755
755
  return
@@ -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