@bvdm/delano 0.1.4 → 0.1.7

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 (43) hide show
  1. package/HANDBOOK.md +1 -0
  2. package/README.md +14 -1
  3. package/assets/install-manifest.json +54 -12
  4. package/assets/payload/.agents/scripts/pm/validate.sh +1 -0
  5. package/assets/payload/.agents/skills/README.md +6 -0
  6. package/assets/payload/.agents/skills/manage-context/SKILL.md +55 -0
  7. package/assets/payload/.agents/skills/manage-context/references/context-audit-checklist.md +26 -0
  8. package/assets/payload/.agents/skills/manage-context/references/runbook.md +26 -0
  9. package/assets/payload/.agents/skills/manage-context/templates/context-debt-report.md +22 -0
  10. package/assets/payload/.agents/skills/manage-context/templates/context-refresh-summary.md +13 -0
  11. package/assets/payload/.agents/skills/onboarding/SKILL.md +49 -0
  12. package/assets/payload/.agents/skills/onboarding/references/agents-md-best-practices.md +76 -0
  13. package/assets/payload/.agents/skills/prototype-skill/SKILL.md +51 -0
  14. package/assets/payload/.agents/skills/prototype-skill/references/probe-design-checklist.md +26 -0
  15. package/assets/payload/.agents/skills/prototype-skill/references/runbook.md +27 -0
  16. package/assets/payload/.agents/skills/prototype-skill/templates/probe-approval-recommendation.md +13 -0
  17. package/assets/payload/.agents/skills/prototype-skill/templates/probe-findings.md +16 -0
  18. package/assets/payload/.project/context/README.md +3 -1
  19. package/assets/payload/.project/context/gui-testing.md +5 -9
  20. package/assets/payload/.project/context/product-context.md +3 -10
  21. package/assets/payload/.project/context/progress.md +4 -14
  22. package/assets/payload/.project/context/project-brief.md +6 -6
  23. package/assets/payload/.project/context/project-overview.md +3 -7
  24. package/assets/payload/.project/context/project-structure.md +8 -13
  25. package/assets/payload/.project/context/project-style-guide.md +3 -10
  26. package/assets/payload/.project/context/system-patterns.md +5 -9
  27. package/assets/payload/.project/context/tech-context.md +3 -12
  28. package/assets/payload/HANDBOOK.md +1 -0
  29. package/assets/templates/context/README.md +17 -0
  30. package/assets/templates/context/gui-testing.md +16 -0
  31. package/assets/templates/context/product-context.md +10 -0
  32. package/assets/templates/context/progress.md +13 -0
  33. package/assets/templates/context/project-brief.md +13 -0
  34. package/assets/templates/context/project-overview.md +10 -0
  35. package/assets/templates/context/project-structure.md +19 -0
  36. package/assets/templates/context/project-style-guide.md +10 -0
  37. package/assets/templates/context/system-patterns.md +18 -0
  38. package/assets/templates/context/tech-context.md +10 -0
  39. package/package.json +1 -1
  40. package/src/cli/commands/onboarding.js +29 -0
  41. package/src/cli/index.js +12 -0
  42. package/src/cli/lib/install.js +48 -6
  43. package/src/cli/lib/onboarding.js +243 -0
@@ -1,23 +1,13 @@
1
1
  # Progress
2
2
 
3
3
  ## What Changed
4
- - Completed the handbook-theo-method-upgrade implementation bundle across handbook, templates, runtime scripts, hooks/logging, installer messaging, and skill/runbook references.
5
- - Synced the `.claude` compatibility mirror to the updated `.agents` runtime so canonical and fallback command paths now align.
6
- - Replaced the placeholder `.project/context/` files with repo-specific context for Delano as both product and reference implementation.
7
- - Created the `delano-cli-packaging-v1` project with an approved spec, planned delivery plan, four workstreams, and a decomposed task graph.
8
- - Added the first working `@bvdm/delano` scaffold: package metadata, `delano` bin entrypoint, command dispatch, wrapper commands, install manifest, asset build pipeline, and a conservative install flow.
4
+ - <summarize the most recent meaningful delivery changes>
9
5
 
