@devspecai/pi-plugin 0.0.0-stage → 0.10.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/CHANGELOG.md +899 -0
- package/LICENSE +21 -0
- package/README.md +103 -2
- package/extensions/.gitkeep +0 -0
- package/extensions/core/activation-recovery.ts +135 -0
- package/extensions/core/active-deliveries.ts +171 -0
- package/extensions/core/active-session-plans.ts +374 -0
- package/extensions/core/adapter-overlap.ts +247 -0
- package/extensions/core/assistant-speech.ts +44 -0
- package/extensions/core/attach-context.ts +25 -0
- package/extensions/core/attachment-limits.ts +20 -0
- package/extensions/core/attachments.ts +487 -0
- package/extensions/core/auth-store.ts +91 -0
- package/extensions/core/automation-run-retry.ts +31 -0
- package/extensions/core/background-journal.ts +85 -0
- package/extensions/core/background-observer.ts +279 -0
- package/extensions/core/bond-recovery.ts +65 -0
- package/extensions/core/bond-state.ts +80 -0
- package/extensions/core/clear-conversation.ts +53 -0
- package/extensions/core/client-versions.ts +56 -0
- package/extensions/core/client.ts +704 -0
- package/extensions/core/command-offer.ts +88 -0
- package/extensions/core/command-runner.ts +62 -0
- package/extensions/core/command-turn.ts +88 -0
- package/extensions/core/commit-ledger.ts +195 -0
- package/extensions/core/commit-stamp.ts +98 -0
- package/extensions/core/config.ts +63 -0
- package/extensions/core/connection-context.ts +28 -0
- package/extensions/core/context-budget.ts +175 -0
- package/extensions/core/control-result-outbox.ts +80 -0
- package/extensions/core/control.ts +156 -0
- package/extensions/core/ctx-guard.ts +33 -0
- package/extensions/core/debug.ts +136 -0
- package/extensions/core/delivery-queue.ts +92 -0
- package/extensions/core/dispatch.ts +108 -0
- package/extensions/core/duck.ts +128 -0
- package/extensions/core/git-observer.ts +382 -0
- package/extensions/core/github-identity.ts +26 -0
- package/extensions/core/implementation-contract.ts +773 -0
- package/extensions/core/instructions.ts +40 -0
- package/extensions/core/interaction-events.ts +834 -0
- package/extensions/core/json-schema.ts +16 -0
- package/extensions/core/local-activity.ts +34 -0
- package/extensions/core/mcp-config-guard.ts +117 -0
- package/extensions/core/model-catalog.ts +76 -0
- package/extensions/core/model-surface.ts +125 -0
- package/extensions/core/notice-reply.ts +215 -0
- package/extensions/core/owner-inject.ts +148 -0
- package/extensions/core/post-session-receipt.ts +70 -0
- package/extensions/core/preempt.ts +100 -0
- package/extensions/core/project-choice.ts +145 -0
- package/extensions/core/project-scope.ts +335 -0
- package/extensions/core/project-selection-ui.ts +202 -0
- package/extensions/core/provenance-refs.ts +158 -0
- package/extensions/core/push-channel.ts +281 -0
- package/extensions/core/question-receipt-lifecycle.ts +158 -0
- package/extensions/core/recall.ts +121 -0
- package/extensions/core/remote-payload.ts +1329 -0
- package/extensions/core/remote-session-arg.ts +24 -0
- package/extensions/core/repository-context.ts +35 -0
- package/extensions/core/request-chain.ts +1244 -0
- package/extensions/core/result-projection.ts +939 -0
- package/extensions/core/result.ts +100 -0
- package/extensions/core/review-context.ts +70 -0
- package/extensions/core/review-watch.ts +94 -0
- package/extensions/core/room-access.ts +12 -0
- package/extensions/core/room-context.ts +178 -0
- package/extensions/core/room-reader.ts +308 -0
- package/extensions/core/room-store.ts +381 -0
- package/extensions/core/room-sync.ts +79 -0
- package/extensions/core/room-tools.ts +86 -0
- package/extensions/core/room-unread.ts +173 -0
- package/extensions/core/session-events.ts +62 -0
- package/extensions/core/session-polls.ts +292 -0
- package/extensions/core/settings.ts +39 -0
- package/extensions/core/status-line.ts +432 -0
- package/extensions/core/still-to-discuss.ts +124 -0
- package/extensions/core/subagent-fleet.ts +238 -0
- package/extensions/core/system-notice.ts +227 -0
- package/extensions/core/telemetry.ts +177 -0
- package/extensions/core/tool-selection.ts +72 -0
- package/extensions/core/trail-events.ts +247 -0
- package/extensions/core/trail-projection.ts +373 -0
- package/extensions/core/trail.ts +465 -0
- package/extensions/core/turn-lifecycle.ts +472 -0
- package/extensions/core/version-mismatch.ts +165 -0
- package/extensions/core/work-prompt.ts +44 -0
- package/extensions/core/work-state.ts +179 -0
- package/extensions/devspec-adapter-guard.ts +106 -0
- package/extensions/devspec-auth.ts +191 -0
- package/extensions/devspec-brand.ts +140 -0
- package/extensions/devspec-commit-ledger.ts +477 -0
- package/extensions/devspec-context.ts +146 -0
- package/extensions/devspec-memory.ts +136 -0
- package/extensions/devspec-provenance-assistance.ts +233 -0
- package/extensions/devspec-remote.ts +5152 -0
- package/extensions/devspec-tools.ts +552 -0
- package/extensions/devspec-work.ts +244 -0
- package/extensions/generated/README.md +18 -0
- package/extensions/generated/mcp-catalog.ts +15811 -0
- package/package.json +71 -4
- package/prompts/.gitkeep +0 -0
- package/runtime/commit-stamp.mjs +279 -0
- package/runtime/git-observer-shim.mjs +390 -0
- package/skills/.gitkeep +0 -0
- package/themes/.gitkeep +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DevSpec Pi — always-on workflow instructions (item 7de79db6).
|
|
3
|
+
*
|
|
4
|
+
* Injected into the system prompt via before_agent_start when a DevSpec token
|
|
5
|
+
* resolves. Keep it TIGHT: every line here costs tokens on every turn.
|
|
6
|
+
*
|
|
7
|
+
* First-touch is mechanical (memory-card recall + attach agenda). This block
|
|
8
|
+
* must not tell the model to search first, and must not dump the 76-verb map.
|
|
9
|
+
* Keep only rules a tool cannot know.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** Bump when the block changes materially; handy for debugging drift reports. */
|
|
13
|
+
export const INSTRUCTIONS_VERSION = 27;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* `commitTagging`: whether Pi's git stand-in can tag commits here (df71ab6c). Where it
|
|
17
|
+
* cannot (native Windows, no bonded connection), the model writes the tag itself.
|
|
18
|
+
*/
|
|
19
|
+
export function buildDevspecInstructions(options: { commitTagging?: boolean } = {}): string {
|
|
20
|
+
const commitTagging = options.commitTagging ?? true;
|
|
21
|
+
return `## DevSpec
|
|
22
|
+
This project is connected to DevSpec, and every DevSpec tool this connection may use is available natively. Call a fitting tool directly; \`search_devspec_tools\` only helps pick one when unsure. Search is optional. Do not connect a duplicate DevSpec MCP server.
|
|
23
|
+
|
|
24
|
+
- The loaded implementation contract alone chooses task/session-plan tracking and the plan threshold. If it selects a task, search/reuse/create one and claim via claim_work_item. A missing claim never blocks edits, execution, tests, worktrees, delegation, or follow-through.
|
|
25
|
+
- When creating or updating a task (create_task requires title, intent, and description; update_task), keep each task atomic around one primary subject or cohesive deliverable — never bundle unrelated subjects, independent deliverables, or separate carve-outs into one task; create separate tasks (or child tasks under a parent brief) and connect them via parent_task_id, follow_up_from_task_id, or link_tasks. Partition fields cleanly: intent records the underlying problem, who raised it and their synthesized rationale (never conversational go-ahead quotes), and the desired outcome; description states the complete product behaviour, rules, edge cases, and the architectural or technical mechanism in natural English (screening reads title, intent, description, and acceptance_criteria — never ai_instructions — so never strip the technical mechanism out of description or dump raw file paths, line numbers, code snippets, or CSS classes into it); acceptance_criteria lists plain-prose checkable conditions; ai_instructions holds file paths, symbols, code snippets, and CSS classes. Writes violating field placement, substance/intent, or single-subject atomicity are rejected at write time.
|
|
26
|
+
- Read the canonical product contract when needed via get_workflow_rules with include_implementation_contract:true; work entry loads it for you. Nothing is ever sent work — reserve the items you were asked to work (reserve_work_items), then claim them in order when available.
|
|
27
|
+
${commitTagging
|
|
28
|
+
? "- When exactly one task is claimed, Pi adds its full [devspec:<id>] tag to your commit messages itself and says so under the command's output. Write the tag yourself only when Pi says it did not add it, for example because several tasks are claimed (the served contract's commit_provenance_contract)."
|
|
29
|
+
: "- Pi cannot add task tags to commits in this setup, so put the claimed task's full [devspec:<id>] reference in every implementing commit message yourself (the served contract's commit_provenance_contract)."}
|
|
30
|
+
- After pushing, call record_implementation with affected_files, testing_notes, and completion_summary and no commit id: DevSpec takes the commit Pi observed. Name a commit only when the response says none was found, and then copy its full id from git (git rev-parse HEAD), never from memory. Report the lifecycle and anything still holding it short of done exactly as the result says. Never mark items done yourself: what done requires, and who may sign off on what evidence, is the served contract's boundary, not a rule to remember here.
|
|
31
|
+
- Agreed project conventions and decisions are binding. Work that would undo a protected decision waits for an OK: when a result carries waiting_for_ok ("Waiting for <name>'s OK", or "Experiment"), follow its instruction and the served contract's core.waiting-work-stays-on-its-branch rule — build and push it on its own branch and never merge it into the tracking branch until it has the OK — and tell the person plainly. Who can give the OK is the served contract's reversal_rule; give it only for a person who can and clearly asks you to (acting_rule), never on your own judgement.
|
|
32
|
+
- Act for the person who asks you, with their authority (the served contract's acting_rule). When their request is clear and they evidently know what it does, do it at once: never ask them to confirm what they just said, or send them to Review to do it themselves. Ask only when what they want is unclear. If they seem unaware of a significant consequence (say, that it undoes someone's decision), say so once, up front, then do what they decide.
|
|
33
|
+
- Every Review decision has a tool. get_review_queue: what waits, with the ids and revisions to pass. decide_proposal: accept or decline a proposed change or a request to confirm. manage_protected_intent: answer on work that would undo a decision, let an experiment land, adopt or take ownership; request_confirmation asks someone else to agree. resolve_memory_flag, resolve_resource_flag: a flagged record is still accurate (if not, correct or retire it). resolve_duplicate (preview first): close a duplicate; record_duplicate_nonmatch: they differ.
|
|
34
|
+
- Standing long-form documents are artifacts (create_resource, update_resource, supersede_resource), kept current as code changes; create_resource's description says what a document can be. A plan is a brief with tasks, a handoff or status belongs on the task, and a decision or convention is a memory. Use repository Markdown only when it ships with the repository or the user asks.
|
|
35
|
+
- Record a decision with record_memory only when it was a real choice among alternatives, made for a reason, that steers work beyond this change and is not obvious from the code. Ask the person whether it was deliberate and why: only their answer makes it their decision; a no or no answer records nothing. When it reaches no further than the item, the item's intent is the record. Refine with update_memory; replace a changed decision with supersede_memory. Keep each memory atomic around one primary decision, convention, insight, or risk — never bundle distinct subjects or a primary decision together with a separate operational carve-out or companion convention into one memory; record separate memories and link them via companion_links. Put the human-readable substance and rationale in body and code-level implementation pointers (file paths, symbols, code snippets) in ai_instructions; writes that violate field placement, substance completeness, or single-subject atomicity are rejected at write time. Work in flight (approved but unbuilt, awaiting a pick, blocked) and delivery evidence belong on a task, not in memory.
|
|
36
|
+
- Who may commit a memory, artifact, rule, flag ruling or supersession — and what a queued write means — is the served contract's authority_contract; never predict it. Relay each result's summary (or note) and next in plain words. committed is live; queued_for_review carries a proposal_id, a reason and who it waits on — relay them and never report the change as done, nor a refused or unconfirmed one. A notice DevSpec sends about your own work (a finding, or the outcome of an edit, ruling or request to confirm) is handled as its prompt says, within its allowed outcomes and tools; tell the person in plain words what you did or what needs their decision.
|
|
37
|
+
- In a room, writing @ and a person's name in your reply (@Brandon, or @Brandon Smith) notifies that person, if they are in the room or on the project. Mention someone only when they need to see it.
|
|
38
|
+
- For non-trivial work, start with one concise user-facing sentence saying what you understood and what you will do next before tools. Add another only at a meaningful boundary; never narrate individual tools.
|
|
39
|
+
- Do not pass git_remote, project_id, or connection_id — the extension already knows them.`;
|
|
40
|
+
}
|