@anhlp/alp 0.0.1-beta.3 → 0.0.1-beta.6

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 (175) hide show
  1. package/README.md +14 -410
  2. package/bin/alp.js +5 -0
  3. package/lib/launcher.js +136 -0
  4. package/package.json +19 -104
  5. package/dist/THIRD-PARTY-NOTICES.txt +0 -626
  6. package/dist/acp.js +0 -19903
  7. package/dist/alpd.js +0 -42558
  8. package/docs/modular-monorepo.md +0 -210
  9. package/packages/cli/README.md +0 -7
  10. package/packages/cli/dist/THIRD-PARTY-NOTICES.txt +0 -626
  11. package/packages/cli/dist/acp/agent.d.ts +0 -37
  12. package/packages/cli/dist/acp/agent.js +0 -489
  13. package/packages/cli/dist/acp/main.d.ts +0 -4
  14. package/packages/cli/dist/acp/main.js +0 -23
  15. package/packages/cli/dist/acp.js +0 -19903
  16. package/packages/cli/dist/alpd.js +0 -42558
  17. package/packages/cli/dist/backup.d.ts +0 -4
  18. package/packages/cli/dist/backup.js +0 -146
  19. package/packages/cli/dist/build-manifest.json +0 -142
  20. package/packages/cli/dist/cli.d.ts +0 -2
  21. package/packages/cli/dist/cli.js +0 -28
  22. package/packages/cli/dist/daemon.d.ts +0 -35
  23. package/packages/cli/dist/daemon.js +0 -126
  24. package/packages/cli/dist/index.d.ts +0 -1
  25. package/packages/cli/dist/index.js +0 -5
  26. package/packages/cli/dist/interfaces.d.ts +0 -16
  27. package/packages/cli/dist/interfaces.js +0 -96
  28. package/packages/cli/dist/library.d.ts +0 -140
  29. package/packages/cli/dist/library.js +0 -319
  30. package/packages/cli/dist/paths.d.ts +0 -3
  31. package/packages/cli/dist/paths.js +0 -18
  32. package/packages/cli/dist/projects.d.ts +0 -9
  33. package/packages/cli/dist/projects.js +0 -159
  34. package/packages/cli/dist/sessions.d.ts +0 -41
  35. package/packages/cli/dist/sessions.js +0 -447
  36. package/packages/cli/dist/tasks.d.ts +0 -29
  37. package/packages/cli/dist/tasks.js +0 -345
  38. package/packages/cli/dist/usage.d.ts +0 -3
  39. package/packages/cli/dist/usage.js +0 -72
  40. package/packages/client/README.md +0 -24
  41. package/packages/client/dist/acp-probe.d.ts +0 -44
  42. package/packages/client/dist/acp-probe.js +0 -37
  43. package/packages/client/dist/antigravity-probe.d.ts +0 -34
  44. package/packages/client/dist/antigravity-probe.js +0 -95
  45. package/packages/client/dist/command.d.ts +0 -5
  46. package/packages/client/dist/command.js +0 -33
  47. package/packages/client/dist/doctor.d.ts +0 -13
  48. package/packages/client/dist/doctor.js +0 -587
  49. package/packages/client/dist/index.d.ts +0 -116
  50. package/packages/client/dist/index.js +0 -500
  51. package/packages/client/dist/ipc.d.ts +0 -42
  52. package/packages/client/dist/ipc.js +0 -69
  53. package/packages/client/dist/library-test.d.ts +0 -94
  54. package/packages/client/dist/library-test.js +0 -37
  55. package/packages/client/dist/mcp-probe.d.ts +0 -24
  56. package/packages/client/dist/mcp-probe.js +0 -147
  57. package/packages/client/dist/portable.d.ts +0 -18
  58. package/packages/client/dist/portable.js +0 -27
  59. package/packages/client/dist/prompt.d.ts +0 -32
  60. package/packages/client/dist/prompt.js +0 -59
  61. package/packages/client/dist/render.d.ts +0 -6
  62. package/packages/client/dist/render.js +0 -120
  63. package/packages/client/dist/rpc/client.d.ts +0 -82
  64. package/packages/client/dist/rpc/client.js +0 -292
  65. package/packages/client/dist/rpc/errors.d.ts +0 -42
  66. package/packages/client/dist/rpc/errors.js +0 -34
  67. package/packages/client/dist/rpc/framing.d.ts +0 -21
  68. package/packages/client/dist/rpc/framing.js +0 -57
  69. package/packages/client/dist/rpc/handshake.d.ts +0 -19
  70. package/packages/client/dist/rpc/handshake.js +0 -8
  71. package/packages/client/dist/rpc/reconnect.d.ts +0 -97
  72. package/packages/client/dist/rpc/reconnect.js +0 -227
  73. package/packages/client/dist/rpc/timers.d.ts +0 -11
  74. package/packages/client/dist/rpc/timers.js +0 -11
  75. package/packages/client/dist/service.d.ts +0 -50
  76. package/packages/client/dist/service.js +0 -143
  77. package/packages/client/dist/setup.d.ts +0 -2
  78. package/packages/client/dist/setup.js +0 -146
  79. package/packages/client/dist/supervise.d.ts +0 -12
  80. package/packages/client/dist/supervise.js +0 -87
  81. package/packages/client/dist/websocket.d.ts +0 -51
  82. package/packages/client/dist/websocket.js +0 -190
  83. package/packages/core/README.md +0 -7
  84. package/packages/core/dist/adapter.d.ts +0 -20
  85. package/packages/core/dist/adapter.js +0 -30
  86. package/packages/core/dist/atomic.d.ts +0 -2
  87. package/packages/core/dist/atomic.js +0 -28
  88. package/packages/core/dist/backup.d.ts +0 -27
  89. package/packages/core/dist/backup.js +0 -582
  90. package/packages/core/dist/beads.d.ts +0 -65
  91. package/packages/core/dist/beads.js +0 -213
  92. package/packages/core/dist/delegation.d.ts +0 -2
  93. package/packages/core/dist/delegation.js +0 -32
  94. package/packages/core/dist/errors.d.ts +0 -4
  95. package/packages/core/dist/errors.js +0 -11
  96. package/packages/core/dist/formulas.d.ts +0 -25
  97. package/packages/core/dist/formulas.js +0 -201
  98. package/packages/core/dist/hook-run.d.ts +0 -44
  99. package/packages/core/dist/hook-run.js +0 -60
  100. package/packages/core/dist/hooks.d.ts +0 -35
  101. package/packages/core/dist/hooks.js +0 -30
  102. package/packages/core/dist/index.d.ts +0 -30
  103. package/packages/core/dist/index.js +0 -63
  104. package/packages/core/dist/init.d.ts +0 -30
  105. package/packages/core/dist/init.js +0 -89
  106. package/packages/core/dist/library-edit.d.ts +0 -93
  107. package/packages/core/dist/library-edit.js +0 -368
  108. package/packages/core/dist/library.d.ts +0 -28
  109. package/packages/core/dist/library.js +0 -108
  110. package/packages/core/dist/log.d.ts +0 -37
  111. package/packages/core/dist/log.js +0 -156
  112. package/packages/core/dist/migrations.d.ts +0 -9
  113. package/packages/core/dist/migrations.js +0 -95
  114. package/packages/core/dist/models.d.ts +0 -11
  115. package/packages/core/dist/models.js +0 -44
  116. package/packages/core/dist/permissions.d.ts +0 -14
  117. package/packages/core/dist/permissions.js +0 -229
  118. package/packages/core/dist/profiles.d.ts +0 -27
  119. package/packages/core/dist/profiles.js +0 -122
  120. package/packages/core/dist/promptsafe.d.ts +0 -1
  121. package/packages/core/dist/promptsafe.js +0 -13
  122. package/packages/core/dist/providers.d.ts +0 -90
  123. package/packages/core/dist/providers.js +0 -101
  124. package/packages/core/dist/resolver.d.ts +0 -41
  125. package/packages/core/dist/resolver.js +0 -240
  126. package/packages/core/dist/safe-path.d.ts +0 -2
  127. package/packages/core/dist/safe-path.js +0 -24
  128. package/packages/core/dist/shell.d.ts +0 -16
  129. package/packages/core/dist/shell.js +0 -22
  130. package/packages/core/dist/state-schema.d.ts +0 -9
  131. package/packages/core/dist/state-schema.js +0 -54
  132. package/packages/core/dist/task-rows.d.ts +0 -47
  133. package/packages/core/dist/task-rows.js +0 -45
  134. package/packages/core/dist/tasks.d.ts +0 -128
  135. package/packages/core/dist/tasks.js +0 -835
  136. package/packages/core/dist/teams.d.ts +0 -80
  137. package/packages/core/dist/teams.js +0 -159
  138. package/packages/core/dist/template-path.d.ts +0 -2
  139. package/packages/core/dist/template-path.js +0 -10
  140. package/packages/core/dist/trust.d.ts +0 -8
  141. package/packages/core/dist/trust.js +0 -47
  142. package/packages/core/dist/types.d.ts +0 -51
  143. package/packages/core/dist/upgrade.d.ts +0 -10
  144. package/packages/core/dist/upgrade.js +0 -200
  145. package/packages/core/dist/user-settings.d.ts +0 -6
  146. package/packages/core/dist/user-settings.js +0 -72
  147. package/packages/core/dist/validation.d.ts +0 -17
  148. package/packages/core/dist/validation.js +0 -295
  149. package/packages/core/dist/verify.d.ts +0 -15
  150. package/packages/core/dist/verify.js +0 -123
  151. package/packages/core/dist/workflow.d.ts +0 -45
  152. package/packages/core/dist/workflow.js +0 -33
  153. package/templates/ALP.md +0 -52
  154. package/templates/agents/lead/AGENT.md +0 -90
  155. package/templates/agents/main/AGENT.md +0 -150
  156. package/templates/agents/oracle/AGENT.md +0 -44
  157. package/templates/agents/peer/AGENT.md +0 -55
  158. package/templates/agents/reviewer/AGENT.md +0 -80
  159. package/templates/agents/supervisor/AGENT.md +0 -72
  160. package/templates/providers/antigravity.json +0 -6
  161. package/templates/providers/opencode.json +0 -7
  162. package/templates/role-skills.json +0 -8
  163. package/templates/skills/bug-loop/SKILL.md +0 -44
  164. package/templates/skills/bug-loop/references/test-proof.md +0 -25
  165. package/templates/skills/goal-griller/SKILL.md +0 -49
  166. package/templates/skills/prompt-leverage/SKILL.md +0 -37
  167. package/templates/skills/prompt-leverage/references/brief-template.md +0 -27
  168. package/templates/skills/sequence-execution-plan/SKILL.md +0 -42
  169. package/templates/skills/sequence-execution-plan/references/plan-template.md +0 -22
  170. package/templates/skills/smart-commits/SKILL.md +0 -40
  171. package/templates/skills/xia/SKILL.md +0 -42
  172. package/templates/teams/cafe/HOUSE_RULES.md +0 -1
  173. package/templates/teams/cafe/team.json +0 -15
  174. package/templates/teams/pho/HOUSE_RULES.md +0 -1
  175. package/templates/teams/pho/team.json +0 -14
