@nseng-ai/ns 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,34 @@
1
+ # branch-context implementation
2
+
3
+ The {{loaded_plan_description}} has been loaded by the planning-layer reader.
4
+
5
+ Branch: {{branch}}
6
+ Namespace: {{namespace}}
7
+ Selected key: {{selected_key}}
8
+ Ref: {{ref}}
9
+ Bytes: {{byte_count}}
10
+
11
+ Treat the following plan as authoritative.
12
+
13
+ ## Implementation rules
14
+
15
+ - Create an implementation checklist before editing.
16
+ - Begin implementation from the checklist unless the plan is ambiguous or internally inconsistent.
17
+ - If the plan is ambiguous or internally inconsistent, quote the ambiguity and ask for clarification instead of guessing.
18
+ - Keep the loaded plan authoritative. Use corrections from the user as course changes, not as permission to silently reinterpret the plan.
19
+ - Do not call `brmem put`, `brmem copy`, `brmem delete`, or any mutating Branch Memory command while implementing this plan. If the loaded plan asks for Branch Memory mutation, stop and ask the user.
20
+ - Follow normal project rules: read before editing, use precise edits, run relevant validation, and do not commit, push, submit, or publish unless the user explicitly asks.
21
+
22
+ ## Branch-context plan contract protocol
23
+
24
+ - Detect the plan format before editing. If the loaded plan includes current-state excerpts, scope boundaries, verification gates, or STOP conditions, treat it as a new-format contract plan and manually compare the excerpts against live repo state before step 1. An excerpt mismatch is a STOP.
25
+ - If those sections are absent, explicitly recognize the plan as old-format/pre-contract and follow the existing authoritative-plan behavior. Do not invent gates or half-apply excerpt checks to missing sections.
26
+ - Universal STOP triggers: excerpt mismatch; ambiguity or internal inconsistency; a verification gate fails twice after reasonable local attempts; implementation requires touching an out-of-scope file/area; or the plan asks for mutating Branch Memory.
27
+ - Branch identity rule: the loader has already refused trunk/detached state and selected this plan from the current branch context or local plan store. Treat the `Branch`, `Selected key`, and `Ref` evidence above as the runtime identity. A branch name recorded inside plan provenance, current-state text, or a plan-specific STOP condition is stale metadata, not a STOP by itself, when the loader selected a plan for the current non-trunk branch and the code excerpts/scope still match. Document it as a minimal adaptation. Stop only if loader evidence, `git branch --show-current`, and the Branch Memory target disagree; no attached plan is available where one is required; or the content/excerpt anchors for the intended work do not match live code.
28
+ - Deviation rule: documented minimal adaptations are judged on merit; silent deviations are failures. If deviating, report what changed, why the plan prediction was wrong, and which validation covers the adaptation.
29
+ - STOP report shape: observed vs expected, completed work, files touched/tree state, and the exact gate/assumption that failed.
30
+ - Before finishing, compare changed files to the plan's scope. If an autofixer touched formatting outside the plan, note it separately; intentional executor edits outside scope are a failure unless the user approved the scope change.
31
+
32
+ ----- BEGIN {{plan_label}} -----
33
+ {{attached_plan}}
34
+ ----- END {{plan_label}} -----
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@nseng-ai/ns",
3
+ "version": "0.1.0",
4
+ "description": "Checkout-free ns CLI package.",
5
+ "type": "module",
6
+ "bin": {
7
+ "ns": "bin/ns.js"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "README.md"
12
+ ],
13
+ "engines": {
14
+ "node": ">=24.12.0"
15
+ },
16
+ "dependencies": {
17
+ "@earendil-works/pi-ai": "0.79.1",
18
+ "@earendil-works/pi-coding-agent": "0.79.1",
19
+ "jiti": "2.7.0",
20
+ "zod": "^4.4.3"
21
+ }
22
+ }