10
6
  ## Why It Changed
11
- - The repo had drift between written process, generated scaffolds, and executable runtime behavior around canonical paths and probe-aware delivery.
12
- - Closing that drift restores Delano's contract discipline and makes the documented operating model match the runnable one.
13
- - The repository still lacked living context for Delano itself and needed a clean planning baseline before starting the npm CLI packaging effort.
14
- - The CLI effort needed a real executable foundation so later bridge, docs, and release work could build on actual package behavior rather than placeholders.
7
+ - <record the decision or trigger behind those changes>
15
8
 
16
9
  ## What Is Next
17
- - Use `.agents/scripts/pm/*` as the canonical operator path for future work.
18
- - Follow up separately on any external documentation that may still teach legacy `.claude` examples.
19
- - Continue `delano-cli-packaging-v1` with legacy installer alignment, operator docs, and release-focused verification.
10
+ - <list the next expected work or validation steps>
20
11
 
21
12
  ## Remaining Risks
22
- - External docs outside this repository may still need the same canonical-path sweep.
23
- - The CLI packaging project still needs explicit operator documentation and final quality review before the first npm release is ready.
13
+ - <capture the main unresolved risks or open questions>
@@ -1,13 +1,13 @@
1
1
  # Project Brief
2
2
 
3
3
  ## Problem
4
- - Delano is both the product and the reference repository, so this repo needs real execution context inside `.project/context/`, not empty placeholders.
5
- - The next delivery initiative is a first npm/CLI packaging layer that must wrap the existing runtime without breaking Delano's handbook-first, file-contract-first architecture.
4
+ - <describe the product or operational problem this repository exists to solve>
5
+ - <capture why Delano is being installed or used in this repository now>
6
6
 
7
7
  ## Target Outcome
8
- - Keep this repository self-describing for maintainers and coding agents by documenting the actual product purpose, runtime boundaries, operating constraints, and current health.
9
- - Stand up a handbook-compliant project outline for the v1 CLI packaging effort so execution can start from an approved spec, delivery plan, workstreams, and atomic tasks.
8
+ - <state the measurable delivery outcome for the current scope>
9
+ - <note what should improve if this effort succeeds>
10
10
 
11
11
  ## Scope Boundaries
12
- - In scope: repository context for Delano itself, the current canonical runtime model, and the planning/decomposition artifacts for the CLI packaging initiative.
13
- - Out of scope: implementing the CLI in this setup pass, redefining Delano's core architecture, or changing adapter entrypoint behavior by default.
12
+ - In scope: <list the work Delano should track here>
13
+ - Out of scope: <list nearby work that should stay outside this context pack>
@@ -1,14 +1,10 @@
1
1
  # Project Overview
2
2
 
3
3
  ## Mission
4
- - Delano is an agent-agnostic delivery system that turns outcomes into specs, plans, tasks, execution evidence, and learnings through shared file contracts and runtime scripts.
5
- - This repository is the canonical source for the handbook, runtime, templates, and reference install path used when Delano is adopted in other repositories.
4
+ - <describe the repository mission and the outcome it supports>
6
5
 
7
6
  ## Active Delivery Scopes
8
- - `handbook-theo-method-upgrade` is complete and established the `.agents`-first, probe-aware operating model.
9
- - `delano-cli-packaging-v1` is the next planned scope: add a thin npm CLI and packaging layer around the existing runtime without turning Delano into a harness.
7
+ - <list the current active or planned Delano project slugs>
10
8
 
11
9
  ## Current Health
12
- - Canonical runtime and contract structure are present and `bash .agents/scripts/pm/validate.sh` passes in this environment.
13
- - `.agents/` is the canonical runtime tree. `.claude/` exists in this repo as a directory mirror with matching contents, not as a symlink.
14
- - The primary current gap was context quality rather than missing runtime pieces; the context pack should now be maintained as execution memory, not treated as boilerplate.
10
+ - <summarize runtime readiness, major gaps, and known operational concerns>
@@ -3,22 +3,17 @@
3
3
  Document major repository boundaries and ownership.
