@bvdm/delano 0.1.7 → 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 (113) hide show
  1. package/.delano/README.md +7 -0
  2. package/.delano/viewer/README.md +19 -0
  3. package/.delano/viewer/public/app.js +818 -0
  4. package/.delano/viewer/public/explorer.svg +3 -0
  5. package/.delano/viewer/public/index.html +21 -0
  6. package/.delano/viewer/public/markdown.svg +6 -0
  7. package/.delano/viewer/public/styles.css +1042 -0
  8. package/.delano/viewer/public/vscode.svg +24 -0
  9. package/.delano/viewer/server.js +389 -0
  10. package/HANDBOOK.md +65 -45
  11. package/README.md +10 -2
  12. package/assets/install-manifest.json +112 -35
  13. package/assets/payload/.agents/README.md +31 -6
  14. package/assets/payload/.agents/adapters/claude/README.md +22 -3
  15. package/assets/payload/.agents/adapters/codex/README.md +22 -3
  16. package/assets/payload/.agents/adapters/opencode/README.md +22 -3
  17. package/assets/payload/.agents/adapters/pi/README.md +22 -3
  18. package/assets/payload/.agents/common/log-safety.js +55 -0
  19. package/assets/payload/.agents/eval-fixtures/skill-output/invalid/missing-evidence/output.json +6 -0
  20. package/assets/payload/.agents/eval-fixtures/skill-output/valid/summary/output.json +7 -0
  21. package/assets/payload/.agents/fixtures/github/status-snapshot.json +6 -0
  22. package/assets/payload/.agents/fixtures/linear/issue-snapshot.json +6 -0
  23. package/assets/payload/.agents/hooks/bash-worktree-fix.sh +2 -1
  24. package/assets/payload/.agents/hooks/post-tool-logger.js +2 -1
  25. package/assets/payload/.agents/hooks/user-prompt-logger.js +17 -1
  26. package/assets/payload/.agents/logs/delivery-metrics.md +22 -0
  27. package/assets/payload/.agents/logs/schema.md +20 -1
  28. package/assets/payload/.agents/rules/delivery-modes.md +17 -0
  29. package/assets/payload/.agents/schemas/README.md +22 -0
  30. package/assets/payload/.agents/schemas/artifact-scope.json +237 -0
  31. package/assets/payload/.agents/schemas/artifacts/context.schema.json +11 -0
  32. package/assets/payload/.agents/schemas/artifacts/decision_log.schema.json +12 -0
  33. package/assets/payload/.agents/schemas/artifacts/evidence.schema.json +17 -0
  34. package/assets/payload/.agents/schemas/artifacts/plan.schema.json +83 -0
  35. package/assets/payload/.agents/schemas/artifacts/spec.schema.json +101 -0
  36. package/assets/payload/.agents/schemas/artifacts/task.schema.json +121 -0
  37. package/assets/payload/.agents/schemas/artifacts/update.schema.json +12 -0
  38. package/assets/payload/.agents/schemas/artifacts/workstream.schema.json +66 -0
  39. package/assets/payload/.agents/schemas/evidence-map.json +53 -0
  40. package/assets/payload/.agents/schemas/learning/closeout-learning-proposal.schema.json +20 -0
  41. package/assets/payload/.agents/schemas/learning/delivery-metric-event.schema.json +21 -0
  42. package/assets/payload/.agents/schemas/leases/lease.schema.json +39 -0
  43. package/assets/payload/.agents/schemas/metrics/delivery-event.schema.json +29 -0
  44. package/assets/payload/.agents/schemas/metrics/delivery-events.schema.json +49 -0
  45. package/assets/payload/.agents/schemas/operating-modes.json +42 -0
  46. package/assets/payload/.agents/schemas/status-transitions.json +31 -0
  47. package/assets/payload/.agents/schemas/sync/drift-report.schema.json +25 -0
  48. package/assets/payload/.agents/schemas/sync/drift-taxonomy.json +38 -0
  49. package/assets/payload/.agents/schemas/sync/sync-map.schema.json +39 -0
  50. package/assets/payload/.agents/scripts/README.md +1 -0
  51. package/assets/payload/.agents/scripts/audit-context-files.mjs +54 -0
  52. package/assets/payload/.agents/scripts/audit-context-scoring.mjs +14 -0
  53. package/assets/payload/.agents/scripts/build-drift-report.mjs +133 -0
  54. package/assets/payload/.agents/scripts/check-artifact-schemas.mjs +116 -0
  55. package/assets/payload/.agents/scripts/check-closeout-learning-proposals.mjs +23 -0
  56. package/assets/payload/.agents/scripts/check-context-audit.mjs +61 -0
  57. package/assets/payload/.agents/scripts/check-delivery-metric-events.mjs +35 -0
  58. package/assets/payload/.agents/scripts/check-delivery-metrics.mjs +52 -0
  59. package/assets/payload/.agents/scripts/check-evidence-map.mjs +143 -0
  60. package/assets/payload/.agents/scripts/check-github-status-inspection.mjs +93 -0
  61. package/assets/payload/.agents/scripts/check-github-sync.mjs +159 -0
  62. package/assets/payload/.agents/scripts/check-handoff-summaries.mjs +57 -0
  63. package/assets/payload/.agents/scripts/check-lease-conflicts.mjs +24 -0
  64. package/assets/payload/.agents/scripts/check-lease-contracts.mjs +17 -0
  65. package/assets/payload/.agents/scripts/check-linear-issue-inspection.mjs +63 -0
  66. package/assets/payload/.agents/scripts/check-local-sync-map.mjs +151 -0
  67. package/assets/payload/.agents/scripts/check-log-safety.sh +62 -0
  68. package/assets/payload/.agents/scripts/check-operating-modes.mjs +99 -0
  69. package/assets/payload/.agents/scripts/check-path-standards.sh +1 -1
  70. package/assets/payload/.agents/scripts/check-skill-output-evals.mjs +13 -0
  71. package/assets/payload/.agents/scripts/check-status-transitions.mjs +169 -0
  72. package/assets/payload/.agents/scripts/check-strict-fixtures.mjs +140 -0
  73. package/assets/payload/.agents/scripts/check-sync-schemas.mjs +52 -0
  74. package/assets/payload/.agents/scripts/check-text-safety.mjs +158 -0
  75. package/assets/payload/.agents/scripts/check-worktree-health.mjs +100 -0
  76. package/assets/payload/.agents/scripts/fix-path-standards.sh +1 -1
  77. package/assets/payload/.agents/scripts/inspect-github-sync.mjs +108 -0
  78. package/assets/payload/.agents/scripts/lease-manager.mjs +88 -0
  79. package/assets/payload/.agents/scripts/log-event.js +3 -0
  80. package/assets/payload/.agents/scripts/plan-sync-repairs.mjs +66 -0
  81. package/assets/payload/.agents/scripts/pm/validate.sh +656 -2
  82. package/assets/payload/.agents/scripts/propose-closeout-learning.mjs +20 -0
  83. package/assets/payload/.agents/scripts/read-local-sync-map.mjs +135 -0
  84. package/assets/payload/.agents/scripts/select-next-task.mjs +22 -0
  85. package/assets/payload/.agents/scripts/summarize-project-metrics.mjs +15 -0
  86. package/assets/payload/.agents/skills/closeout-skill/SKILL.md +3 -0
  87. package/assets/payload/.agents/skills/closeout-skill/references/runbook.md +5 -2
  88. package/assets/payload/.agents/skills/closeout-skill/templates/closure-checklist.md +2 -0
  89. package/assets/payload/.agents/skills/closeout-skill/templates/learning-proposal.md +21 -0
  90. package/assets/payload/.agents/skills/closeout-skill/templates/learning-proposals.md +25 -0
  91. package/assets/payload/.agents/validation-fixtures/strict/invalid/broken-dependencies/dependency.md +18 -0
  92. package/assets/payload/.agents/validation-fixtures/strict/invalid/broken-dependencies/task.md +24 -0
  93. package/assets/payload/.agents/validation-fixtures/strict/invalid/invalid-transition/task.md +20 -0
  94. package/assets/payload/.agents/validation-fixtures/strict/invalid/missing-evidence/task.md +27 -0
  95. package/assets/payload/.agents/validation-fixtures/strict/invalid/path-leak/task.md +27 -0
  96. package/assets/payload/.agents/validation-fixtures/strict/invalid/stale-context/context.md +9 -0
  97. package/assets/payload/.agents/validation-fixtures/strict/manifest.json +11 -0
  98. package/assets/payload/.agents/validation-fixtures/strict/valid/minimal-project/task.md +27 -0
  99. package/assets/payload/.delano/viewer/README.md +19 -0
  100. package/assets/payload/.delano/viewer/public/app.js +818 -0
  101. package/assets/payload/.delano/viewer/public/explorer.svg +3 -0
  102. package/assets/payload/.delano/viewer/public/index.html +21 -0
  103. package/assets/payload/.delano/viewer/public/markdown.svg +6 -0
  104. package/assets/payload/.delano/viewer/public/styles.css +1042 -0
  105. package/assets/payload/.delano/viewer/public/vscode.svg +24 -0
  106. package/assets/payload/.delano/viewer/server.js +389 -0
  107. package/assets/payload/.project/templates/plan.md +1 -1
  108. package/assets/payload/.project/templates/spec.md +1 -1
  109. package/assets/payload/.project/templates/task.md +1 -0
  110. package/assets/payload/HANDBOOK.md +65 -45
  111. package/package.json +31 -2
  112. package/src/cli/commands/viewer.js +81 -0
  113. package/src/cli/index.js +8 -0
