feat(steering): K-Ext-2 Attention-Registry, Gate/Intake-Proposals, generische UI
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 4m13s
Test Suite / lint-backend (push) Successful in 3s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 19s
Test Suite / playwright-smoke (push) Successful in 12s
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 4m13s
Test Suite / lint-backend (push) Successful in 3s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 19s
Test Suite / playwright-smoke (push) Successful in 12s
Methodenuebergreifende Provider auf Kernel v0.3; verbindliche Coding Rules fuer Agenten in ADP und .cursor/rules. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
1bbc5dbfce
commit
b747200f3a
29 files changed
+1364
-182
No files matched your search
@@ -0,0 +1,107 @@
|
||||
import {
|
||||
PROPOSAL_UI_CONFIG,
|
||||
filterSprintProposals,
|
||||
listProposalKeys,
|
||||
proposalReasonLabel,
|
||||
} from '../utils/steeringProposals.js'
|
||||
import { backlogKindLabel, resolveBacklogVocabulary } from '../utils/resolveBacklogVocabulary.js'
|
||||
import { PriorityBadge } from './PriorityBadge.jsx'
|
||||
|
||||
export function SteeringProposalsPanel({
|
||||
proposalsByKey = {},
|
||||
proposalKeys = null,
|
||||
backlogVocabulary = null,
|
||||
canManage = false,
|
||||
onAcceptBacklogProposal,
|
||||
busy = false,
|
||||
filterContext = {},
|
||||
}) {
|
||||
const vocabulary = resolveBacklogVocabulary(backlogVocabulary)
|
||||
const keys = proposalKeys || listProposalKeys(proposalsByKey)
|
||||
|
||||
if (!keys.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{keys.map((proposalKey) => {
|
||||
const config = PROPOSAL_UI_CONFIG[proposalKey] || {
|
||||
title: proposalKey,
|
||||
lead: 'Steuerungsvorschlag',
|
||||
acceptLabel: 'Übernehmen',
|
||||
scopeTypes: ['backlog_item'],
|
||||
}
|
||||
let items = proposalsByKey[proposalKey] || []
|
||||
if (proposalKey === 'sprint_commit' && filterContext.workCycleId) {
|
||||
items = filterSprintProposals(items, filterContext.workCycleId)
|
||||
}
|
||||
if (!items.length) return null
|
||||
const ranker = items[0]?.ranker_key || 'heuristic_v0'
|
||||
|
||||
return (
|
||||
<section key={proposalKey} className="card steering-proposals">
|
||||
<div className="section-header">
|
||||
<div>
|
||||
<h2>{config.title}</h2>
|
||||
<p className="section-lead muted">
|
||||
{config.lead} Ranker: {ranker}.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<ol className="item-list steering-proposals__list">
|
||||
{items.map((proposal) => (
|
||||
<li
|
||||
key={`${proposalKey}-${proposal.scope_type}-${proposal.scope_id}`}
|
||||
className="list-item card-list-item steering-proposal"
|
||||
>
|
||||
<div className="list-item-main">
|
||||
<strong>
|
||||
{proposal.rank}. {proposal.title}
|
||||
</strong>
|
||||
<p className="list-item-sub muted">{proposalReasonLabel(proposal)}</p>
|
||||
{proposal.dependency_blocked && (
|
||||
<p className="list-item-sub muted steering-proposal__blocked">
|
||||
Abhängigkeit offen
|
||||
</p>
|
||||
)}
|
||||
{proposal.scope_type === 'roadmap_item' && (
|
||||
<p className="list-item-sub muted">
|
||||
Gate ohne Plan — Arbeitspaket anlegen oder Eingang committen
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="list-item-meta action-controls">
|
||||
{proposal.item_kind && (
|
||||
<span className="badge badge--kind muted">
|
||||
{backlogKindLabel(vocabulary, proposal.item_kind)}
|
||||
</span>
|
||||
)}
|
||||
{proposal.priority && <PriorityBadge priority={proposal.priority} />}
|
||||
{canManage
|
||||
&& proposal.scope_type === 'backlog_item'
|
||||
&& config.scopeTypes.includes('backlog_item') && (
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm"
|
||||
disabled={busy || proposal.dependency_blocked}
|
||||
onClick={() =>
|
||||
onAcceptBacklogProposal?.(proposal.scope_id, {
|
||||
work_cycle_id: proposal.work_cycle_id,
|
||||
proposal_key: proposalKey,
|
||||
})
|
||||
}
|
||||
>
|
||||
{config.acceptLabel}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
</section>
|
||||
)
|
||||
})}
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import { useEffect, useMemo } from 'react'
|
||||
import { useInitiativeOperations } from '../../context/InitiativeOperationsContext.jsx'
|
||||
import { BacklogSection } from '../../components/BacklogSection.jsx'
|
||||
import { SteeringProposalsPanel } from '../../components/SteeringProposalsPanel.jsx'
|
||||
import { LoadingState } from '../../components/LoadingState.jsx'
|
||||
|
||||
export function InitiativeInboxPage() {
|
||||
@@ -21,8 +23,20 @@ export function InitiativeInboxPage() {
|
||||
handleConvertBacklog,
|
||||
handleBulkConvertBacklog,
|
||||
handleDeleteBacklog,
|
||||
reloadSlices,
|
||||
steeringSnapshot,
|
||||
operatingContext,
|
||||
} = useInitiativeOperations()
|
||||
|
||||
useEffect(() => {
|
||||
reloadSlices(['steering_snapshot'])
|
||||
}, [reloadSlices])
|
||||
|
||||
const kernelProposals = useMemo(
|
||||
() => steeringSnapshot?.steering_kernel?.proposals || {},
|
||||
[steeringSnapshot],
|
||||
)
|
||||
|
||||
if (!capabilities.has('kairo.initiative.read')) {
|
||||
return null
|
||||
}
|
||||
@@ -34,6 +48,17 @@ export function InitiativeInboxPage() {
|
||||
return (
|
||||
<>
|
||||
{error && <p className="error">{error}</p>}
|
||||
<SteeringProposalsPanel
|
||||
proposalsByKey={kernelProposals}
|
||||
proposalKeys={['intake_triage']}
|
||||
backlogVocabulary={operatingContext?.backlog_vocabulary}
|
||||
canManage={capabilities.has('kairo.backlog.manage')}
|
||||
onAcceptBacklogProposal={async (itemId) => {
|
||||
await handleConvertBacklog(itemId, {})
|
||||
await reloadSlices(['steering_snapshot', 'actions', 'backlog'])
|
||||
}}
|
||||
busy={formBusy}
|
||||
/>
|
||||
<BacklogSection
|
||||
items={backlogItems}
|
||||
initiativeId={initiativeId}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { useEffect, useMemo } from 'react'
|
||||
import { useInitiativeOperations } from '../../context/InitiativeOperationsContext.jsx'
|
||||
import { GatesPlanPanel } from '../../components/GatesPlanPanel.jsx'
|
||||
import { SteeringProposalsPanel } from '../../components/SteeringProposalsPanel.jsx'
|
||||
|
||||
export function InitiativePlanPage() {
|
||||
const {
|
||||
@@ -10,9 +12,22 @@ export function InitiativePlanPage() {
|
||||
handleCreateRoadmapItem,
|
||||
handleReorderRoadmapItems,
|
||||
handleDeleteRoadmapItem,
|
||||
handleConvertBacklog,
|
||||
reloadSlices,
|
||||
steeringSnapshot,
|
||||
operatingContext,
|
||||
error,
|
||||
} = useInitiativeOperations()
|
||||
|
||||
useEffect(() => {
|
||||
reloadSlices(['steering_snapshot'])
|
||||
}, [reloadSlices])
|
||||
|
||||
const kernelProposals = useMemo(
|
||||
() => steeringSnapshot?.steering_kernel?.proposals || {},
|
||||
[steeringSnapshot],
|
||||
)
|
||||
|
||||
if (!capabilities.has('kairo.initiative.read')) {
|
||||
return null
|
||||
}
|
||||
@@ -20,6 +35,17 @@ export function InitiativePlanPage() {
|
||||
return (
|
||||
<>
|
||||
{error && <p className="error">{error}</p>}
|
||||
<SteeringProposalsPanel
|
||||
proposalsByKey={kernelProposals}
|
||||
proposalKeys={['gate_next_actions']}
|
||||
backlogVocabulary={operatingContext?.backlog_vocabulary}
|
||||
canManage={capabilities.has('kairo.backlog.manage')}
|
||||
onAcceptBacklogProposal={async (itemId) => {
|
||||
await handleConvertBacklog(itemId, {})
|
||||
await reloadSlices(['steering_snapshot', 'actions', 'backlog'])
|
||||
}}
|
||||
busy={formBusy}
|
||||
/>
|
||||
<GatesPlanPanel
|
||||
initiativeId={initiativeId}
|
||||
items={roadmapItems}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useEffect, useMemo } from 'react'
|
||||
import { RequireInitiativeScope } from '../../components/RequireInitiativeScope.jsx'
|
||||
import { ScopedInitiativeProvider } from '../../layout/ScopedInitiativeProvider.jsx'
|
||||
import { WorkCyclesPanel } from '../../components/WorkCyclesPanel.jsx'
|
||||
import { SprintCommitProposalPanel } from '../../components/SprintCommitProposalPanel.jsx'
|
||||
import { SteeringProposalsPanel } from '../../components/SteeringProposalsPanel.jsx'
|
||||
import { InitiativeActionsHub } from '../../components/InitiativeActionsHub.jsx'
|
||||
import { LoadingState } from '../../components/LoadingState.jsx'
|
||||
import { useInitiativeOperations } from '../../context/InitiativeOperationsContext.jsx'
|
||||
@@ -58,11 +58,8 @@ function PlanSprintInner() {
|
||||
reloadSlices(['steering_snapshot'])
|
||||
}, [reloadSlices])
|
||||
|
||||
const sprintCommitProposals = useMemo(
|
||||
() =>
|
||||
steeringSnapshot?.sprint_commit_proposals ||
|
||||
steeringSnapshot?.steering_kernel?.proposals?.sprint_commit ||
|
||||
[],
|
||||
const kernelProposals = useMemo(
|
||||
() => steeringSnapshot?.steering_kernel?.proposals || {},
|
||||
[steeringSnapshot],
|
||||
)
|
||||
|
||||
@@ -110,12 +107,13 @@ function PlanSprintInner() {
|
||||
busy={formBusy}
|
||||
/>
|
||||
{selectedWorkCycleId && (
|
||||
<SprintCommitProposalPanel
|
||||
proposals={sprintCommitProposals}
|
||||
selectedWorkCycleId={selectedWorkCycleId}
|
||||
<SteeringProposalsPanel
|
||||
proposalsByKey={kernelProposals}
|
||||
proposalKeys={['sprint_commit']}
|
||||
filterContext={{ workCycleId: selectedWorkCycleId }}
|
||||
backlogVocabulary={operatingContext?.backlog_vocabulary}
|
||||
canManage={capabilities.has('kairo.backlog.manage')}
|
||||
onAcceptProposal={async (itemId, options) => {
|
||||
onAcceptBacklogProposal={async (itemId, options) => {
|
||||
await handleConvertBacklog(itemId, options)
|
||||
await reloadSlices(['steering_snapshot', 'actions', 'backlog'])
|
||||
}}
|
||||
|
||||
@@ -1716,10 +1716,28 @@
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.sprint-commit-proposal__blocked {
|
||||
.sprint-commit-proposal__blocked,
|
||||
.steering-proposal__blocked {
|
||||
color: var(--jk-warning-text, #7a4b08);
|
||||
}
|
||||
|
||||
.steering-proposals {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.steering-proposals__list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.steering-proposal {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.archetype-badge {
|
||||
background: var(--jk-surface-muted, #eef2f6);
|
||||
color: var(--jk-text-secondary, #445);
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/** Generic steering proposal UI config (Kernel v0.3). */
|
||||
|
||||
export const PROPOSAL_UI_CONFIG = {
|
||||
sprint_commit: {
|
||||
title: 'Sprint-Vorschläge',
|
||||
lead: 'Ranker-gestützte Commit-Vorschläge — Accept committet ins Sprint-Backlog.',
|
||||
acceptLabel: 'In Sprint planen',
|
||||
scopeTypes: ['backlog_item'],
|
||||
},
|
||||
gate_next_actions: {
|
||||
title: 'Gate-Vorschläge',
|
||||
lead: 'Planning Debt und Eingang am aktiven Gate — committen oder AP planen.',
|
||||
acceptLabel: 'Committen',
|
||||
scopeTypes: ['backlog_item'],
|
||||
},
|
||||
intake_triage: {
|
||||
title: 'Triage-Vorschläge',
|
||||
lead: 'Priorisierte Eingangs-Reihenfolge — Heuristik oder später Agent-Ranker.',
|
||||
acceptLabel: 'Committen',
|
||||
scopeTypes: ['backlog_item'],
|
||||
},
|
||||
}
|
||||
|
||||
export function listProposalKeys(proposalsByKey = {}) {
|
||||
return Object.keys(PROPOSAL_UI_CONFIG).filter(
|
||||
(key) => Array.isArray(proposalsByKey[key]) && proposalsByKey[key].length > 0,
|
||||
)
|
||||
}
|
||||
|
||||
export function proposalReasonLabel(proposal) {
|
||||
const labels = {
|
||||
priority_critical: 'Dringlichkeit critical',
|
||||
priority_high: 'Hohe Priorität',
|
||||
candidate_bug_or_issue: 'Kandidat (Heuristik)',
|
||||
candidate_ready: 'Commit-bereit (Heuristik)',
|
||||
waiting_on_feature_action: 'Wartet auf Feature-AP',
|
||||
missing_parent_action: 'Feature-Referenz fehlt',
|
||||
dependency_blocked: 'Abhängigkeit offen',
|
||||
gate_backlog_ready: 'Gate-Eingang committen',
|
||||
planning_debt: 'Planning Debt — Plan ergänzen',
|
||||
intake_triage_candidate: 'Triage-Kandidat',
|
||||
}
|
||||
return labels[proposal?.reason_code] || proposal?.summary || 'Vorschlag'
|
||||
}
|
||||
|
||||
export function filterSprintProposals(proposals, workCycleId) {
|
||||
if (!workCycleId) return proposals || []
|
||||
return (proposals || []).filter(
|
||||
(p) => !p.work_cycle_id || String(p.work_cycle_id) === String(workCycleId),
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user