4
4
 
5
5
  ## Canonical Boundaries
6
- - `HANDBOOK.md`: canonical operating model, governance, contracts, and workflow stages.
7
- - `.project/`: delivery truth for project specs, plans, workstreams, tasks, updates, decisions, templates, registry state, and shared context.
8
- - `.agents/`: canonical runtime assets shared across supported coding agents.
9
- - `.claude/`: compatibility mirror of `.agents/`; present for Claude-style path expectations only.
10
- - `.delano/`: optional presentation layer; never source of process truth.
6
+ - `HANDBOOK.md`: <describe where operating rules live>
7
+ - `.project/`: <describe the delivery-truth contents for this repository>
8
+ - `.agents/`: <describe the shared runtime assets in use>
9
+ - `.claude/`: <note compatibility expectations if present>
10
+ - `.delano/`: <note any optional presentation or UI layer if present>
11
11
 
12
12
  ## Runtime Areas
13
- - `.agents/scripts/pm/`: critical operator commands such as `init.sh`, `validate.sh`, `status.sh`, `next.sh`, and `blocked.sh`.
14
- - `.agents/skills/`: stage skills and supporting runbooks/templates used to structure work.
15
- - `.agents/rules/` and `.agents/hooks/`: guardrails and runtime instrumentation.
16
- - `.agents/adapters/<agent>/`: thin agent-specific notes for Claude, Codex, OpenCode, and Pi.
13
+ - <list the important scripts, skills, rules, hooks, or service areas>
17
14
 
18
15
  ## Documentation Areas
19
- - `README.md`: short product/repo overview.
20
- - `docs/`: operator-facing guidance that expands on the handbook and runtime.
21
- - Top-level adapter entry files such as `AGENTS.md`, `CLAUDE.md`, and `CODEX.md`: thin pointers into the canonical model.
16
+ - <list the primary operator-facing docs or reference files>
22
17
 
23
18
  ## Working Notes
24
- - `tmp/` is scratch space and is not part of Delano's canonical runtime or delivery truth.
19
+ - <capture scratch paths, generated areas, or local-only conventions worth knowing>
@@ -1,17 +1,10 @@
1
1
  # Project Style Guide
2
2
 
3
3
  ## Naming
4
- - Use kebab-case for project slugs under `.project/projects/`.
5
- - Use `WS-<letter>` for workstream identifiers and `T-###` for task identifiers.
6
- - Keep adapter/runtime references explicit: `.agents` for canonical paths, `.claude` only when discussing compatibility behavior.
4
+ - <record naming rules for project slugs, workstreams, tasks, packages, or services>
7
5
 
8
6
  ## Documentation Conventions
9
- - Keep context files short, factual, and current enough for another operator or agent to resume work without rediscovery.
10
- - Use handbook terminology consistently: outcome, spec, probe decision, workstream, task, evidence, and closeout.
11
- - Frontmatter timestamps must be ISO8601 UTC.
12
- - Do not leak machine-specific absolute paths into shared docs or contracts.
7
+ - <record conventions for context updates, timestamps, terminology, and evidence>
13
8
 
14
9
  ## Review Expectations
15
- - Changes that touch contracts, templates, runtime scripts, or user-facing docs should be checked for cross-artifact consistency, not reviewed in isolation.
16
- - Run `bash .agents/scripts/pm/validate.sh` after modifying delivery artifacts or runtime behavior.
17
- - When planning install or packaging work, prefer conflict-first and non-destructive behavior by default.
10
+ - <record required validation, review scope, and any change-management constraints>
@@ -3,20 +3,16 @@
3
3
  Capture architecture and delivery patterns that should be reused.
4
4
 
5
5
  ## Handbook-First Delivery
6
- - Changes to runtime behavior, templates, and operator guidance should be aligned with `HANDBOOK.md`, not invented ad hoc in scripts or adapter docs.
7
- - Planning follows the handbook stages: discovery, optional probe, planning, breakdown, sync, execution, quality, closeout, and learning.
6
+ - <describe how this repository uses Delano's operating model>
8
7
 
