一键导入
ks-brief
// Lightweight task compressor. Turn messy input into a one-page brief that can route to roundtable or writing-plan without replacing direction decisions.
// Lightweight task compressor. Turn messy input into a one-page brief that can route to roundtable or writing-plan without replacing direction decisions.
Formal quality gate with multi-persona review, confidence thresholds, and QA routing based on fresh verification evidence.
Direction convergence skill. Use brainstorm, align, or challenge mode to turn messy questions or existing proposals into a clear directional decision.
Use this when direction is already clear and the next job is to compress it into an executable block with scope, done criteria, and routing.
Fast failure classifier. Decide whether the problem is a spec gap, an implementation bug, or a rollback candidate before routing to writing-plan, diagnose, or ship.
Use this when the system is broken, tests are failing, or behavior is abnormal and the root cause is still unknown. No investigation, no fix.
Use this when the current block is already clear and the job is to complete it. Default route comes from test-first; only controlled low-risk exceptions may enter directly.
| name | ks-brief |
| description | Lightweight task compressor. Turn messy input into a one-page brief that can route to roundtable or writing-plan without replacing direction decisions. |
| layer | decision |
| owner | brief |
| inputs | ["task_description","context","constraints"] |
| outputs | ["brief_document","suggested_next_skill"] |
| entry_modes | ["from-scratch","aligned-offline","plan-ready"] |
Preamble: see templates/preamble.md
Compresses messy input into a short executable brief, then hands control back to the decision chain. Enter when the request is scattered across multiple statements, or when quick alignment on what this round is about is needed before formal planning. Does not replace roundtable for direction convergence, writing-plan for block formalization, or verify/review for later-stage work.
If you cannot compress the task into one sentence, do not pretend that you already did.
Brief is not a replacement for roundtable.
Unknowns must be written down, not glossed over.
Remove information that does not help the decision chain:
What to keep vs discard:
| Keep | Discard |
|---|---|
| Specific constraints (deadline, dependency) | Repeated context statements |
| Named dependencies and blockers | Background that does not affect this round |
| Success criteria the user mentioned | Vague wishes ("it should be better") |
| Known risks or limits | Tangential feature ideas |
Write the real task in one sentence. This is the hardest part of brief and the most important.
If that fails, the request belongs in roundtable, not brief. Do not pretend you already compressed it.
Examples:
| Input | Compressed one-sentence task |
|---|---|
| "We need to add a notification toggle to the settings page, and also the notification system needs to support email and push, and the user should be able to set quiet hours, and we should probably think about the notification center redesign..." | "Add a notification toggle to the existing settings page and define the smallest viable loop for this round." |
| "The API is slow and users are complaining and we should probably add caching and also optimize the queries and maybe switch to a different ORM..." | "Reduce API response time to meet the performance target for the most affected endpoint." |
| "I want to refactor the authentication module because it's messy and also add 2FA support while we're in there..." | "Refactor the authentication module to support 2FA without breaking existing login flows." |
## Brief
**Task**: [one-sentence task from Step 2]
**Background**: [2-4 sentences of essential context]
**Goal**: [what this round should achieve]
**Non-goals**: [what this round will not do]
**Constraints**: [time, technical, collaboration, or release constraints]
**Unknowns**: [still-unconfirmed items — list them explicitly]
**Suggested next skill**: [roundtable / writing-plan]
**Why**: [why that route is correct]
Decision logic:
roundtablewriting-planWhen the task resists one-sentence compression after 2 attempts:
roundtable with a note: "Brief could not compress the task; direction convergence needed"decision = brief-unresolved and confidence = 0.5When the brief has more unknowns than confirmed facts:
roundtable because the decision space is too open for writing-planconfidence = 0.6| Condition | Route | Why |
|---|---|---|
| Task compressed to one sentence, direction clear | writing-plan | Ready for block definition |
| Task compressed but unknowns remain | roundtable | Unknowns need convergence |
| Cannot compress to one sentence | roundtable | Direction is too vague for brief |
| Unknowns outnumber facts | roundtable | Decision space is too open |
decision: brief-defined confidence: 0.9 rationale: The raw input was compressed into a usable one-page brief and the correct next decision skill is explicit. fallback: If the brief still does not reveal the actual task, return to roundtable. escalate: false next_skill: roundtable or writing-plan next_action: Enter the recommended next decision skill.
_KS_CLI="${KEYSTONE_CLI:-./keystone}"
$_KS_CLI state set last_decision "brief-defined" >/dev/null 2>&1 || true
$_KS_CLI state set artifacts.latest_brief_status "defined" >/dev/null 2>&1 || true
mkdir -p .keystone/telemetry/events
echo "{\"skill\":\"brief\",\"ts\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"decision\":\"brief-defined\",\"next_skill\":\"${NEXT_SKILL:-roundtable}\"}" >> .keystone/telemetry/events/$(date +%Y-%m).jsonl