@lsctech/polaris 0.3.21 → 0.3.23
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.
- package/dist/cli/adopt-assets.js +13 -0
- package/dist/cli/adopt-canon.js +1 -0
- package/dist/cli/adopt-genesis.js +85 -4
- package/dist/cli/adopt-instructions.js +3 -3
- package/dist/cli/adopt-report.js +15 -1
- package/dist/cli/adopt-rules.js +44 -8
- package/dist/cli/adopt-workspace.js +2 -2
- package/dist/cli/adoption-inventory.js +5 -2
- package/dist/cli/init.js +5 -4
- package/dist/config/provider-detect.js +19 -2
- package/dist/workspace/.polaris/skills/ROUTING.md +4 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/POLARIS.md +9 -8
- package/dist/workspace/.polaris/skills/docs-ingest/SKILL.md +2 -2
- package/dist/workspace/.polaris/skills/docs-ingest/chain.md +1 -1
- package/dist/workspace/.polaris/skills/docs-ingest/steps/04-place-and-link.md +5 -5
- package/dist/workspace/.polaris/skills/docs-ingest/steps/05-finalize-ingest.md +1 -1
- package/dist/workspace/.polaris/skills/docs-promote/SKILL.md +6 -6
- package/dist/workspace/.polaris/skills/docs-promote/chain.md +5 -5
- package/dist/workspace/.polaris/skills/docs-promote/steps/04-conflict-surface.md +1 -1
- package/dist/workspace/.polaris/skills/docs-promote/steps/06-execute-promote-deprecate.md +3 -3
- package/dist/workspace/{workspace/.polaris → .polaris}/skills/docs-review/SKILL.md +1 -1
- package/dist/workspace/{workspace/.polaris → .polaris}/skills/docs-triage/SKILL.md +1 -1
- package/dist/workspace/{workspace/.polaris → .polaris}/skills/docs-triage/chain.md +1 -1
- package/dist/workspace/.polaris/skills/polaris-analyze/SKILL.md +1 -1
- package/dist/workspace/.polaris/skills/polaris-analyze/chain.md +2 -2
- package/dist/workspace/.polaris/skills/polaris-analyze/issue-reconciliation.md +1 -1
- package/dist/workspace/.polaris/skills/polaris-analyze/linked-skills/repo-analysis.md +3 -4
- package/dist/workspace/.polaris/skills/polaris-analyze/steps/02-map-affected-code.md +2 -2
- package/dist/workspace/.polaris/skills/polaris-catalog/SKILL.md +5 -5
- package/dist/workspace/.polaris/skills/polaris-catalog/chain.md +3 -3
- package/dist/workspace/.polaris/skills/polaris-catalog/steps/04-classify-and-place.md +3 -3
- package/dist/workspace/.polaris/skills/polaris-reconcile/SKILL.md +2 -2
- package/dist/workspace/.polaris/skills/polaris-run/SKILL.md +1 -1
- package/dist/workspace/.polaris/skills/polaris-run/chain.md +17 -17
- package/dist/workspace/.polaris/skills/polaris-run/linked-skills/repo-analysis.md +3 -4
- package/dist/workspace/.polaris/skills/polaris-run/steps/01-orient-cluster.md +3 -3
- package/dist/workspace/.polaris/skills/polaris-run/steps/03-select-child.md +1 -1
- package/dist/workspace/.polaris/skills/polaris-run/steps/06-commit-and-update-linear.md +2 -2
- package/dist/workspace/.polaris/skills/polaris-run/steps/07-decide-continuation.md +3 -3
- package/dist/workspace/.polaris/skills/polaris-run/steps/08-closeout-librarian.md +1 -1
- package/dist/workspace/.polaris/skills/polaris-run/steps/08-final-delivery.md +2 -2
- package/dist/workspace/.polaris/skills/polaris-run/steps/09-final-delivery.md +1 -1
- package/dist/workspace/.polaris/skills/polaris-tools/README.md +1 -1
- package/dist/workspace/POLARIS_RULES.md +169 -0
- package/package.json +3 -2
- package/dist/workspace/workspace/.polaris/roles/analyst.md +0 -38
- package/dist/workspace/workspace/.polaris/roles/closeout-librarian.md +0 -122
- package/dist/workspace/workspace/.polaris/roles/cognition-librarian.md +0 -37
- package/dist/workspace/workspace/.polaris/roles/finalizer.md +0 -45
- package/dist/workspace/workspace/.polaris/roles/foreman.md +0 -165
- package/dist/workspace/workspace/.polaris/roles/librarian.md +0 -74
- package/dist/workspace/workspace/.polaris/roles/worker.md +0 -119
- package/dist/workspace/workspace/.polaris/session-type +0 -1
- package/dist/workspace/workspace/.polaris/skills/ROUTING.md +0 -113
- package/dist/workspace/workspace/.polaris/skills/caveman/SKILL.md +0 -74
- package/dist/workspace/workspace/.polaris/skills/caveman-compress/scripts/compress.py +0 -272
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/POLARIS.md +0 -46
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/SKILL.md +0 -59
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/chain.md +0 -116
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/01-load-cluster-context.md +0 -78
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/02-drift-reconciliation.md +0 -157
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/03-reconcile-polaris-md.md +0 -93
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/04-reconcile-summary-md.md +0 -106
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/05-doc-ingestion.md +0 -114
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/06-link-validation.md +0 -128
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/07-yaml-linking.md +0 -95
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/08-librarian-commit.md +0 -119
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/09-sealed-result.md +0 -118
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/SKILL.md +0 -68
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/chain.json +0 -23
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/chain.md +0 -149
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/steps/01-orient-ingest.md +0 -85
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/steps/02-classify-batch.md +0 -87
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/steps/03-conflict-check.md +0 -66
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/steps/04-place-and-link.md +0 -77
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/steps/05-finalize-ingest.md +0 -49
- package/dist/workspace/workspace/.polaris/skills/docs-promote/SKILL.md +0 -79
- package/dist/workspace/workspace/.polaris/skills/docs-promote/chain.json +0 -25
- package/dist/workspace/workspace/.polaris/skills/docs-promote/chain.md +0 -80
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/01-orient-promote.md +0 -53
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/02-review-candidates.md +0 -51
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/03-read-linked-code.md +0 -50
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/04-conflict-surface.md +0 -65
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/05-await-approval.md +0 -61
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/06-execute-promote-deprecate.md +0 -65
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/07-finalize-promote.md +0 -44
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/SKILL.md +0 -94
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/chain.json +0 -20
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/chain.md +0 -105
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/issue-reconciliation.md +0 -149
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/issue-template.md +0 -133
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/linked-skills/repo-analysis.md +0 -55
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/steps/01-fetch-and-orient.md +0 -79
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/steps/02-map-affected-code.md +0 -58
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/steps/03-assess-issue.md +0 -58
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/steps/04-blocker-check.md +0 -60
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/steps/05-create-cluster-plan.md +0 -197
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/steps/06-final-report.md +0 -60
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/SKILL.md +0 -91
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/chain.json +0 -22
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/chain.md +0 -85
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/01-orient-catalog.md +0 -92
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/02-reconcile-polaris-md.md +0 -33
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/03-reconcile-summary-md.md +0 -70
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/04-classify-and-place.md +0 -117
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/05-catalog-commit.md +0 -94
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/SKILL.md +0 -52
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/chain.md +0 -111
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/steps/01-orient-medic.md +0 -75
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/steps/02-diagnose.md +0 -79
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/steps/03-repair.md +0 -64
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/steps/04-validate.md +0 -66
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/steps/05-create-chart.md +0 -85
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/steps/06-closeout.md +0 -86
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/SKILL.md +0 -75
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/chain.json +0 -20
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/chain.md +0 -67
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/steps/01-orient-reconcile.md +0 -82
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/steps/02-reconcile-polaris-md.md +0 -95
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/steps/03-reconcile-summary-md.md +0 -108
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/steps/04-reconcile-commit.md +0 -88
- package/dist/workspace/workspace/.polaris/skills/polaris-run/SKILL.md +0 -135
- package/dist/workspace/workspace/.polaris/skills/polaris-run/chain.json +0 -19
- package/dist/workspace/workspace/.polaris/skills/polaris-run/chain.md +0 -298
- package/dist/workspace/workspace/.polaris/skills/polaris-run/execution-adapter.md +0 -34
- package/dist/workspace/workspace/.polaris/skills/polaris-run/linked-skills/repo-analysis.md +0 -58
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/01-orient-cluster.md +0 -96
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/02-prepare-branch.md +0 -53
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/03-select-child.md +0 -63
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/04-execute-child.md +0 -75
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/05-validate-child.md +0 -57
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/06-commit-and-update-linear.md +0 -74
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/07-decide-continuation.md +0 -89
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/08-closeout-librarian.md +0 -146
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/08-final-delivery.md +0 -91
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/09-final-delivery.md +0 -104
- package/dist/workspace/workspace/.polaris/skills/polaris-tools/README.md +0 -63
- package/dist/workspace/workspace/.polaris/skills/polaris-tools/SKILL.md +0 -94
- package/dist/workspace/workspace/.polaris/skills/polaris-tools/tools.js +0 -191
- package/dist/workspace/workspace/smartdocs/architecture/.gitkeep +0 -0
- package/dist/workspace/workspace/smartdocs/audits/.gitkeep +0 -0
- package/dist/workspace/workspace/smartdocs/decisions/.gitkeep +0 -0
- package/dist/workspace/workspace/smartdocs/doctrine/active/.gitkeep +0 -0
- package/dist/workspace/workspace/smartdocs/runtime/.gitkeep +0 -0
- package/dist/workspace/workspace/smartdocs/specs/active/.gitkeep +0 -0
- package/dist/workspace/workspace/smartdocs/specs/archive/.gitkeep +0 -0
- /package/dist/workspace/{workspace/.polaris → .polaris}/skills/docs-review/chain.md +0 -0
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-analyze-step-06-final-report
|
|
3
|
-
description: Produce the structured analysis summary, cluster plan, and recommended polaris-run command.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Step 06 — Final report
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
Deliver the complete analysis result and the command the operator needs to begin implementation.
|
|
11
|
-
|
|
12
|
-
## Scope declarations
|
|
13
|
-
|
|
14
|
-
```yaml
|
|
15
|
-
allowed_files:
|
|
16
|
-
- artifacts from steps 01-05
|
|
17
|
-
- .taskchain_artifacts/polaris-analyze/current-state.json
|
|
18
|
-
allowed_routes:
|
|
19
|
-
- CLAUDE.md
|
|
20
|
-
- .polaris/skills/polaris-analyze/chain.md
|
|
21
|
-
expected_evidence:
|
|
22
|
-
- analysis decision summarized
|
|
23
|
-
- clusters.json path confirmed
|
|
24
|
-
- created or updated child issues listed
|
|
25
|
-
- blockers and next action reported
|
|
26
|
-
- recommended run command provided
|
|
27
|
-
stop_rules:
|
|
28
|
-
- artifact state is incomplete
|
|
29
|
-
- analysis has unresolved blocker
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Actions
|
|
33
|
-
|
|
34
|
-
Return a structured summary containing:
|
|
35
|
-
|
|
36
|
-
1. **Parent issue audited** — ID, title, state
|
|
37
|
-
2. **Repo-analysis provider status** — `available` / `unavailable` / `not-configured` (if available: provider name and index freshness)
|
|
38
|
-
3. **Files / systems inspected** — list (max 10; summarize remainder as "N additional files")
|
|
39
|
-
4. **Findings** — outcome assessment with evidence (max 5–10 lines; no raw command output)
|
|
40
|
-
5. **Clusters plan** — cluster IDs, child issues per cluster, session_types, and dependency order
|
|
41
|
-
6. **clusters.json location** — `.polaris/clusters/<source-id>/clusters.json`
|
|
42
|
-
7. **Recommended run command**:
|
|
43
|
-
```bash
|
|
44
|
-
polaris-run <PARENT-ID>
|
|
45
|
-
```
|
|
46
|
-
8. **Remaining risks** — anything uncertain, out of scope, or requiring follow-up
|
|
47
|
-
|
|
48
|
-
## Artifact update
|
|
49
|
-
|
|
50
|
-
Update `.taskchain_artifacts/polaris-analyze/current-state.json`:
|
|
51
|
-
- `status: complete`
|
|
52
|
-
- `current_step_id: 06-final-report`
|
|
53
|
-
- `completed_at: <timestamp>`
|
|
54
|
-
- `updated_at: <timestamp>`
|
|
55
|
-
|
|
56
|
-
Emit `step-complete` for `06-final-report` to telemetry JSONL.
|
|
57
|
-
|
|
58
|
-
## Session end
|
|
59
|
-
|
|
60
|
-
This is the terminal step. Do not continue to polaris-run or any other implementation skill.
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-catalog
|
|
3
|
-
description: Combined cognition reconciliation and document classification. Updates POLARIS.md and SUMMARY.md from the packet, then classifies documents in smartdocs/raw/ — auto-placing high-confidence files and asking the user (or leaving in raw when unattended) for low-confidence ones.
|
|
4
|
-
role: librarian
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Polaris Skill Bootloader
|
|
8
|
-
|
|
9
|
-
**Before proceeding, you must obtain a skill packet from the Polaris runtime.**
|
|
10
|
-
|
|
11
|
-
Run the following command:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm run polaris -- skill packet catalog
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
- Do not begin work until a packet is returned.
|
|
18
|
-
- Treat the packet as your authoritative instruction source.
|
|
19
|
-
- If no packet is produced, stop and report: **Polaris could not authorize this run.**
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
# polaris-catalog
|
|
24
|
-
|
|
25
|
-
Use this skill to perform a full cognition and documentation pass after completed work.
|
|
26
|
-
It combines the cognition reconciliation of `polaris-reconcile` with document classification
|
|
27
|
-
from `smartdocs/raw/`.
|
|
28
|
-
|
|
29
|
-
`polaris-catalog` is the callable-at-will equivalent of what the Closeout Librarian does
|
|
30
|
-
for cognition + ingestion, without requiring a cluster closeout.
|
|
31
|
-
|
|
32
|
-
## When to use
|
|
33
|
-
|
|
34
|
-
- "Catalog the docs after POL-257"
|
|
35
|
-
- "Run polaris-catalog on POL-303"
|
|
36
|
-
- After a run completes and you want a full cognition + docs pass in one invocation
|
|
37
|
-
- In CI or automated contexts where both reconciliation and doc classification should run together
|
|
38
|
-
|
|
39
|
-
## How to execute
|
|
40
|
-
|
|
41
|
-
1. Read `chain.md` — step order and rules.
|
|
42
|
-
2. Read `.taskchain_artifacts/polaris-catalog/current-state.json` — resumable state.
|
|
43
|
-
3. Execute steps in the order `chain.md` defines. Do not skip steps.
|
|
44
|
-
4. After every completed step, update `current-state.json` before advancing.
|
|
45
|
-
|
|
46
|
-
## Classification behavior
|
|
47
|
-
|
|
48
|
-
- **High confidence** — auto-place via CLI. No pause, no user input required.
|
|
49
|
-
- **Low confidence (interactive)** — surface each file and ask the user where it should go.
|
|
50
|
-
- **Low confidence (unattended/CI)** — leave in `smartdocs/raw/` and include in the final report. Do not block. Do not fail.
|
|
51
|
-
|
|
52
|
-
The `packet.unattended` flag controls which low-confidence behavior applies.
|
|
53
|
-
|
|
54
|
-
## Hard rules — what polaris-catalog may do
|
|
55
|
-
|
|
56
|
-
- Read packet-specified folders and their POLARIS.md and SUMMARY.md files
|
|
57
|
-
- Write POLARIS.md and SUMMARY.md files within `packet.allowed_write_paths`
|
|
58
|
-
- Read `smartdocs/raw/` to enumerate documents for classification
|
|
59
|
-
- Call `npm run polaris -- docs ingest --file <path>` to place classified documents
|
|
60
|
-
- Call `npm run polaris -- doctrine draft <path>` for doctrine candidates
|
|
61
|
-
- Call `npm run polaris -- map update --changed` after batch placement
|
|
62
|
-
- Create a single sealed git commit of all cognition and doc changes
|
|
63
|
-
|
|
64
|
-
## Hard rules — what polaris-catalog must NOT do
|
|
65
|
-
|
|
66
|
-
- Modify implementation source code (`src/`, tests, config)
|
|
67
|
-
- Modify runtime state files outside this skill's owned artifacts (cluster-state, other skills' `.taskchain_artifacts/` state, or non-catalog telemetry)
|
|
68
|
-
- Call `npm run polaris -- loop continue` or `npm run polaris -- finalize`
|
|
69
|
-
- Write to `packet.prohibited_write_paths`
|
|
70
|
-
- Git push or create PRs
|
|
71
|
-
- Auto-place low-confidence files (always leave in raw or ask)
|
|
72
|
-
- Move files under `smartdocs/` directly with `mv` or `cp` — use the CLI
|
|
73
|
-
|
|
74
|
-
## Packet schema
|
|
75
|
-
|
|
76
|
-
The packet is a `CatalogPacket`. Required fields:
|
|
77
|
-
|
|
78
|
-
| Field | Description |
|
|
79
|
-
|---|---|
|
|
80
|
-
| `run_id` | Identifier for this catalog run |
|
|
81
|
-
| `issue_id` | Bound issue (e.g. `POL-257`) |
|
|
82
|
-
| `affected_folders` | Folders whose POLARIS.md and/or SUMMARY.md may need updating |
|
|
83
|
-
| `work_inventory` | Summary of completed work: changed files, child summaries, cognition notes |
|
|
84
|
-
| `unattended` | Boolean — `true` means CI/automated context; low-confidence files left in raw |
|
|
85
|
-
| `allowed_write_paths` | Paths this skill may write |
|
|
86
|
-
| `prohibited_write_paths` | Paths this skill must not write |
|
|
87
|
-
| `constraints.max_summary_addition_lines` | Net new line cap per SUMMARY.md update (default: 50) |
|
|
88
|
-
|
|
89
|
-
## Execution
|
|
90
|
-
|
|
91
|
-
Read `chain.md` and execute steps in strict order. Do not skip steps. Do not reorder steps.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "polaris-catalog-chain",
|
|
3
|
-
"steps": [
|
|
4
|
-
"01-orient-catalog",
|
|
5
|
-
"02-reconcile-polaris-md",
|
|
6
|
-
"03-reconcile-summary-md",
|
|
7
|
-
"04-classify-and-place",
|
|
8
|
-
"05-catalog-commit"
|
|
9
|
-
],
|
|
10
|
-
"terminal_steps": ["05-catalog-commit"],
|
|
11
|
-
"scope": "cognition-and-docs",
|
|
12
|
-
"forbidden_actions": [
|
|
13
|
-
"src file mutations",
|
|
14
|
-
"runtime state file mutations",
|
|
15
|
-
"polaris loop continue",
|
|
16
|
-
"polaris finalize",
|
|
17
|
-
"git push",
|
|
18
|
-
"pr creation",
|
|
19
|
-
"mv/cp on smartdocs/ files",
|
|
20
|
-
"auto-placing low-confidence files"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-catalog-chain
|
|
3
|
-
description: Step order, CLI reference, canonical paths, run ID format, telemetry, and artifact authority for polaris-catalog.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# polaris-catalog chain
|
|
7
|
-
|
|
8
|
-
## Authority
|
|
9
|
-
|
|
10
|
-
**Polaris runtime state is authoritative. Chat reasoning is not authoritative.**
|
|
11
|
-
|
|
12
|
-
Query runtime state before acting. Do not infer affected folders, doc classifications, or
|
|
13
|
-
change scope from conversation context.
|
|
14
|
-
|
|
15
|
-
## Step traversal order
|
|
16
|
-
|
|
17
|
-
```text
|
|
18
|
-
01-orient-catalog
|
|
19
|
-
02-reconcile-polaris-md
|
|
20
|
-
03-reconcile-summary-md
|
|
21
|
-
04-classify-and-place
|
|
22
|
-
05-catalog-commit
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Read the current step's file in `steps/` before acting. Do not read ahead.
|
|
26
|
-
|
|
27
|
-
## CLI
|
|
28
|
-
|
|
29
|
-
Always use the repo-local Polaris CLI:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
npm run polaris -- docs ingest --file <path>
|
|
33
|
-
npm run polaris -- doctrine draft <path>
|
|
34
|
-
npm run polaris -- map update --changed
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Never assume a globally linked `polaris` command exists.
|
|
38
|
-
|
|
39
|
-
## Canonical paths
|
|
40
|
-
|
|
41
|
-
| State | Path |
|
|
42
|
-
|---|---|
|
|
43
|
-
| Doc drop zone | `smartdocs/raw/` |
|
|
44
|
-
| Skill state | `.taskchain_artifacts/polaris-catalog/current-state.json` |
|
|
45
|
-
| Telemetry | `.taskchain_artifacts/polaris-catalog/runs/<run-id>/telemetry.jsonl` |
|
|
46
|
-
|
|
47
|
-
## Run ID format
|
|
48
|
-
|
|
49
|
-
`polaris-catalog-<slug>-<YYYY-MM-DD>-<seq>` — e.g. `polaris-catalog-POL-257-2026-06-04-001`
|
|
50
|
-
|
|
51
|
-
## Telemetry
|
|
52
|
-
|
|
53
|
-
Append-only JSONL. Required fields: `event`, `run_id`, `timestamp`.
|
|
54
|
-
|
|
55
|
-
| Event | Trigger |
|
|
56
|
-
|---|---|
|
|
57
|
-
| `run-start` | Begin orient step |
|
|
58
|
-
| `step-complete` | End of every step |
|
|
59
|
-
| `polaris-md-updated` | POLARIS.md written for a folder |
|
|
60
|
-
| `summary-md-updated` | SUMMARY.md written for a folder |
|
|
61
|
-
| `doc-classified` | Classification assigned per file in raw |
|
|
62
|
-
| `doc-placed` | File moved via CLI |
|
|
63
|
-
| `doc-held` | Low-confidence file left in raw |
|
|
64
|
-
| `catalog-commit` | Commit created |
|
|
65
|
-
| `catalog-complete` | All steps done |
|
|
66
|
-
|
|
67
|
-
## Artifact authority
|
|
68
|
-
|
|
69
|
-
`.taskchain_artifacts/polaris-catalog/current-state.json` is the sole authoritative
|
|
70
|
-
live state surface.
|
|
71
|
-
|
|
72
|
-
- Update after every completed step — before advancing.
|
|
73
|
-
- A step is NOT complete until the state update succeeds.
|
|
74
|
-
- If the update fails: stop and report the persistence failure.
|
|
75
|
-
|
|
76
|
-
## Forbidden actions
|
|
77
|
-
|
|
78
|
-
- src file mutations
|
|
79
|
-
- runtime state file mutations
|
|
80
|
-
- polaris loop continue
|
|
81
|
-
- polaris finalize
|
|
82
|
-
- git push
|
|
83
|
-
- PR creation
|
|
84
|
-
- mv/cp on files under smartdocs/ (use CLI)
|
|
85
|
-
- auto-placing low-confidence files
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-catalog-step-01
|
|
3
|
-
description: Generate run_id, emit run-start telemetry, validate packet, establish work_inventory, and enumerate smartdocs/raw/ for classification.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Step 01 — Orient catalog
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
Establish bounded execution context before touching any files. Validate the packet,
|
|
11
|
-
confirm cognition scope, and enumerate `smartdocs/raw/` for the classification step.
|
|
12
|
-
|
|
13
|
-
## Actions
|
|
14
|
-
|
|
15
|
-
### 1.1 Generate run_id
|
|
16
|
-
|
|
17
|
-
Format: `polaris-catalog-<issue-slug>-<YYYY-MM-DD>-<seq>`
|
|
18
|
-
Example: `polaris-catalog-POL-257-2026-06-04-001`
|
|
19
|
-
|
|
20
|
-
### 1.2 Emit run-start telemetry
|
|
21
|
-
|
|
22
|
-
First I/O action, before any file access:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
mkdir -p .taskchain_artifacts/polaris-catalog/runs/<run-id>
|
|
26
|
-
echo '{"event":"run-start","run_id":"<run-id>","issue_id":"<issue_id>","unattended":<bool>,"timestamp":"<ISO>"}' \
|
|
27
|
-
>> .taskchain_artifacts/polaris-catalog/runs/<run-id>/telemetry.jsonl
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
If this write fails: halt. Do not continue.
|
|
31
|
-
|
|
32
|
-
### 1.3 Validate packet
|
|
33
|
-
|
|
34
|
-
Confirm required fields are present:
|
|
35
|
-
`run_id`, `issue_id`, `affected_folders`, `work_inventory`, `unattended`,
|
|
36
|
-
`allowed_write_paths`, `prohibited_write_paths`, `constraints`
|
|
37
|
-
|
|
38
|
-
If any required field is missing: halt and report which field is absent.
|
|
39
|
-
|
|
40
|
-
### 1.4 Build work inventory snapshot
|
|
41
|
-
|
|
42
|
-
From `packet.work_inventory`, confirm:
|
|
43
|
-
- `affected_folders` — folders whose cognition may need updating
|
|
44
|
-
- `all_changed_files` — files changed by the completed work
|
|
45
|
-
- `child_summaries` — summaries of completed children (if cluster-based)
|
|
46
|
-
- `pending_cognition_notes` — pending cognition notes per folder
|
|
47
|
-
- `polaris_md_files` — current POLARIS.md paths per folder
|
|
48
|
-
- `summary_md_files` — current SUMMARY.md paths per folder
|
|
49
|
-
|
|
50
|
-
If `affected_folders` is empty: record cognition scope as no-op, continue to step 04 to
|
|
51
|
-
still process any docs in `smartdocs/raw/`.
|
|
52
|
-
|
|
53
|
-
### 1.5 Enumerate smartdocs/raw/
|
|
54
|
-
|
|
55
|
-
List all files currently in `smartdocs/raw/` (excluding `.provenance.json` sidecars and
|
|
56
|
-
hidden files). This is the batch for step 04.
|
|
57
|
-
|
|
58
|
-
If `smartdocs/raw/` is empty or does not exist: record doc classification as no-op.
|
|
59
|
-
Continue — cognition steps may still have work to do.
|
|
60
|
-
|
|
61
|
-
### 1.6 Restate working context
|
|
62
|
-
|
|
63
|
-
Summarize in under 10 bullets:
|
|
64
|
-
- `run_id` and fresh/resumed
|
|
65
|
-
- Bound issue
|
|
66
|
-
- Mode: interactive or unattended
|
|
67
|
-
- Affected folders for cognition (count)
|
|
68
|
-
- Files in `smartdocs/raw/` for classification (count)
|
|
69
|
-
|
|
70
|
-
## Scope declarations
|
|
71
|
-
|
|
72
|
-
```yaml
|
|
73
|
-
allowed_files:
|
|
74
|
-
- .polaris/skills/polaris-catalog/SKILL.md
|
|
75
|
-
- .polaris/skills/polaris-catalog/chain.md
|
|
76
|
-
- .taskchain_artifacts/polaris-catalog/current-state.json
|
|
77
|
-
- smartdocs/raw/ (enumerate only)
|
|
78
|
-
- packet (read only)
|
|
79
|
-
stop_rules:
|
|
80
|
-
- run-start telemetry write fails
|
|
81
|
-
- packet missing required fields
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Artifact update
|
|
85
|
-
|
|
86
|
-
Update `.taskchain_artifacts/polaris-catalog/current-state.json`:
|
|
87
|
-
- `run_id`, `issue_id`, `unattended`, `status: orienting`, `current_step_id: 01-orient-catalog`
|
|
88
|
-
- `affected_folders`, `raw_files: [...]`, `updated_at: <timestamp>`
|
|
89
|
-
|
|
90
|
-
## Next step
|
|
91
|
-
|
|
92
|
-
02-reconcile-polaris-md
|
package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/02-reconcile-polaris-md.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-catalog-step-02
|
|
3
|
-
description: Update affected POLARIS.md files to accurately reflect the current state of each folder after the completed work.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Step 02 — Reconcile POLARIS.md
|
|
7
|
-
|
|
8
|
-
Identical in behavior to `polaris-reconcile` step 02. See
|
|
9
|
-
`.polaris/skills/polaris-reconcile/steps/02-reconcile-polaris-md.md` for full detail.
|
|
10
|
-
|
|
11
|
-
## Summary
|
|
12
|
-
|
|
13
|
-
For each folder in `work_inventory.affected_folders`:
|
|
14
|
-
1. Assess which files changed and how they affect the folder's operational reality.
|
|
15
|
-
2. Read the current POLARIS.md.
|
|
16
|
-
3. Apply the confidence threshold (≥0.85 write, 0.70–0.84 write with note, <0.70 skip).
|
|
17
|
-
4. Write the full updated POLARIS.md if needed — full replacement, not append.
|
|
18
|
-
5. Record in `polaris_md_updates`.
|
|
19
|
-
|
|
20
|
-
POLARIS.md is NOT a changelog. Replace stale statements with current truth.
|
|
21
|
-
|
|
22
|
-
## Output
|
|
23
|
-
|
|
24
|
-
```yaml
|
|
25
|
-
polaris_md_updates: [
|
|
26
|
-
{ file: "<path>", action: "update", change_summary: "<≤50 words>" },
|
|
27
|
-
...
|
|
28
|
-
]
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Next step
|
|
32
|
-
|
|
33
|
-
03-reconcile-summary-md
|
package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/03-reconcile-summary-md.md
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-catalog-step-03
|
|
3
|
-
description: Refresh SUMMARY.md files to reflect current project state after the completed work.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Step 03 — Reconcile SUMMARY.md
|
|
7
|
-
|
|
8
|
-
Identical in behavior to `polaris-reconcile` step 03. See
|
|
9
|
-
`.polaris/skills/polaris-reconcile/steps/03-reconcile-summary-md.md` for full detail.
|
|
10
|
-
|
|
11
|
-
## Summary
|
|
12
|
-
|
|
13
|
-
For each folder in `work_inventory.affected_folders` that has a SUMMARY.md:
|
|
14
|
-
1. Assess staleness against the completed work.
|
|
15
|
-
2. Remove stale information. Replace superseded references. Preserve current understanding.
|
|
16
|
-
3. Write the full updated SUMMARY.md — net new line cap of `packet.constraints.max_summary_addition_lines` (default: 50).
|
|
17
|
-
4. Record in `summary_md_updates`.
|
|
18
|
-
|
|
19
|
-
SUMMARY.md is NOT a changelog. It must read as a coherent current-state snapshot.
|
|
20
|
-
|
|
21
|
-
## Required Structure (per June 5 doctrine)
|
|
22
|
-
|
|
23
|
-
SUMMARY.md must contain the following sections:
|
|
24
|
-
|
|
25
|
-
### Current State
|
|
26
|
-
Brief description of what is implemented, what is not yet, and known gaps.
|
|
27
|
-
|
|
28
|
-
### Route Health
|
|
29
|
-
Current operational condition. Example subsections:
|
|
30
|
-
- Healthy
|
|
31
|
-
- Monitoring
|
|
32
|
-
- Known Issues
|
|
33
|
-
- Recent Treatments
|
|
34
|
-
- Improvement Opportunities
|
|
35
|
-
|
|
36
|
-
Goal: Workers understand route condition in under 10 seconds. Not history, not doctrine, not implementation detail.
|
|
37
|
-
|
|
38
|
-
### Canonical References
|
|
39
|
-
YAML block listing navigation paths (not reading assignments):
|
|
40
|
-
|
|
41
|
-
```yaml
|
|
42
|
-
canonical_docs:
|
|
43
|
-
- smartdocs/active/runtime/worker-packet-contract.md
|
|
44
|
-
- smartdocs/active/runtime/librarian-closeout.md
|
|
45
|
-
- POLARIS.md
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
These are retrieval paths, not preload instructions.
|
|
49
|
-
|
|
50
|
-
## Reconciliation Behavior
|
|
51
|
-
|
|
52
|
-
- Do NOT overwrite an existing Route Health section if it has content
|
|
53
|
-
- Do NOT auto-populate Route Health status from runtime data — scaffold a skeleton only
|
|
54
|
-
- Canonical References block must use the `canonical_docs:` key
|
|
55
|
-
- Preserve any existing valid content; only update stale state sections
|
|
56
|
-
|
|
57
|
-
## Output
|
|
58
|
-
|
|
59
|
-
```yaml
|
|
60
|
-
summary_md_updates: [
|
|
61
|
-
{ file: "<path>", action: "update", change_summary: "<≤50 words>" },
|
|
62
|
-
{ file: "<path>", action: "no_change" },
|
|
63
|
-
{ file: "<path>", action: "path_not_allowed" },
|
|
64
|
-
...
|
|
65
|
-
]
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## Next step
|
|
69
|
-
|
|
70
|
-
04-classify-and-place
|
package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/04-classify-and-place.md
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-catalog-step-04
|
|
3
|
-
description: Classify documents in smartdocs/raw/, auto-place high-confidence files via CLI, and surface or hold low-confidence files based on mode.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Step 04 — Classify and place
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
Process all files enumerated in `current-state.json.raw_files`. Classify each one,
|
|
11
|
-
auto-place high-confidence results via the Polaris CLI, and handle low-confidence files
|
|
12
|
-
according to the session mode (`packet.unattended`).
|
|
13
|
-
|
|
14
|
-
If `raw_files` is empty: record as no-op and proceed to step 05.
|
|
15
|
-
|
|
16
|
-
## Classification table
|
|
17
|
-
|
|
18
|
-
| Class | Target path | Auto-place on high confidence |
|
|
19
|
-
|---|---|---|
|
|
20
|
-
| `runtime-summary` | `smartdocs/runtime/summaries/` | yes |
|
|
21
|
-
| `run-report` | `smartdocs/runtime/run-reports/` | yes |
|
|
22
|
-
| `spec-raw` | `smartdocs/raw/` | no-op (already there) |
|
|
23
|
-
| `spec-active` | `smartdocs/specs/active/` | yes |
|
|
24
|
-
| `audit-finding` | `smartdocs/audits/findings/` | yes |
|
|
25
|
-
| `doctrine-candidate` | `smartdocs/doctrine/candidate/` | yes |
|
|
26
|
-
| `architecture` | `smartdocs/architecture/` | yes |
|
|
27
|
-
| `decision` | `smartdocs/decisions/` | yes |
|
|
28
|
-
| `deprecated-noise` | `smartdocs/runtime/generated/` | yes |
|
|
29
|
-
|
|
30
|
-
**Confidence is the only gate.** High confidence → place regardless of authority level.
|
|
31
|
-
Low confidence → ask user (interactive) or leave in raw (unattended).
|
|
32
|
-
|
|
33
|
-
## Classification process (per file)
|
|
34
|
-
|
|
35
|
-
1. Read the document.
|
|
36
|
-
2. Check for explicit Polaris front-matter (`status`, `authority`, `classification`).
|
|
37
|
-
If present and unambiguous → **confidence: high**.
|
|
38
|
-
3. Otherwise infer from content signals:
|
|
39
|
-
- Polaris architectural assertions / "how things should work" → `doctrine-candidate`
|
|
40
|
-
- Structured spec with Spec ID, Status, Purpose headings → `spec-active`
|
|
41
|
-
- Run output, telemetry summaries, session notes → `runtime-summary`
|
|
42
|
-
- Structured run output with metrics → `run-report`
|
|
43
|
-
- `FINDING:` markers or audit-style analysis → `audit-finding`
|
|
44
|
-
- ADR-style decision record → `decision`
|
|
45
|
-
- Architectural diagrams or structural design context → `architecture`
|
|
46
|
-
- Low-signal, transient, or auto-generated → `deprecated-noise`
|
|
47
|
-
- Unclear or multiple signals → low confidence, class remains `spec-raw`
|
|
48
|
-
4. Assign confidence:
|
|
49
|
-
- **high**: explicit front-matter, or exactly one signal matches unambiguously
|
|
50
|
-
- **low**: multiple signals, sparse content, or no clear signal
|
|
51
|
-
|
|
52
|
-
## Placement actions
|
|
53
|
-
|
|
54
|
-
### High confidence
|
|
55
|
-
|
|
56
|
-
Run the appropriate CLI command immediately. Do not pause for user input.
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
# All classes except doctrine-candidate:
|
|
60
|
-
npm run polaris -- docs ingest --file <path>
|
|
61
|
-
|
|
62
|
-
# doctrine-candidate:
|
|
63
|
-
npm run polaris -- doctrine draft <path>
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Record in `docs_placed`.
|
|
67
|
-
|
|
68
|
-
### Low confidence — interactive mode (`packet.unattended: false`)
|
|
69
|
-
|
|
70
|
-
Surface each file to the user:
|
|
71
|
-
|
|
72
|
-
```text
|
|
73
|
-
needs-input: <filename>
|
|
74
|
-
Inferred class: <class> [confidence: low]
|
|
75
|
-
Reason: <why confidence is low>
|
|
76
|
-
Where should this go? Options:
|
|
77
|
-
1. <class> → <target> (inferred)
|
|
78
|
-
2. Leave in smartdocs/raw/
|
|
79
|
-
3. [other class]
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Wait for user response before placing. Record the user's decision in `docs_placed` or
|
|
83
|
-
`docs_held` accordingly.
|
|
84
|
-
|
|
85
|
-
### Low confidence — unattended mode (`packet.unattended: true`)
|
|
86
|
-
|
|
87
|
-
Leave the file in `smartdocs/raw/`. Record in `docs_held` with reason. Do not block.
|
|
88
|
-
Do not fail the run.
|
|
89
|
-
|
|
90
|
-
## After batch
|
|
91
|
-
|
|
92
|
-
Run map update:
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
npm run polaris -- map update --changed
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
## Hard rules
|
|
99
|
-
|
|
100
|
-
- Use the CLI for all file moves. Never use `mv` or `cp` directly on `smartdocs/` files.
|
|
101
|
-
- If the CLI rejects a file as ignored (`POLARIS.md`, `SUMMARY.md`, `README.md`): leave in
|
|
102
|
-
raw, record as ineligible in `docs_held`.
|
|
103
|
-
- If a target path collision is detected: record as a blocker for that file. Do not
|
|
104
|
-
overwrite without explicit user approval.
|
|
105
|
-
- Source files already in `smartdocs/` sub-directories other than `raw/` are out of scope
|
|
106
|
-
for this step. Skip them.
|
|
107
|
-
|
|
108
|
-
## Output
|
|
109
|
-
|
|
110
|
-
```yaml
|
|
111
|
-
docs_placed: [{ file: "<source>", target: "<path>", class: "<class>", confidence: "high" }]
|
|
112
|
-
docs_held: [{ file: "<source>", reason: "<low-confidence|ineligible|collision>", detail: "..." }]
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Next step
|
|
116
|
-
|
|
117
|
-
05-catalog-commit
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-catalog-step-05
|
|
3
|
-
description: Commit all cognition and document changes as a single sealed catalog commit.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Step 05 — Catalog commit
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
All changes produced by steps 02–04 must be committed as a single sealed commit.
|
|
11
|
-
This separates implementation commits from documentation and cognition reconciliation.
|
|
12
|
-
|
|
13
|
-
## Commit constraints
|
|
14
|
-
|
|
15
|
-
The catalog commit MUST:
|
|
16
|
-
- Contain only files from `packet.allowed_write_paths`
|
|
17
|
-
- Contain no implementation source code
|
|
18
|
-
- Contain no runtime state files (`current-state.json`, telemetry JSONL, cluster-state)
|
|
19
|
-
|
|
20
|
-
If any staged file would violate these constraints, unstage it and record as a blocker.
|
|
21
|
-
|
|
22
|
-
## No-change case
|
|
23
|
-
|
|
24
|
-
If steps 02–04 produced no file changes, this step is a no-op. Record `commit_sha: null`.
|
|
25
|
-
Do not create an empty commit.
|
|
26
|
-
|
|
27
|
-
## Commit message format
|
|
28
|
-
|
|
29
|
-
```text
|
|
30
|
-
docs(catalog): reconcile cognition and classify docs for <issue_id>
|
|
31
|
-
|
|
32
|
-
Run: <run_id>
|
|
33
|
-
Issue: <issue_id>
|
|
34
|
-
Files updated:
|
|
35
|
-
- POLARIS.md: <count> files
|
|
36
|
-
- SUMMARY.md: <count> files
|
|
37
|
-
- docs placed: <count>
|
|
38
|
-
- docs held in raw: <count>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Actions
|
|
42
|
-
|
|
43
|
-
### 5.1 Pre-commit validation
|
|
44
|
-
|
|
45
|
-
Verify:
|
|
46
|
-
1. Every file to be committed is in `packet.allowed_write_paths`.
|
|
47
|
-
2. No file is in `packet.prohibited_write_paths`.
|
|
48
|
-
3. At least one non-empty change exists.
|
|
49
|
-
|
|
50
|
-
If prohibited files are staged: `git reset HEAD <file>` before committing.
|
|
51
|
-
|
|
52
|
-
### 5.2 Stage changed files
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
git add <polaris_md_updates[*].file where action == "update">
|
|
56
|
-
git add <summary_md_updates[*].file where action == "update">
|
|
57
|
-
git add <docs_placed[*].target>
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### 5.3 Verify staged files
|
|
61
|
-
|
|
62
|
-
Run `git diff --cached --name-only` and confirm all staged files are in
|
|
63
|
-
`packet.allowed_write_paths` and none are in `packet.prohibited_write_paths`.
|
|
64
|
-
|
|
65
|
-
### 5.4 Commit
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
git commit -m "<commit message>"
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Capture the resulting commit SHA.
|
|
72
|
-
|
|
73
|
-
### 5.5 Finalize
|
|
74
|
-
|
|
75
|
-
Update `.taskchain_artifacts/polaris-catalog/current-state.json`:
|
|
76
|
-
- `status: complete`
|
|
77
|
-
- `current_step_id: 05-catalog-commit`
|
|
78
|
-
- `commit_sha: <sha or null>`
|
|
79
|
-
- `completed_at: <ISO timestamp>`
|
|
80
|
-
|
|
81
|
-
Emit `catalog-commit` and `catalog-complete` telemetry events.
|
|
82
|
-
|
|
83
|
-
Report summary:
|
|
84
|
-
```text
|
|
85
|
-
polaris-catalog complete
|
|
86
|
-
Issue: <issue_id>
|
|
87
|
-
Mode: interactive | unattended
|
|
88
|
-
POLARIS.md: <count> files updated
|
|
89
|
-
SUMMARY.md: <count> files updated
|
|
90
|
-
Docs placed: <count>
|
|
91
|
-
Docs held raw: <count> (<filenames if any>)
|
|
92
|
-
Commit: <sha> | no changes
|
|
93
|
-
Blockers: <none | list>
|
|
94
|
-
```
|