9
8
  ## File-Contract-First State
10
- - `.project/` is the source of truth for delivery state. Scripts and future tooling should read and respect those contracts instead of replacing them with hidden state.
11
- - Project context files are part of execution continuity and should be updated when repo reality changes.
9
+ - <describe which files are canonical and how tooling should treat them>
12
10
 
13
11
  ## Thin Runtime Wrapping
14
- - Delano favors thin wrappers around existing execution scripts over large rewrites. The current PM scripts are shell/Python-driven and should remain the execution layer unless there is a strong reason to replace them.
15
- - Adapter entrypoints stay minimal and point back to the shared runtime and handbook.
12
+ - <describe how wrappers or automation should stay conservative>
16
13
 
17
14
  ## Compatibility Without Dual Truth
18
- - `.claude/` may mirror `.agents/`, but it is compatibility infrastructure only. New work should treat `.agents/` as canonical and avoid creating a second source of truth.
15
+ - <describe any compatibility mirrors and the canonical runtime boundary>
19
16
 
20
17
  ## Conservative Installation
21
- - Installation and packaging flows should compute explicit plans, surface conflicts early, and avoid silently overwriting `.project/` or `.agents/` content.
22
- - Seeded files may establish a repo, but once installed the consumer repo owns its own `.project` state.
18
+ - <describe any install, bootstrap, or write-safety expectations>
@@ -1,19 +1,10 @@
1
1
  # Tech Context
2
2
 
3
3
  ## Stack
4
- - Markdown contracts and templates for delivery artifacts.
5
- - Bash for the PM/operator script layer.
6
- - Python for validation and dependency-graph checks.
7
- - Git for repository discovery, sparse installs, and sync-oriented workflows.
8
- - Node/npm is the intended packaging surface for the next CLI initiative, but not yet the execution layer for Delano itself.
4
+ - <list the key languages, frameworks, runtimes, and build tools>
9
5
 
10
6
  ## Runtime Constraints
11
- - Current operator environment is Windows-first with PowerShell available; Delano still assumes `bash`, `git`, and a usable Python runtime.
12
- - Canonical command paths should use `.agents/scripts/...`; `.claude/scripts/...` is compatibility-only when the mirror exists.
13
- - Shared docs and contracts must avoid absolute path leakage.
14
- - `.project` and `.agents` are seeded artifacts and runtime assets, not package-owned mutable state after install.
7
+ - <record environment assumptions, platform constraints, and required dependencies>
15
8
 
16
9
  ## Integration Points
17
- - `.project/registry/linear-map.json` and `.project/registry/migration-map.json` capture tracker mapping state.
18
- - `.agents/scripts/pm/init.sh`, `validate.sh`, `status.sh`, `next.sh`, and `blocked.sh` are the current critical-path operator interface.
19
- - `install-delano.sh` is the current shell-first bootstrap path for installing Delano into another repository.
10
+ - <list the main external systems, internal scripts, or registry files this repo depends on>
@@ -633,6 +633,7 @@ This keeps rapid learning without weakening team governance.
633
633
 
634
634
  **Primary components**
635
635
 
636
+ - skill: `prototype-skill`
636
637
  - discovery artifacts from `spec.md`
637
638
  - targeted prototype commands or narrow experiments
638
639
  - `pm/validate.sh` if probe findings mutate contracts