@@ -1,5 +1,24 @@
1
1
  # Codex adapter
2
2
 
3
- - Start from `AGENTS.md`
4
- - Use `.project/` as source of truth
5
- - Reuse runtime scripts via `.agents/scripts/*` (or `.claude/scripts/*` compatibility symlink)
3
+ ## Start here
4
+
5
+ 1. Read root `AGENTS.md` first.
6
+ 2. Use this note only for Codex-specific execution reminders.
7
+ 3. Inspect `git status --short --branch` and the assigned `.project` contract before editing.
8
+
9
+ ## Runtime paths
10
+
11
+ - Delivery contracts: `.project/`
12
+ - Canonical runtime scripts, hooks, rules, and skills: `.agents/`
13
+ - Compatibility path if needed: `.claude/`
14
+
15
+ ## Commands
16
+
17
+ - `bash .agents/scripts/pm/validate.sh`
18
+ - `npm test`
19
+ - `npm run build:assets`
20
+ - `npm run check:package-manifest`
21
+
22
+ ## Completion and safety
23
+
24
+ Keep changes task-scoped, record evidence before marking done, and report exactly which validation commands passed or were not run. Do not force-push, apply remote writes, commit unsafe logs, or expose local absolute paths unless an explicit task instruction requires it.
@@ -1,5 +1,24 @@
1
1
  # OpenCode adapter
