@aman_asmuei/aman 0.1.1 → 0.2.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/dist/index.js +178 -17
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -132,13 +132,23 @@ function detectEcosystem() {
132
132
  } catch {
133
133
  }
134
134
  }
135
+ const askillPath = path.join(home, ".askill", "skills.md");
136
+ let askillCount = 0;
137
+ if (fs.existsSync(askillPath)) {
138
+ try {
139
+ const content = fs.readFileSync(askillPath, "utf-8");
140
+ askillCount = (content.match(/^## /gm) || []).length;
141
+ } catch {
142
+ }
143
+ }
135
144
  return {
136
145
  acore: { installed: fs.existsSync(acorePath), path: acorePath },
137
146
  amem: { installed: amemInstalled },
138
147
  akit: { installed: fs.existsSync(akitPath), path: akitPath, toolCount: akitToolCount },
139
148
  aflow: { installed: fs.existsSync(aflowPath), path: aflowPath, workflowCount: aflowWorkflowCount },
140
149
  arules: { installed: fs.existsSync(arulesPath), path: arulesPath, ruleCount: arulesRuleCount },
141
- aeval: { installed: fs.existsSync(aevalPath), path: aevalPath, sessions: aevalSessions }
150
+ aeval: { installed: fs.existsSync(aevalPath), path: aevalPath, sessions: aevalSessions },
151
+ askill: { installed: fs.existsSync(askillPath), path: askillPath, skillCount: askillCount }
142
152
  };
143
153
  }
144
154
 
@@ -246,6 +256,93 @@ function getPlatformFile(platform) {
246
256
  }
247
257
  }
248
258
 
259
+ // src/templates.ts
260
+ var STARTER_FLOW = `# My Workflows
261
+
262
+ ## code-review
263
+ When asked to review code:
264
+ 1. Analyze for bugs, logic errors, and edge cases
265
+ 2. Check for security vulnerabilities (OWASP top 10)
266
+ 3. Evaluate code style and maintainability
267
+ 4. Summarize findings with severity ratings (critical/warning/info)
268
+ 5. Suggest specific fixes with code examples
269
+
270
+ ## bug-fix
271
+ When asked to fix a bug:
272
+ 1. Reproduce \u2014 understand the expected vs actual behavior
273
+ 2. Locate \u2014 find the root cause in the codebase
274
+ 3. Fix \u2014 implement the minimal change that fixes the issue
275
+ 4. Test \u2014 verify the fix works and doesn't break other things
276
+ 5. Document \u2014 explain what was wrong and why the fix works
277
+
278
+ ## feature-build
279
+ When asked to build a feature:
280
+ 1. Clarify \u2014 ask questions until requirements are clear
281
+ 2. Design \u2014 propose an approach, get approval
282
+ 3. Implement \u2014 write the code in small, testable increments
283
+ 4. Test \u2014 write and run tests for the new code
284
+ 5. Review \u2014 check for edge cases, security, and performance
285
+
286
+ ## daily-standup
287
+ When starting a new session:
288
+ 1. Check git log for recent changes
289
+ 2. Review open PRs and issues
290
+ 3. Summarize: what was done, what's in progress, what's blocked
291
+ 4. Ask what to focus on today
292
+ `;
293
+ var STARTER_RULES = `# My AI Rules
294
+
295
+ ## Always
296
+ - Ask before deleting files or data
297
+ - Explain your reasoning before making changes
298
+ - Flag security concerns immediately
299
+ - Respect code review processes
300
+
301
+ ## Never
302
+ - Push directly to main/master without approval
303
+ - Expose secrets, API keys, or credentials in code
304
+ - Make changes to production systems without confirmation
305
+ - Skip tests when fixing bugs
306
+
307
+ ## Coding
308
+ - Follow existing code style and conventions
309
+ - Prefer simple solutions over clever ones
310
+ - Write tests for new functionality
311
+ - Keep PRs focused and small
312
+
313
+ ## Communication
314
+ - Be direct \u2014 lead with the answer
315
+ - Admit when you don't know something
316
+ - Ask clarifying questions before assuming
317
+ - Flag when a task is outside your expertise
318
+
319
+ ## Data
320
+ - Never log or expose personal information
321
+ - Treat user data as confidential
322
+ - Ask before accessing external APIs
323
+ - Don't store credentials in plain text
324
+
325
+ ## Team
326
+ - Follow the team's branching strategy
327
+ - Respect code ownership boundaries
328
+ - Tag relevant people for review
329
+ - Document breaking changes
330
+ `;
331
+ var STARTER_EVAL = `# AI Relationship Metrics
332
+
333
+ ## Overview
334
+ - Sessions: 0
335
+ - First session: {{DATE}}
336
+ - Trust level: 3/5
337
+ - Trajectory: building
338
+
339
+ ## Timeline
340
+
341
+ ## Milestones
342
+
343
+ ## Patterns
344
+ `;
345
+
249
346
  // src/commands/setup.ts