@@ -0,0 +1,17 @@
1
+ # Delano Context Pack
2
+
3
+ This folder is seeded by `delano install` with generic starter context.
4
+
5
+ Update each file to describe this repository's real delivery context before active implementation work begins.
6
+
7
+ Required context files:
8
+
9
+ - `project-overview.md`
10
+ - `project-brief.md`
11
+ - `tech-context.md`
12
+ - `project-structure.md`
13
+ - `system-patterns.md`
14
+ - `product-context.md`
15
+ - `project-style-guide.md`
16
+ - `progress.md`
17
+ - `gui-testing.md`
@@ -0,0 +1,16 @@
1
+ # GUI Testing Policy
2
+
3
+ ## Enforcement Mode
4
+ - `<advisory|required>`
5
+
6
+ ## Smoke Routes
7
+ - <list any critical UI routes or state that must be exercised>
8
+
9
+ ## Console Filtering
10
+ - <describe which browser or runtime errors are blocking>
11
+
12
+ ## Evidence Requirements
13
+ - <describe what screenshots, logs, or notes must be captured>
14
+
15
+ ## Design Validation Threshold
16
+ - <describe the usability and visual quality bar for UI work>
@@ -0,0 +1,10 @@
1
+ # Product Context
2
+
3
+ ## Users
4
+ - <describe the primary operator, maintainer, or end-user groups>
5
+
6
+ ## Core Flows
7
+ - <describe the critical workflows that should remain intact>
8
+
9
+ ## Constraints
10
+ - <record the major product, policy, or architectural constraints>
@@ -0,0 +1,13 @@
1
+ # Progress
2
+
3
+ ## What Changed
4
+ - <summarize the most recent meaningful delivery changes>
5
+
6
+ ## Why It Changed
7
+ - <record the decision or trigger behind those changes>
8
+
9
+ ## What Is Next
10
+ - <list the next expected work or validation steps>
11
+
12
+ ## Remaining Risks
13
+ - <capture the main unresolved risks or open questions>
@@ -0,0 +1,13 @@
1
+ # Project Brief
2
+
3
+ ## Problem
4
+ - <describe the product or operational problem this repository exists to solve>
5
+ - <capture why Delano is being installed or used in this repository now>
6
+
7
+ ## Target Outcome
8
+ - <state the measurable delivery outcome for the current scope>
9
+ - <note what should improve if this effort succeeds>
10
+
11
+ ## Scope Boundaries
12
+ - In scope: <list the work Delano should track here>
13
+ - Out of scope: <list nearby work that should stay outside this context pack>
@@ -0,0 +1,10 @@
1
+ # Project Overview
2
+
3
+ ## Mission
4
+ - <describe the repository mission and the outcome it supports>
5
+
6
+ ## Active Delivery Scopes
7
+ - <list the current active or planned Delano project slugs>
8
+
9
+ ## Current Health
10
+ - <summarize runtime readiness, major gaps, and known operational concerns>
@@ -0,0 +1,19 @@
1
+ # Project Structure
2
+
3
+ Document major repository boundaries and ownership.
4
+
5
+ ## Canonical Boundaries
6
+ - `HANDBOOK.md`: <describe where operating rules live>
7
+ - `.project/`: <describe the delivery-truth contents for this repository>
8
+ - `.agents/`: <describe the shared runtime assets in use>
9
+ - `.claude/`: <note compatibility expectations if present>
10
+ - `.delano/`: <note any optional presentation or UI layer if present>
11
+
12
+ ## Runtime Areas
13
+ - <list the important scripts, skills, rules, hooks, or service areas>
14
+
15
+ ## Documentation Areas
16
+ - <list the primary operator-facing docs or reference files>
17
+
18
+ ## Working Notes
19
+ - <capture scratch paths, generated areas, or local-only conventions worth knowing>
@@ -0,0 +1,10 @@
1
+ # Project Style Guide
2
+
3
+ ## Naming
4
+ - <record naming rules for project slugs, workstreams, tasks, packages, or services>
5
+
6
+ ## Documentation Conventions
7
+ - <record conventions for context updates, timestamps, terminology, and evidence>
8
+
9
+ ## Review Expectations
10
+ - <record required validation, review scope, and any change-management constraints>
@@ -0,0 +1,18 @@
1
+ # System Patterns
2
+
3
+ Capture architecture and delivery patterns that should be reused.
4
+
5
+ ## Handbook-First Delivery
6
+ - <describe how this repository uses Delano's operating model>
7
+
8
+ ## File-Contract-First State
9
+ - <describe which files are canonical and how tooling should treat them>
10
+
11
+ ## Thin Runtime Wrapping
12
+ - <describe how wrappers or automation should stay conservative>
13
+
14
+ ## Compatibility Without Dual Truth
15
+ - <describe any compatibility mirrors and the canonical runtime boundary>
16
+
17
+ ## Conservative Installation
18
+ - <describe any install, bootstrap, or write-safety expectations>
@@ -0,0 +1,10 @@
1
+ # Tech Context
2
+
3
+ ## Stack
4
+ - <list the key languages, frameworks, runtimes, and build tools>
5
+
6
+ ## Runtime Constraints
7
+ - <record environment assumptions, platform constraints, and required dependencies>
8
+
9
+ ## Integration Points
10
+ - <list the main external systems, internal scripts, or registry files this repo depends on>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bvdm/delano",
3
- "version": "0.1.4",
3
+ "version": "0.1.7",
4
4
  "description": "CLI for the Delano delivery runtime.",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -0,0 +1,29 @@
