@polymorphism-tech/morph-spec 10.12.1 → 11.1.0
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/CLAUDE.md +27 -57
- package/README.md +53 -338
- package/bin/morph-spec.js +22 -373
- package/docs/CHEATSHEET.md +37 -166
- package/docs/QUICKSTART.md +14 -74
- package/framework/CLAUDE.md +15 -26
- package/framework/MORPH.md +34 -101
- package/framework/agents.json +12 -9
- package/framework/commands/morph-apply.md +5 -5
- package/framework/commands/morph-infra.md +1 -1
- package/framework/docs/CLI.md +74 -886
- package/framework/evals/review-checklist.md +14 -14
- package/framework/hooks/README.md +21 -189
- package/framework/hooks/claude-code/core/README.md +2 -5
- package/framework/hooks/claude-code/core/conventional-commit.js +2 -2
- package/framework/hooks/claude-code/core/denylist.json +3 -3
- package/framework/hooks/claude-code/core/graph-refresh-kick.js +2 -2
- package/framework/hooks/claude-code/core/masked-exit.js +6 -6
- package/framework/hooks/claude-code/core/pre-bash-denylist.js +2 -2
- package/framework/hooks/claude-code/core/protect-spec-files.js +17 -61
- package/framework/hooks/claude-code/core/stack-changed.js +35 -0
- package/framework/hooks/claude-code/core/validate-completion.js +32 -87
- package/framework/hooks/shared/{heavy-command.js → command-kind.js} +6 -79
- package/framework/hooks/shared/command-tokens.js +0 -139
- package/framework/hooks/shared/contract.js +14 -0
- package/framework/hooks/shared/feature-slug.js +21 -0
- package/framework/hooks/shared/frontend-locations.js +0 -1
- package/framework/hooks/shared/git-paths.js +0 -15
- package/framework/hooks/shared/graph-freshness.js +0 -19
- package/framework/hooks/shared/hook-response.js +0 -7
- package/framework/hooks/shared/morph-cli.js +2 -81
- package/framework/hooks/shared/owner-words.js +2 -120
- package/framework/hooks/shared/payload-utils.js +0 -39
- package/framework/hooks/shared/report-progress.js +7 -101
- package/framework/hooks/statusline.js +16 -60
- package/framework/mcp/registry.json +2 -2
- package/framework/rules/ai-agents-standards.md +1 -1
- package/framework/rules/asaas-standards.md +1 -1
- package/framework/rules/ef-standards.md +1 -1
- package/framework/rules/gsap-standards.md +1 -1
- package/framework/rules/hangfire-standards.md +1 -1
- package/framework/rules/implement-report.md +3 -3
- package/framework/rules/neon-auth-standards.md +1 -1
- package/framework/rules/nextjs-standards.md +1 -1
- package/framework/rules/plan-grammar.md +15 -13
- package/framework/rules/resend-standards.md +1 -1
- package/framework/rules/ui-design.md +5 -1
- package/framework/schemas/config.schema.json +95 -310
- package/framework/skills/README.md +12 -32
- package/framework/skills/core/create-umbraco-lp/SKILL.md +1 -1
- package/framework/skills/core/migrate-lp-to-umbraco/SKILL.md +1 -1
- package/framework/skills/core/morph-apply/SKILL.md +21 -46
- package/framework/skills/core/morph-plan/SKILL.md +28 -63
- package/framework/skills/core/morph-uiux/SKILL.md +23 -25
- package/framework/{templates/docs/ui-mockups.md → skills/core/morph-uiux/references/mockups.md} +4 -4
- package/framework/standards/STANDARDS.json +10 -11
- package/framework/standards/STANDARDS.meta.json +1 -1
- package/framework/standards/ai-agents/evals-with-cache.md +18 -32
- package/framework/standards/ai-agents/observability-patterns.md +2 -2
- package/framework/standards/architecture/code-comments.md +2 -5
- package/framework/standards/architecture/engineering-lens.md +1 -1
- package/framework/standards/backend/dotnet/testing.md +4 -4
- package/framework/standards/frontend/nextjs/lint.md +24 -10
- package/framework/standards/frontend/nextjs/testing.md +2 -2
- package/framework/standards/infrastructure/docker/local-compose-isolation.md +14 -30
- package/framework/templates/CLAUDE.md.core.guide.md +2 -2
- package/framework/templates/README.md +1 -1
- package/framework/templates/REGISTRY.json +3 -33
- package/framework/templates/docs/plan.md +3 -2
- package/framework/templates/dotnet/ai-kit/README.md +2 -4
- package/framework/templates/dotnet/ai-kit/src/Morph.AiKit/Evals/EvalCacheMissException.cs +1 -1
- package/framework/templates/dotnet/ai-kit/src/Morph.AiKit/Evals/EvalFixture.cs +1 -1
- package/package.json +1 -2
- package/src/commands/graph/explain.js +2 -1
- package/src/commands/graph/status.js +2 -1
- package/src/commands/mcp/mcp-setup.js +1 -2
- package/src/commands/project/doctor.js +13 -342
- package/src/commands/project/env.js +21 -52
- package/src/commands/project/init-contract.js +47 -0
- package/src/commands/project/init.js +36 -66
- package/src/commands/project/stack-scan.js +1 -1
- package/src/commands/project/update.js +16 -53
- package/src/commands/validation/check.js +128 -0
- package/src/commands/validation/plan-check.js +41 -64
- package/src/commands/validation/prove-red.js +1 -1
- package/src/core/paths/output-schema.js +0 -22
- package/src/core/templates/template-renderer.js +0 -14
- package/src/lib/ai/ai-project-scan.js +1 -6
- package/src/lib/check/attempts.js +38 -0
- package/src/lib/check/signals.js +145 -0
- package/src/lib/config/project-config.js +13 -0
- package/src/lib/contract/apply.js +62 -0
- package/src/lib/contract/defaults.js +96 -0
- package/src/lib/contract/merge.js +79 -0
- package/src/lib/contract/ports.js +43 -0
- package/src/lib/contract/scan.js +102 -0
- package/src/lib/detectors/claude-config-detector.js +7 -0
- package/src/lib/{procs → detectors}/mcp-config.js +1 -37
- package/src/lib/diff/diff-lines.js +64 -0
- package/src/lib/generators/architecture-scanner.js +1 -1
- package/src/lib/generators/scaffold-generator.js +0 -7
- package/src/lib/git/default-branch.js +0 -122
- package/src/lib/graph/diff-tree.js +2 -1
- package/src/lib/graph/god-nodes.js +2 -1
- package/src/lib/graph/graphify-runtime.js +0 -1
- package/src/lib/graph/graphifyignore.js +1 -1
- package/src/lib/graph/sanitize.js +2 -8
- package/src/lib/installers/memory-installer.js +15 -30
- package/src/lib/installers/stack-sync.js +16 -9
- package/src/lib/plan/checks.js +20 -64
- package/src/lib/plan/media.js +1 -1
- package/src/lib/plan/plan-parser.js +5 -5
- package/src/lib/review-reports.js +3 -77
- package/src/lib/scan/worktree-dirs.js +3 -0
- package/src/lib/specs/adr-index.js +2 -2
- package/src/lib/stack/dotnet-build-ignores.js +10 -2
- package/src/lib/stack/stack-scan.js +2 -2
- package/src/lib/stack-filter.js +3 -2
- package/src/lib/tests-audit/audit.js +1 -1
- package/src/scripts/setup-infra.js +6 -59
- package/src/utils/agents-installer.js +13 -37
- package/src/utils/atomic-json.js +27 -0
- package/src/utils/file-copier.js +24 -24
- package/src/utils/hooks-installer.js +9 -107
- package/claude-plugin.json +0 -14
- package/framework/commands/morph-archive.md +0 -46
- package/framework/commands/morph-hotfix.md +0 -17
- package/framework/commands/morph-preflight.md +0 -180
- package/framework/commands/morph-review.md +0 -15
- package/framework/commands/morph-status.md +0 -37
- package/framework/hooks/claude-code/core/block-destructive-worktree-removal.js +0 -80
- package/framework/hooks/claude-code/core/block-raw-worktree-add.js +0 -72
- package/framework/hooks/claude-code/core/enforce-phase-writes.js +0 -100
- package/framework/hooks/claude-code/core/gate-guard.js +0 -148
- package/framework/hooks/claude-code/core/heavy-gate.js +0 -78
- package/framework/hooks/claude-code/core/heavy-release.js +0 -23
- package/framework/hooks/claude-code/core/loop-detect.js +0 -79
- package/framework/hooks/claude-code/core/state-sync.js +0 -214
- package/framework/hooks/claude-code/core/telemetry-log.js +0 -259
- package/framework/hooks/claude-code/core/test-budget.js +0 -29
- package/framework/hooks/claude-code/core/worktree-context.js +0 -249
- package/framework/hooks/claude-code/core/worktree-create.js +0 -119
- package/framework/hooks/claude-code/core/worktree-env-inject.js +0 -68
- package/framework/hooks/claude-code/core/worktree-remove.js +0 -55
- package/framework/hooks/shared/build-check.js +0 -120
- package/framework/hooks/shared/claim-registry.js +0 -125
- package/framework/hooks/shared/e2e-check.js +0 -1022
- package/framework/hooks/shared/feature-locator.js +0 -82
- package/framework/hooks/shared/gate-event.js +0 -18
- package/framework/hooks/shared/gate-question.js +0 -20
- package/framework/hooks/shared/heavy-config.js +0 -113
- package/framework/hooks/shared/heavy-holders.js +0 -85
- package/framework/hooks/shared/heavy-slots.js +0 -280
- package/framework/hooks/shared/host-services.js +0 -440
- package/framework/hooks/shared/next-step.js +0 -181
- package/framework/hooks/shared/redact-secrets.js +0 -44
- package/framework/hooks/shared/reparse-scan.js +0 -40
- package/framework/hooks/shared/state-reader.js +0 -220
- package/framework/hooks/shared/state-writer.js +0 -112
- package/framework/hooks/shared/telemetry-logger.js +0 -101
- package/framework/hooks/shared/transcript-usage.js +0 -58
- package/framework/hooks/shared/worktree-root.js +0 -71
- package/framework/phases.json +0 -92
- package/framework/schemas/feature.schema.json +0 -242
- package/framework/skills/core/morph-apply/references/hotfix.md +0 -46
- package/framework/skills/core/morph-apply/references/machine.md +0 -30
- package/framework/skills/core/morph-apply/references/review.md +0 -77
- package/framework/skills/core/morph-plan/references/critique.md +0 -51
- package/framework/skills/core/morph-plan/references/interview.md +0 -37
- package/framework/templates/state.template.json +0 -17
- package/src/commands/dashboard/dashboard.js +0 -74
- package/src/commands/e2e/e2e.js +0 -400
- package/src/commands/observability/cost.js +0 -283
- package/src/commands/project/branch.js +0 -129
- package/src/commands/project/claim.js +0 -132
- package/src/commands/project/doctor-procs.js +0 -162
- package/src/commands/project/fleet.js +0 -66
- package/src/commands/project/heavy.js +0 -81
- package/src/commands/project/install-plugin-cmd.js +0 -27
- package/src/commands/project/status.js +0 -61
- package/src/commands/project/worktree.js +0 -1234
- package/src/commands/state/advance.js +0 -248
- package/src/commands/state/approve.js +0 -303
- package/src/commands/state/archive.js +0 -231
- package/src/commands/state/auto-approval.js +0 -67
- package/src/commands/state/create.js +0 -274
- package/src/commands/state/delete.js +0 -192
- package/src/commands/state/finish.js +0 -1247
- package/src/commands/state/gate-check.js +0 -244
- package/src/commands/state/gate-decision.js +0 -122
- package/src/commands/state/list.js +0 -244
- package/src/commands/state/next.js +0 -24
- package/src/commands/state/recap.js +0 -80
- package/src/commands/state/report-check.js +0 -244
- package/src/commands/state/retype.js +0 -110
- package/src/commands/validation/verify.js +0 -421
- package/src/core/state/feature-identity.js +0 -10
- package/src/core/state/gate-order.js +0 -23
- package/src/core/state/lifecycle-audit.js +0 -171
- package/src/core/state/state-manager.js +0 -523
- package/src/core/templates/template-seed.js +0 -21
- package/src/core/work-types.js +0 -44
- package/src/dashboard/app/App.jsx +0 -84
- package/src/dashboard/app/components/ActivityFeed.jsx +0 -166
- package/src/dashboard/app/components/CommandPalette.jsx +0 -144
- package/src/dashboard/app/components/DetailPanel.jsx +0 -43
- package/src/dashboard/app/components/EntityLink.jsx +0 -42
- package/src/dashboard/app/components/ErrorBoundary.jsx +0 -47
- package/src/dashboard/app/components/FlowGraph.jsx +0 -19
- package/src/dashboard/app/components/GatePauses.jsx +0 -116
- package/src/dashboard/app/components/KnowledgeMarkdown.jsx +0 -42
- package/src/dashboard/app/components/Markdown.jsx +0 -38
- package/src/dashboard/app/components/PhaseRail.jsx +0 -100
- package/src/dashboard/app/components/SearchFilter.jsx +0 -36
- package/src/dashboard/app/components/SessionMap.jsx +0 -77
- package/src/dashboard/app/components/Sidebar.jsx +0 -147
- package/src/dashboard/app/hooks/useMorphQuery.js +0 -44
- package/src/dashboard/app/hooks/usePref.js +0 -34
- package/src/dashboard/app/lib/format.js +0 -69
- package/src/dashboard/app/lib/phases.js +0 -75
- package/src/dashboard/app/lib/project.js +0 -38
- package/src/dashboard/app/main.jsx +0 -13
- package/src/dashboard/app/pages/Activity.jsx +0 -28
- package/src/dashboard/app/pages/AgentMap.jsx +0 -363
- package/src/dashboard/app/pages/FeatureDetail.jsx +0 -579
- package/src/dashboard/app/pages/Features.jsx +0 -393
- package/src/dashboard/app/pages/Guide.jsx +0 -145
- package/src/dashboard/app/pages/HookInspector.jsx +0 -444
- package/src/dashboard/app/pages/PhasePipeline.jsx +0 -273
- package/src/dashboard/app/pages/Portfolio.jsx +0 -190
- package/src/dashboard/app/pages/RulesMap.jsx +0 -285
- package/src/dashboard/app/pages/SkillsLibrary.jsx +0 -468
- package/src/dashboard/app/pages/Standards.jsx +0 -392
- package/src/dashboard/app/styles/index.css +0 -187
- package/src/dashboard/index.html +0 -14
- package/src/dashboard/package.json +0 -32
- package/src/dashboard/scanner/activity-scanner.js +0 -321
- package/src/dashboard/scanner/agents-scanner.js +0 -67
- package/src/dashboard/scanner/docs-scanner.js +0 -34
- package/src/dashboard/scanner/feature-status.js +0 -7
- package/src/dashboard/scanner/features-scanner.js +0 -397
- package/src/dashboard/scanner/hooks-scanner.js +0 -96
- package/src/dashboard/scanner/index.js +0 -21
- package/src/dashboard/scanner/phases-scanner.js +0 -14
- package/src/dashboard/scanner/portfolio.js +0 -129
- package/src/dashboard/scanner/project-api.js +0 -160
- package/src/dashboard/scanner/rules-scanner.js +0 -46
- package/src/dashboard/scanner/skills-scanner.js +0 -104
- package/src/dashboard/scanner/standards-scanner.js +0 -38
- package/src/dashboard/vite-plugin-morph-data.js +0 -120
- package/src/dashboard/vite.config.js +0 -26
- package/src/lib/ci/ci-verify.js +0 -30
- package/src/lib/ci/github-ci.js +0 -52
- package/src/lib/ci/pr-checks.js +0 -76
- package/src/lib/e2e/applicability.js +0 -39
- package/src/lib/e2e/compose-env.js +0 -80
- package/src/lib/e2e/stack-teardown.js +0 -96
- package/src/lib/git/branch-classifier.js +0 -104
- package/src/lib/git/evidence-staleness.js +0 -40
- package/src/lib/git/gh.js +0 -15
- package/src/lib/git/pending-prs.js +0 -58
- package/src/lib/git/pr-files.js +0 -31
- package/src/lib/git/pr-index.js +0 -39
- package/src/lib/git/tree-fingerprint.js +0 -58
- package/src/lib/git/tree-state.js +0 -125
- package/src/lib/heavy/cleanup.js +0 -72
- package/src/lib/heavy/gate.js +0 -168
- package/src/lib/heavy/live-stacks.js +0 -64
- package/src/lib/heavy/reclaim.js +0 -107
- package/src/lib/heavy/watchdog.js +0 -46
- package/src/lib/next-step.js +0 -12
- package/src/lib/plan/critique.js +0 -67
- package/src/lib/plan/plan-template.js +0 -18
- package/src/lib/procs/classify.js +0 -91
- package/src/lib/procs/list.js +0 -124
- package/src/lib/procs/prune.js +0 -47
- package/src/lib/procs/wslconfig.js +0 -70
- package/src/lib/projects/registry.js +0 -121
- package/src/lib/recap/piper.js +0 -36
- package/src/lib/recap/recap.js +0 -259
- package/src/lib/review-confirmation.js +0 -66
- package/src/lib/risk/diff-risk.js +0 -137
- package/src/lib/risk-detector.js +0 -638
- package/src/lib/specs/design-seed.js +0 -18
- package/src/lib/specs/screen-checklist.js +0 -315
- package/src/lib/stack/stack-profile.js +0 -69
- package/src/lib/tasks/eval-node.js +0 -293
- package/src/lib/tasks/linux-runner.js +0 -200
- package/src/lib/tasks/test-nodes.js +0 -414
- package/src/lib/tasks/test-runner.js +0 -569
- package/src/lib/telemetry/metrics.js +0 -384
- package/src/lib/telemetry/telemetry-reader.js +0 -276
- package/src/lib/telemetry/verify-event.js +0 -57
- package/src/lib/validators/code-budget/code-budget-validator.js +0 -170
- package/src/lib/validators/contracts/contract-compliance-validator.js +0 -219
- package/src/lib/validators/nextjs/next-component-validator.js +0 -142
- package/src/lib/validators/packages/package-validator.js +0 -310
- package/src/lib/validators/reuse/reuse-validator.js +0 -202
- package/src/lib/validators/reuse/symbol-scanner.js +0 -64
- package/src/lib/validators/validation-runner.js +0 -188
- package/src/lib/validators/verify-cache.js +0 -63
- package/src/lib/validators/verify-runner.js +0 -971
- package/src/lib/verify/affected.js +0 -143
- package/src/lib/verify/detached.js +0 -159
- package/src/lib/view/feature-html.js +0 -480
- package/src/lib/view/feature-page.client.js +0 -109
- package/src/lib/view/feature-page.css +0 -278
- package/src/lib/view/feature-view.js +0 -113
- package/src/lib/view/flow-layers.js +0 -79
- package/src/lib/view/flow-svg.js +0 -63
- package/src/lib/view/tokens.css +0 -18
- package/src/lib/work-type-detector.js +0 -81
- package/src/lib/worktree/dirs.js +0 -3
- package/src/lib/worktree/docker-audit.js +0 -175
- package/src/lib/worktree/env-allocator.js +0 -177
- package/src/lib/worktree/feature-truth.js +0 -145
- package/src/lib/worktree/finish-backup.js +0 -529
- package/src/lib/worktree/fleet-scanner.js +0 -223
- package/src/lib/worktree/ignored-triage.js +0 -136
- package/src/lib/worktree/vscode-settings.js +0 -112
- package/src/lib/worktree/worktree-audit.js +0 -323
- package/src/lib/worktree/worktree-include.js +0 -44
- package/src/scripts/install-plugin.js +0 -114
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
import { useState, useMemo, useCallback } from 'react';
|
|
2
|
-
import { useNavigate } from 'react-router-dom';
|
|
3
|
-
import { Handle, Position } from '@xyflow/react';
|
|
4
|
-
import { Terminal, Robot, UsersThree } from '@phosphor-icons/react';
|
|
5
|
-
import morphData from 'virtual:morph-data';
|
|
6
|
-
import FlowGraph from '../components/FlowGraph.jsx';
|
|
7
|
-
import DetailPanel from '../components/DetailPanel.jsx';
|
|
8
|
-
import SearchFilter from '../components/SearchFilter.jsx';
|
|
9
|
-
import Markdown from '../components/Markdown.jsx';
|
|
10
|
-
import EntityLink, { useSelection, entityHref } from '../components/EntityLink.jsx';
|
|
11
|
-
import { phaseMeta } from '../lib/phases.js';
|
|
12
|
-
import { splitFrontmatter } from '../lib/format.js';
|
|
13
|
-
|
|
14
|
-
const SUPPORT_LABEL = 'Skills de apoio';
|
|
15
|
-
const GENERIC_ID = 'persona:*';
|
|
16
|
-
const GENERIC_LABEL = 'implementadores (morph-{id})';
|
|
17
|
-
const SUPPORT_COLOR = 'var(--color-dim)';
|
|
18
|
-
const PERSONA_COLOR = 'var(--color-ok)';
|
|
19
|
-
|
|
20
|
-
const INVOKE_YES = 'invocável por você';
|
|
21
|
-
const INVOKE_NO = 'só interna';
|
|
22
|
-
|
|
23
|
-
const tint = (color, pct = 14) => `color-mix(in srgb, ${color} ${pct}%, var(--color-core))`;
|
|
24
|
-
|
|
25
|
-
const HANDLE = { width: 7, height: 7, border: 0 };
|
|
26
|
-
|
|
27
|
-
function PhaseNode({ data }) {
|
|
28
|
-
return (
|
|
29
|
-
<div
|
|
30
|
-
className="w-[220px] cursor-pointer select-none rounded-xl px-4 py-2.5"
|
|
31
|
-
style={{ background: tint(data.color, 18), boxShadow: `inset 0 0 0 1.5px ${data.color}` }}
|
|
32
|
-
>
|
|
33
|
-
<div className="text-[13px] font-semibold leading-tight text-[var(--color-fg)]">{data.label}</div>
|
|
34
|
-
<div className="mt-0.5 text-xs" style={{ color: data.color }}>
|
|
35
|
-
fase{data.optional ? ' opcional' : ''}
|
|
36
|
-
</div>
|
|
37
|
-
<Handle type="source" position={Position.Bottom} style={{ ...HANDLE, background: data.color }} />
|
|
38
|
-
</div>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function SkillNode({ data }) {
|
|
43
|
-
return (
|
|
44
|
-
<div
|
|
45
|
-
className="w-[220px] cursor-pointer select-none rounded-xl px-3.5 py-2 transition-opacity"
|
|
46
|
-
style={{
|
|
47
|
-
background: tint(data.color, 12),
|
|
48
|
-
boxShadow: `inset 0 0 0 1.5px ${data.color}`,
|
|
49
|
-
opacity: data.dimmed ? 0.2 : 1,
|
|
50
|
-
}}
|
|
51
|
-
>
|
|
52
|
-
<Handle type="target" position={Position.Top} id="top-in" style={{ ...HANDLE, background: data.color }} />
|
|
53
|
-
<div className="flex items-center gap-1.5">
|
|
54
|
-
<span className="truncate font-mono text-[13px] font-medium text-[var(--color-fg)]" title={data.label}>{data.label}</span>
|
|
55
|
-
{data.userInvocable && <Terminal weight="light" size={13} className="shrink-0 text-[var(--color-dim)]" aria-label="invocável por você" />}
|
|
56
|
-
</div>
|
|
57
|
-
<div className="mt-0.5 text-xs text-[var(--color-dim)]">
|
|
58
|
-
{data.dispatchCount > 0 ? `${data.dispatchCount} prompt${data.dispatchCount > 1 ? 's' : ''} a sub-agents` : data.sub}
|
|
59
|
-
</div>
|
|
60
|
-
<Handle type="source" position={Position.Bottom} id="bottom-out" style={{ ...HANDLE, background: data.color }} />
|
|
61
|
-
<Handle type="source" position={Position.Top} id="top-out" style={{ ...HANDLE, background: data.color, left: '70%' }} />
|
|
62
|
-
</div>
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function PersonaNode({ data }) {
|
|
67
|
-
const Icon = data.generic ? UsersThree : Robot;
|
|
68
|
-
return (
|
|
69
|
-
<div
|
|
70
|
-
className="w-[220px] cursor-pointer select-none rounded-full px-4 py-2 transition-opacity"
|
|
71
|
-
style={{
|
|
72
|
-
background: tint(PERSONA_COLOR, 10),
|
|
73
|
-
boxShadow: `inset 0 0 0 1.5px ${PERSONA_COLOR}`,
|
|
74
|
-
opacity: data.dimmed ? 0.25 : 1,
|
|
75
|
-
}}
|
|
76
|
-
>
|
|
77
|
-
<Handle type="target" position={Position.Top} id="top-in" style={{ ...HANDLE, background: PERSONA_COLOR }} />
|
|
78
|
-
<div className="flex items-center gap-2">
|
|
79
|
-
<Icon weight="light" size={15} className="shrink-0 text-[var(--color-ok)]" />
|
|
80
|
-
<span className="truncate font-mono text-[13px] text-[var(--color-fg)]" title={data.label}>{data.label}</span>
|
|
81
|
-
</div>
|
|
82
|
-
<Handle type="target" position={Position.Bottom} id="bottom-in" style={{ ...HANDLE, background: PERSONA_COLOR }} />
|
|
83
|
-
</div>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function GroupNode({ data }) {
|
|
88
|
-
return (
|
|
89
|
-
<div
|
|
90
|
-
className="pointer-events-none rounded-2xl"
|
|
91
|
-
style={{ width: data.width, height: data.height, boxShadow: 'inset 0 0 0 1px var(--color-hair-strong)', background: 'rgb(255 255 255 / 0.015)' }}
|
|
92
|
-
>
|
|
93
|
-
<div className="px-4 pt-3 text-[13px] font-medium text-[var(--color-dim)]">{data.label}</div>
|
|
94
|
-
</div>
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const nodeTypes = { phaseNode: PhaseNode, skillNode: SkillNode, personaNode: PersonaNode, groupNode: GroupNode };
|
|
99
|
-
|
|
100
|
-
function skillPhaseOf(skill, phases) {
|
|
101
|
-
if (skill.phase) return skill.phase;
|
|
102
|
-
return phases.find((p) => p.skill === skill.id)?.id || null;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function dispatchTargets(skill) {
|
|
106
|
-
const out = new Set();
|
|
107
|
-
for (const d of skill.dispatches || []) {
|
|
108
|
-
if (d.generic) out.add(GENERIC_ID);
|
|
109
|
-
else for (const p of d.personas || []) out.add(p);
|
|
110
|
-
}
|
|
111
|
-
return [...out];
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
const COL = 250;
|
|
115
|
-
const ROW_PHASE = 0;
|
|
116
|
-
const ROW_SKILL = 120;
|
|
117
|
-
const ROW_PERSONA = 290;
|
|
118
|
-
const ROW_SUPPORT = 440;
|
|
119
|
-
const SUPPORT_PER_ROW = 5;
|
|
120
|
-
|
|
121
|
-
function buildGraph({ skills, phases, agents, isMatch, hasFilter }) {
|
|
122
|
-
const nodes = [];
|
|
123
|
-
const edges = [];
|
|
124
|
-
const phaseSkills = new Map();
|
|
125
|
-
const support = [];
|
|
126
|
-
for (const s of skills) {
|
|
127
|
-
const ph = skillPhaseOf(s, phases);
|
|
128
|
-
if (ph && phases.some((p) => p.id === ph)) {
|
|
129
|
-
if (!phaseSkills.has(ph)) phaseSkills.set(ph, []);
|
|
130
|
-
phaseSkills.get(ph).push(s);
|
|
131
|
-
} else support.push(s);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
phases.forEach((p, i) => {
|
|
135
|
-
const meta = phaseMeta(p.id);
|
|
136
|
-
const x = i * COL;
|
|
137
|
-
nodes.push({
|
|
138
|
-
id: `phase:${p.id}`, type: 'phaseNode', position: { x, y: ROW_PHASE },
|
|
139
|
-
data: { label: meta.label, color: meta.color, optional: p.optional, phaseId: p.id },
|
|
140
|
-
});
|
|
141
|
-
(phaseSkills.get(p.id) || []).forEach((s, j) => {
|
|
142
|
-
nodes.push(skillNode(s, x, ROW_SKILL + j * 70, meta.color, meta.label));
|
|
143
|
-
edges.push({
|
|
144
|
-
id: `e:phase:${p.id}->${s.id}`, source: `phase:${p.id}`, target: s.id, targetHandle: 'top-in',
|
|
145
|
-
style: { stroke: meta.color, strokeWidth: 1.5, opacity: hasFilter && !isMatch(s) ? 0.12 : 0.8 },
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
const supportCols = Math.min(SUPPORT_PER_ROW, Math.max(1, support.length));
|
|
151
|
-
const supportRows = Math.ceil(support.length / supportCols);
|
|
152
|
-
const supportWidth = supportCols * COL;
|
|
153
|
-
const gridWidth = Math.max(phases.length * COL, supportWidth);
|
|
154
|
-
const supportX0 = (gridWidth - supportWidth) / 2;
|
|
155
|
-
if (support.length) {
|
|
156
|
-
nodes.push({
|
|
157
|
-
id: 'group:support', type: 'groupNode', position: { x: supportX0 - 15, y: ROW_SUPPORT - 45 },
|
|
158
|
-
data: { label: `${SUPPORT_LABEL} (fora do pipeline de fases)`, width: supportWidth, height: supportRows * 80 + 45 },
|
|
159
|
-
selectable: false, draggable: false, focusable: false, zIndex: -1,
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
support.forEach((s, i) => {
|
|
163
|
-
const x = supportX0 + (i % supportCols) * COL;
|
|
164
|
-
const y = ROW_SUPPORT + Math.floor(i / supportCols) * 80;
|
|
165
|
-
nodes.push(skillNode(s, x, y, SUPPORT_COLOR, SUPPORT_LABEL));
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
const personaIds = new Set();
|
|
169
|
-
for (const s of skills) for (const t of dispatchTargets(s)) personaIds.add(t);
|
|
170
|
-
const agentOrder = agents.map((a) => a.id);
|
|
171
|
-
const personas = [...personaIds].sort((a, b) => {
|
|
172
|
-
if (a === GENERIC_ID) return 1;
|
|
173
|
-
if (b === GENERIC_ID) return -1;
|
|
174
|
-
return (agentOrder.indexOf(a) + 1 || 99) - (agentOrder.indexOf(b) + 1 || 99);
|
|
175
|
-
});
|
|
176
|
-
const personaX0 = (gridWidth - personas.length * COL) / 2;
|
|
177
|
-
personas.forEach((pid, i) => {
|
|
178
|
-
const touched = skills.filter((s) => dispatchTargets(s).includes(pid));
|
|
179
|
-
nodes.push({
|
|
180
|
-
id: `persona:${pid}`, type: 'personaNode', position: { x: personaX0 + i * COL, y: ROW_PERSONA },
|
|
181
|
-
data: {
|
|
182
|
-
label: pid === GENERIC_ID ? GENERIC_LABEL : `morph-${pid}`,
|
|
183
|
-
personaId: pid === GENERIC_ID ? null : pid,
|
|
184
|
-
generic: pid === GENERIC_ID,
|
|
185
|
-
color: PERSONA_COLOR,
|
|
186
|
-
dimmed: hasFilter && !touched.some(isMatch),
|
|
187
|
-
},
|
|
188
|
-
});
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
const supportIds = new Set(support.map((s) => s.id));
|
|
192
|
-
for (const s of skills) {
|
|
193
|
-
const fromSupport = supportIds.has(s.id);
|
|
194
|
-
for (const pid of dispatchTargets(s)) {
|
|
195
|
-
edges.push({
|
|
196
|
-
id: `e:${s.id}->persona:${pid}`,
|
|
197
|
-
source: s.id, sourceHandle: fromSupport ? 'top-out' : 'bottom-out',
|
|
198
|
-
target: `persona:${pid}`, targetHandle: fromSupport ? 'bottom-in' : 'top-in',
|
|
199
|
-
style: { stroke: PERSONA_COLOR, strokeWidth: 1.25, strokeDasharray: '5 4', opacity: hasFilter && !isMatch(s) ? 0.1 : 0.6 },
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
return { nodes, edges, supportCount: support.length, linkedCount: skills.length - support.length };
|
|
205
|
-
|
|
206
|
-
function skillNode(s, x, y, color, sub) {
|
|
207
|
-
return {
|
|
208
|
-
id: s.id, type: 'skillNode', position: { x, y },
|
|
209
|
-
data: {
|
|
210
|
-
label: s.id, sub, color, skillId: s.id,
|
|
211
|
-
userInvocable: Boolean(s.userInvocable),
|
|
212
|
-
dispatchCount: (s.dispatches || []).length,
|
|
213
|
-
dimmed: hasFilter && !isMatch(s),
|
|
214
|
-
},
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
function Section({ title, children }) {
|
|
220
|
-
return (
|
|
221
|
-
<section className="space-y-2">
|
|
222
|
-
<h3 className="text-xs font-medium text-[var(--color-faint)]">{title}</h3>
|
|
223
|
-
{children}
|
|
224
|
-
</section>
|
|
225
|
-
);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
function PromptBlock({ text, label = 'Prompt enviado ao sub-agent' }) {
|
|
229
|
-
return (
|
|
230
|
-
<div
|
|
231
|
-
className="overflow-hidden rounded-xl"
|
|
232
|
-
style={{ background: tint('var(--color-phase-implement)', 8), boxShadow: 'inset 0 0 0 1px color-mix(in srgb, var(--color-phase-implement) 45%, transparent)' }}
|
|
233
|
-
>
|
|
234
|
-
<div className="flex items-center gap-1.5 border-b border-[var(--color-hair)] px-3 py-1.5 text-xs text-[var(--color-phase-implement)]">
|
|
235
|
-
<Robot weight="light" size={14} />
|
|
236
|
-
{label}
|
|
237
|
-
</div>
|
|
238
|
-
<pre className="m-0 overflow-x-auto whitespace-pre-wrap px-3 py-2.5 font-mono text-xs leading-relaxed text-[var(--color-fg)]">{text}</pre>
|
|
239
|
-
</div>
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
function hastText(node) {
|
|
244
|
-
if (!node) return '';
|
|
245
|
-
if (node.type === 'text') return node.value || '';
|
|
246
|
-
return (node.children || []).map(hastText).join('');
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
function isDispatchBlock(text) {
|
|
250
|
-
const t = text.trimStart();
|
|
251
|
-
return t.startsWith('dispatch Agent') || t.includes('subagent_type');
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
const SKILL_MD_COMPONENTS = {
|
|
255
|
-
pre({ node, ...rest }) {
|
|
256
|
-
const text = hastText(node);
|
|
257
|
-
if (isDispatchBlock(text)) return <PromptBlock text={text.replace(/\n$/, '')} />;
|
|
258
|
-
return <pre {...rest} />;
|
|
259
|
-
},
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
function DispatchItem({ d }) {
|
|
263
|
-
const personas = d.personas || [];
|
|
264
|
-
return (
|
|
265
|
-
<li className="space-y-2 rounded-xl bg-white/[0.02] p-3 shadow-[inset_0_0_0_1px_var(--color-hair)]">
|
|
266
|
-
<div className="flex flex-wrap items-center gap-1.5 text-xs text-[var(--color-dim)]">
|
|
267
|
-
<span>Para</span>
|
|
268
|
-
{d.generic ? (
|
|
269
|
-
<span className="rounded-full px-2 py-0.5 font-mono text-xs text-[var(--color-fg)] shadow-[inset_0_0_0_1px_var(--color-hair-strong)]">
|
|
270
|
-
qualquer implementador (morph-{'{id}'})
|
|
271
|
-
</span>
|
|
272
|
-
) : personas.length ? (
|
|
273
|
-
personas.map((p) => <EntityLink key={p} kind="persona" id={p} chip>{`morph-${p}`}</EntityLink>)
|
|
274
|
-
) : d.builtin?.length ? (
|
|
275
|
-
d.builtin.map((b) => (
|
|
276
|
-
<span key={b} className="rounded-full px-2 py-0.5 font-mono text-xs text-[var(--color-fg)] shadow-[inset_0_0_0_1px_var(--color-hair-strong)]" title="sub-agent nativo do Claude Code, não uma persona do morph-spec">
|
|
277
|
-
{b}
|
|
278
|
-
</span>
|
|
279
|
-
))
|
|
280
|
-
) : (
|
|
281
|
-
<span>sub-agent não identificado</span>
|
|
282
|
-
)}
|
|
283
|
-
</div>
|
|
284
|
-
{d.context && (
|
|
285
|
-
<div className="text-sm text-[var(--color-dim)]">
|
|
286
|
-
<Markdown text={d.context} size="sm" />
|
|
287
|
-
</div>
|
|
288
|
-
)}
|
|
289
|
-
{d.text && <PromptBlock text={d.text} />}
|
|
290
|
-
</li>
|
|
291
|
-
);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
export function SkillDetail({ skill, phases = morphData.phases?.list || [] }) {
|
|
295
|
-
const phaseId = skillPhaseOf(skill, phases);
|
|
296
|
-
const dispatches = skill.dispatches || [];
|
|
297
|
-
const stacks = skill.stacks || [];
|
|
298
|
-
const body = useMemo(() => splitFrontmatter(skill.content || '').body, [skill.content]);
|
|
299
|
-
|
|
300
|
-
return (
|
|
301
|
-
<div className="space-y-6 text-sm text-[var(--color-dim)]">
|
|
302
|
-
{skill.description && <p className="leading-relaxed text-[var(--color-fg)]">{skill.description}</p>}
|
|
303
|
-
|
|
304
|
-
<dl className="grid grid-cols-[max-content_1fr] gap-x-4 gap-y-2 rounded-xl bg-white/[0.03] px-4 py-3 shadow-[inset_0_0_0_1px_var(--color-hair)]">
|
|
305
|
-
{skill.whenToUse && (
|
|
306
|
-
<>
|
|
307
|
-
<dt className="text-xs leading-6 text-[var(--color-faint)]">Quando usar</dt>
|
|
308
|
-
<dd className="leading-6">{skill.whenToUse}</dd>
|
|
309
|
-
</>
|
|
310
|
-
)}
|
|
311
|
-
<dt className="text-xs leading-6 text-[var(--color-faint)]">Fase</dt>
|
|
312
|
-
<dd className="leading-6">
|
|
313
|
-
{phaseId
|
|
314
|
-
? <EntityLink kind="phase" id={phaseId}>{phaseMeta(phaseId).label}</EntityLink>
|
|
315
|
-
: <span>Skill de apoio (não pertence a uma fase)</span>}
|
|
316
|
-
</dd>
|
|
317
|
-
<dt className="text-xs leading-6 text-[var(--color-faint)]">Invocação</dt>
|
|
318
|
-
<dd className="leading-6">
|
|
319
|
-
{skill.userInvocable
|
|
320
|
-
? <>você pode rodar <code className="rounded bg-white/[0.06] px-1.5 py-0.5 font-mono text-xs text-[var(--color-fg)]">/{skill.id}</code></>
|
|
321
|
-
: 'interna: o orquestrador a carrega, você não a chama direto'}
|
|
322
|
-
</dd>
|
|
323
|
-
{stacks.length > 0 && (
|
|
324
|
-
<>
|
|
325
|
-
<dt className="text-xs leading-6 text-[var(--color-faint)]">Stacks</dt>
|
|
326
|
-
<dd className="flex flex-wrap gap-1.5 py-0.5">
|
|
327
|
-
{stacks.map((s) => (
|
|
328
|
-
<span key={s} className="rounded-full px-2 py-0.5 font-mono text-xs shadow-[inset_0_0_0_1px_var(--color-hair)]">{s}</span>
|
|
329
|
-
))}
|
|
330
|
-
</dd>
|
|
331
|
-
</>
|
|
332
|
-
)}
|
|
333
|
-
{skill.allowedTools?.length > 0 && (
|
|
334
|
-
<>
|
|
335
|
-
<dt className="text-xs leading-6 text-[var(--color-faint)]">Ferramentas</dt>
|
|
336
|
-
<dd className="flex flex-wrap gap-1.5 py-0.5">
|
|
337
|
-
{skill.allowedTools.map((t) => (
|
|
338
|
-
<span key={t} className="rounded-full px-2 py-0.5 font-mono text-xs shadow-[inset_0_0_0_1px_var(--color-hair)]">{t}</span>
|
|
339
|
-
))}
|
|
340
|
-
</dd>
|
|
341
|
-
</>
|
|
342
|
-
)}
|
|
343
|
-
</dl>
|
|
344
|
-
|
|
345
|
-
{dispatches.length > 0 && (
|
|
346
|
-
<Section title={`Prompts enviados a sub-agents (${dispatches.length})`}>
|
|
347
|
-
<ul className="space-y-3">
|
|
348
|
-
{dispatches.map((d) => <DispatchItem key={d.index} d={d} />)}
|
|
349
|
-
</ul>
|
|
350
|
-
</Section>
|
|
351
|
-
)}
|
|
352
|
-
|
|
353
|
-
{body.trim() && (
|
|
354
|
-
<Section title="SKILL.md completo">
|
|
355
|
-
<Markdown text={body} size="sm" components={SKILL_MD_COMPONENTS} />
|
|
356
|
-
</Section>
|
|
357
|
-
)}
|
|
358
|
-
</div>
|
|
359
|
-
);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
export default function SkillsLibrary() {
|
|
363
|
-
const skills = morphData.skills || [];
|
|
364
|
-
const phases = morphData.phases?.list || [];
|
|
365
|
-
const agents = morphData.agents?.list || [];
|
|
366
|
-
const navigate = useNavigate();
|
|
367
|
-
const [sel, setSel] = useSelection();
|
|
368
|
-
const [search, setSearch] = useState('');
|
|
369
|
-
const [phaseFilter, setPhaseFilter] = useState('');
|
|
370
|
-
const [invokeFilter, setInvokeFilter] = useState('');
|
|
371
|
-
|
|
372
|
-
const phaseOptions = useMemo(() => [...phases.map((p) => phaseMeta(p.id).label), SUPPORT_LABEL], [phases]);
|
|
373
|
-
|
|
374
|
-
const isMatch = useCallback((s) => {
|
|
375
|
-
const q = search.trim().toLowerCase();
|
|
376
|
-
if (q) {
|
|
377
|
-
const hay = [s.id, s.name, s.description, s.whenToUse].filter(Boolean).join(' ').toLowerCase();
|
|
378
|
-
if (!hay.includes(q)) return false;
|
|
379
|
-
}
|
|
380
|
-
if (phaseFilter) {
|
|
381
|
-
const ph = skillPhaseOf(s, phases);
|
|
382
|
-
const label = ph ? phaseMeta(ph).label : SUPPORT_LABEL;
|
|
383
|
-
if (label !== phaseFilter) return false;
|
|
384
|
-
}
|
|
385
|
-
if (invokeFilter === INVOKE_YES && !s.userInvocable) return false;
|
|
386
|
-
if (invokeFilter === INVOKE_NO && s.userInvocable) return false;
|
|
387
|
-
return true;
|
|
388
|
-
}, [search, phaseFilter, invokeFilter, phases]);
|
|
389
|
-
|
|
390
|
-
const hasFilter = Boolean(search.trim() || phaseFilter || invokeFilter);
|
|
391
|
-
const matchCount = useMemo(() => skills.filter(isMatch).length, [skills, isMatch]);
|
|
392
|
-
|
|
393
|
-
const graph = useMemo(
|
|
394
|
-
() => buildGraph({ skills, phases, agents, isMatch, hasFilter }),
|
|
395
|
-
[skills, phases, agents, isMatch, hasFilter],
|
|
396
|
-
);
|
|
397
|
-
const dispatchingCount = skills.filter((s) => (s.dispatches || []).length > 0).length;
|
|
398
|
-
|
|
399
|
-
const selected = sel ? skills.find((s) => s.id === sel) : null;
|
|
400
|
-
const selectedPhase = selected ? skillPhaseOf(selected, phases) : null;
|
|
401
|
-
const close = useCallback(() => setSel(null), [setSel]);
|
|
402
|
-
|
|
403
|
-
const onNodeClick = useCallback((_e, node) => {
|
|
404
|
-
if (node.type === 'skillNode') setSel(node.data.skillId);
|
|
405
|
-
else if (node.type === 'phaseNode') navigate(entityHref('phase', node.data.phaseId));
|
|
406
|
-
else if (node.type === 'personaNode' && node.data.personaId) navigate(entityHref('persona', node.data.personaId));
|
|
407
|
-
}, [setSel, navigate]);
|
|
408
|
-
|
|
409
|
-
const filters = [
|
|
410
|
-
{ name: 'phase', label: 'Fase', options: phaseOptions, value: phaseFilter },
|
|
411
|
-
{ name: 'invoke', label: 'Invocação', options: [INVOKE_YES, INVOKE_NO], value: invokeFilter },
|
|
412
|
-
];
|
|
413
|
-
|
|
414
|
-
return (
|
|
415
|
-
<div className="flex h-full flex-col">
|
|
416
|
-
<SearchFilter
|
|
417
|
-
placeholder="Buscar skill por nome, descrição ou quando usar"
|
|
418
|
-
filters={filters}
|
|
419
|
-
onSearchChange={setSearch}
|
|
420
|
-
onFilterChange={(name, value) => {
|
|
421
|
-
if (name === 'phase') setPhaseFilter(value);
|
|
422
|
-
if (name === 'invoke') setInvokeFilter(value);
|
|
423
|
-
}}
|
|
424
|
-
/>
|
|
425
|
-
|
|
426
|
-
<div className="relative flex-1">
|
|
427
|
-
<FlowGraph nodes={graph.nodes} edges={graph.edges} nodeTypes={nodeTypes} onNodeClick={onNodeClick} fitView />
|
|
428
|
-
|
|
429
|
-
<div className="absolute left-3 top-3 z-10 space-y-2 rounded-xl bg-[var(--color-ink)]/85 p-3 text-xs text-[var(--color-dim)] shadow-[inset_0_0_0_1px_var(--color-hair)] backdrop-blur">
|
|
430
|
-
<p className="text-[13px] font-medium text-[var(--color-fg)]">Legenda</p>
|
|
431
|
-
<div className="flex items-center gap-2">
|
|
432
|
-
<span className="inline-block h-3 w-8 rounded" style={{ boxShadow: 'inset 0 0 0 1.5px var(--color-phase-plan)' }} />
|
|
433
|
-
fase → skill que a conduz
|
|
434
|
-
</div>
|
|
435
|
-
<div className="flex items-center gap-2">
|
|
436
|
-
<span className="inline-block h-3 w-8 rounded" style={{ boxShadow: `inset 0 0 0 1.5px ${SUPPORT_COLOR}` }} />
|
|
437
|
-
skill de apoio (sem fase)
|
|
438
|
-
</div>
|
|
439
|
-
<div className="flex items-center gap-2">
|
|
440
|
-
<span className="inline-block w-8 border-t-2 border-dashed" style={{ borderColor: PERSONA_COLOR }} />
|
|
441
|
-
skill → sub-agent que ela despacha
|
|
442
|
-
</div>
|
|
443
|
-
<div className="flex items-center gap-2">
|
|
444
|
-
<Terminal weight="light" size={13} className="ml-2.5 mr-2.5" />
|
|
445
|
-
você pode rodar com /nome
|
|
446
|
-
</div>
|
|
447
|
-
</div>
|
|
448
|
-
|
|
449
|
-
<div className="absolute right-3 top-3 z-10 space-y-0.5 rounded-xl bg-[var(--color-ink)]/85 px-3 py-2 text-xs text-[var(--color-dim)] shadow-[inset_0_0_0_1px_var(--color-hair)] backdrop-blur">
|
|
450
|
-
<div className="text-[13px] text-[var(--color-fg)]">
|
|
451
|
-
{hasFilter ? `${matchCount} de ${skills.length} skills` : `${skills.length} skills`}
|
|
452
|
-
</div>
|
|
453
|
-
<div>{graph.linkedCount} conduzem uma fase · {graph.supportCount} de apoio</div>
|
|
454
|
-
<div>{dispatchingCount} despacham sub-agents</div>
|
|
455
|
-
</div>
|
|
456
|
-
</div>
|
|
457
|
-
|
|
458
|
-
<DetailPanel
|
|
459
|
-
open={Boolean(selected)}
|
|
460
|
-
title={selected?.name || ''}
|
|
461
|
-
subtitle={selected ? (selectedPhase ? `Skill da fase ${phaseMeta(selectedPhase).label}` : 'Skill de apoio') : ''}
|
|
462
|
-
onClose={close}
|
|
463
|
-
>
|
|
464
|
-
{selected && <SkillDetail skill={selected} phases={phases} />}
|
|
465
|
-
</DetailPanel>
|
|
466
|
-
</div>
|
|
467
|
-
);
|
|
468
|
-
}
|