@lsctech/polaris 0.1.1 → 0.1.3
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 +187 -0
- package/dist/cli/adopt-cognition.js +1 -2
- package/dist/cli/adopt-genesis.js +84 -0
- package/dist/cli/adopt-instructions.js +1 -2
- package/dist/cli/adopt-report.js +67 -0
- package/dist/cli/adopt-workspace.js +114 -0
- package/dist/cli/adoption-plan.js +11 -0
- package/dist/cli/init.js +79 -7
- package/dist/workspace/.polaris/roles/analyst.md +38 -0
- package/dist/workspace/.polaris/roles/closeout-librarian.md +122 -0
- package/dist/workspace/.polaris/roles/cognition-librarian.md +37 -0
- package/dist/workspace/.polaris/roles/finalizer.md +45 -0
- package/dist/workspace/.polaris/roles/foreman.md +165 -0
- package/dist/workspace/.polaris/roles/librarian.md +74 -0
- package/dist/workspace/.polaris/roles/worker.md +119 -0
- package/dist/workspace/.polaris/session-type +1 -0
- package/dist/workspace/.polaris/skills/ROUTING.md +109 -0
- package/dist/workspace/.polaris/skills/caveman/SKILL.md +74 -0
- package/dist/workspace/.polaris/skills/caveman-compress/scripts/compress.py +272 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/POLARIS.md +46 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/SKILL.md +59 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/chain.md +116 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/steps/01-load-cluster-context.md +78 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/steps/02-drift-reconciliation.md +157 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/steps/03-reconcile-polaris-md.md +93 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/steps/04-reconcile-summary-md.md +106 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/steps/05-doc-ingestion.md +114 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/steps/06-link-validation.md +128 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/steps/07-yaml-linking.md +95 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/steps/08-librarian-commit.md +119 -0
- package/dist/workspace/.polaris/skills/closeout-librarian/steps/09-sealed-result.md +118 -0
- package/dist/workspace/.polaris/skills/docs-ingest/SKILL.md +68 -0
- package/dist/workspace/.polaris/skills/docs-ingest/chain.json +23 -0
- package/dist/workspace/.polaris/skills/docs-ingest/chain.md +149 -0
- package/dist/workspace/.polaris/skills/docs-ingest/steps/01-orient-ingest.md +85 -0
- package/dist/workspace/.polaris/skills/docs-ingest/steps/02-classify-batch.md +87 -0
- package/dist/workspace/.polaris/skills/docs-ingest/steps/03-conflict-check.md +66 -0
- package/dist/workspace/.polaris/skills/docs-ingest/steps/04-place-and-link.md +77 -0
- package/dist/workspace/.polaris/skills/docs-ingest/steps/05-finalize-ingest.md +49 -0
- package/dist/workspace/.polaris/skills/docs-promote/SKILL.md +79 -0
- package/dist/workspace/.polaris/skills/docs-promote/chain.json +25 -0
- package/dist/workspace/.polaris/skills/docs-promote/chain.md +80 -0
- package/dist/workspace/.polaris/skills/docs-promote/steps/01-orient-promote.md +53 -0
- package/dist/workspace/.polaris/skills/docs-promote/steps/02-review-candidates.md +51 -0
- package/dist/workspace/.polaris/skills/docs-promote/steps/03-read-linked-code.md +50 -0
- package/dist/workspace/.polaris/skills/docs-promote/steps/04-conflict-surface.md +65 -0
- package/dist/workspace/.polaris/skills/docs-promote/steps/05-await-approval.md +61 -0
- package/dist/workspace/.polaris/skills/docs-promote/steps/06-execute-promote-deprecate.md +65 -0
- package/dist/workspace/.polaris/skills/docs-promote/steps/07-finalize-promote.md +44 -0
- package/dist/workspace/.polaris/skills/polaris-analyze/SKILL.md +94 -0
- package/dist/workspace/.polaris/skills/polaris-analyze/chain.json +20 -0
- package/dist/workspace/.polaris/skills/polaris-analyze/chain.md +105 -0
- package/dist/workspace/.polaris/skills/polaris-analyze/issue-reconciliation.md +149 -0
- package/dist/workspace/.polaris/skills/polaris-analyze/issue-template.md +133 -0
- package/dist/workspace/.polaris/skills/polaris-analyze/linked-skills/repo-analysis.md +55 -0
- package/dist/workspace/.polaris/skills/polaris-analyze/steps/01-fetch-and-orient.md +79 -0
- package/dist/workspace/.polaris/skills/polaris-analyze/steps/02-map-affected-code.md +58 -0
- package/dist/workspace/.polaris/skills/polaris-analyze/steps/03-assess-issue.md +58 -0
- package/dist/workspace/.polaris/skills/polaris-analyze/steps/04-blocker-check.md +60 -0
- package/dist/workspace/.polaris/skills/polaris-analyze/steps/05-create-cluster-plan.md +197 -0
- package/dist/workspace/.polaris/skills/polaris-analyze/steps/06-final-report.md +60 -0
- package/dist/workspace/.polaris/skills/polaris-catalog/SKILL.md +91 -0
- package/dist/workspace/.polaris/skills/polaris-catalog/chain.json +22 -0
- package/dist/workspace/.polaris/skills/polaris-catalog/chain.md +85 -0
- package/dist/workspace/.polaris/skills/polaris-catalog/steps/01-orient-catalog.md +92 -0
- package/dist/workspace/.polaris/skills/polaris-catalog/steps/02-reconcile-polaris-md.md +33 -0
- package/dist/workspace/.polaris/skills/polaris-catalog/steps/03-reconcile-summary-md.md +70 -0
- package/dist/workspace/.polaris/skills/polaris-catalog/steps/04-classify-and-place.md +117 -0
- package/dist/workspace/.polaris/skills/polaris-catalog/steps/05-catalog-commit.md +94 -0
- package/dist/workspace/.polaris/skills/polaris-medic/SKILL.md +52 -0
- package/dist/workspace/.polaris/skills/polaris-medic/chain.md +111 -0
- package/dist/workspace/.polaris/skills/polaris-medic/steps/01-orient-medic.md +75 -0
- package/dist/workspace/.polaris/skills/polaris-medic/steps/02-diagnose.md +79 -0
- package/dist/workspace/.polaris/skills/polaris-medic/steps/03-repair.md +64 -0
- package/dist/workspace/.polaris/skills/polaris-medic/steps/04-validate.md +66 -0
- package/dist/workspace/.polaris/skills/polaris-medic/steps/05-create-chart.md +85 -0
- package/dist/workspace/.polaris/skills/polaris-medic/steps/06-closeout.md +86 -0
- package/dist/workspace/.polaris/skills/polaris-reconcile/SKILL.md +75 -0
- package/dist/workspace/.polaris/skills/polaris-reconcile/chain.json +20 -0
- package/dist/workspace/.polaris/skills/polaris-reconcile/chain.md +67 -0
- package/dist/workspace/.polaris/skills/polaris-reconcile/steps/01-orient-reconcile.md +82 -0
- package/dist/workspace/.polaris/skills/polaris-reconcile/steps/02-reconcile-polaris-md.md +95 -0
- package/dist/workspace/.polaris/skills/polaris-reconcile/steps/03-reconcile-summary-md.md +108 -0
- package/dist/workspace/.polaris/skills/polaris-reconcile/steps/04-reconcile-commit.md +88 -0
- package/dist/workspace/.polaris/skills/polaris-run/SKILL.md +135 -0
- package/dist/workspace/.polaris/skills/polaris-run/chain.json +19 -0
- package/dist/workspace/.polaris/skills/polaris-run/chain.md +298 -0
- package/dist/workspace/.polaris/skills/polaris-run/execution-adapter.md +34 -0
- package/dist/workspace/.polaris/skills/polaris-run/linked-skills/repo-analysis.md +58 -0
- package/dist/workspace/.polaris/skills/polaris-run/steps/01-orient-cluster.md +96 -0
- package/dist/workspace/.polaris/skills/polaris-run/steps/02-prepare-branch.md +53 -0
- package/dist/workspace/.polaris/skills/polaris-run/steps/03-select-child.md +63 -0
- package/dist/workspace/.polaris/skills/polaris-run/steps/04-execute-child.md +75 -0
- package/dist/workspace/.polaris/skills/polaris-run/steps/05-validate-child.md +57 -0
- package/dist/workspace/.polaris/skills/polaris-run/steps/06-commit-and-update-linear.md +74 -0
- package/dist/workspace/.polaris/skills/polaris-run/steps/07-decide-continuation.md +89 -0
- package/dist/workspace/.polaris/skills/polaris-run/steps/08-closeout-librarian.md +146 -0
- package/dist/workspace/.polaris/skills/polaris-run/steps/08-final-delivery.md +91 -0
- package/dist/workspace/.polaris/skills/polaris-run/steps/09-final-delivery.md +104 -0
- package/dist/workspace/.polaris/skills/polaris-tools/README.md +63 -0
- package/dist/workspace/.polaris/skills/polaris-tools/SKILL.md +94 -0
- package/dist/workspace/.polaris/skills/polaris-tools/tools.js +191 -0
- package/dist/workspace/smartdocs/architecture/.gitkeep +0 -0
- package/dist/workspace/smartdocs/audits/.gitkeep +0 -0
- package/dist/workspace/smartdocs/decisions/.gitkeep +0 -0
- package/dist/workspace/smartdocs/doctrine/active/.gitkeep +0 -0
- package/dist/workspace/smartdocs/runtime/.gitkeep +0 -0
- package/dist/workspace/smartdocs/specs/active/.gitkeep +0 -0
- package/dist/workspace/smartdocs/specs/archive/.gitkeep +0 -0
- package/dist/workspace/workspace/.polaris/roles/analyst.md +38 -0
- package/dist/workspace/workspace/.polaris/roles/closeout-librarian.md +122 -0
- package/dist/workspace/workspace/.polaris/roles/cognition-librarian.md +37 -0
- package/dist/workspace/workspace/.polaris/roles/finalizer.md +45 -0
- package/dist/workspace/workspace/.polaris/roles/foreman.md +165 -0
- package/dist/workspace/workspace/.polaris/roles/librarian.md +74 -0
- package/dist/workspace/workspace/.polaris/roles/worker.md +119 -0
- package/dist/workspace/workspace/.polaris/session-type +1 -0
- package/dist/workspace/workspace/.polaris/skills/ROUTING.md +109 -0
- package/dist/workspace/workspace/.polaris/skills/caveman/SKILL.md +74 -0
- package/dist/workspace/workspace/.polaris/skills/caveman-compress/scripts/compress.py +272 -0
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/POLARIS.md +46 -0
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/SKILL.md +59 -0
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/chain.md +116 -0
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/01-load-cluster-context.md +78 -0
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/02-drift-reconciliation.md +157 -0
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/03-reconcile-polaris-md.md +93 -0
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/04-reconcile-summary-md.md +106 -0
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/05-doc-ingestion.md +114 -0
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/06-link-validation.md +128 -0
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/07-yaml-linking.md +95 -0
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/08-librarian-commit.md +119 -0
- package/dist/workspace/workspace/.polaris/skills/closeout-librarian/steps/09-sealed-result.md +118 -0
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/SKILL.md +68 -0
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/chain.json +23 -0
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/chain.md +149 -0
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/steps/01-orient-ingest.md +85 -0
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/steps/02-classify-batch.md +87 -0
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/steps/03-conflict-check.md +66 -0
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/steps/04-place-and-link.md +77 -0
- package/dist/workspace/workspace/.polaris/skills/docs-ingest/steps/05-finalize-ingest.md +49 -0
- package/dist/workspace/workspace/.polaris/skills/docs-promote/SKILL.md +79 -0
- package/dist/workspace/workspace/.polaris/skills/docs-promote/chain.json +25 -0
- package/dist/workspace/workspace/.polaris/skills/docs-promote/chain.md +80 -0
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/01-orient-promote.md +53 -0
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/02-review-candidates.md +51 -0
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/03-read-linked-code.md +50 -0
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/04-conflict-surface.md +65 -0
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/05-await-approval.md +61 -0
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/06-execute-promote-deprecate.md +65 -0
- package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/07-finalize-promote.md +44 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/SKILL.md +94 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/chain.json +20 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/chain.md +105 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/issue-reconciliation.md +149 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/issue-template.md +133 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/linked-skills/repo-analysis.md +55 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/steps/01-fetch-and-orient.md +79 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/steps/02-map-affected-code.md +58 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/steps/03-assess-issue.md +58 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/steps/04-blocker-check.md +60 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/steps/05-create-cluster-plan.md +197 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-analyze/steps/06-final-report.md +60 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/SKILL.md +91 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/chain.json +22 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/chain.md +85 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/01-orient-catalog.md +92 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/02-reconcile-polaris-md.md +33 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/03-reconcile-summary-md.md +70 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/04-classify-and-place.md +117 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-catalog/steps/05-catalog-commit.md +94 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/SKILL.md +52 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/chain.md +111 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/steps/01-orient-medic.md +75 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/steps/02-diagnose.md +79 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/steps/03-repair.md +64 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/steps/04-validate.md +66 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/steps/05-create-chart.md +85 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-medic/steps/06-closeout.md +86 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/SKILL.md +75 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/chain.json +20 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/chain.md +67 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/steps/01-orient-reconcile.md +82 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/steps/02-reconcile-polaris-md.md +95 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/steps/03-reconcile-summary-md.md +108 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-reconcile/steps/04-reconcile-commit.md +88 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/SKILL.md +135 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/chain.json +19 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/chain.md +298 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/execution-adapter.md +34 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/linked-skills/repo-analysis.md +58 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/01-orient-cluster.md +96 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/02-prepare-branch.md +53 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/03-select-child.md +63 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/04-execute-child.md +75 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/05-validate-child.md +57 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/06-commit-and-update-linear.md +74 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/07-decide-continuation.md +89 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/08-closeout-librarian.md +146 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/08-final-delivery.md +91 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-run/steps/09-final-delivery.md +104 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-tools/README.md +63 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-tools/SKILL.md +94 -0
- package/dist/workspace/workspace/.polaris/skills/polaris-tools/tools.js +191 -0
- 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/package.json +2 -2
package/dist/workspace/workspace/.polaris/skills/docs-promote/steps/06-execute-promote-deprecate.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docs-promote-step-06-execute-promote-deprecate
|
|
3
|
+
description: Execute the approved promote and deprecate CLI commands one at a time. Halt on any failure.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Step 06 — Execute promote / deprecate
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Fire the CLI commands for every candidate the user approved. One command at a time. Record the result after each before continuing.
|
|
11
|
+
|
|
12
|
+
## Actions
|
|
13
|
+
|
|
14
|
+
For each candidate with `decision: approved`:
|
|
15
|
+
|
|
16
|
+
### Spec promotion
|
|
17
|
+
```bash
|
|
18
|
+
npm run polaris -- doctrine spec-promote <path> --approve
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Doctrine candidate promotion
|
|
22
|
+
```bash
|
|
23
|
+
npm run polaris -- doctrine promote <path>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Active doctrine deprecation
|
|
27
|
+
```bash
|
|
28
|
+
npm run polaris -- doctrine deprecate <path>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
After each command:
|
|
32
|
+
- Record `promoted_to` or `deprecated_to` path in state
|
|
33
|
+
- Emit `docs-promoted` telemetry with `file` and result path
|
|
34
|
+
|
|
35
|
+
If a command exits non-zero:
|
|
36
|
+
- **Halt immediately.** Do not attempt any remaining commands.
|
|
37
|
+
- Record the error in state under `execution_error`.
|
|
38
|
+
- Report the failure in full. Wait for user instruction.
|
|
39
|
+
|
|
40
|
+
Candidates with `decision: rejected` or `deferred`: skip. Record in state as `skipped`.
|
|
41
|
+
|
|
42
|
+
## Scope
|
|
43
|
+
|
|
44
|
+
```yaml
|
|
45
|
+
allowed_files:
|
|
46
|
+
- smartdocs/raw/ (write — files will be moved by CLI)
|
|
47
|
+
- smartdocs/doctrine/candidate/ (write — files will be moved by CLI)
|
|
48
|
+
- smartdocs/doctrine/active/ (write — files will be moved by CLI)
|
|
49
|
+
- smartdocs/specs/active/ (write — files will be moved by CLI)
|
|
50
|
+
- .taskchain_artifacts/docs-promote/current-state.json
|
|
51
|
+
stop_rules:
|
|
52
|
+
- any CLI command exits non-zero → halt immediately
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Artifact update
|
|
56
|
+
|
|
57
|
+
Update `current-state.json` after each command:
|
|
58
|
+
- `current_step_id: 06-execute-promote-deprecate`
|
|
59
|
+
- Per candidate: `promoted_to|deprecated_to|skipped`, `execution_error` if applicable
|
|
60
|
+
|
|
61
|
+
Emit `step-complete` for `06-execute-promote-deprecate` only after all approved candidates are processed (or halted).
|
|
62
|
+
|
|
63
|
+
## Next step
|
|
64
|
+
|
|
65
|
+
07-finalize-promote
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docs-promote-step-07-finalize-promote
|
|
3
|
+
description: Emit completion telemetry, mark the run complete, and print the promotion summary.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Step 07 — Finalize promote
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Close out the session cleanly. Emit telemetry. Write final state. Report.
|
|
11
|
+
|
|
12
|
+
## Actions
|
|
13
|
+
|
|
14
|
+
1. **Emit `docs-promote-complete` telemetry**.
|
|
15
|
+
|
|
16
|
+
2. **Update `current-state.json`**:
|
|
17
|
+
- `status: complete`
|
|
18
|
+
- `current_step_id: 07-finalize-promote`
|
|
19
|
+
- `completed_at: <ISO timestamp>`
|
|
20
|
+
|
|
21
|
+
3. **Print promotion summary**:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
**docs-promote complete**
|
|
25
|
+
Promoted: <file> → <destination> (one line per promoted file)
|
|
26
|
+
Deprecated: <file> → <destination> (one line per deprecated file)
|
|
27
|
+
Held: <file> — <reason> (one line per held/deferred file)
|
|
28
|
+
Errors: none | <detail>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Completion rule
|
|
32
|
+
|
|
33
|
+
Do not report complete until `current-state.json` has `status: complete`.
|
|
34
|
+
|
|
35
|
+
## Scope
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
allowed_files:
|
|
39
|
+
- .taskchain_artifacts/docs-promote/current-state.json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Artifact update
|
|
43
|
+
|
|
44
|
+
Emit `step-complete` for `07-finalize-promote` and `docs-promote-complete` to telemetry JSONL.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: polaris-analyze
|
|
3
|
+
description: Audit one Polaris issue against the actual repo using a configured repo-analysis provider (if available) and targeted inspection, then produce an ordered execution plan and cluster artifacts. Analysis and planning only — no code changes, no implementation execution.
|
|
4
|
+
role: analyst
|
|
5
|
+
role_file: .polaris/roles/analyst.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Command entrypoints
|
|
9
|
+
|
|
10
|
+
This skill is the target for the following user commands:
|
|
11
|
+
|
|
12
|
+
- `polaris-analyze <POL-###>`
|
|
13
|
+
- `run polaris-analyze on issue <POL-###>`
|
|
14
|
+
- `run polaris-analyze on <POL-###>`
|
|
15
|
+
|
|
16
|
+
When any of these commands are issued, load this skill packet **first** before any other action.
|
|
17
|
+
Bind the named issue exactly as specified. See `.polaris/skills/ROUTING.md` for the full routing
|
|
18
|
+
protocol.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Polaris Skill Bootloader
|
|
23
|
+
|
|
24
|
+
**Before proceeding, you must obtain a skill packet from the Polaris runtime.**
|
|
25
|
+
|
|
26
|
+
Run the following command:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
npm run polaris -- skill packet analyze
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- Do not begin work until a packet is returned.
|
|
33
|
+
- Treat the packet as your authoritative instruction source.
|
|
34
|
+
- The packet defines your active role, authority boundaries, prohibited actions, deliverables, and stop conditions.
|
|
35
|
+
- If no packet is produced, stop and report: **Polaris could not authorize this run.**
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
# polaris-analyze
|
|
40
|
+
|
|
41
|
+
Use this skill when the user asks to analyze or break down a Polaris issue before execution.
|
|
42
|
+
|
|
43
|
+
## Related doctrine
|
|
44
|
+
|
|
45
|
+
See `docs/Polaris/spec/polaris-implementation-plan.md` for the Polaris architecture reference.
|
|
46
|
+
|
|
47
|
+
## Canonical issue template
|
|
48
|
+
|
|
49
|
+
All implementation issues (IMPLEMENT parents and children) must use the 8-section canonical format.
|
|
50
|
+
See `.polaris/skills/polaris-analyze/issue-template.md` for the full template.
|
|
51
|
+
|
|
52
|
+
Key rules:
|
|
53
|
+
- Use `## Scope` exactly — no variants ("Implementation scope", "Expected code areas", etc.).
|
|
54
|
+
- If scope is unknown: write `- TBD — BLOCKED: scope missing` under `## Scope` and mark the issue Blocked in Linear.
|
|
55
|
+
- Both IMPLEMENT parents and child issues require a full body — no title-only stubs.
|
|
56
|
+
- Every child must have `## Scope` and `## Validation` or the dispatch preflight gate will halt execution.
|
|
57
|
+
|
|
58
|
+
## When to use
|
|
59
|
+
|
|
60
|
+
- "Analyze POL-XXX before running it"
|
|
61
|
+
- "Break down POL-XXX into child issues"
|
|
62
|
+
- "Is POL-XXX ready to execute?"
|
|
63
|
+
- "Plan the execution clusters for POL-XXX"
|
|
64
|
+
|
|
65
|
+
## How to execute
|
|
66
|
+
|
|
67
|
+
1. Read `chain.md` — it defines the step order and traversal rules.
|
|
68
|
+
2. Read `.taskchain_artifacts/polaris-analyze/current-state.json` — it contains any resumable state.
|
|
69
|
+
3. Execute steps in the order `chain.md` defines. Do not skip steps.
|
|
70
|
+
4. After every completed step, update `.taskchain_artifacts/polaris-analyze/current-state.json` before advancing.
|
|
71
|
+
|
|
72
|
+
## Hard rules — what analyze may do
|
|
73
|
+
|
|
74
|
+
- Inspect repo files and architecture
|
|
75
|
+
- Query the configured repo-analysis provider for code intelligence (if available; falls back to polaris map query + ripgrep)
|
|
76
|
+
- Summarize findings and assess feasibility
|
|
77
|
+
- Create implementation plans and specs (in `docs/`)
|
|
78
|
+
- Create or update tracker child issues (Linear)
|
|
79
|
+
- Generate local cluster artifacts (`.polaris/clusters/<id>/clusters.json`)
|
|
80
|
+
- Update tracker comments and status
|
|
81
|
+
- Close the analysis issue when complete
|
|
82
|
+
|
|
83
|
+
## Hard rules — what analyze must NOT do
|
|
84
|
+
|
|
85
|
+
- Implement production or runtime code
|
|
86
|
+
- Mutate source files (`src/`, tests, config)
|
|
87
|
+
- Execute implementation loops
|
|
88
|
+
- Open implementation PRs
|
|
89
|
+
- Continue automatically into polaris-run execution
|
|
90
|
+
- Call `polaris loop continue` or `polaris finalize`
|
|
91
|
+
|
|
92
|
+
**Analyze shapes work. Run executes work.**
|
|
93
|
+
|
|
94
|
+
If implementation execution is attempted during an analyze session: halt immediately and report the boundary violation.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "polaris-analyze-chain",
|
|
3
|
+
"steps": [
|
|
4
|
+
"01-fetch-and-orient",
|
|
5
|
+
"02-map-affected-code",
|
|
6
|
+
"03-assess-issue",
|
|
7
|
+
"04-blocker-check",
|
|
8
|
+
"05-create-cluster-plan",
|
|
9
|
+
"06-final-report"
|
|
10
|
+
],
|
|
11
|
+
"terminal_steps": ["06-final-report"],
|
|
12
|
+
"scope": "analyze-only",
|
|
13
|
+
"forbidden_actions": [
|
|
14
|
+
"src file mutations",
|
|
15
|
+
"polaris loop continue",
|
|
16
|
+
"polaris finalize",
|
|
17
|
+
"git push",
|
|
18
|
+
"pr creation"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: polaris-analyze-chain
|
|
3
|
+
description: Route map for polaris-analyze — step order, stop conditions, analyze-only boundary enforcement, and artifact requirements.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# polaris-analyze 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 analysis scope or prior progress from conversation context.
|
|
13
|
+
|
|
14
|
+
## CLI
|
|
15
|
+
|
|
16
|
+
Always use the repo-local Polaris CLI:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
npm run polaris -- <command>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Never assume a globally linked `polaris` command exists.
|
|
23
|
+
|
|
24
|
+
## Step traversal order
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
01-fetch-and-orient ← parallel: Linear fetch + repo-analysis provider check + run-start telemetry
|
|
28
|
+
02-map-affected-code ← targeted repo-analysis inspection (provider or fallback)
|
|
29
|
+
03-assess-issue ← outcome classification
|
|
30
|
+
04-blocker-check ← STOP if blocked or non-executable
|
|
31
|
+
05-create-cluster-plan ← create tracker children + local clusters.json
|
|
32
|
+
06-final-report ← terminal step
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Stop conditions
|
|
36
|
+
|
|
37
|
+
**Step 04 (blocker check):**
|
|
38
|
+
Stop immediately if the issue is blocked or assessment outcome is not `needs-cluster-plan`. Do not advance to step 05.
|
|
39
|
+
|
|
40
|
+
**Any step:**
|
|
41
|
+
Stop if:
|
|
42
|
+
- Implementation execution is attempted (scope violation — halt and report).
|
|
43
|
+
- Canonical doctrine conflict cannot be resolved without user input.
|
|
44
|
+
- HIGH or CRITICAL risk identified by repo-analysis provider without a clear resolution path.
|
|
45
|
+
- Parent issue is already Done or Cancelled.
|
|
46
|
+
|
|
47
|
+
## Analyze-only boundary
|
|
48
|
+
|
|
49
|
+
polaris-analyze is a read-and-plan skill. It never executes implementation work.
|
|
50
|
+
|
|
51
|
+
The boundary is enforced by this skill — not by the Polaris runtime — because analyze sessions do not call `polaris loop continue`.
|
|
52
|
+
|
|
53
|
+
If a step produces source code changes, halts on a `src/` file edit, or attempts to push or PR: that is a scope violation. Halt immediately, report the violation, and do not continue.
|
|
54
|
+
|
|
55
|
+
## Run ID format
|
|
56
|
+
|
|
57
|
+
Format: `polaris-analyze-<slug>-<date>-<seq>`
|
|
58
|
+
- `<slug>`: 2–4 lowercase hyphenated words from the issue title. No Linear IDs.
|
|
59
|
+
- `<date>`: `YYYY-MM-DD`
|
|
60
|
+
- `<seq>`: zero-padded sequential number per day (`001`, `002`, …)
|
|
61
|
+
|
|
62
|
+
Example: `polaris-analyze-local-instructions-2026-05-23-001`
|
|
63
|
+
|
|
64
|
+
## Telemetry
|
|
65
|
+
|
|
66
|
+
Telemetry file: `.taskchain_artifacts/polaris-analyze/runs/<run-id>/telemetry.jsonl` (append-only).
|
|
67
|
+
|
|
68
|
+
| Event | Emitted by | Step |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| `run-start` | agent | 01 — before any Linear access |
|
|
71
|
+
| `step-complete` | agent | end of every step |
|
|
72
|
+
| `loop-aborted` | `npm run polaris -- loop abort` | any blocker halt |
|
|
73
|
+
|
|
74
|
+
Required fields on every event: `event`, `run_id`, `timestamp`.
|
|
75
|
+
|
|
76
|
+
## Artifact authority
|
|
77
|
+
|
|
78
|
+
`.taskchain_artifacts/polaris-analyze/current-state.json` is the sole authoritative live state surface.
|
|
79
|
+
|
|
80
|
+
- Update after every completed step before advancing.
|
|
81
|
+
- If the update fails: stop and report the persistence failure.
|
|
82
|
+
|
|
83
|
+
## Linked-skill invocation boundaries
|
|
84
|
+
|
|
85
|
+
| Skill | Allowed steps | Condition |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| repo-analysis | 01, 02 | targeted lookup only; conditional on provider availability |
|
|
88
|
+
|
|
89
|
+
After each completed step, emit a checkpoint:
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
**[step-name]** done | blocked | needs-input
|
|
93
|
+
Changed: <Linear issues / docs created or updated> or none
|
|
94
|
+
Validated: <checks passed> or none
|
|
95
|
+
Blockers: none | <explicit blocker>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Never compressed
|
|
99
|
+
|
|
100
|
+
Always write in full:
|
|
101
|
+
- Child issue bodies and cluster plans (generated planning artifacts)
|
|
102
|
+
- Blocker reports and unblock conditions
|
|
103
|
+
- Doctrine conflict findings
|
|
104
|
+
- HIGH or CRITICAL repo-analysis provider risk findings
|
|
105
|
+
- Final report (step 06)
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: polaris-issue-reconciliation
|
|
3
|
+
description: Workflow for reconciling existing Linear issues into the canonical Polaris format. Use when existing implementation issues are missing required sections or use non-canonical section names.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Polaris Issue Reconciliation Workflow
|
|
7
|
+
|
|
8
|
+
Use this workflow to bring existing Linear implementation issues into the canonical 8-section format
|
|
9
|
+
defined in `issue-template.md`. This is not a `polaris-analyze` run — it is a manual or
|
|
10
|
+
scripted reconciliation pass.
|
|
11
|
+
|
|
12
|
+
## When to use
|
|
13
|
+
|
|
14
|
+
- An existing IMPLEMENT parent or child issue is blocking a `polaris-run` execution.
|
|
15
|
+
- `polaris-run` reported `preflight-scope-missing` or `preflight-body-missing`.
|
|
16
|
+
- An issue uses non-canonical headers ("Implementation scope", "Expected code areas", etc.).
|
|
17
|
+
- An issue has no body at all (title-only stub).
|
|
18
|
+
- You want to prepare a set of existing issues before starting a new `polaris-run`.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Reconciliation rules
|
|
23
|
+
|
|
24
|
+
### Preserve original meaning
|
|
25
|
+
|
|
26
|
+
Do not change what an issue is asking for. Only restructure the body into the canonical format.
|
|
27
|
+
If you are uncertain whether a passage belongs under one header vs. another, preserve it verbatim
|
|
28
|
+
and note the ambiguity in a comment.
|
|
29
|
+
|
|
30
|
+
### Scope
|
|
31
|
+
|
|
32
|
+
- If scope is explicitly stated anywhere in the body (paths, globs, named files, module names),
|
|
33
|
+
move that content into `## Scope` as a bullet list.
|
|
34
|
+
- If scope can be clearly inferred from the objective or goal, write the inferred paths and
|
|
35
|
+
note that they were inferred: `- src/loop/** (inferred from objective)`.
|
|
36
|
+
- If scope is genuinely not determinable from the existing body, write:
|
|
37
|
+
```markdown
|
|
38
|
+
## Scope
|
|
39
|
+
- TBD — BLOCKED: scope missing
|
|
40
|
+
```
|
|
41
|
+
Then mark the issue as **Blocked** in Linear. Do not guess or invent paths.
|
|
42
|
+
|
|
43
|
+
### Acceptance Criteria and Validation
|
|
44
|
+
|
|
45
|
+
- If acceptance criteria exist under any heading, move them to `## Acceptance Criteria`.
|
|
46
|
+
- If validation commands exist (e.g. `npm test`, CI commands), move them to `## Validation`.
|
|
47
|
+
- If no validation commands exist, write the standard minimum:
|
|
48
|
+
```markdown
|
|
49
|
+
## Validation
|
|
50
|
+
- npm run build
|
|
51
|
+
- npm test
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Links
|
|
55
|
+
|
|
56
|
+
- Preserve all links to related issues, PRs, and clusters.
|
|
57
|
+
- Move them to `## Context` if they explain why the issue exists.
|
|
58
|
+
- Move them to `## Ordering` if they express a dependency.
|
|
59
|
+
|
|
60
|
+
### Non-goals / Out of scope
|
|
61
|
+
|
|
62
|
+
- If the original issue has "Out of scope" or "Non-goals" content, move it to `## Non-goals`.
|
|
63
|
+
|
|
64
|
+
### Do not mark ready if TBD/BLOCKED remains
|
|
65
|
+
|
|
66
|
+
If any section still contains `TBD — BLOCKED` after reconciliation, do not change the issue
|
|
67
|
+
status to Ready or In Progress. The issue must remain Blocked until scope (or other TBD content)
|
|
68
|
+
is resolved by a human.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Step-by-step reconciliation prompt
|
|
73
|
+
|
|
74
|
+
Use this prompt with a capable AI assistant to reconcile a single issue.
|
|
75
|
+
Replace `<ISSUE_BODY>` and `<ISSUE_TITLE>` with the actual content.
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
You are reconciling a Polaris Linear issue into the canonical 8-section format.
|
|
79
|
+
|
|
80
|
+
Issue title: <ISSUE_TITLE>
|
|
81
|
+
Current body:
|
|
82
|
+
---
|
|
83
|
+
<ISSUE_BODY>
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
Produce a rewritten body using exactly these sections in this order:
|
|
87
|
+
## Objective
|
|
88
|
+
## Context
|
|
89
|
+
## Goal
|
|
90
|
+
## Scope
|
|
91
|
+
## Acceptance Criteria
|
|
92
|
+
## Validation
|
|
93
|
+
## Ordering
|
|
94
|
+
## Non-goals
|
|
95
|
+
|
|
96
|
+
Rules:
|
|
97
|
+
1. Preserve original meaning. Do not change what the issue asks for.
|
|
98
|
+
2. Do not invent scope. If scope is stated or clearly inferable, use it.
|
|
99
|
+
If not, write:
|
|
100
|
+
## Scope
|
|
101
|
+
- TBD — BLOCKED: scope missing
|
|
102
|
+
3. Preserve all links to related issues, PRs, or clusters.
|
|
103
|
+
4. If acceptance criteria exist anywhere, move them under ## Acceptance Criteria.
|
|
104
|
+
5. If validation commands exist, move them under ## Validation.
|
|
105
|
+
If none exist, add:
|
|
106
|
+
## Validation
|
|
107
|
+
- npm run build
|
|
108
|
+
- npm test
|
|
109
|
+
6. Do not mark the issue ready if any section still says TBD — BLOCKED.
|
|
110
|
+
7. Output only the rewritten body (no commentary).
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Batch reconciliation guidance
|
|
116
|
+
|
|
117
|
+
For a set of issues before a `polaris-run`:
|
|
118
|
+
|
|
119
|
+
1. **Identify affected issues**: Run `polaris-run` in dry-run mode or check `clusters.json`
|
|
120
|
+
for child issue IDs with missing/empty bodies.
|
|
121
|
+
|
|
122
|
+
2. **Fetch current bodies**: For each issue ID, use the Linear MCP tool or CLI to fetch
|
|
123
|
+
the current title and body.
|
|
124
|
+
|
|
125
|
+
3. **Reconcile one at a time**: Apply the reconciliation prompt above to each issue.
|
|
126
|
+
Review the output before updating Linear.
|
|
127
|
+
|
|
128
|
+
4. **Update Linear**: Use the Linear MCP `save_issue` tool to update the body of each issue.
|
|
129
|
+
Do not change issue status unless explicitly reconciling a TBD-BLOCKED scope.
|
|
130
|
+
|
|
131
|
+
5. **Mark TBD-BLOCKED issues as Blocked**: For any issue where scope is TBD, update the
|
|
132
|
+
Linear status to Blocked and add a comment explaining what is needed to unblock.
|
|
133
|
+
|
|
134
|
+
6. **Re-run preflight**: After reconciling, re-run `polaris-run` (or the preflight check)
|
|
135
|
+
to confirm all issues are now packet-actionable.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Verification after reconciliation
|
|
140
|
+
|
|
141
|
+
After updating issue bodies, verify the reconciled issues are packet-actionable:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Dry-run a polaris-run to check all preflight gates pass
|
|
145
|
+
npm run polaris -- loop dispatch --dry-run <cluster-id>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
All children should pass body and scope preflight gates. If any fail,
|
|
149
|
+
the output will identify which issue and which section is still missing.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: polaris-linear-issue-template
|
|
3
|
+
description: Canonical Linear issue template for Polaris implementation issues. Use for both IMPLEMENT parent issues and child implementation issues.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Canonical Polaris Linear Issue Template
|
|
7
|
+
|
|
8
|
+
All implementation issues created by the `polaris-analyze` skill must use this exact structure.
|
|
9
|
+
Sections must appear in this order with these exact `##` headers.
|
|
10
|
+
|
|
11
|
+
## Why canonical format matters
|
|
12
|
+
|
|
13
|
+
The Polaris runtime parses issue bodies to derive `allowed_scope` and `validation_commands`
|
|
14
|
+
for worker packets. Non-canonical section names (e.g. "Implementation scope", "Expected code areas")
|
|
15
|
+
cause `allowed_scope` to be empty, which triggers the preflight gate and halts execution.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Template
|
|
20
|
+
|
|
21
|
+
```markdown
|
|
22
|
+
## Objective
|
|
23
|
+
Short statement of what this issue accomplishes.
|
|
24
|
+
|
|
25
|
+
## Context
|
|
26
|
+
Why this issue exists. Include relevant bug, PR, cluster, or doctrine context.
|
|
27
|
+
Link to the ANALYZE source issue and any related issues.
|
|
28
|
+
|
|
29
|
+
## Goal
|
|
30
|
+
Specific implementation outcome.
|
|
31
|
+
|
|
32
|
+
## Scope
|
|
33
|
+
Machine-readable list of allowed paths or areas. Use explicit repo paths or globs.
|
|
34
|
+
|
|
35
|
+
- src/loop/**
|
|
36
|
+
- src/finalize/**
|
|
37
|
+
- src/cluster-state/**
|
|
38
|
+
- src/loop/parent.test.ts
|
|
39
|
+
|
|
40
|
+
## Acceptance Criteria
|
|
41
|
+
|
|
42
|
+
- [ ] Observable completion requirement 1
|
|
43
|
+
- [ ] Observable completion requirement 2
|
|
44
|
+
- [ ] Tests pass
|
|
45
|
+
|
|
46
|
+
## Validation
|
|
47
|
+
|
|
48
|
+
Commands that must be run:
|
|
49
|
+
|
|
50
|
+
- npm run build
|
|
51
|
+
- npm test
|
|
52
|
+
- npx vitest run src/loop src/finalize src/cluster-state
|
|
53
|
+
|
|
54
|
+
## Ordering
|
|
55
|
+
|
|
56
|
+
Dependencies or sequencing relative to sibling issues:
|
|
57
|
+
|
|
58
|
+
- Depends on <child-id> being Done first (or "None").
|
|
59
|
+
|
|
60
|
+
## Non-goals
|
|
61
|
+
|
|
62
|
+
What this issue must not change:
|
|
63
|
+
|
|
64
|
+
- Do not modify <area>.
|
|
65
|
+
- Do not change <schema/API/etc>.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Rules
|
|
71
|
+
|
|
72
|
+
### Section names
|
|
73
|
+
|
|
74
|
+
Use the headers above exactly. Do NOT use:
|
|
75
|
+
|
|
76
|
+
| Non-canonical (do not use) | Canonical |
|
|
77
|
+
|-----------------------------|-------------------|
|
|
78
|
+
| Implementation scope | `## Scope` |
|
|
79
|
+
| Expected code areas | `## Scope` |
|
|
80
|
+
| Code areas | `## Scope` |
|
|
81
|
+
| Files to change | `## Scope` |
|
|
82
|
+
| Test commands | `## Validation` |
|
|
83
|
+
| Verify | `## Validation` |
|
|
84
|
+
| Requirements | `## Acceptance Criteria` |
|
|
85
|
+
| Dependencies / Blockers | `## Ordering` |
|
|
86
|
+
| Out of scope | `## Non-goals` |
|
|
87
|
+
| Allowed Changes | *(merge into Scope)* |
|
|
88
|
+
|
|
89
|
+
Aliases are supported by the body parser for backward compatibility, but new issues
|
|
90
|
+
must always use the canonical header names.
|
|
91
|
+
|
|
92
|
+
### `## Scope` is required
|
|
93
|
+
|
|
94
|
+
- Every implementation child issue MUST have `## Scope` with at least one path or glob.
|
|
95
|
+
- Child issues must include their own explicit `## Scope` section (they may not omit it).
|
|
96
|
+
- The runtime derives `allowed_scope` from the child's `## Scope` section. An empty or missing `## Scope` causes
|
|
97
|
+
a hard preflight failure — the issue cannot be dispatched.
|
|
98
|
+
- If scope is not yet determinable, write:
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
## Scope
|
|
102
|
+
- TBD — BLOCKED: scope missing
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Then mark the Linear issue as **Blocked** status. The blocked status prevents dispatch.
|
|
106
|
+
Do NOT invent paths or use placeholder globs like `src/**`.
|
|
107
|
+
|
|
108
|
+
### `## Validation` is required
|
|
109
|
+
|
|
110
|
+
Every implementation issue must list the commands that confirm acceptance criteria are met.
|
|
111
|
+
Minimum: `npm run build` and `npm test`.
|
|
112
|
+
|
|
113
|
+
### Full bodies required
|
|
114
|
+
|
|
115
|
+
Neither IMPLEMENT parent issues nor child issues may be title-only stubs. Every issue
|
|
116
|
+
must include all 8 canonical sections, populated with real content.
|
|
117
|
+
|
|
118
|
+
### IMPLEMENT parents
|
|
119
|
+
|
|
120
|
+
IMPLEMENT parent issues must include a cluster-wide `## Scope` section for documentation
|
|
121
|
+
and context purposes. However, every child issue must include its own explicit `## Scope`
|
|
122
|
+
section — children may not omit scope to inherit from the parent.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Checklist before marking analysis Done
|
|
127
|
+
|
|
128
|
+
- [ ] Every IMPLEMENT child has a full body (not title-only)
|
|
129
|
+
- [ ] Every child has `## Scope` with real paths (not `TBD — BLOCKED`)
|
|
130
|
+
- [ ] Every child has `## Validation` with runnable commands
|
|
131
|
+
- [ ] Issues with unknown scope are marked Blocked in Linear
|
|
132
|
+
- [ ] IMPLEMENT parent has a full body with cluster-wide `## Scope`
|
|
133
|
+
- [ ] `clusters.json` references the IMPLEMENT parent as `source_id`
|
package/dist/workspace/workspace/.polaris/skills/polaris-analyze/linked-skills/repo-analysis.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: repo-analysis provider linkage
|
|
3
|
+
description: Provide targeted code intelligence when a repo-analysis provider is configured and available in the session environment.
|
|
4
|
+
version: "1.0"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# repo-analysis provider linkage
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Allowed steps
|
|
12
|
+
|
|
13
|
+
- 01-fetch-and-orient
|
|
14
|
+
- 02-map-affected-code
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Purpose
|
|
19
|
+
|
|
20
|
+
Provide targeted code intelligence when polaris-analyze needs to understand the affected code surface.
|
|
21
|
+
|
|
22
|
+
This linked-skill governs use of the configured repo-analysis provider (e.g., GitNexus). If no provider is available, the fallback path (polaris map query + ripgrep + direct file inspection) is authoritative. See `docs/Polaris/spec/provider-capabilities.md` for the full provider model.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Allowed scope
|
|
27
|
+
|
|
28
|
+
- Check configured provider availability at session start
|
|
29
|
+
- Query specific files, symbols, or concepts relevant to the issue scope
|
|
30
|
+
- Run impact analysis on symbols mentioned in the issue
|
|
31
|
+
- Check provider index freshness and trigger refresh if stale
|
|
32
|
+
- Report execution flows relevant to the issue
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Forbidden scope
|
|
37
|
+
|
|
38
|
+
- Do not perform broad graph dumps or full-repo reports
|
|
39
|
+
- Do not replace direct repository inspection
|
|
40
|
+
- Do not invoke outside allowed steps
|
|
41
|
+
- Do not assume a specific provider product is present — check availability first
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Provider detection
|
|
46
|
+
|
|
47
|
+
At step 01, check `polaris.config.json` for `providers.repoAnalysis.preferred`.
|
|
48
|
+
If a provider is configured and available in the session environment: use it.
|
|
49
|
+
If unavailable or not configured: note `repo_analysis_status: not-configured` in artifact and proceed with fallback.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Invocation note
|
|
54
|
+
|
|
55
|
+
Conditional. Invoke when the issue references specific files, symbols, or flows that benefit from graph context. When the provider is unavailable, the fallback path runs instead — the session continues either way.
|