1
+ const { ANALYSIS_APPROVAL_FLAG, runOnboarding } = require("../lib/onboarding");
2
+
3
+ function getOnboardingHelp() {
4
+ return [
5
+ "Usage:",
6
+ " delano onboarding [options]",
7
+ "",
8
+ "Options:",
9
+ " --target <dir> Analyze the nearest AGENTS.md starting from this directory.",
10
+ ` ${ANALYSIS_APPROVAL_FLAG} Explicitly approve AGENTS.md analysis without an interactive prompt.`,
11
+ " -h, --help Show command help.",
12
+ "",
13
+ "Behavior:",
14
+ " - Finds AGENTS.md by searching upward from the target directory.",
15
+ " - Requires explicit approval before analyzing the file.",
16
+ " - Uses the packaged onboarding skill rubric to print recommendations.",
17
+ " - Never edits AGENTS.md; changes remain a separate explicit approval step.",
18
+ "",
19
+ "Examples:",
20
+ " delano onboarding",
21
+ ` delano onboarding ${ANALYSIS_APPROVAL_FLAG}`,
22
+ " delano onboarding --target ../repo"
23
+ ].join("\n");
24
+ }
25
+
26
+ module.exports = {
27
+ getOnboardingHelp,
28
+ runOnboarding
29
+ };
package/src/cli/index.js CHANGED
@@ -3,6 +3,7 @@ const path = require("node:path");
3
3
 
4
4
  const { CliError } = require("./lib/errors");
5
5
  const { getPackageRoot } = require("./lib/runtime");
6
+ const { getOnboardingHelp, runOnboarding } = require("./commands/onboarding");
6
7
  const { runInstall, getInstallHelp } = require("./commands/install");
7
8
  const { createWrapperCommand } = require("./commands/wrapper");
8
9
 
@@ -14,6 +15,11 @@ const wrapperCommands = {
14
15
  };
15
16
 