2
2
 
3
- - Start from `AGENTS.md`
4
- - Use `.project/` as source of truth
5
- - Reuse runtime scripts via `.agents/scripts/*` (or `.claude/scripts/*` compatibility symlink)
3
+ ## Start here
4
+
5
+ 1. Read root `AGENTS.md` first.
6
+ 2. Use this note only for OpenCode-specific execution reminders.
7
+ 3. Inspect `git status --short --branch` and the assigned `.project` contract before editing.
8
+
9
+ ## Runtime paths
10
+
11
+ - Delivery contracts: `.project/`
12
+ - Canonical runtime scripts, hooks, rules, and skills: `.agents/`
13
+ - Compatibility path if needed: `.claude/`
14
+
15
+ ## Commands
16
+
17
+ - `bash .agents/scripts/pm/validate.sh`
18
+ - `npm test`
19
+ - `npm run build:assets`
20
+ - `npm run check:package-manifest`
21
+
22
+ ## Completion and safety
23
+
24
+ Keep changes task-scoped, record evidence before marking done, and report exactly which validation commands passed or were not run. Do not force-push, apply remote writes, commit unsafe logs, or expose local absolute paths unless an explicit task instruction requires it.
@@ -1,5 +1,24 @@
1
1
  # Pi adapter
2
2
 
