| import { Command } from 'commander'; | ||
| export declare function registerContextCommand(program: Command): void; | ||
| //# sourceMappingURL=context.d.ts.map |
| {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAWnC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmD7D"} |
| "use strict"; | ||
| var __importDefault = (this && this.__importDefault) || function (mod) { | ||
| return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.registerContextCommand = registerContextCommand; | ||
| const ora_1 = __importDefault(require("ora")); | ||
| const chalk_1 = __importDefault(require("chalk")); | ||
| const path_1 = __importDefault(require("path")); | ||
| const config_loader_js_1 = require("../../core/config-loader.js"); | ||
| const config_types_js_1 = require("../../types/config.types.js"); | ||
| const logger_js_1 = require("../../core/logger.js"); | ||
| const context_export_js_1 = require("../../core/context-export.js"); | ||
| const AUDIENCES = ['ba', 'dev', 'all']; | ||
| function registerContextCommand(program) { | ||
| const ctx = program | ||
| .command('context') | ||
| .description('Portable context packs for sharing project context outside the repo (Claude Project, bot, onboarding)'); | ||
| ctx.command('export') | ||
| .description('Bundle project context into a shareable pack (+ Story Assistant instructions) — no state change, no API key') | ||
| .option('-a, --audience <who>', `who it's for: ${AUDIENCES.join(' | ')}`, 'ba') | ||
| .option('--out <dir>', 'output directory (relative to project root)', 'aaid_artifacts/exports') | ||
| .action(async (opts) => { | ||
| const audience = opts.audience.toLowerCase(); | ||
| if (!AUDIENCES.includes(audience)) { | ||
| logger_js_1.logger.error(`Unknown audience "${opts.audience}". Valid: ${AUDIENCES.join(', ')}`); | ||
| process.exit(1); | ||
| } | ||
| const spinner = (0, ora_1.default)('Assembling context pack…').start(); | ||
| try { | ||
| const config = await (0, config_loader_js_1.loadConfig)(); | ||
| const projectRoot = process.cwd(); | ||
| const today = new Date().toISOString().slice(0, 10); | ||
| const result = await (0, context_export_js_1.exportContextPack)(projectRoot, audience, opts.out, config.project.name, (0, config_types_js_1.stackLabel)(config), today); | ||
| const rel = (p) => path_1.default.relative(projectRoot, p).replace(/\\/g, '/'); | ||
| spinner.succeed(`Context pack written → ${rel(result.packPath)}`); | ||
| if (result.instructionsPath) { | ||
| process.stdout.write(` ${chalk_1.default.dim('Story Assistant instructions →')} ${rel(result.instructionsPath)}\n`); | ||
| } | ||
| if (result.included.length > 0) { | ||
| process.stdout.write(` ${chalk_1.default.green('Included:')} ${chalk_1.default.dim(result.included.join(', '))}\n`); | ||
| } | ||
| if (result.missing.length > 0) { | ||
| process.stdout.write(` ${chalk_1.default.yellow('Not found (skipped):')} ${chalk_1.default.dim(result.missing.join(', '))}\n`); | ||
| } | ||
| process.stdout.write('\n'); | ||
| if (audience === 'ba' || audience === 'all') { | ||
| process.stdout.write(chalk_1.default.dim(' Next: create a Claude Project, upload the pack as knowledge, paste story-assistant-instructions.md\n')); | ||
| process.stdout.write(chalk_1.default.dim(' as its instructions — then BAs draft app-aware stories in the browser.\n')); | ||
| } | ||
| process.stdout.write(chalk_1.default.dim(' Keep it fresh: re-run on design changes, or wire `aaid context export` into CI on merge to main.\n\n')); | ||
| } | ||
| catch (err) { | ||
| spinner.fail('Context export failed'); | ||
| logger_js_1.logger.error(err instanceof Error ? err.message : String(err)); | ||
| process.exit(1); | ||
| } | ||
| }); | ||
| } | ||
| //# sourceMappingURL=context.js.map |
| {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/cli/commands/context.ts"],"names":[],"mappings":";;;;;AAWA,wDAmDC;AA7DD,8CAAqB;AACrB,kDAAyB;AACzB,gDAAuB;AACvB,kEAAwD;AACxD,iEAAwD;AACxD,oDAA6C;AAC7C,oEAA+E;AAE/E,MAAM,SAAS,GAAe,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;AAElD,SAAgB,sBAAsB,CAAC,OAAgB;IACrD,MAAM,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,CAAC,GAAG,CAAC,kFAAkF,CAAC,CAAC,CAAA;YACrH,CAAC;YACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,wGAAwG,CAAC,CAAC,CAAA;QAC3I,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACtB,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA;YACrC,kBAAM,CAAC,KAAK,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;YAC9D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACjB,CAAC;IACH,CAAC,CAAC,CAAA;AACN,CAAC"} |
| export type Audience = 'ba' | 'dev' | 'all'; | ||
| export interface ExportResult { | ||
| packPath: string; | ||
| instructionsPath?: string; | ||
| included: string[]; | ||
| missing: string[]; | ||
| } | ||
| /** | ||
| * Assemble and write the context pack (and, for ba/all, the Story Assistant | ||
| * instructions) into `outDir`. Returns what was included / missing. | ||
| */ | ||
| export declare function exportContextPack(projectRoot: string, audience: Audience, outDir: string, projectName: string, stack: string, today: string): Promise<ExportResult>; | ||
| //# sourceMappingURL=context-export.d.ts.map |
| {"version":3,"file":"context-export.d.ts","sourceRoot":"","sources":["../../src/core/context-export.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,CAAA;AAE3C,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AA2DD;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,YAAY,CAAC,CA8FvB"} |
| "use strict"; | ||
| var __importDefault = (this && this.__importDefault) || function (mod) { | ||
| return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.exportContextPack = exportContextPack; | ||
| const fs_extra_1 = __importDefault(require("fs-extra")); | ||
| const path_1 = __importDefault(require("path")); | ||
| const glob_1 = require("glob"); | ||
| async function readIf(root, rel) { | ||
| const p = path_1.default.join(root, rel); | ||
| return (await fs_extra_1.default.pathExists(p)) ? (await fs_extra_1.default.readFile(p, 'utf8')).trim() : null; | ||
| } | ||
| /** Strip a leading YAML frontmatter block if present. */ | ||
| function stripFrontmatter(md) { | ||
| return md.replace(/^---\s*[\s\S]*?\s*---\s*/, '').trim(); | ||
| } | ||
| /** Pull one "## Heading" section (until the next "## ") out of a markdown doc. */ | ||
| function extractSection(md, heading) { | ||
| const lines = md.split('\n'); | ||
| const start = lines.findIndex(l => l.trim().toLowerCase() === `## ${heading.toLowerCase()}`); | ||
| if (start === -1) | ||
| return null; | ||
| let end = lines.length; | ||
| for (let i = start + 1; i < lines.length; i++) { | ||
| if (lines[i].startsWith('## ')) { | ||
| end = i; | ||
| break; | ||
| } | ||
| } | ||
| const body = lines.slice(start + 1, end).join('\n').trim(); | ||
| return body.length > 0 ? body : null; | ||
| } | ||
| const STORY_CONVENTIONS = `Write each story in this shape: | ||
| **Title** — short, action-oriented | ||
| - **As a** <persona>, **I want** <capability>, **so that** <value> | ||
| - **Acceptance criteria** (testable, Given/When/Then): | ||
| - AC-1: Given … When … Then … | ||
| - AC-2: … | ||
| - **Story points**: 1 / 2 / 3 / 5 / 8 / 13 (Fibonacci) | ||
| - **Notes**: edge cases, dependencies, open questions`; | ||
| function assistantInstructions(project) { | ||
| return `# Story Assistant — instructions | ||
| You help a Business Analyst write and groom user stories for **${project}**, grounded in the attached **context pack** (this project's requirements, domain language, and backlog). You are a drafting aid — you do NOT track work. The BA pastes your output into their tracker (Zoho / Jira). | ||
| ## When asked to write a story | ||
| 1. If the request is vague, ask up to 3 clarifying questions first. | ||
| 2. Use the app's real **domain language** and rules from the context pack — never invent entities, APIs, or flows that aren't there. If something is unknown, say so and ask. | ||
| 3. Check the **backlog** section so you don't duplicate an existing story. | ||
| 4. Output ONE story card in copy-paste-ready markdown: | ||
| - Title | ||
| - **As a** / **I want** / **so that** | ||
| - Acceptance criteria as Given/When/Then (AC-1, AC-2, …) — specific and testable | ||
| - Suggested story points (Fibonacci) and any dependencies/edge cases | ||
| ## When asked to groom | ||
| Re-score estimates, split any story over 8 points, flag missing acceptance criteria or gaps, and suggest epic groupings — as recommendations the BA applies in the tracker. | ||
| ## Boundaries | ||
| - Stay within what the context pack describes; flag assumptions explicitly. | ||
| - Don't produce implementation/code — just the story. | ||
| - Keep output tracker-ready (clean markdown, no preamble).`; | ||
| } | ||
| /** | ||
| * Assemble and write the context pack (and, for ba/all, the Story Assistant | ||
| * instructions) into `outDir`. Returns what was included / missing. | ||
| */ | ||
| async function exportContextPack(projectRoot, audience, outDir, projectName, stack, today) { | ||
| const included = []; | ||
| const missing = []; | ||
| const sections = []; | ||
| const add = (title, body, sourceLabel) => { | ||
| if (body && body.trim().length > 0) { | ||
| sections.push(`## ${title}\n\n${stripFrontmatter(body)}`); | ||
| included.push(sourceLabel); | ||
| } | ||
| else { | ||
| missing.push(sourceLabel); | ||
| } | ||
| }; | ||
| const wantBa = audience === 'ba' || audience === 'all'; | ||
| const wantDev = audience === 'dev' || audience === 'all'; | ||
| // ── Requirements / product docs (BA + all) ────────────────────────────── | ||
| if (wantBa) { | ||
| add('Requirements', await readIf(projectRoot, 'aaid_artifacts/planning/requirements/requirements.md'), 'requirements.md'); | ||
| add('Product Requirements (PRD)', await readIf(projectRoot, 'aaid_artifacts/planning/prd/prd.md'), 'prd.md'); | ||
| add('Business Requirements (BRD)', await readIf(projectRoot, 'aaid_artifacts/planning/brd/brd.md'), 'brd.md'); | ||
| } | ||
| // ── Architecture (dev + all; BA fallback if no requirements present) ───── | ||
| const arch = await readIf(projectRoot, 'aaid_artifacts/planning/architecture/architecture.md'); | ||
| if (wantDev) { | ||
| add('Architecture', arch, 'architecture.md'); | ||
| add('Architecture views', await readIf(projectRoot, 'aaid_artifacts/planning/architecture/arch-views.md'), 'arch-views.md'); | ||
| const adrDir = path_1.default.join(projectRoot, 'aaid_artifacts', 'planning', 'architecture', 'adrs'); | ||
| if (await fs_extra_1.default.pathExists(adrDir)) { | ||
| const adrs = (await (0, glob_1.glob)('*.md', { cwd: adrDir })).sort(); | ||
| if (adrs.length > 0) { | ||
| const body = (await Promise.all(adrs.map(f => fs_extra_1.default.readFile(path_1.default.join(adrDir, f), 'utf8')))).join('\n\n---\n\n'); | ||
| add('Architecture Decision Records', body, `${adrs.length} ADR(s)`); | ||
| } | ||
| } | ||
| add('Conventions & rules', await readIf(projectRoot, 'aaid_artifacts/project-context.md'), 'project-context.md'); | ||
| add('Codebase map', await readIf(projectRoot, '.aaid/repomap.md'), 'repomap.md'); | ||
| } | ||
| else if (wantBa && included.length === 0 && arch) { | ||
| // BA pack with no requirements docs yet — fall back to architecture so it isn't empty | ||
| add('System overview (from architecture)', arch, 'architecture.md (fallback)'); | ||
| } | ||
| // ── Domain glossary / business rules ──────────────────────────────────── | ||
| const memory = await readIf(projectRoot, '.aaid/memory.md'); | ||
| if (memory) { | ||
| if (wantDev) { | ||
| add('Accumulated project memory', memory, 'memory.md'); | ||
| } | ||
| else { | ||
| const domain = extractSection(memory, 'Domain'); | ||
| add('Domain glossary & business rules', domain, 'memory.md (Domain)'); | ||
| } | ||
| } | ||
| else { | ||
| missing.push('memory.md'); | ||
| } | ||
| // ── Backlog (context so stories aren't duplicated) ────────────────────── | ||
| add('Backlog (existing epics & stories — do not duplicate)', await readIf(projectRoot, 'aaid_artifacts/planning/backlog/backlog.md'), 'backlog.md'); | ||
| // ── Story conventions (BA + all) ──────────────────────────────────────── | ||
| if (wantBa) | ||
| sections.push(`## Story conventions\n\n${STORY_CONVENTIONS}`); | ||
| // ── Assemble ──────────────────────────────────────────────────────────── | ||
| const label = audience.toUpperCase(); | ||
| const toc = sections | ||
| .map(s => (s.match(/^## (.+)$/m)?.[1] ?? '').trim()) | ||
| .filter(Boolean) | ||
| .map(t => `- ${t}`) | ||
| .join('\n'); | ||
| const header = `<!-- aaid context pack · audience: ${audience} · generated: ${today} -->\n` + | ||
| `<!-- CONFIDENTIAL — internal. Contains project design & requirements. Keep in your org's private workspace (do not paste anywhere public). -->\n\n` + | ||
| `# ${projectName} — Context Pack (${label})\n\n` + | ||
| `Stack: ${stack} · generated ${today}. A portable snapshot of this project's context.\n` + | ||
| (audience === 'ba' || audience === 'all' | ||
| ? `Use this as the **knowledge** for a story-writing assistant; pair it with \`story-assistant-instructions.md\` as the assistant's instructions.\n` | ||
| : `Use this to ramp on the project without spelunking the repo.\n`) + | ||
| `\n## Contents\n${toc}\n`; | ||
| await fs_extra_1.default.ensureDir(path_1.default.join(projectRoot, outDir)); | ||
| const packPath = path_1.default.join(projectRoot, outDir, `context-pack-${audience}.md`); | ||
| await fs_extra_1.default.writeFile(packPath, header + '\n' + sections.join('\n\n') + '\n', 'utf8'); | ||
| const result = { packPath, included, missing }; | ||
| if (wantBa) { | ||
| const instrPath = path_1.default.join(projectRoot, outDir, 'story-assistant-instructions.md'); | ||
| await fs_extra_1.default.writeFile(instrPath, assistantInstructions(projectName) + '\n', 'utf8'); | ||
| result.instructionsPath = instrPath; | ||
| } | ||
| return result; | ||
| } | ||
| //# sourceMappingURL=context-export.js.map |
| {"version":3,"file":"context-export.js","sourceRoot":"","sources":["../../src/core/context-export.ts"],"names":[],"mappings":";;;;;AAiFA,8CAqGC;AAtLD,wDAAyB;AACzB,gDAAuB;AACvB,+BAA2B;AAkB3B,KAAK,UAAU,MAAM,CAAC,IAAY,EAAE,GAAW;IAC7C,MAAM,CAAC,GAAG,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f,CAAC"} |
+17
-0
@@ -10,2 +10,19 @@ # Changelog | ||
| ## [1.6.0] — 2026-07-08 | ||
| ### Added — `aaid context export` (portable context packs for non-repo roles) | ||
| Bundles the project's durable context into a single self-contained file so people who don't work in the repo — Business Analysts especially — can still work *with* the app's context. It's a projection of existing artifacts (no new source of truth), so it needs **no API key** and is safe to run in CI. | ||
| - **`aaid context export --audience ba|dev|all`** (default `ba`) → writes `aaid_artifacts/exports/context-pack-<audience>.md`. | ||
| - **`ba`** — requirements / PRD / BRD + **domain glossary** (the Domain section of `.aaid/memory.md`) + backlog + story conventions. Deep architecture, ADRs, full memory, and the codebase map are trimmed. | ||
| - **`dev`** — architecture + arch-views + ADRs + conventions (`project-context.md`) + full memory + codebase map, for onboarding. | ||
| - **`all`** — the union. | ||
| - BA/all exports also emit **`story-assistant-instructions.md`** — a ready-to-paste instruction block that turns a shared Claude Project into an app-aware story-writing assistant. | ||
| - Reports which artifacts were included vs missing (with fixes), and strips YAML frontmatter from bundled sections. | ||
| **BA workflow it unlocks:** run `aaid context export`, upload the pack as *knowledge* to a shared Claude Project, paste `story-assistant-instructions.md` as the Project's *instructions* — BAs then draft app-aware, tracker-ready stories from the browser (no repo, no IDE). Re-run on design changes, or wire into CI on merge to keep it fresh. | ||
| --- | ||
| ## [1.5.0] — 2026-07-08 | ||
@@ -12,0 +29,0 @@ |
@@ -20,2 +20,3 @@ #!/usr/bin/env node | ||
| const sync_js_1 = require("./commands/sync.js"); | ||
| const context_js_1 = require("./commands/context.js"); | ||
| const codeindex_js_1 = require("./commands/codeindex.js"); | ||
@@ -26,3 +27,3 @@ const program = new commander_1.Command(); | ||
| .description('Agentic AI Development Life Cycle — specialized agents, quality gates, multi-LLM support') | ||
| .version('1.5.0'); | ||
| .version('1.6.0'); | ||
| (0, init_js_1.registerInitCommand)(program); | ||
@@ -43,2 +44,3 @@ (0, run_js_1.registerRunCommand)(program); | ||
| (0, sync_js_1.registerSyncCommand)(program); | ||
| (0, context_js_1.registerContextCommand)(program); | ||
| (0, codeindex_js_1.registerIndexCommand)(program); | ||
@@ -45,0 +47,0 @@ program.parseAsync(process.argv).catch(err => { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AAEA,yCAAmC;AACnC,gDAAwD;AACxD,8CAAsD;AACtD,gDAAwD;AACxD,kDAA0D;AAC1D,oDAA4D;AAC5D,oDAA4D;AAC5D,sDAA8D;AAC9D,gDAAwD;AACxD,sDAA8D;AAC9D,8DAAsE;AACtE,oDAA4D;AAC5D,oDAA4D;AAC5D,0DAAiE;AACjE,kEAAyE;AACzE,gDAAwD;AACxD,0DAA8D;AAE9D,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAA;AAE7B,OAAO;KACJ,IAAI,CAAC,MAAM,CAAC;KACZ,WAAW,CAAC,0FAA0F,CAAC;KACvG,OAAO,CAAC,OAAO,CAAC,CAAA;AAEnB,IAAA,6BAAmB,EAAC,OAAO,CAAC,CAAA;AAC5B,IAAA,2BAAkB,EAAC,OAAO,CAAC,CAAA;AAC3B,IAAA,6BAAmB,EAAC,OAAO,CAAC,CAAA;AAC5B,IAAA,+BAAoB,EAAC,OAAO,CAAC,CAAA;AAC7B,IAAA,iCAAqB,EAAC,OAAO,CAAC,CAAA;AAC9B,IAAA,iCAAqB,EAAC,OAAO,CAAC,CAAA;AAC9B,IAAA,mCAAsB,EAAC,OAAO,CAAC,CAAA;AAC/B,IAAA,6BAAmB,EAAC,OAAO,CAAC,CAAA;AAC5B,IAAA,mCAAsB,EAAC,OAAO,CAAC,CAAA;AAC/B,IAAA,2CAA0B,EAAC,OAAO,CAAC,CAAA;AACnC,IAAA,iCAAqB,EAAC,OAAO,CAAC,CAAA;AAC9B,IAAA,iCAAqB,EAAC,OAAO,CAAC,CAAA;AAC9B,IAAA,sCAAuB,EAAC,OAAO,CAAC,CAAA;AAChC,IAAA,8CAA2B,EAAC,OAAO,CAAC,CA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A,6BAAmB,EAAC,OAAO,CAAC,CAAA;AAC5B,IAAA,mCAAsB,EAAC,OAAO,CAAC,CAAA;AAC/B,IAAA,2CAA0B,EAAC,OAAO,CAAC,CAAA;AACnC,IAAA,iCAAqB,EAAC,OAAO,CAAC,CAAA;AAC9B,IAAA,iCAAqB,EAAC,OAAO,CAAC,CAAA;AAC9B,IAAA,sCAAuB,EAAC,OAAO,CAAC,CAAA;AAChC,IAAA,8CAA2B,EAAC,OAAO,CAAC,CAAA;AACpC,IAAA,6BAAmB,EAAC,OAAO,CAAC,CAAA;AAC5B,IAAA,mCAAsB,EAAC,OAAO,CAAC,CAAA;AAC/B,IAAA,mCAAoB,EAAC,OAAO,CAAC,CAAA;AAE7B,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IAC3C,OAAO,CAAC,KAAK,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;IAC/D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"} |
+1
-1
| { | ||
| "name": "aaidlc", | ||
| "version": "1.5.0", | ||
| "version": "1.6.0", | ||
| "description": "Agentic AI Development Life Cycle — specialized AI agents, enforced quality gates, and multi-LLM support for every phase of software delivery", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
+3
-0
@@ -166,2 +166,3 @@ # aaidlc — Agentic AI Development Life Cycle | ||
| | `aaid sync` | Regenerate `sprint-status.yaml`, per-story files, and `.aaid/context.md` from `.aaid/state.json` (no state change) — run after chat-driven changes | | ||
| | `aaid context export` | Bundle project context into a shareable pack for a Claude Project / bot — `--audience ba\|dev\|all` (default `ba`). BA packs also emit `story-assistant-instructions.md`. No API key | | ||
| | `aaid migrate` | Brownfield onboarding — scans codebase, generates requirements + architecture + backlog | | ||
@@ -177,2 +178,4 @@ | `aaid restructure` | Sync `aaid_artifacts/` layout with the installed aaidlc version — run after upgrading (`--dry-run` to preview) | | ||
| > **Context packs for non-repo roles** (`aaid context export`) — Bundles the project's durable context (requirements, PRD, domain glossary, backlog, or — for `--audience dev` — architecture, ADRs, conventions, codebase map) into a single portable `aaid_artifacts/exports/context-pack-<audience>.md`. It's a projection of existing artifacts, so it needs no API key and is safe to run in CI. **BA use:** run `aaid context export` (default `--audience ba`), upload the pack as *knowledge* to a shared Claude Project, and paste the emitted `story-assistant-instructions.md` as the Project's *instructions* — now BAs draft app-aware, tracker-ready stories from the browser, no repo or IDE needed. Re-run on design changes (or in CI on merge) to keep it current. | ||
| --- | ||
@@ -179,0 +182,0 @@ |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
1447223
1.74%366
2.23%16837
1.35%686
0.44%76
1.33%