250
347
  var ARCHETYPES = {
251
348
  pragmatist: {
@@ -366,6 +463,74 @@ async function setupCommand() {
366
463
  if (stack) inferredParts.push(stack);
367
464
  p.log.info(`Inferred: ${pc.dim(inferredParts.join(" \xB7 "))}`);
368
465
  }
466
+ const home = os2.homedir();
467
+ const aflowExists = ecosystem.aflow.installed;
468
+ const arulesExists = ecosystem.arules.installed;
469
+ const aevalExists = ecosystem.aeval.installed;
470
+ if (aflowExists && arulesExists && aevalExists) {
471
+ p.log.success(`Workflows: ${ecosystem.aflow.workflowCount} defined`);
472
+ p.log.success(`Guardrails: ${ecosystem.arules.ruleCount} rules`);
473
+ p.log.success("Evaluation: already configured");
474
+ } else {
475
+ const setupChoice = await p.select({
476
+ message: "Set up additional layers?",
477
+ options: [
478
+ { value: "all", label: "Yes, set up everything", hint: "recommended" },
479
+ { value: "choose", label: "Let me choose" },
480
+ { value: "skip", label: "Skip for now" }
481
+ ],
482
+ initialValue: "all"
483
+ });
484
+ if (p.isCancel(setupChoice)) process.exit(0);
485
+ let doFlow = false;
486
+ let doRules = false;
487
+ let doEval = false;
488
+ if (setupChoice === "all") {
489
+ doFlow = !aflowExists;
490
+ doRules = !arulesExists;
491
+ doEval = !aevalExists;
492
+ } else if (setupChoice === "choose") {
493
+ const layers = await p.multiselect({
494
+ message: "Which layers?",
495
+ options: [
496
+ ...!aflowExists ? [{ value: "flow", label: "Workflows", hint: "4 starter workflows" }] : [],
497
+ ...!arulesExists ? [{ value: "rules", label: "Guardrails", hint: "24 starter rules" }] : [],
498
+ ...!aevalExists ? [{ value: "eval", label: "Evaluation", hint: "track relationship metrics" }] : []
499
+ ],
500
+ required: false
501
+ });
502
+ if (p.isCancel(layers)) process.exit(0);
503
+ const selected = layers;
504
+ doFlow = selected.includes("flow");
505
+ doRules = selected.includes("rules");
506
+ doEval = selected.includes("eval");
507
+ }
508
+ if (doFlow) {
509
+ const aflowDir = path3.join(home, ".aflow");
510
+ fs4.mkdirSync(aflowDir, { recursive: true });
511
+ fs4.writeFileSync(path3.join(aflowDir, "flow.md"), STARTER_FLOW, "utf-8");
512
+ p.log.success(`Workflows: created ${pc.dim("~/.aflow/flow.md")} (4 starter workflows)`);
513
+ } else if (aflowExists) {
514
+ p.log.success(`Workflows: ${ecosystem.aflow.workflowCount} defined`);
515
+ }
516
+ if (doRules) {
517
+ const arulesDir = path3.join(home, ".arules");
518
+ fs4.mkdirSync(arulesDir, { recursive: true });
519
+ fs4.writeFileSync(path3.join(arulesDir, "rules.md"), STARTER_RULES, "utf-8");
520
+ p.log.success(`Guardrails: created ${pc.dim("~/.arules/rules.md")} (24 rules)`);
521
+ } else if (arulesExists) {
522
+ p.log.success(`Guardrails: ${ecosystem.arules.ruleCount} rules`);
523
+ }
524
+ if (doEval) {
525
+ const aevalDir = path3.join(home, ".aeval");
526
+ fs4.mkdirSync(aevalDir, { recursive: true });
527
+ const today = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
528
+ fs4.writeFileSync(path3.join(aevalDir, "eval.md"), STARTER_EVAL.replace("{{DATE}}", today), "utf-8");
529
+ p.log.success(`Evaluation: created ${pc.dim("~/.aeval/eval.md")}`);
530
+ } else if (aevalExists) {
531
+ p.log.success("Evaluation: already configured");
532
+ }
533
+ }
369
534
  if (ecosystem.amem.installed) {
370
535
  p.log.success("Memory: amem connected");
371
536
  } else {
@@ -376,28 +541,18 @@ async function setupCommand() {
376
541
  p.log.info(`Memory: built-in via core.md (upgrade with ${pc.bold("npx @aman_asmuei/amem")})`);
377
542
  }
378
543
  }
379
- if (ecosystem.akit.installed) {
380
- p.log.success(`Tools: ${ecosystem.akit.toolCount} tools configured`);
381
- } else {
382
- p.log.info(`Tools: run ${pc.bold("npx @aman_asmuei/akit add github")} to add capabilities`);
383
- }
384
- if (ecosystem.aflow.installed) {
385
- p.log.success(`Workflows: ${ecosystem.aflow.workflowCount} defined`);
386
- } else {
387
- p.log.info(`Workflows: run ${pc.bold("npx @aman_asmuei/aflow init")} to add AI workflows`);
388
- }
389
544
  const card = [
390
545
  "",
391
546
  ` ${pc.green("\u2714")} Your AI companion is ready.`,
392
547
  "",
393
548
  ` ${pc.bold("aman status")} See your full ecosystem`,
394
549
  ` ${pc.bold("acore customize")} Change personality`,
395
- ` ${pc.bold("akit add <tool>")} Add tools`,
550
+ ` ${pc.bold("askill add testing")} Install skills`,
396
551
  ` ${pc.bold("npx @aman_asmuei/amem")} Enable automated memory`,
397
552
  ""
398
553
  ];
399
554
  p.note(card.join("\n"), "");
400
- p.outro(pc.dim("Identity + Memory + Tools \u2014 one ecosystem."));
555
+ p.outro(pc.dim("Identity + Workflows + Guardrails + Evaluation \u2014 one ecosystem."));
401
556
  }
402
557
 
403
558
  // src/commands/status.ts
@@ -441,6 +596,11 @@ function statusCommand() {
441
596
  } else {
442
597
  p2.log.warning(`Evaluation: not tracking \u2014 ${pc2.dim("npx @aman_asmuei/aeval init")}`);
443
598
  }
599
+ if (ecosystem.askill.installed) {
600
+ p2.log.success(`Skills: ${ecosystem.askill.skillCount} installed \u2014 ${pc2.dim("askill list for details")}`);
601
+ } else {
602
+ p2.log.warning(`Skills: none \u2014 ${pc2.dim("npx @aman_asmuei/askill add testing")}`);
603
+ }
444
604
  const platformLabels = {
445
605
  "claude-code": "Claude Code",
446
606
  cursor: "Cursor",
@@ -460,16 +620,17 @@ function statusCommand() {
460
620
  if (ecosystem.aflow.installed) score += 1;
461
621
  if (ecosystem.arules.installed) score += 1;
462
622
  if (ecosystem.aeval.installed) score += 1;
463
- const levels = ["Not started", "Getting started", "Growing", "Building", "Strong", "Advanced", "Complete ecosystem"];
464
- const colors = [pc2.red, pc2.red, pc2.yellow, pc2.yellow, pc2.cyan, pc2.cyan, pc2.green];
623
+ if (ecosystem.askill.installed) score += 1;
624
+ const levels = ["Not started", "Getting started", "Growing", "Building", "Expanding", "Strong", "Advanced", "Complete ecosystem"];
625
+ const colors = [pc2.red, pc2.red, pc2.yellow, pc2.yellow, pc2.cyan, pc2.cyan, pc2.cyan, pc2.green];
465
626
  p2.log.message("");
466
- p2.log.info(`Ecosystem: ${colors[score](levels[score])} (${score}/6 layers active)`);
627
+ p2.log.info(`Ecosystem: ${colors[score](levels[score])} (${score}/7 layers active)`);
467
628
  p2.outro("");
468
629
  }
469
630
 
470
631
  // src/index.ts
471
632
  var program = new Command();
472
- program.name("aman").description("Your complete AI companion \u2014 identity, memory, and tools in one command").version("0.1.1").action(() => {
633
+ program.name("aman").description("Your complete AI companion \u2014 identity, memory, and tools in one command").version("0.2.0").action(() => {
473
634
  const ecosystem = detectEcosystem();
474
635
  if (ecosystem.acore.installed) {
475
636
  statusCommand();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aman_asmuei/aman",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Your complete AI companion — identity, memory, and tools in one command",
5
5
  "type": "module",
6
6
  "bin": {