@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,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "polaris-reconcile-chain",
|
|
3
|
-
"steps": [
|
|
4
|
-
"01-orient-reconcile",
|
|
5
|
-
"02-reconcile-polaris-md",
|
|
6
|
-
"03-reconcile-summary-md",
|
|
7
|
-
"04-reconcile-commit"
|
|
8
|
-
],
|
|
9
|
-
"terminal_steps": ["04-reconcile-commit"],
|
|
10
|
-
"scope": "cognition-only",
|
|
11
|
-
"forbidden_actions": [
|
|
12
|
-
"src file mutations",
|
|
13
|
-
"runtime state file mutations",
|
|
14
|
-
"document ingestion or promotion",
|
|
15
|
-
"polaris loop continue",
|
|
16
|
-
"polaris finalize",
|
|
17
|
-
"git push",
|
|
18
|
-
"pr creation"
|
|
19
|
-
]
|
|
20
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-reconcile-chain
|
|
3
|
-
description: Step order, CLI reference, canonical paths, run ID format, telemetry, and artifact authority for polaris-reconcile.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# polaris-reconcile 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 or change scope from
|
|
13
|
-
conversation context.
|
|
14
|
-
|
|
15
|
-
## Step traversal order
|
|
16
|
-
|
|
17
|
-
```text
|
|
18
|
-
01-orient-reconcile
|
|
19
|
-
02-reconcile-polaris-md
|
|
20
|
-
03-reconcile-summary-md
|
|
21
|
-
04-reconcile-commit
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Read the current step's file in `steps/` before acting. Do not read ahead.
|
|
25
|
-
|
|
26
|
-
## Canonical paths
|
|
27
|
-
|
|
28
|
-
| State | Path |
|
|
29
|
-
|---|---|
|
|
30
|
-
| Skill state | `.taskchain_artifacts/polaris-reconcile/current-state.json` |
|
|
31
|
-
| Telemetry | `.taskchain_artifacts/polaris-reconcile/runs/<run-id>/telemetry.jsonl` |
|
|
32
|
-
|
|
33
|
-
## Run ID format
|
|
34
|
-
|
|
35
|
-
`polaris-reconcile-<slug>-<YYYY-MM-DD>-<seq>` — e.g. `polaris-reconcile-POL-257-2026-06-04-001`
|
|
36
|
-
|
|
37
|
-
## Telemetry
|
|
38
|
-
|
|
39
|
-
Append-only JSONL. Required fields: `event`, `run_id`, `timestamp`.
|
|
40
|
-
|
|
41
|
-
| Event | Trigger |
|
|
42
|
-
|---|---|
|
|
43
|
-
| `run-start` | Begin orient step |
|
|
44
|
-
| `step-complete` | End of every step |
|
|
45
|
-
| `polaris-md-updated` | POLARIS.md written for a folder |
|
|
46
|
-
| `summary-md-updated` | SUMMARY.md written for a folder |
|
|
47
|
-
| `reconcile-commit` | Commit created |
|
|
48
|
-
| `reconcile-complete` | All steps done |
|
|
49
|
-
|
|
50
|
-
## Artifact authority
|
|
51
|
-
|
|
52
|
-
`.taskchain_artifacts/polaris-reconcile/current-state.json` is the sole authoritative
|
|
53
|
-
live state surface.
|
|
54
|
-
|
|
55
|
-
- Update after every completed step — before advancing.
|
|
56
|
-
- A step is NOT complete until the state update succeeds.
|
|
57
|
-
- If the update fails: stop and report the persistence failure.
|
|
58
|
-
|
|
59
|
-
## Forbidden actions
|
|
60
|
-
|
|
61
|
-
- src file mutations
|
|
62
|
-
- runtime state file mutations
|
|
63
|
-
- document ingestion or promotion
|
|
64
|
-
- polaris loop continue
|
|
65
|
-
- polaris finalize
|
|
66
|
-
- git push
|
|
67
|
-
- PR creation
|
package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/steps/01-orient-reconcile.md
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-reconcile-step-01
|
|
3
|
-
description: Generate run_id, emit run-start telemetry, load packet, validate schema, and establish work_inventory.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Step 01 — Orient reconcile
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
Establish bounded execution context before touching any files. Validate the packet,
|
|
11
|
-
confirm which folders are in scope, and build the work inventory.
|
|
12
|
-
|
|
13
|
-
## Actions
|
|
14
|
-
|
|
15
|
-
### 1.1 Generate run_id
|
|
16
|
-
|
|
17
|
-
Format: `polaris-reconcile-<issue-slug>-<YYYY-MM-DD>-<seq>`
|
|
18
|
-
Example: `polaris-reconcile-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-reconcile/runs/<run-id>
|
|
26
|
-
echo '{"event":"run-start","run_id":"<run-id>","issue_id":"<issue_id>","timestamp":"<ISO>"}' \
|
|
27
|
-
>> .taskchain_artifacts/polaris-reconcile/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 the packet contains all required fields:
|
|
35
|
-
`run_id`, `issue_id`, `affected_folders`, `work_inventory`, `allowed_write_paths`,
|
|
36
|
-
`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` — list of folder paths 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` — any 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 as no-op, skip to step 04.
|
|
51
|
-
|
|
52
|
-
### 1.5 Restate working context
|
|
53
|
-
|
|
54
|
-
Summarize in under 8 bullets:
|
|
55
|
-
- `run_id` and fresh/resumed
|
|
56
|
-
- Bound issue
|
|
57
|
-
- Affected folders (count and paths)
|
|
58
|
-
- `allowed_write_paths` count
|
|
59
|
-
- `prohibited_write_paths` count
|
|
60
|
-
|
|
61
|
-
## Scope declarations
|
|
62
|
-
|
|
63
|
-
```yaml
|
|
64
|
-
allowed_files:
|
|
65
|
-
- .polaris/skills/polaris-reconcile/SKILL.md
|
|
66
|
-
- .polaris/skills/polaris-reconcile/chain.md
|
|
67
|
-
- .taskchain_artifacts/polaris-reconcile/current-state.json
|
|
68
|
-
- packet (read only)
|
|
69
|
-
stop_rules:
|
|
70
|
-
- run-start telemetry write fails
|
|
71
|
-
- packet missing required fields
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Artifact update
|
|
75
|
-
|
|
76
|
-
Update `.taskchain_artifacts/polaris-reconcile/current-state.json`:
|
|
77
|
-
- `run_id`, `issue_id`, `status: orienting`, `current_step_id: 01-orient-reconcile`
|
|
78
|
-
- `affected_folders`, `updated_at: <timestamp>`
|
|
79
|
-
|
|
80
|
-
## Next step
|
|
81
|
-
|
|
82
|
-
02-reconcile-polaris-md
|
package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/steps/02-reconcile-polaris-md.md
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-reconcile-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
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
Each affected folder's POLARIS.md must accurately describe the current reality of that folder.
|
|
11
|
-
This step performs actual reconciliation — not append-only notes.
|
|
12
|
-
|
|
13
|
-
## What POLARIS.md Represents
|
|
14
|
-
|
|
15
|
-
A folder's POLARIS.md is a living operational guide. It should describe:
|
|
16
|
-
- Current capabilities (what this folder does now)
|
|
17
|
-
- Current architecture (how it is structured now)
|
|
18
|
-
- Current responsibilities (what owns what)
|
|
19
|
-
- Current constraints (what is forbidden)
|
|
20
|
-
- Current folder state (what is present and what is not)
|
|
21
|
-
|
|
22
|
-
POLARIS.md is NOT a changelog. Do not append "added in POL-123". Replace stale
|
|
23
|
-
statements with current truth.
|
|
24
|
-
|
|
25
|
-
## When to Update
|
|
26
|
-
|
|
27
|
-
Update a folder's POLARIS.md when ALL of the following are true:
|
|
28
|
-
1. Files in that folder were changed by the completed work.
|
|
29
|
-
2. The changes materially affect the folder's responsibilities, architecture, or constraints.
|
|
30
|
-
3. The current POLARIS.md content is factually wrong or incomplete as a result.
|
|
31
|
-
|
|
32
|
-
Do NOT update for: formatting fixes, test additions without behavior change,
|
|
33
|
-
internal refactors that leave operational guidance still accurate.
|
|
34
|
-
|
|
35
|
-
## When NOT to Update
|
|
36
|
-
|
|
37
|
-
- The folder was not touched by the completed work.
|
|
38
|
-
- The changes are in sub-packages that have their own POLARIS.md.
|
|
39
|
-
- The existing POLARIS.md correctly describes the outcome of the changes.
|
|
40
|
-
|
|
41
|
-
## Actions
|
|
42
|
-
|
|
43
|
-
For each folder in `work_inventory.affected_folders`:
|
|
44
|
-
|
|
45
|
-
### 2.1 Assess the Impact
|
|
46
|
-
|
|
47
|
-
1. Identify which files in this folder were changed (from `work_inventory.all_changed_files`).
|
|
48
|
-
2. Read the current POLARIS.md content for this folder (from `work_inventory.polaris_md_files`).
|
|
49
|
-
3. Read cognition notes for this folder (from `work_inventory.pending_cognition_notes`).
|
|
50
|
-
4. Cross-reference with child summaries and work summary to understand what changed.
|
|
51
|
-
|
|
52
|
-
### 2.2 Determine Required Changes
|
|
53
|
-
|
|
54
|
-
For each stale or missing statement in POLARIS.md:
|
|
55
|
-
- If a capability was added: add it to the appropriate section.
|
|
56
|
-
- If a capability was changed: update the statement in place.
|
|
57
|
-
- If a capability was removed: remove the statement.
|
|
58
|
-
- If a constraint was added: add to constraints section.
|
|
59
|
-
- If a constraint was lifted: remove it.
|
|
60
|
-
- If architecture changed: update the architecture description.
|
|
61
|
-
|
|
62
|
-
**Reconciliation principle:** The resulting POLARIS.md must describe the folder as it
|
|
63
|
-
exists AFTER the work completed. Read the code if necessary to confirm the current state.
|
|
64
|
-
|
|
65
|
-
### 2.3 Confidence Threshold
|
|
66
|
-
|
|
67
|
-
Assess confidence (0.0–1.0) in the proposed update:
|
|
68
|
-
- `≥ 0.85`: Apply the update.
|
|
69
|
-
- `0.70–0.84`: Apply with a note in the result that confidence was moderate.
|
|
70
|
-
- `< 0.70`: Skip the update for this folder, record as a blocker in the result.
|
|
71
|
-
|
|
72
|
-
Low confidence triggers: ambiguous changed_files, contradictory notes, minimal diff context.
|
|
73
|
-
|
|
74
|
-
### 2.4 Write
|
|
75
|
-
|
|
76
|
-
If the assessment confirms an update is needed and confidence is sufficient:
|
|
77
|
-
1. Verify the POLARIS.md path is in `packet.allowed_write_paths`.
|
|
78
|
-
2. Write the full updated content (not a patch — full file replacement).
|
|
79
|
-
3. Record in the running `polaris_md_updates` list.
|
|
80
|
-
|
|
81
|
-
If the path is in `packet.prohibited_write_paths`, record as a blocker and skip.
|
|
82
|
-
|
|
83
|
-
## Output
|
|
84
|
-
|
|
85
|
-
Running list for step 04:
|
|
86
|
-
```yaml
|
|
87
|
-
polaris_md_updates: [
|
|
88
|
-
{ file: "<path>", action: "update", change_summary: "<≤50 words>" },
|
|
89
|
-
...
|
|
90
|
-
]
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## Next step
|
|
94
|
-
|
|
95
|
-
03-reconcile-summary-md
|
package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/steps/03-reconcile-summary-md.md
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-reconcile-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
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
SUMMARY.md files serve as continuation artifacts, project snapshots, and handoff documents.
|
|
11
|
-
A future session loading SUMMARY.md must be able to continue work immediately without
|
|
12
|
-
replaying history.
|
|
13
|
-
|
|
14
|
-
The goal is that SUMMARY.md reflects the current state of the project AFTER the completed
|
|
15
|
-
work, not a log of what happened.
|
|
16
|
-
|
|
17
|
-
## What SUMMARY.md Represents
|
|
18
|
-
|
|
19
|
-
- Current understanding of the system (what is true now)
|
|
20
|
-
- Canonical references to active specs and doctrine
|
|
21
|
-
- Architecture snapshots that are no longer in flux
|
|
22
|
-
- Handoff context for continuation sessions
|
|
23
|
-
|
|
24
|
-
SUMMARY.md is NOT:
|
|
25
|
-
- A changelog
|
|
26
|
-
- A history of execution events
|
|
27
|
-
- A list of completed issues
|
|
28
|
-
|
|
29
|
-
## When to Update
|
|
30
|
-
|
|
31
|
-
Update a folder's SUMMARY.md when:
|
|
32
|
-
- Linked specs or doctrine changed significantly
|
|
33
|
-
- Canon relationships changed (new spec supersedes old; architecture changed)
|
|
34
|
-
- Architecture meaning changed in ways not captured by POLARIS.md
|
|
35
|
-
- Current understanding described in SUMMARY.md is now stale or contradicted by completed work
|
|
36
|
-
|
|
37
|
-
Do NOT update for: ephemeral execution events, minor bug fixes, test additions without
|
|
38
|
-
behavior change, changes that do not affect the reader's understanding.
|
|
39
|
-
|
|
40
|
-
## Reconciliation Principles
|
|
41
|
-
|
|
42
|
-
### Remove Stale Information
|
|
43
|
-
|
|
44
|
-
Identify statements that are contradicted by the completed work. Remove or replace them.
|
|
45
|
-
Do not preserve stale content by appending "as of POL-XXX".
|
|
46
|
-
|
|
47
|
-
### Replace Superseded Information
|
|
48
|
-
|
|
49
|
-
When a spec or decision that SUMMARY.md references has been superseded, update the reference
|
|
50
|
-
to point to the current authority.
|
|
51
|
-
|
|
52
|
-
### Preserve Current Understanding
|
|
53
|
-
|
|
54
|
-
Retain content that accurately describes current reality. Preservation is not append — it is
|
|
55
|
-
selection of what remains true.
|
|
56
|
-
|
|
57
|
-
### Root-level SUMMARY.md
|
|
58
|
-
|
|
59
|
-
The root-level SUMMARY.md (if in `packet.affected_folders`) must reflect the overall project
|
|
60
|
-
state after the completed work. Give it higher priority than folder-level SUMMARY.md files.
|
|
61
|
-
|
|
62
|
-
## Actions
|
|
63
|
-
|
|
64
|
-
For each folder in `work_inventory.affected_folders` that has a SUMMARY.md:
|
|
65
|
-
|
|
66
|
-
### 3.1 Assess Staleness
|
|
67
|
-
|
|
68
|
-
1. Read the current SUMMARY.md (from `work_inventory.summary_md_files`).
|
|
69
|
-
2. Cross-reference with completed work: changed specs, new capabilities, new constraints.
|
|
70
|
-
3. Identify sections that are stale, contradicted, or superseded.
|
|
71
|
-
4. Identify new information that should be captured.
|
|
72
|
-
|
|
73
|
-
### 3.2 Refresh
|
|
74
|
-
|
|
75
|
-
Produce the updated SUMMARY.md content:
|
|
76
|
-
1. Remove sections that are no longer accurate.
|
|
77
|
-
2. Update references to specs and doctrine that changed.
|
|
78
|
-
3. Add brief architecture notes for significant new capabilities (if they help future sessions).
|
|
79
|
-
4. Ensure the document still reads as a coherent current-state snapshot, not a list of events.
|
|
80
|
-
|
|
81
|
-
**Constraint:** SUMMARY.md updates must not exceed `packet.constraints.max_summary_addition_lines`
|
|
82
|
-
net new lines per folder (default: 50 lines). Replacements (same or fewer lines) do not
|
|
83
|
-
count toward this limit.
|
|
84
|
-
|
|
85
|
-
### 3.3 Write
|
|
86
|
-
|
|
87
|
-
1. Verify the SUMMARY.md path is in `packet.allowed_write_paths`.
|
|
88
|
-
If not allowed, skip this file and record with `action: "path_not_allowed"`.
|
|
89
|
-
2. Write the full updated content.
|
|
90
|
-
3. Record in the running `summary_md_updates` list.
|
|
91
|
-
|
|
92
|
-
If no update is needed, record no-change with `action: "no_change"`.
|
|
93
|
-
|
|
94
|
-
## Output
|
|
95
|
-
|
|
96
|
-
Running list for step 04:
|
|
97
|
-
```yaml
|
|
98
|
-
summary_md_updates: [
|
|
99
|
-
{ file: "<path>", action: "update", change_summary: "<≤50 words>" },
|
|
100
|
-
{ file: "<path>", action: "no_change" },
|
|
101
|
-
{ file: "<path>", action: "path_not_allowed" },
|
|
102
|
-
...
|
|
103
|
-
]
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Next step
|
|
107
|
-
|
|
108
|
-
04-reconcile-commit
|
package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/steps/04-reconcile-commit.md
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-reconcile-step-04
|
|
3
|
-
description: Commit all cognition changes (POLARIS.md and SUMMARY.md updates) as a single sealed reconcile commit.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Step 04 — Reconcile commit
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
All cognition changes produced by steps 02–03 must be committed as a single sealed commit.
|
|
11
|
-
This separates implementation commits from documentation reconciliation commits.
|
|
12
|
-
|
|
13
|
-
## Commit constraints
|
|
14
|
-
|
|
15
|
-
The reconcile commit MUST:
|
|
16
|
-
- Contain only files from `packet.allowed_write_paths`
|
|
17
|
-
- Contain only POLARIS.md and SUMMARY.md changes — no implementation source, no runtime state
|
|
18
|
-
- Be a distinct commit from any implementation commit
|
|
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–03 produced no file changes (everything was already current), this step is a
|
|
25
|
-
no-op. Record `commit_sha: null`. Do not create an empty commit.
|
|
26
|
-
|
|
27
|
-
## Commit message format
|
|
28
|
-
|
|
29
|
-
```text
|
|
30
|
-
docs(reconcile): update cognition 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
|
-
```
|
|
38
|
-
|
|
39
|
-
## Actions
|
|
40
|
-
|
|
41
|
-
### 4.1 Pre-commit validation
|
|
42
|
-
|
|
43
|
-
Verify:
|
|
44
|
-
1. Every file to be committed is in `packet.allowed_write_paths`.
|
|
45
|
-
2. No file is in `packet.prohibited_write_paths`.
|
|
46
|
-
3. At least one non-empty change exists.
|
|
47
|
-
|
|
48
|
-
If prohibited files are staged: `git reset HEAD <file>` before committing.
|
|
49
|
-
|
|
50
|
-
### 4.2 Stage changed files
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
git add <polaris_md_updates[*].file where action == "update">
|
|
54
|
-
git add <summary_md_updates[*].file where action == "update">
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### 4.3 Verify staged files
|
|
58
|
-
|
|
59
|
-
Run `git diff --cached --name-only` and confirm all staged files are in
|
|
60
|
-
`packet.allowed_write_paths` and none are in `packet.prohibited_write_paths`.
|
|
61
|
-
|
|
62
|
-
### 4.4 Commit
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
git commit -m "<commit message>"
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Capture the resulting commit SHA.
|
|
69
|
-
|
|
70
|
-
### 4.5 Finalize
|
|
71
|
-
|
|
72
|
-
Update `.taskchain_artifacts/polaris-reconcile/current-state.json`:
|
|
73
|
-
- `status: complete`
|
|
74
|
-
- `current_step_id: 04-reconcile-commit`
|
|
75
|
-
- `commit_sha: <sha or null>`
|
|
76
|
-
- `completed_at: <ISO timestamp>`
|
|
77
|
-
|
|
78
|
-
Emit `reconcile-commit` and `reconcile-complete` telemetry events.
|
|
79
|
-
|
|
80
|
-
Report summary:
|
|
81
|
-
```text
|
|
82
|
-
polaris-reconcile complete
|
|
83
|
-
Issue: <issue_id>
|
|
84
|
-
POLARIS.md: <count> files updated
|
|
85
|
-
SUMMARY.md: <count> files updated
|
|
86
|
-
Commit: <sha> | no changes
|
|
87
|
-
Blockers: <none | list>
|
|
88
|
-
```
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polaris-run
|
|
3
|
-
description: Execute one governed Polaris parent cluster per session, dispatching children until all are done or the configured budget is exhausted (budget.mode and budget.max_children in polaris.config.json), with explicit dispatch boundaries and post-child checkpointing.
|
|
4
|
-
role: foreman
|
|
5
|
-
role_file: .polaris/roles/foreman.md
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Command entrypoints
|
|
9
|
-
|
|
10
|
-
This skill is the target for the following user commands:
|
|
11
|
-
|
|
12
|
-
- `polaris-run <POL-###>`
|
|
13
|
-
- `run polaris-run on issue <POL-###>`
|
|
14
|
-
- `run polaris-run on <POL-###>`
|
|
15
|
-
- `polaris-finalize`
|
|
16
|
-
- `run polaris-finalize`
|
|
17
|
-
|
|
18
|
-
When any of these commands are issued, load this skill packet **first** before any other action.
|
|
19
|
-
If the command specifies an issue ID (e.g., `POL-249`), bind exactly that issue. Commands without
|
|
20
|
-
an issue ID (e.g., `polaris-finalize`) do not require issue binding. `polaris-finalize` routes
|
|
21
|
-
here because finalization is part of the run lifecycle governed by this skill. See
|
|
22
|
-
`.polaris/skills/ROUTING.md` for the full routing protocol.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Polaris Skill Bootloader
|
|
27
|
-
|
|
28
|
-
**Before proceeding, you must obtain a skill packet from the Polaris runtime.**
|
|
29
|
-
|
|
30
|
-
Run the following command:
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
npm run polaris -- skill packet run
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
- Do not begin work until a packet is returned.
|
|
37
|
-
- Treat the packet as your authoritative instruction source.
|
|
38
|
-
- The packet defines your active role, authority boundaries, prohibited actions, deliverables, and stop conditions.
|
|
39
|
-
- If no packet is produced, stop and report: **Polaris could not authorize this run.**
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
# polaris-run
|
|
44
|
-
|
|
45
|
-
Use this skill when the user asks to run a governed Polaris implementation cluster or standalone Polaris issue.
|
|
46
|
-
|
|
47
|
-
polaris-run only targets IMPLEMENT parents. If Step 01 detects a parent title
|
|
48
|
-
starting with `ANALYZE:` or an `analyze` label, halt with:
|
|
49
|
-
`polaris-run targets IMPLEMENT parents, not ANALYZE issues. Run polaris-analyze first to create an IMPLEMENT parent.`
|
|
50
|
-
|
|
51
|
-
## Related doctrine
|
|
52
|
-
|
|
53
|
-
See `docs/Polaris/spec/polaris-implementation-plan.md` for the Polaris architecture reference.
|
|
54
|
-
|
|
55
|
-
## How to execute
|
|
56
|
-
|
|
57
|
-
1. Read `chain.md` — it is the route map for this workflow.
|
|
58
|
-
2. Read `.taskchain_artifacts/polaris-run/current-state.json` — it holds shared runtime state across sessions.
|
|
59
|
-
3. Execute one step at a time in the order `chain.md` specifies.
|
|
60
|
-
4. After each durable checkpoint, update `.taskchain_artifacts/polaris-run/current-state.json` before advancing.
|
|
61
|
-
5. Do not skip steps.
|
|
62
|
-
6. Do not report completion until `.taskchain_artifacts/polaris-run/current-state.json` has `status: complete`.
|
|
63
|
-
|
|
64
|
-
## Artifact authority rule
|
|
65
|
-
|
|
66
|
-
`.taskchain_artifacts/polaris-run/current-state.json` is the authoritative run ledger, not an optional note.
|
|
67
|
-
|
|
68
|
-
A step is not complete until its state update has been written successfully.
|
|
69
|
-
|
|
70
|
-
If the artifact update fails or cannot be verified, stop and report the artifact failure instead of continuing.
|
|
71
|
-
|
|
72
|
-
## Hard rules
|
|
73
|
-
|
|
74
|
-
- Implementation work only — source code, tests, config changes.
|
|
75
|
-
- One child per commit. Never batch multiple children into one commit.
|
|
76
|
-
- Do not implement child work inline in the parent. Use `polaris loop dispatch` to dispatch a worker.
|
|
77
|
-
- `polaris loop continue` is post-child only. Do not call it before the worker has returned.
|
|
78
|
-
- Do not call `polaris loop continue` without a preceding commit.
|
|
79
|
-
- `polaris finalize` replaces manual push and PR — do not push or open PRs directly.
|
|
80
|
-
|
|
81
|
-
## Runtime-enforced dispatch boundaries
|
|
82
|
-
|
|
83
|
-
**The runtime enforces dispatch boundaries. Parent/orchestrator inline implementation is forbidden.**
|
|
84
|
-
|
|
85
|
-
The Polaris runtime tracks a `dispatch_boundary` record in `current-state.json` with monotonic epoch counters:
|
|
86
|
-
|
|
87
|
-
```json
|
|
88
|
-
{
|
|
89
|
-
"dispatch_boundary": {
|
|
90
|
-
"dispatch_epoch": 1,
|
|
91
|
-
"continue_epoch": 0,
|
|
92
|
-
"last_dispatched_child": "POL-23"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Enforcement rules
|
|
98
|
-
|
|
99
|
-
- `polaris loop continue` **will hard-fail** if `dispatch_epoch === continue_epoch` (no dispatch preceded this call).
|
|
100
|
-
- `polaris loop dispatch` **will hard-fail** if `active_child` is already set (previous dispatch not completed).
|
|
101
|
-
- `polaris loop run` (parent loop) **will hard-fail** if `active_child` is set at the start of a dispatch iteration.
|
|
102
|
-
|
|
103
|
-
These are not warnings. They are runtime errors with `process.exit(1)`.
|
|
104
|
-
|
|
105
|
-
### Allowed state machine transitions
|
|
106
|
-
|
|
107
|
-
```
|
|
108
|
-
idle → dispatched (polaris loop dispatch)
|
|
109
|
-
checkpointed → dispatched (polaris loop dispatch, next child)
|
|
110
|
-
dispatched → worker-completed (worker CompactReturn)
|
|
111
|
-
worker-completed → checkpointed (polaris loop continue)
|
|
112
|
-
dispatched → checkpointed (polaris loop continue when worker wrote own completion)
|
|
113
|
-
checkpointed → cluster-complete (polaris loop continue, no remaining children)
|
|
114
|
-
* → blocked (polaris loop abort)
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Disallowed transitions (runtime-rejected)
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
idle → worker-completed (worker completed without dispatch)
|
|
121
|
-
idle → checkpointed (continue called without dispatch)
|
|
122
|
-
idle → cluster-complete (cluster done without dispatch path)
|
|
123
|
-
selected → completed (inline completion — forbidden)
|
|
124
|
-
selected → checkpointed (checkpoint without dispatch — forbidden)
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Telemetry events emitted on violation
|
|
128
|
-
|
|
129
|
-
| Event | When |
|
|
130
|
-
|---|---|
|
|
131
|
-
| `dispatch-required` | `polaris loop continue` called without prior dispatch |
|
|
132
|
-
| `invalid-inline-attempt` | `polaris loop dispatch` called with `active_child` already set |
|
|
133
|
-
| `illegal-state-transition` | Parent tries to complete child without dispatch boundary |
|
|
134
|
-
|
|
135
|
-
These events are append-only to `telemetry.jsonl` and appear only on failure paths.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "polaris-run-chain",
|
|
3
|
-
"steps": [
|
|
4
|
-
"01-orient-cluster",
|
|
5
|
-
"02-prepare-branch",
|
|
6
|
-
"03-select-child",
|
|
7
|
-
"04-execute-child",
|
|
8
|
-
"05-validate-child",
|
|
9
|
-
"06-commit-and-update-linear",
|
|
10
|
-
"07-decide-continuation",
|
|
11
|
-
"08-final-delivery"
|
|
12
|
-
],
|
|
13
|
-
"loop_re_entry": "03-select-child",
|
|
14
|
-
"terminal_steps": ["08-final-delivery"],
|
|
15
|
-
"polaris_calls": {
|
|
16
|
-
"07-decide-continuation": ["polaris loop dispatch", "polaris loop continue"],
|
|
17
|
-
"08-final-delivery": ["polaris finalize"]
|
|
18
|
-
}
|
|
19
|
-
}
|