@fatelabs/pi-estelle 0.0.0-stage → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +6 -0
  3. package/README.md +44 -2
  4. package/adapters/claude.mjs +17 -0
  5. package/adapters/codex.mjs +85 -0
  6. package/adapters/cursor.mjs +66 -0
  7. package/adapters/dsh-host.mjs +181 -0
  8. package/adapters/dsh-plugin.mjs +11 -0
  9. package/adapters/dsh.mjs +54 -0
  10. package/adapters/grok.mjs +63 -0
  11. package/adapters/host-bridge.mjs +85 -0
  12. package/adapters/kimi.mjs +135 -0
  13. package/adapters/opencode-mirror.mjs +103 -0
  14. package/adapters/opencode-plugin.mjs +143 -0
  15. package/adapters/opencode.mjs +15 -0
  16. package/adapters/pi-extension.mjs +107 -0
  17. package/adapters/pi.mjs +13 -0
  18. package/adapters/plugin-envelope.mjs +56 -0
  19. package/commands/cloud.md +28 -0
  20. package/commands/code.md +6 -0
  21. package/commands/handoff.md +25 -0
  22. package/commands/monitor.md +6 -0
  23. package/commands/resume.md +6 -0
  24. package/commands/review.md +6 -0
  25. package/commands/rooms.md +7 -0
  26. package/instructions.md +19 -0
  27. package/package.json +38 -4
  28. package/runtime/auth.mjs +27 -0
  29. package/runtime/checkpoint.mjs +208 -0
  30. package/runtime/claude-setup.mjs +130 -0
  31. package/runtime/cli.mjs +112 -0
  32. package/runtime/codex-trust.mjs +68 -0
  33. package/runtime/credential.mjs +341 -0
  34. package/runtime/dsh-session.mjs +91 -0
  35. package/runtime/dsh-telemetry.mjs +31 -0
  36. package/runtime/hooks.mjs +234 -0
  37. package/runtime/identity.mjs +20 -0
  38. package/runtime/io.mjs +155 -0
  39. package/runtime/key-check.mjs +51 -0
  40. package/runtime/kimi-history.mjs +163 -0
  41. package/runtime/mailbox.mjs +46 -0
  42. package/runtime/migration.mjs +118 -0
  43. package/runtime/move.mjs +443 -0
  44. package/runtime/native-export.mjs +204 -0
  45. package/runtime/native-index.mjs +77 -0
  46. package/runtime/native-tree.mjs +117 -0
  47. package/runtime/queued-context.mjs +152 -0
  48. package/runtime/redact.mjs +74 -0
  49. package/runtime/reindex.mjs +259 -0
  50. package/runtime/setup.mjs +174 -0
  51. package/runtime/stream.mjs +755 -0
  52. package/runtime/version.mjs +2 -0
  53. package/runtime/write-warning.mjs +67 -0
  54. package/skills/abstain-right/SKILL.md +19 -0
  55. package/skills/api-call-ground/SKILL.md +19 -0
  56. package/skills/bug-hunt/SKILL.md +20 -0
  57. package/skills/chain-of-verification/SKILL.md +19 -0
  58. package/skills/change-impact/SKILL.md +19 -0
  59. package/skills/coding-workflow/SKILL.md +20 -0
  60. package/skills/commit-guard/SKILL.md +20 -0
  61. package/skills/context-checkpoint/SKILL.md +19 -0
  62. package/skills/continuity-brief/SKILL.md +19 -0
  63. package/skills/dead-code-sweep/SKILL.md +19 -0
  64. package/skills/deep-search/SKILL.md +19 -0
  65. package/skills/diff-review/SKILL.md +19 -0
  66. package/skills/estelle/SKILL.md +119 -0
  67. package/skills/estelle-loop/SKILL.md +19 -0
  68. package/skills/estelle-monitor-install/SKILL.md +20 -0
  69. package/skills/evidence-traceability-audit/SKILL.md +19 -0
  70. package/skills/grounded-generate/SKILL.md +19 -0
  71. package/skills/incident-rca/SKILL.md +20 -0
  72. package/skills/mutation-test/SKILL.md +19 -0
  73. package/skills/program-repair/SKILL.md +20 -0
  74. package/skills/prompt-injection-defense/SKILL.md +19 -0
  75. package/skills/property-based-test/SKILL.md +19 -0
  76. package/skills/refactor-rfc/SKILL.md +19 -0
  77. package/skills/root-cause-loop/SKILL.md +19 -0
  78. package/skills/test-first/SKILL.md +19 -0
  79. package/skills/threat-model-stride/SKILL.md +19 -0
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: property-based-test
3
+ description: "State what must always be true, then hunt for a counterexample. Use when the task involves: property based, invariant, hypothesis, quickcheck, generative test, shrinking."
4
+ user-invocable: false
5
+ metadata:
6
+ short-description: "State what must always be true, then hunt for a counterexample."
7
+ ---
8
+
9
+ # property-based-test
10
+
11
+ Test a precise invariant across generated inputs.
12
+
13
+ 1. State the property in observable terms: round-trip, idempotence, ordering, conservation, monotonicity or a postcondition.
14
+ 2. Read the real function and callers through `find_definition` and `find_usages`. Include the boundary's invalid-input contract in the property.
15
+ 3. Use the repository's existing property-testing tool or standard test facilities. Read the pinned library's API before adding a new dependency.
16
+ 4. Bound generated sizes and runtime. Include empty, Unicode, extreme and malformed values that matter to the contract.
17
+ 5. Run the property and keep a minimized counterexample as a regression fixture when it finds a real defect. Fix the behavior at its shared owner.
18
+
19
+ Return the invariant, input domain, reproducible seed/example and test result. Generated testing covers the domain exercised; it is not proof over all possible inputs.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: refactor-rfc
3
+ description: "Name the smell, the target shape, and the order to get there. Use when the task involves: refactor, rfc, debt, cleanup, restructure, smell."
4
+ user-invocable: false
5
+ metadata:
6
+ short-description: "Name the smell, the target shape, and the order to get there."
7
+ ---
8
+
9
+ # refactor-rfc
10
+
11
+ Plan a refactor around a concrete maintenance problem.
12
+
13
+ 1. Name the current pain and show the source locations that cause it. Use `find_usages`, `find_references`, `blast_radius` and dependency tools to map the actual boundary.
14
+ 2. Describe the target ownership and public interface. Reuse existing modules and native features where they already fit.
15
+ 3. Identify behavior and compatibility that must remain unchanged. Add characterization tests where an unmeasured contract would make moving code risky.
16
+ 4. Order small, reversible steps so each keeps the affected build and tests working. Separate mechanical moves from behavior changes and migrations.
17
+ 5. Record the risky step, verification command, rollback approach and remaining decisions. Publish to an external tracker only if authorized.
18
+
19
+ Return the proposed structure and ordered changes with checks. A diagram or plan is not an implemented refactor.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: root-cause-loop
3
+ description: "Find why it happens before changing anything. Use when the task involves: debug, root cause, systematic, heisenbug, flaky, investigate."
4
+ user-invocable: false
5
+ metadata:
6
+ short-description: "Find why it happens before changing anything."
7
+ ---
8
+
9
+ # root-cause-loop
10
+
11
+ Choose experiments that distinguish causes before editing the implementation.
12
+
13
+ 1. Record the observed failure, expected behavior and minimal input/state. Confirm the failure is current.
14
+ 2. Trace the real path with `find_definition` and `find_usages`; identify the point where expected and observed states diverge.
15
+ 3. List the competing explanations and the evidence each predicts. Run the cheapest controlled experiment that would separate them.
16
+ 4. Update the explanation from results, including evidence that disproves your first guess. Bound repetitions and state what remains unknown.
17
+ 5. Fix the confirmed shared cause and prove it with a regression that fails before and passes after. Check other affected callers with `blast_radius` and relevant tests.
18
+
19
+ Return the confirmed cause, decisive experiment and fix. If the evidence only narrows the candidates, say that rather than labeling a hypothesis as the cause.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: test-first
3
+ description: "One test, one thin slice, then the next. Use when the task involves: tdd, test, test-first, red green, coverage, unit test."
4
+ user-invocable: false
5
+ metadata:
6
+ short-description: "One test, one thin slice, then the next."
7
+ ---
8
+
9
+ # test-first
10
+
11
+ Build one observable behavior at a time when a regression test will protect a real contract.
12
+
13
+ 1. Choose a thin slice through the public interface and define its acceptance condition. Inspect the existing implementation and test conventions.
14
+ 2. Write the smallest meaningful test. Run it and confirm it fails for the missing or broken behavior rather than for an unrelated setup error.
15
+ 3. Implement the minimum change using real repository or dependency APIs. Reuse existing behavior before adding another abstraction.
16
+ 4. Run the test, then the relevant regression/type/build checks. Refactor with the behavior test still passing.
17
+ 5. Repeat only for the remaining acceptance conditions. Avoid tests that merely restate implementation details or add ceremony to a trivial reversible edit.
18
+
19
+ Return the behavior, its before/after result and applicable checks. A passing test command is evidence about the tests it actually ran; it does not establish a coverage percentage.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: threat-model-stride
3
+ description: "Walk the data flow and ask how each step gets abused. Use when the task involves: threat model, stride, attack surface, trust boundary, spoofing tampering, mitigation."
4
+ user-invocable: false
5
+ metadata:
6
+ short-description: "Walk the data flow and ask how each step gets abused."
7
+ ---
8
+
9
+ # threat-model-stride
10
+
11
+ Review real data flows and their trust boundaries.
12
+
13
+ 1. Locate entry points, processes, stores and external services with `locate`, `find_definition` and dependency tools. Read the relevant implementation before drawing a flow.
14
+ 2. At each boundary ask about spoofing, tampering, repudiation, information disclosure, denial of service and elevation of privilege.
15
+ 3. For each plausible threat, name the attacker capability, affected operation and concrete control: identity/authorization, validation, integrity, redaction, audit, quotas, deadlines or least privilege.
16
+ 4. Check that the proposed implementation enforces the control on every reachable path. Do not replace security validation with a model's judgment.
17
+ 5. Run a positive control for authorized behavior and a negative control for the abuse case. Use `scan` for applicable diff-level patterns and `review` for logic.
18
+
19
+ Return a prioritized threat/control list with source evidence and test results. Label hypotheses and untested controls; a threat model alone is not a security certification.