@@ -1,37 +0,0 @@
1
- ---
2
- name: prompt-leverage
3
- description: Convert a task into a self-contained delegation brief without changing user intent or predetermining the solution. Use before Main assigns Lead or Lead assigns Peer, or when asked to improve an execution prompt.
4
- ---
5
-
6
- # Prepare an actionable brief
7
-
8
- Identify the requested result and the recipient's responsibility. Preserve actual
9
- user constraints, but distinguish them from current design choices the recipient
10
- may question. Do not seed a reviewer's verdict or turn a preferred implementation
11
- into an invented requirement.
12
-
13
- A useful brief supplies the root, outcome, relevant context, owned/excluded paths,
14
- authority, important dependencies, resources, verification, and expected handoff.
15
- Use [the brief format](references/brief-template.md) for substantial assignments;
16
- combine fields for a small task. A real base SHA is useful in a Git repository but
17
- is not required for a plain file project. Never fabricate one.
18
-
19
- Verification must describe the observable behavior and, when known, its executable
20
- check. If a command still needs discovery, state how it should be established from
21
- the repository. Do not invent a test command just to fill a field.
22
-
23
- Choose the relevant installed skill by task type and mention it in the brief:
24
- research -> xia; diagnosis/regression -> bug-loop; an authorized commit handoff ->
25
- smart-commits. Do not require skills absent from the recipient's package. A reviewer
26
- can inspect an existing candidate without additional skill ceremonies.
27
-
28
- On current Paseo, pass the full brief as alp_delegate.task with an authorized agent
29
- and optional mode. Model and reasoning inherit from the parent; there is no model
30
- argument on this tool. Request read-only for research/review where appropriate.
31
- Implementation requires workspace-write on the parent and child. The call waits
32
- for a final handoff, so include everything needed to work without a live Q&A channel.
33
-
34
- This skill grants no new authority and never bypasses the configured routing graph.
35
- If asked only to improve a prompt, return the prompt. If assignment is authorized,
36
- send it using the actual runtime tool after preparing it. Missing capabilities
37
- must be reported, not simulated.
@@ -1,27 +0,0 @@
1
- # Brief and handoff format
2
-
3
- Use enough detail to make an independent worker effective, without prescribing an
4
- unverified solution. Available context includes ALP.md and the selected agent's own
5
- instructions; the parent's full transcript is not automatically available.
6
-
7
- ```text
8
- Task and recipient:
9
- Root:
10
- Outcome:
11
- Context / prior decisions:
12
- Required constraints + sources:
13
- Current technical choices (open to evidence):
14
- Owned paths / excluded paths:
15
- Authority and permission mode:
16
- Dependencies / writer ownership / resource allocation:
17
- Verification commands or expected observable checks:
18
- Relevant installed skill, if needed:
19
- Candidate/base revision, if applicable:
20
- Return: outcome, artifact, scope, actual checks/results, risks, ownership status.
21
- ```
22
-
23
- For read-only review, supply the candidate/artifact and independent acceptance
24
- criteria. For a correction, include the concrete finding and prior evidence. For
25
- a resumed assignment, include the findings needed from the previous handoff because
26
- the next child is a new session. A blocked recipient should return its blocker and
27
- completed independent work rather than waiting for a nonexistent mailbox.
@@ -1,42 +0,0 @@
1
- ---
2
- name: sequence-execution-plan
3
- description: Order multiple ALP work items by real dependencies, verification, and writer ownership. Use when Main or Lead coordinates several outcomes or must replan after a blocker, changed premise, or rejection.
4
- ---
5
-
6
- # Order executable work
7
-
8
- Use the task contract and available evidence. Planning authority comes from the
9
- current assignment: main coordinates the overall outcome; lead plans technical
10
- execution within its assigned scope. A peer reports dependencies instead of
11
- reassigning ownership or widening the plan.
12
-
13
- Separate urgency from dependency order. A lower-priority prerequisite may need to
14
- run first, but it does not close the higher-priority outcome. A mitigation reduces
15
- current impact; it is not proof of a durable fix.
16
-
17
- Build small work items that each deliver observable progress. Keep implementation
18
- and its direct verification together. Split when an unresolved decision blocks one
19
- part, separate outcomes need independent acceptance, or a resource/human wait would
20
- stall unrelated work. Do not impose a fixed task count on a simple change.
21
-
22
- For each item identify the result, owner, owned/excluded paths, true prerequisites,
23
- verification seam, completion evidence, and current state. Distinguish necessary
24
- foundations from optional improvements and speculative future abstractions.
25
-
26
- Arrange Now, Next, and Later using causal explanations: which prerequisite blocks
27
- which outcome, which check validates it, and which decision opens the next branch.
28
- Read [the plan format](references/plan-template.md) when a durable multi-item plan
29
- helps. Use the project's existing plan location; do not create unrelated ignore
30
- rules or a new planning hierarchy just to satisfy this skill.
31
-
32
- Current Paseo delegation is sequential: each parent waits for one child's result.
33
- Do not promise parallel workers or live upstream mailboxes. A shared checkout has
34
- one writer at a time; main intervention requires ownership to be released first.
35
- Allocate ports, scratch paths, and other exclusive resources if the assignment uses
36
- them. Separate worktrees alone do not isolate ports or a shared database.
37
-
38
- Replan when evidence changes a premise, a dependency blocks work, the user changes
39
- scope, or repeated rejection reveals that the assignment needs restructuring.
40
- Update the facts and constraints before issuing a revised brief. Preserve unfinished
41
- acceptance criteria when merging items. Candidate remains candidate until the
42
- responsible reviewer has evaluated the actual evidence.
@@ -1,22 +0,0 @@
1
- # Proportional plan format
2
-
3
- Use the relevant fields; a plan is a decision aid, not a form-completion exercise.
4
-
5
- ```text
6
- Outcome and acceptance evidence:
7
- User constraints and their sources:
8
- Current facts / technical assumptions:
9
-
10
- ID | Result | Owner | Owned/excluded scope | Prerequisites | Verification | State
11
-
12
- Now:
13
- Next (and what unlocks it):
14
- Later:
15
- Writer/resource allocation:
16
- Open decisions and blockers:
17
- Replan reason, when applicable:
18
- ```
19
-
20
- States can be ready, blocked, running, candidate, accepted, or rejected. An item is
21
- accepted based on artifacts and verification; a successful process exit is not an
22
- acceptance criterion by itself. Omit branch/SHA fields in non-Git projects.
@@ -1,40 +0,0 @@
1
- ---
2
- name: smart-commits
3
- description: Package existing owned changes into focused local Git commits with verification evidence. Use when commits are requested or part of the assigned handoff; do not activate merely because a file was edited.
4
- ---
5
-
6
- # Package the authorized changes
7
-
8
- Confirm this is a Git repository and that local commits belong to the requested
9
- deliverable. A non-Git task returns file artifacts; do not initialize Git merely to
10
- produce a SHA. A read-only task cannot commit. Existing user authorization remains
11
- valid; the skill adds no confirmation gate or permission to push.
12
-
13
- Inspect the root, branch, status, unresolved merges, staged paths, and staged/unstaged
14
- diffs with Git commands. Verify any supplied base revision. Preserve work outside
15
- the assignment. If unrelated staged changes would enter the commit, stop packaging
16
- and report the conflict without resetting or unstaging someone else's work.
17
-
18
- Group changes by behavior and intent. Keep implementation and its direct tests
19
- together where useful. Read each included diff and stage only the owned paths or
20
- hunks. Avoid whole-tree staging in a shared checkout. Do not add unrelated fixes or
21
- formatting to make a commit easier.
22
-
23
- Run the relevant checks from the project/brief, reusing recent results when still
24
- applicable. State failures and omissions accurately. If hooks may cause external
25
- side effects, inspect their configured behavior before invoking them and stay within
26
- the task's authorization. Do not bypass hooks or protections to get a green commit.
27
-
28
- Create focused messages explaining the change and its purpose, following the
29
- repository's convention. Check commit success before reading the candidate SHA.
30
- Verify that the candidate contains only the intended scope and that the base
31
- relationship is valid when a base was supplied. A failed commit produces no new
32
- candidate, and an already-clean tree needs no empty commit.
33
-
34
- Do not rewrite a candidate already handed off for review. Corrections should be
35
- new commits unless rewriting was specifically agreed. Push requires existing explicit
36
- authorization for the intended remote/branch; a configured remote does not provide it.
37
-
38
- Return root, branch, actual base/candidate SHAs, commit summary, owned scope, checks
39
- and results, remaining work, and push status. Lead/main still review the artifact;
40
- the writer does not self-accept its work.
@@ -1,42 +0,0 @@
1
- ---
2
- name: xia
3
- description: Research an unfamiliar implementation, reuse opportunity, or version-sensitive integration using local artifacts and primary sources. Return an evidence-backed recommendation before implementation; do not expand the assigned scope.
4
- ---
5
-
6
- # Research before building
7
-
8
- Start with a named question that affects a decision. Use a short local inspection
9
- when the relevant seam is clear; broaden to upstream sources only when the question
10
- requires it. Research is read-only with respect to project artifacts. Temporary
11
- experiments require an available isolated scratch location and appropriate authority.
12
-
13
- 1. Establish the actual stack from manifests, lockfiles, configuration, and commands.
14
- Read ALP.md and relevant project guidance. Do not infer a stack from folder names.
15
- 2. Search nearby code, tests, configuration, scripts, and docs for existing behavior
16
- and reusable parts. Record the scope searched before saying something is absent.
17
- 3. For external behavior, inspect primary upstream source/examples and official
18
- documentation matching the installed version. Distinguish current guidance from
19
- the version this project actually uses.
20
- 4. Compare viable approaches only where the choice matters. Prefer an existing
21
- local capability, then a supported dependency capability, then a small adaptation.
22
- Explain what evidence would change the recommendation.
23
-
24
- Label significant findings by evidence type:
25
-
26
- - Local: file path, command output, test, or repository revision.
27
- - Upstream: repository URL and revision when available.
28
- - Docs: official source and applicable version.
29
- - Inference: a conclusion drawn from the cited evidence, with uncertainty stated.
30
-
31
- If browsing is unavailable, return the local findings and the unresolved external
32
- question. Do not invent a source or claim version compatibility without evidence.
33
- Research does not authorize installing dependencies, editing code, or deploying.
34
-
35
- Return the question, findings/sources, reuse candidates, recommendation, alternatives
36
- if material, unknowns, and the next decision. Include actual inspection commands and
37
- results in the handoff. A peer returns this to lead; lead returns unresolved scope
38
- decisions to main. Main can decide technical matters within the user's authorization.
39
-
40
- Use available synchronous delegation for a separate research assignment only when
41
- helpful. Do not assume a Scout role or parallel session exists; research is a peer
42
- disposition. An agent can inspect evidence itself without spawning another agent.
@@ -1 +0,0 @@
1
- In Phở (pho), main implements or directly delegates to peer; do not create lead. In Cafe (cafe), main supervises lead; lead may implement or delegate to peer. The technical coordinator chooses each peer's model and effort. Use oracle for significant uncertainty; use reviewer for logic changes and risky changes, not mandatory for typo/format fixes. Advisors return only to their requesting coordinator.
@@ -1,15 +0,0 @@
1
- {
2
- "label": "Cafe",
3
- "description": "Main supervises lead, who implements or delegates to peer; a supervisor reviews the process.",
4
- "main": "main",
5
- "members": {
6
- "main": { "model": "claude:claude-opus-5-5", "thinking": "high" },
7
- "lead": { "role": "lead" },
8
- "peer": { "role": "peer" },
9
- "oracle": { "role": "advisor" },
10
- "reviewer": { "role": "reviewer" }
11
- },
12
- "delegation": { "main": ["lead", "oracle", "reviewer"], "lead": ["peer", "oracle", "reviewer"] },
13
- "maxPeers": 2,
14
- "supervisor": { "agent": "supervisor", "model": "claude:claude-sonnet-5", "thinking": "medium" }
15
- }
@@ -1 +0,0 @@
1
- In Phở (pho), main implements or directly delegates to peer; do not create lead. In Cafe (cafe), main supervises lead; lead may implement or delegate to peer. The technical coordinator chooses each peer's model and effort. Use oracle for significant uncertainty; use reviewer for logic changes and risky changes, not mandatory for typo/format fixes. Advisors return only to their requesting coordinator.
@@ -1,14 +0,0 @@
1
- {
2
- "label": "Phở",
3
- "description": "Main implements or delegates to peer; a supervisor reviews the process.",
4
- "main": "main",
5
- "members": {
6
- "main": { "model": "claude:claude-opus-5-5", "thinking": "high" },
7
- "peer": { "role": "peer" },
8
- "oracle": { "role": "advisor" },
9
- "reviewer": { "role": "reviewer" }
10
- },
11
- "delegation": { "main": ["peer", "oracle", "reviewer"] },
12
- "maxPeers": 2,
13
- "supervisor": { "agent": "supervisor", "model": "claude:claude-sonnet-5", "thinking": "medium" }
14
- }