16
17
  const commands = {
18
+ onboarding: {
19
+ description: "Analyze AGENTS.md with the approval-first onboarding skill.",
20
+ run: runOnboarding,
21
+ help: getOnboardingHelp
22
+ },
17
23
  install: {
18
24
  description: "Install the approved Delano runtime payload into a target repository.",
19
25
  run: runInstall,
@@ -84,6 +90,7 @@ function getGeneralHelp() {
84
90
  " delano <command> [options]",
85
91
  "",
86
92
  "Commands:",
93
+ " onboarding Analyze AGENTS.md with the approval-first onboarding skill",
87
94
  " install Install the approved Delano runtime payload",
88
95
  " init Run .agents/scripts/pm/init.sh in the current Delano repo",
89
96
  " validate Run .agents/scripts/pm/validate.sh in the current Delano repo",
@@ -95,6 +102,8 @@ function getGeneralHelp() {
95
102
  " -v, --version Show version",
96
103
  "",
97
104
  "Examples:",
105
+ " delano onboarding",
106
+ " delano onboarding --approve-agents-analysis",
98
107
  " delano --yes",
99
108
  " delano --target ../my-repo --yes",
100
109
  " npx -y @bvdm/delano@latest --yes",
@@ -104,6 +113,9 @@ function getGeneralHelp() {
104
113
  "Shorthand:",
105
114
  " delano [install-options] is equivalent to delano install [install-options].",
106
115
  "",
116
+ "Recommended first step after install:",
117
+ " Run 'delano onboarding' to review AGENTS.md. The command requires explicit approval before analysis.",
118
+ "",
107
119
  "Use 'delano <command> --help' for command-specific help."
108
120
  ].join("\n");
109
121
  }
@@ -30,6 +30,7 @@ function readInstallManifest() {
30
30
  return {
31
31
  manifestPath,
32
32
  manifest,
33
+ entries: normalizeManifestEntries(manifest),
33
34
  payloadRoot: path.join(getPackageRoot(), "assets", "payload")
34
35
  };
35
36
  }
@@ -120,17 +121,17 @@ function parseInstallArgs(args) {
120
121
  }
121
122
 
122
123
  function buildInstallPlan(options) {
123
- const { manifest, payloadRoot } = readInstallManifest();
124
- const items = manifest.paths.map((relativePath) => {
125
- const sourcePath = path.join(payloadRoot, relativePath);
124
+ const { manifest, entries, payloadRoot } = readInstallManifest();
125
+ const items = entries.map((entry) => {
126
+ const sourcePath = path.join(payloadRoot, entry.target);
126
127
  if (!existsSync(sourcePath)) {
127
- throw new CliError(getMissingPackagedAssetMessage(relativePath), 1);
128
+ throw new CliError(getMissingPackagedAssetMessage(entry.target), 1);
128
129
  }
129
130
 
130
131
  return {
131
- relativePath,
132
+ relativePath: entry.target,
132
133
  sourcePath,
133
- targetPath: path.join(options.target, relativePath)
134
+ targetPath: path.join(options.target, entry.target)
134
135
  };
135
136
  });
136
137
 
@@ -250,6 +251,46 @@ function applyInstallPlan(plan, options) {
250
251
 
251
252
  console.log("");
252
253
  console.log(`Installed ${plan.items.length} files into ${options.target}.`);
254
+ console.log("Recommended next step: run 'delano onboarding' to review AGENTS.md. The command asks for explicit approval before analysis.");
255
+ }
256
+
257
+ function normalizeManifestEntries(rawManifest) {
258
+ const entries = Array.isArray(rawManifest.files) ? rawManifest.files : rawManifest.paths;
259
+ if (!Array.isArray(entries)) {
260
+ throw new CliError("Install manifest is missing a files array.", 1);
261
+ }
262
+
263
+ const seenTargets = new Set();
264
+ return entries.map((entry) => {
265
+ const normalized = typeof entry === "string"
266
+ ? { source: entry, target: entry }
267
+ : entry;
268
+
269
+ if (!normalized || typeof normalized.source !== "string" || typeof normalized.target !== "string") {
270
+ throw new CliError("Install manifest entries must be strings or { source, target } objects.", 1);
271
+ }
272
+
273
+ validateManifestPath(normalized.source, "source");
274
+ validateManifestPath(normalized.target, "target");
275
+
276
+ if (seenTargets.has(normalized.target)) {
277
+ throw new CliError(`Install manifest target is duplicated: ${normalized.target}`, 1);
278
+ }
279
+ seenTargets.add(normalized.target);
280
+
281
+ return normalized;
282
+ });
283
+ }
284
+
285
+ function validateManifestPath(relativePath, fieldName) {
286
+ if (path.isAbsolute(relativePath)) {
287
+ throw new CliError(`Install manifest ${fieldName} must be relative: ${relativePath}`, 1);
288
+ }
289
+
290
+ const normalizedPath = path.normalize(relativePath);
291
+ if (normalizedPath.startsWith("..") || normalizedPath === "..") {
292
+ throw new CliError(`Install manifest ${fieldName} must stay inside the package root: ${relativePath}`, 1);
293
+ }
253
294
  }
254
295
 
255
296
  module.exports = {
@@ -258,6 +299,7 @@ module.exports = {
258
299
  buildInstallPlan,
259
300
  collectConflicts,
260
301
  confirmInstall,
302
+ normalizeManifestEntries,
261
303
  parseAgentList,
262
304
  parseInstallArgs,
263
305
  printConflicts,