3
- - Start from `AGENTS.md`
4
- - Use `.project/` as source of truth
5
- - Reuse runtime scripts via `.agents/scripts/*` (or `.claude/scripts/*` compatibility symlink)
3
+ ## Start here
4
+
5
+ 1. Read root `AGENTS.md` first.
6
+ 2. Use this note only for Pi-specific execution reminders.
7
+ 3. Inspect `git status --short --branch` and the assigned `.project` contract before editing.
8
+
9
+ ## Runtime paths
10
+
11
+ - Delivery contracts: `.project/`
12
+ - Canonical runtime scripts, hooks, rules, and skills: `.agents/`
13
+ - Compatibility path if needed: `.claude/`
14
+
15
+ ## Commands
16
+
17
+ - `bash .agents/scripts/pm/validate.sh`
18
+ - `npm test`
19
+ - `npm run build:assets`
20
+ - `npm run check:package-manifest`
21
+
22
+ ## Completion and safety
23
+
24
+ Keep changes task-scoped, record evidence before marking done, and report exactly which validation commands passed or were not run. Do not force-push, apply remote writes, commit unsafe logs, or expose local absolute paths unless an explicit task instruction requires it.
@@ -0,0 +1,55 @@
1
+ const crypto = require('crypto');
2
+
3
+ const SECRET_PATTERNS = [
4
+ /\b(sk-[A-Za-z0-9_-]{12,})\b/g,
5
+ /\b(github_pat_[A-Za-z0-9_]{20,})\b/g,
6
+ /\b(gh[pousr]_[A-Za-z0-9_]{20,})\b/g,
7
+ /\b(xox[baprs]-[A-Za-z0-9-]{10,})\b/g,
8
+ /\b([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,})\b/g,
9
+ /\b(password|passwd|pwd|secret|token|api[_-]?key)\s*[:=]\s*([^\s"']+)/gi
10
+ ];
11
+
12
+ function sha256Hex(value) {
13
+ return crypto.createHash('sha256').update(String(value || '')).digest('hex');
14
+ }
15
+
16
+ function envFlag(name, defaultValue = false) {
17
+ const value = process.env[name];
18
+ if (value === undefined || value === '') return defaultValue;
19
+ return ['1', 'true', 'yes', 'on'].includes(String(value).toLowerCase());
20
+ }
21
+
22
+ function redactString(value) {
23
+ let output = String(value || '');
24
+ let replacements = 0;
25
+
26
+ for (const pattern of SECRET_PATTERNS) {
27
+ output = output.replace(pattern, (...args) => {
28
+ replacements += 1;
29
+ const match = args[0];
30
+ if (/^(password|passwd|pwd|secret|token|api[_-]?key)/i.test(match)) {
31
+ return match.replace(/[:=]\s*[^\s"']+/i, ': [REDACTED]');
32
+ }
33
+ return '[REDACTED]';
34
+ });
35
+ }
36
+
37
+ return { value: output, replacements };
38
+ }
39
+
40
+ function redactObject(value) {
41
+ if (typeof value === 'string') return redactString(value).value;
42
+ if (Array.isArray(value)) return value.map(redactObject);
43
+ if (!value || typeof value !== 'object') return value;
44
+
45
+ return Object.fromEntries(
46
+ Object.entries(value).map(([key, nested]) => [key, redactObject(nested)])
47
+ );
48
+ }
49
+
50
+ module.exports = {
51
+ envFlag,
52
+ redactObject,
53
+ redactString,
54
+ sha256Hex
55
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "schema_version": 1,
3
+ "skill": "learning-skill",
4
+ "outcome": "claims success without evidence",
5
+ "privacy": "metadata-only"
6
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "schema_version": 1,
3
+ "skill": "learning-skill",
4
+ "outcome": "summary-only delivery metrics recorded",
5
+ "evidence": ["scripts/summarize-project-metrics.mjs", ".project/registry/linear-map.json"],
6
+ "privacy": "metadata-only"
7
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "schema_version": 1,
3
+ "source": "mock-github-status-snapshot",
4
+ "generated_at": "2026-04-30T00:55:00Z",
5
+ "repositories": []
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "schema_version": 1,
3
+ "source": "mock-linear-issue-snapshot",
4
+ "generated_at": "2026-04-30T01:05:00Z",
5
+ "issues": []
6
+ }
@@ -4,4 +4,5 @@ set -euo pipefail
4
4
  # Ensure shell starts in repository root when invoked from nested worktree paths.
5
5
  root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
6
6
  cd "$root"
7
- echo "worktree context set: $root"
7
+ repo_name="$(basename "$root")"
8
+ echo "worktree context set: <repo-root> ($repo_name)"
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  const fs = require('fs');
3
3
  const path = require('path');
4
+ const { redactObject } = require('../common/log-safety');
4
5
 
5
6
  const payload = process.argv[2] ? JSON.parse(process.argv[2]) : { type: 'tool_mutation' };
6
7
  const root = process.cwd();
@@ -12,7 +13,7 @@ const row = {
12
13
  timestamp: new Date().toISOString(),
13
14
  type: payload.type || 'tool_mutation',
14
15
  actor: payload.actor || 'runtime',
15
- meta: payload.meta || {}
16
+ meta: redactObject(payload.meta || {})
16
17
  };
17
18
 
18
19
  fs.appendFileSync(file, JSON.stringify(row) + '\n', 'utf8');
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  const fs = require('fs');
3
3
  const path = require('path');
4
+ const { envFlag, redactString, sha256Hex } = require('../common/log-safety');
4
5
 
5
6
  const prompt = process.argv.slice(2).join(' ');
6
7
  if (!prompt) process.exit(0);
@@ -10,9 +11,24 @@ const dir = path.join(root, '.agents', 'logs');
10
11
  const file = path.join(dir, 'prompts.jsonl');
11
12
  fs.mkdirSync(dir, { recursive: true });
12
13
 
14
+ const redacted = redactString(prompt);
13
15
  const row = {
14
16
  timestamp: new Date().toISOString(),
15
- prompt
17
+ prompt_hash: sha256Hex(prompt),
18
+ prompt_length: prompt.length,
19
+ redaction: {
20
+ applied: redacted.replacements > 0,
21
+ replacements: redacted.replacements
22
+ }
16
23
  };
17
24
 
25
+ if (envFlag('DELANO_LOG_REDACTED_PROMPTS')) {
26
+ row.prompt_redacted = redacted.value;
27
+ }
28
+
29
+ if (envFlag('DELANO_LOG_RAW_PROMPTS')) {
30
+ row.prompt_raw = envFlag('DELANO_LOG_UNREDACTED_PROMPTS') ? prompt : redacted.value;
31
+ row.raw_prompt_redacted = !envFlag('DELANO_LOG_UNREDACTED_PROMPTS');
32
+ }
33
+
18
34
  fs.appendFileSync(file, JSON.stringify(row) + '\n', 'utf8');
@@ -0,0 +1,22 @@
1
+ # Delivery Metrics
2
+
3
+ Delivery metric events are local, metadata-only records used to summarize Delano delivery flow without copying prompt text, raw logs, customer data, or machine-local paths.
4
+
5
+ ## Location
6
+
7
+ - Runtime stream: `.agents/logs/delivery-events.jsonl`
8
+ - Compatibility runtime: `.claude/logs/delivery-events.jsonl`
9
+ - Contract: `.agents/schemas/metrics/delivery-events.schema.json`
10
+
11
+ ## Captured events
12
+
13
+ - `task_status_changed`: task lifecycle movement, especially ready/in-progress/done/blocked.
14
+ - `validation_run`: validation command result and count summary.
15
+ - `lease_acquired` / `lease_released`: multi-agent lease lifecycle.
16
+ - `drift_report_generated`: dry-run sync drift report summary.
17
+ - `repair_plan_created`: gated repair plan summary.
18
+ - `closeout_recorded`: closeout and learning-loop handoff.
19
+
20
+ ## Privacy posture
21
+
22
+ Events are metadata-only summaries. Store repo-relative paths only, hash or omit sensitive values, and keep command evidence limited to commands that are safe to show in local project evidence.
@@ -1,7 +1,11 @@
1
1
  # Log Schema
2
2
 
3
+ Delano logs are local runtime evidence. Treat them as operationally sensitive and do not copy them into public issues, PRs, or reports without review.
4
+
3
5
  ## `changes.jsonl`
4
6
 
7
+ Metadata is redacted before write by Delano logging helpers.
8
+
5
9
  ```json
6
10
  {
7
11
  "timestamp": "ISO8601 UTC",
@@ -23,15 +27,30 @@
23
27
 
24
28
  ## `prompts.jsonl`
25
29
 
30
+ Raw prompt text is not stored by default. Default prompt logs store only hash/length/redaction metadata.
31
+
26
32
  ```json
27
33
  {
28
34
  "timestamp": "ISO8601 UTC",
29
- "prompt": "string"
35
+ "prompt_hash": "sha256 hex string",
36
+ "prompt_length": 123,
37
+ "redaction": {
38
+ "applied": true,
39
+ "replacements": 1
40
+ }
30
41
  }
31
42
  ```
32
43
 
44
+ Optional environment flags:
45
+
46
+ - `DELANO_LOG_REDACTED_PROMPTS=1`: also write `prompt_redacted`.
47
+ - `DELANO_LOG_RAW_PROMPTS=1`: also write `prompt_raw`, redacted unless explicitly overridden.
48
+ - `DELANO_LOG_UNREDACTED_PROMPTS=1`: allow unredacted `prompt_raw`; only use in private debugging contexts.
49
+
33
50
  ## `test-runs.jsonl`
34
51
 
52
+ Test logs intentionally preserve command output as evidence. Review logs before sharing outside the local repo.
53
+
35
54
  ```json
36
55
  {
37
56
  "timestamp": "ISO8601 UTC",
@@ -0,0 +1,17 @@
1
+ # Delano operating modes
2
+
3
+ Use operating modes to choose the lightest safe delivery contract. The mode should reduce ambiguity, not add ceremony.
4
+
5
+ | Mode | Slug | Name | Best fit | Minimum contract |
6
+ | --- | --- | --- | --- | --- |
7
+ | 0 | patch | Patch | Tiny, low-risk fix with obvious validation | Focused change plus validation evidence |
8
+ | 1 | scoped-change | Scoped change | Bounded task with clear acceptance criteria | Task contract, acceptance criteria, local validation |
9
+ | 2 | feature | Feature | Multi-step delivery with clear solution direction | Spec/plan, task sequence or workstream, validation gate |
10
+ | 3 | uncertain-feature | Uncertain feature | Feature with meaningful unknowns | Uncertainty statement, probe decision, probe evidence before build commitment |
11
+ | 4 | multi-stream | Multi-stream delivery | Concurrent streams or coordination/collision risk | Workstream map, conflict zones or leases, handoff summaries, sync/drift checks when relevant |
12
+
13
+ ## Validation posture
14
+
15
+ `operating-modes.json` is the canonical machine-readable contract. `npm run check:operating-modes` verifies that modes 0 through 4 are present, ordered, uniquely named, and documented with requirements.
16
+
17
+ Modes are additive for now. Existing artifacts do not need an `operating_mode` field until stricter migration work lands.
@@ -0,0 +1,22 @@
1
+ # Delano artifact schema scope
2
+
3
+ This directory defines the first contract surface for Delano project artifacts.
4
+
5
+ `artifact-scope.json` defines which artifacts are in scope, which fields are required or optional, which fields should become enum-constrained, and which values can be derived by tooling later.
6
+
7
+ `artifacts/*.schema.json` contains the first JSON Schema contracts for each scoped artifact type. The schemas are intentionally additive: they make canonical fields explicit without forbidding current project-specific metadata.
8
+
9
+ ## In scope for the first schema pass
10
+
11
+ - Project specs
12
+ - Project plans
13
+ - Workstreams
14
+ - Tasks
15
+ - Decision logs
16
+ - Updates
17
+ - Context documents
18
+ - Evidence records in task logs or update files
19
+
20
+ ## Validation posture
21
+
22
+ The scope and schema contracts are additive and local-first. Existing validation still runs through `bash .agents/scripts/pm/validate.sh`; schema-specific validation starts with `npm run check:artifact-scope` and `npm run check:artifact-schemas` before stricter artifact-instance enforcement is added.
@@ -0,0 +1,237 @@
1
+ {
2
+ "schema_version": 1,
3
+ "status": "draft",
4
+ "purpose": "Defines the first enforceable Delano artifact contract surface before JSON schemas are introduced.",
5
+ "artifact_types": {
6
+ "spec": {
7
+ "path_patterns": [
8
+ ".project/projects/<project>/spec.md"
9
+ ],
10
+ "frontmatter": true,
11
+ "required_fields": [
12
+ "name",
13
+ "slug",
14
+ "owner",
15
+ "status",
16
+ "created",
17
+ "updated",
18
+ "outcome",
19
+ "uncertainty",
20
+ "probe_required",
21
+ "probe_status"
22
+ ],
23
+ "optional_fields": [
24
+ "source_review",
25
+ "external_reference",
26
+ "target_version",
27
+ "operating_mode"
28
+ ],
29
+ "enum_fields": {
30
+ "status": [
31
+ "planned",
32
+ "active",
33
+ "complete",
34
+ "deferred"
35
+ ],
36
+ "probe_required": [
37
+ "true",
38
+ "false"
39
+ ],
40
+ "probe_status": [
41
+ "not-started",
42
+ "pending",
43
+ "completed",
44
+ "skipped"
45
+ ]
46
+ },
47
+ "derived_fields": [
48
+ "slug may be derived from the project directory name when absent in future migration tooling"
49
+ ],
50
+ "schema_path": ".agents/schemas/artifacts/spec.schema.json"
51
+ },
52
+ "plan": {
53
+ "path_patterns": [
54
+ ".project/projects/<project>/plan.md"
55
+ ],
56
+ "frontmatter": true,
57
+ "required_fields": [
58
+ "name",
59
+ "status",
60
+ "lead",
61
+ "created",
62
+ "updated",
63
+ "linear_project_id",
64
+ "risk_level",
65
+ "spec_status_at_plan_time"
66
+ ],
67
+ "optional_fields": [
68
+ "target_version",
69
+ "operating_mode"
70
+ ],
71
+ "enum_fields": {
72
+ "status": [
73
+ "planned",
74
+ "active",
75
+ "done",
76
+ "deferred"
77
+ ],
78
+ "risk_level": [
79
+ "low",
80
+ "medium",
81
+ "high"
82
+ ]
83
+ },
84
+ "derived_fields": [
85
+ "spec_status_at_plan_time is copied from spec.status when the plan is created"
86
+ ],
87
+ "schema_path": ".agents/schemas/artifacts/plan.schema.json"
88
+ },
89
+ "workstream": {
90
+ "path_patterns": [
91
+ ".project/projects/<project>/workstreams/*.md"
92
+ ],
93
+ "frontmatter": true,
94
+ "required_fields": [
95
+ "name",
96
+ "status",
97
+ "owner",
98
+ "created",
99
+ "updated"
100
+ ],
101
+ "optional_fields": [
102
+ "id",
103
+ "child_project",
104
+ "operating_mode"
105
+ ],
106
+ "enum_fields": {
107
+ "status": [
108
+ "planned",
109
+ "active",
110
+ "done",
111
+ "deferred"
112
+ ]
113
+ },
114
+ "derived_fields": [
115
+ "id may be derived from a canonical filename prefix like WS-A"
116
+ ],
117
+ "schema_path": ".agents/schemas/artifacts/workstream.schema.json"
118
+ },
119
+ "task": {
120
+ "path_patterns": [
121
+ ".project/projects/<project>/tasks/*.md"
122
+ ],
123
+ "frontmatter": true,
124
+ "required_fields": [
125
+ "id",
126
+ "name",
127
+ "status",
128
+ "workstream",
129
+ "created",
130
+ "updated",
131
+ "linear_issue_id",
132
+ "github_issue",
133
+ "github_pr",
134
+ "depends_on",
135
+ "conflicts_with",
136
+ "parallel",
137
+ "priority",
138
+ "estimate"
139
+ ],
140
+ "optional_fields": [
141
+ "operating_mode"
142
+ ],
143
+ "enum_fields": {
144
+ "status": [
145
+ "ready",
146
+ "in-progress",
147
+ "blocked",
148
+ "done",
149
+ "deferred"
150
+ ],
151
+ "parallel": [
152
+ "true",
153
+ "false"
154
+ ],
155
+ "priority": [
156
+ "low",
157
+ "medium",
158
+ "high"
159
+ ],
160
+ "estimate": [
161
+ "S",
162
+ "M",
163
+ "L",
164
+ "XL"
165
+ ]
166
+ },
167
+ "derived_fields": [
168
+ "workstream must match a workstream id available in the same project"
169
+ ],
170
+ "schema_path": ".agents/schemas/artifacts/task.schema.json"
171
+ },
172
+ "decision_log": {
173
+ "path_patterns": [
174
+ ".project/projects/<project>/decisions.md"
175
+ ],
176
+ "frontmatter": false,
177
+ "required_sections": [
178
+ "# Decisions"
179
+ ],
180
+ "optional_fields": [],
181
+ "enum_fields": {},
182
+ "derived_fields": [],
183
+ "schema_path": ".agents/schemas/artifacts/decision_log.schema.json"
184
+ },
185
+ "update": {
186
+ "path_patterns": [
187
+ ".project/projects/<project>/updates/**/*.md"
188
+ ],
189
+ "frontmatter": "optional",
190
+ "required_sections": [],
191
+ "optional_fields": [
192
+ "date",
193
+ "related_task",
194
+ "status"
195
+ ],
196
+ "enum_fields": {},
197
+ "derived_fields": [
198
+ "related_task should reference a local task id when present"
199
+ ],
200
+ "schema_path": ".agents/schemas/artifacts/update.schema.json"
201
+ },
202
+ "context": {
203
+ "path_patterns": [
204
+ ".project/context/*.md"
205
+ ],
206
+ "frontmatter": false,
207
+ "required_sections": [],
208
+ "optional_fields": [],
209
+ "enum_fields": {},
210
+ "derived_fields": [],
211
+ "schema_path": ".agents/schemas/artifacts/context.schema.json"
212
+ },
213
+ "evidence": {
214
+ "path_patterns": [
215
+ "Evidence Log sections inside task files",
216
+ ".project/projects/<project>/updates/**/*.md"
217
+ ],
218
+ "frontmatter": false,
219
+ "required_fields": [
220
+ "timestamp",
221
+ "claim",
222
+ "validation_or_artifact"
223
+ ],
224
+ "optional_fields": [
225
+ "command",
226
+ "result",
227
+ "log_path",
228
+ "commit"
229
+ ],
230
+ "enum_fields": {},
231
+ "derived_fields": [
232
+ "timestamp is the leading ISO8601 UTC value in a task Evidence Log bullet"
233
+ ],
234
+ "schema_path": ".agents/schemas/artifacts/evidence.schema.json"
235
+ }
236
+ }
237
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://delano.local/schemas/artifacts/context.schema.json",
4
+ "title": "Delano context document",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["path"],
8
+ "properties": {
9
+ "path": { "type": "string", "pattern": "^\\.project/context/[^/]+\\.md$" }
10
+ }
11
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://delano.local/schemas/artifacts/decision-log.schema.json",
4
+ "title": "Delano decision log document",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["path", "required_sections"],
8
+ "properties": {
9
+ "path": { "type": "string", "pattern": "^\\.project/projects/[^/]+/decisions\\.md$" },
10
+ "required_sections": { "type": "array", "contains": { "const": "# Decisions" } }
11
+ }
12
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://delano.local/schemas/artifacts/evidence.schema.json",
4
+ "title": "Delano evidence record",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["timestamp", "claim", "validation_or_artifact"],
8
+ "properties": {
9
+ "timestamp": { "type": "string", "format": "date-time" },
10
+ "claim": { "type": "string", "minLength": 1 },
11
+ "validation_or_artifact": { "type": "string", "minLength": 1 },
12
+ "command": { "type": "string" },
13
+ "result": { "type": "string" },
14
+ "log_path": { "type": "string" },
15
+ "commit": { "type": "string", "pattern": "^[0-9a-f]{7,40}$" }
16
+ }
17
+ }