#!/usr/bin/env node
import {f as f$1,d}from'./chunk-JIXHEBGK.js';import'./chunk-XHJ27CER.js';import*as g from'path';import o from'chalk';import f from'ora';async function h(i){let a=process.cwd(),p=g.resolve(a,i);console.log(o.blue(`
\u{1F4D6} Remembering Purpose...
`));let s=f("Aggregating purpose files...").start();try{let r=await f$1(p),e=d(r);if(s.succeed(`Found ${r.length} purpose file(s)`),console.log(o.white(`
`+"\u2550".repeat(50))),e.description&&(console.log(o.white(`
Description`)),console.log(o.gray("\u2500".repeat(50))),console.log(o.cyan(e.description))),e.context.length>0){console.log(o.white(`
Context`)),console.log(o.gray("\u2500".repeat(50)));for(let n of e.context)console.log(o.gray("  \u2022 ")+n);}if(Object.keys(e.rules).length>0){console.log(o.white(`
Rules`)),console.log(o.gray("\u2500".repeat(50)));for(let[n,t]of Object.entries(e.rules))console.log(o.gray("  ")+o.yellow(n)+o.gray(": ")+String(t));}if(Object.keys(e.features).length>0){console.log(o.white(`
Features`)),console.log(o.gray("\u2500".repeat(50)));for(let[n,t]of Object.entries(e.features))console.log(o.blue("  @"+n)),t.description&&console.log(o.gray("    "+t.description));}if(Object.keys(e.components).length>0){console.log(o.white(`
Components`)),console.log(o.gray("\u2500".repeat(50)));for(let[n,t]of Object.entries(e.components))console.log(o.green("  #"+n)),t.description&&console.log(o.gray("    "+t.description));}if(e.ruleConflicts.length>0){console.log(o.yellow(`
Warnings`)),console.log(o.gray("\u2500".repeat(50)));for(let n of e.ruleConflicts)console.log(o.yellow("  \u26A0 "+n));}console.log(o.white(`
`+"\u2550".repeat(50)+`
`));}catch(r){s.fail("Failed to aggregate"),console.log(o.red(`Error: ${r.message}
`));}}export{h as purposeRememberCommand};