@forwardimpact/pathway 0.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/LICENSE +201 -0
- package/README.md +104 -0
- package/app/commands/agent.js +430 -0
- package/app/commands/behaviour.js +61 -0
- package/app/commands/command-factory.js +211 -0
- package/app/commands/discipline.js +58 -0
- package/app/commands/driver.js +94 -0
- package/app/commands/grade.js +60 -0
- package/app/commands/index.js +20 -0
- package/app/commands/init.js +67 -0
- package/app/commands/interview.js +68 -0
- package/app/commands/job.js +157 -0
- package/app/commands/progress.js +77 -0
- package/app/commands/questions.js +179 -0
- package/app/commands/serve.js +143 -0
- package/app/commands/site.js +121 -0
- package/app/commands/skill.js +76 -0
- package/app/commands/stage.js +129 -0
- package/app/commands/track.js +70 -0
- package/app/components/action-buttons.js +66 -0
- package/app/components/behaviour-profile.js +53 -0
- package/app/components/builder.js +341 -0
- package/app/components/card.js +98 -0
- package/app/components/checklist.js +145 -0
- package/app/components/comparison-radar.js +237 -0
- package/app/components/detail.js +230 -0
- package/app/components/error-page.js +72 -0
- package/app/components/grid.js +109 -0
- package/app/components/list.js +120 -0
- package/app/components/modifier-table.js +142 -0
- package/app/components/nav.js +64 -0
- package/app/components/progression-table.js +320 -0
- package/app/components/radar-chart.js +102 -0
- package/app/components/skill-matrix.js +97 -0
- package/app/css/base.css +56 -0
- package/app/css/bundles/app.css +40 -0
- package/app/css/bundles/handout.css +43 -0
- package/app/css/bundles/slides.css +40 -0
- package/app/css/components/badges.css +215 -0
- package/app/css/components/buttons.css +101 -0
- package/app/css/components/forms.css +105 -0
- package/app/css/components/layout.css +209 -0
- package/app/css/components/nav.css +166 -0
- package/app/css/components/progress.css +166 -0
- package/app/css/components/states.css +82 -0
- package/app/css/components/surfaces.css +243 -0
- package/app/css/components/tables.css +362 -0
- package/app/css/components/typography.css +122 -0
- package/app/css/components/utilities.css +41 -0
- package/app/css/pages/agent-builder.css +391 -0
- package/app/css/pages/assessment-results.css +453 -0
- package/app/css/pages/detail.css +59 -0
- package/app/css/pages/interview-builder.css +148 -0
- package/app/css/pages/job-builder.css +134 -0
- package/app/css/pages/landing.css +92 -0
- package/app/css/pages/lifecycle.css +118 -0
- package/app/css/pages/progress-builder.css +274 -0
- package/app/css/pages/self-assessment.css +502 -0
- package/app/css/reset.css +50 -0
- package/app/css/tokens.css +153 -0
- package/app/css/views/handout.css +30 -0
- package/app/css/views/print.css +608 -0
- package/app/css/views/slide-animations.css +113 -0
- package/app/css/views/slide-base.css +330 -0
- package/app/css/views/slide-sections.css +597 -0
- package/app/css/views/slide-tables.css +275 -0
- package/app/formatters/agent/dom.js +540 -0
- package/app/formatters/agent/profile.js +133 -0
- package/app/formatters/agent/skill.js +58 -0
- package/app/formatters/behaviour/dom.js +91 -0
- package/app/formatters/behaviour/markdown.js +54 -0
- package/app/formatters/behaviour/shared.js +64 -0
- package/app/formatters/discipline/dom.js +187 -0
- package/app/formatters/discipline/markdown.js +87 -0
- package/app/formatters/discipline/shared.js +131 -0
- package/app/formatters/driver/dom.js +103 -0
- package/app/formatters/driver/shared.js +92 -0
- package/app/formatters/grade/dom.js +208 -0
- package/app/formatters/grade/markdown.js +94 -0
- package/app/formatters/grade/shared.js +86 -0
- package/app/formatters/index.js +50 -0
- package/app/formatters/interview/dom.js +97 -0
- package/app/formatters/interview/markdown.js +66 -0
- package/app/formatters/interview/shared.js +332 -0
- package/app/formatters/job/description.js +176 -0
- package/app/formatters/job/dom.js +411 -0
- package/app/formatters/job/markdown.js +102 -0
- package/app/formatters/progress/dom.js +135 -0
- package/app/formatters/progress/markdown.js +86 -0
- package/app/formatters/progress/shared.js +339 -0
- package/app/formatters/questions/json.js +43 -0
- package/app/formatters/questions/markdown.js +303 -0
- package/app/formatters/questions/shared.js +274 -0
- package/app/formatters/questions/yaml.js +76 -0
- package/app/formatters/shared.js +71 -0
- package/app/formatters/skill/dom.js +168 -0
- package/app/formatters/skill/markdown.js +109 -0
- package/app/formatters/skill/shared.js +125 -0
- package/app/formatters/stage/dom.js +135 -0
- package/app/formatters/stage/index.js +12 -0
- package/app/formatters/stage/shared.js +111 -0
- package/app/formatters/track/dom.js +128 -0
- package/app/formatters/track/markdown.js +105 -0
- package/app/formatters/track/shared.js +181 -0
- package/app/handout-main.js +421 -0
- package/app/handout.html +21 -0
- package/app/index.html +59 -0
- package/app/lib/card-mappers.js +173 -0
- package/app/lib/cli-output.js +270 -0
- package/app/lib/error-boundary.js +70 -0
- package/app/lib/errors.js +49 -0
- package/app/lib/form-controls.js +47 -0
- package/app/lib/job-cache.js +86 -0
- package/app/lib/markdown.js +114 -0
- package/app/lib/radar.js +866 -0
- package/app/lib/reactive.js +77 -0
- package/app/lib/render.js +212 -0
- package/app/lib/router-core.js +160 -0
- package/app/lib/router-pages.js +16 -0
- package/app/lib/router-slides.js +202 -0
- package/app/lib/state.js +148 -0
- package/app/lib/utils.js +14 -0
- package/app/lib/yaml-loader.js +327 -0
- package/app/main.js +213 -0
- package/app/model/agent.js +702 -0
- package/app/model/checklist.js +137 -0
- package/app/model/derivation.js +699 -0
- package/app/model/index-generator.js +71 -0
- package/app/model/interview.js +539 -0
- package/app/model/job.js +222 -0
- package/app/model/levels.js +591 -0
- package/app/model/loader.js +564 -0
- package/app/model/matching.js +858 -0
- package/app/model/modifiers.js +158 -0
- package/app/model/profile.js +266 -0
- package/app/model/progression.js +507 -0
- package/app/model/validation.js +1385 -0
- package/app/pages/agent-builder.js +823 -0
- package/app/pages/assessment-results.js +507 -0
- package/app/pages/behaviour.js +70 -0
- package/app/pages/discipline.js +71 -0
- package/app/pages/driver.js +106 -0
- package/app/pages/grade.js +117 -0
- package/app/pages/interview-builder.js +50 -0
- package/app/pages/interview.js +304 -0
- package/app/pages/job-builder.js +50 -0
- package/app/pages/job.js +58 -0
- package/app/pages/landing.js +305 -0
- package/app/pages/progress-builder.js +58 -0
- package/app/pages/progress.js +495 -0
- package/app/pages/self-assessment.js +729 -0
- package/app/pages/skill.js +113 -0
- package/app/pages/stage.js +231 -0
- package/app/pages/track.js +69 -0
- package/app/slide-main.js +360 -0
- package/app/slides/behaviour.js +38 -0
- package/app/slides/chapter.js +82 -0
- package/app/slides/discipline.js +40 -0
- package/app/slides/driver.js +39 -0
- package/app/slides/grade.js +32 -0
- package/app/slides/index.js +198 -0
- package/app/slides/interview.js +58 -0
- package/app/slides/job.js +55 -0
- package/app/slides/overview.js +126 -0
- package/app/slides/progress.js +83 -0
- package/app/slides/skill.js +40 -0
- package/app/slides/track.js +39 -0
- package/app/slides.html +56 -0
- package/app/types.js +147 -0
- package/bin/pathway.js +489 -0
- package/examples/agents/.claude/skills/architecture-design/SKILL.md +88 -0
- package/examples/agents/.claude/skills/cloud-platforms/SKILL.md +90 -0
- package/examples/agents/.claude/skills/code-quality-review/SKILL.md +67 -0
- package/examples/agents/.claude/skills/data-modeling/SKILL.md +99 -0
- package/examples/agents/.claude/skills/developer-experience/SKILL.md +99 -0
- package/examples/agents/.claude/skills/devops-cicd/SKILL.md +96 -0
- package/examples/agents/.claude/skills/full-stack-development/SKILL.md +90 -0
- package/examples/agents/.claude/skills/knowledge-management/SKILL.md +100 -0
- package/examples/agents/.claude/skills/pattern-generalization/SKILL.md +102 -0
- package/examples/agents/.claude/skills/sre-practices/SKILL.md +117 -0
- package/examples/agents/.claude/skills/technical-debt-management/SKILL.md +123 -0
- package/examples/agents/.claude/skills/technical-writing/SKILL.md +129 -0
- package/examples/agents/.github/agents/se-platform-code.agent.md +181 -0
- package/examples/agents/.github/agents/se-platform-plan.agent.md +178 -0
- package/examples/agents/.github/agents/se-platform-review.agent.md +113 -0
- package/examples/agents/.vscode/settings.json +8 -0
- package/examples/behaviours/_index.yaml +8 -0
- package/examples/behaviours/outcome_ownership.yaml +44 -0
- package/examples/behaviours/polymathic_knowledge.yaml +42 -0
- package/examples/behaviours/precise_communication.yaml +40 -0
- package/examples/behaviours/relentless_curiosity.yaml +38 -0
- package/examples/behaviours/systems_thinking.yaml +41 -0
- package/examples/capabilities/_index.yaml +8 -0
- package/examples/capabilities/business.yaml +251 -0
- package/examples/capabilities/delivery.yaml +352 -0
- package/examples/capabilities/people.yaml +100 -0
- package/examples/capabilities/reliability.yaml +318 -0
- package/examples/capabilities/scale.yaml +394 -0
- package/examples/disciplines/_index.yaml +5 -0
- package/examples/disciplines/data_engineering.yaml +76 -0
- package/examples/disciplines/software_engineering.yaml +76 -0
- package/examples/drivers.yaml +205 -0
- package/examples/framework.yaml +58 -0
- package/examples/grades.yaml +118 -0
- package/examples/questions/behaviours/outcome_ownership.yaml +52 -0
- package/examples/questions/behaviours/polymathic_knowledge.yaml +48 -0
- package/examples/questions/behaviours/precise_communication.yaml +55 -0
- package/examples/questions/behaviours/relentless_curiosity.yaml +51 -0
- package/examples/questions/behaviours/systems_thinking.yaml +53 -0
- package/examples/questions/skills/architecture_design.yaml +54 -0
- package/examples/questions/skills/cloud_platforms.yaml +48 -0
- package/examples/questions/skills/code_quality.yaml +49 -0
- package/examples/questions/skills/data_modeling.yaml +46 -0
- package/examples/questions/skills/devops.yaml +47 -0
- package/examples/questions/skills/full_stack_development.yaml +48 -0
- package/examples/questions/skills/sre_practices.yaml +44 -0
- package/examples/questions/skills/stakeholder_management.yaml +49 -0
- package/examples/questions/skills/team_collaboration.yaml +43 -0
- package/examples/questions/skills/technical_writing.yaml +43 -0
- package/examples/self-assessments.yaml +66 -0
- package/examples/stages.yaml +76 -0
- package/examples/tracks/_index.yaml +6 -0
- package/examples/tracks/manager.yaml +53 -0
- package/examples/tracks/platform.yaml +54 -0
- package/examples/tracks/sre.yaml +58 -0
- package/examples/vscode-settings.yaml +22 -0
- package/package.json +68 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills pages
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { render, div, h1, h2, p } from "../lib/render.js";
|
|
6
|
+
import { getState } from "../lib/state.js";
|
|
7
|
+
import { createBadge } from "../components/card.js";
|
|
8
|
+
import { createGroupedList } from "../components/list.js";
|
|
9
|
+
import { renderNotFound } from "../components/error-page.js";
|
|
10
|
+
import { prepareSkillsList } from "../formatters/skill/shared.js";
|
|
11
|
+
import { skillToDOM } from "../formatters/skill/dom.js";
|
|
12
|
+
import { skillToCardConfig } from "../lib/card-mappers.js";
|
|
13
|
+
import { getCapabilityEmoji } from "../model/levels.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Render skills list page
|
|
17
|
+
*/
|
|
18
|
+
export function renderSkillsList() {
|
|
19
|
+
const { data } = getState();
|
|
20
|
+
const { framework } = data;
|
|
21
|
+
|
|
22
|
+
// Transform data for list view
|
|
23
|
+
const { groups, groupOrder } = prepareSkillsList(
|
|
24
|
+
data.skills,
|
|
25
|
+
data.capabilities,
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const page = div(
|
|
29
|
+
{ className: "skills-page" },
|
|
30
|
+
// Header
|
|
31
|
+
div(
|
|
32
|
+
{ className: "page-header" },
|
|
33
|
+
h1({ className: "page-title" }, framework.entityDefinitions.skill.title),
|
|
34
|
+
p(
|
|
35
|
+
{ className: "page-description" },
|
|
36
|
+
framework.entityDefinitions.skill.description.trim(),
|
|
37
|
+
),
|
|
38
|
+
),
|
|
39
|
+
|
|
40
|
+
// Skills list
|
|
41
|
+
groupOrder.length > 0
|
|
42
|
+
? createGroupedList(
|
|
43
|
+
groups,
|
|
44
|
+
(skill) => skillToCardConfig(skill, data.capabilities),
|
|
45
|
+
(capability, count) =>
|
|
46
|
+
div(
|
|
47
|
+
{ className: "capability-header" },
|
|
48
|
+
h2(
|
|
49
|
+
{ className: "capability-title" },
|
|
50
|
+
formatCapability(capability, data.capabilities),
|
|
51
|
+
),
|
|
52
|
+
createBadge(`${count} skills`, "default"),
|
|
53
|
+
),
|
|
54
|
+
)
|
|
55
|
+
: div({ className: "empty-state" }, p({}, "No skills found.")),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
render(page);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Render skill detail page
|
|
63
|
+
* @param {Object} params - Route params
|
|
64
|
+
*/
|
|
65
|
+
export function renderSkillDetail(params) {
|
|
66
|
+
const { data } = getState();
|
|
67
|
+
const skill = data.skills.find((s) => s.id === params.id);
|
|
68
|
+
|
|
69
|
+
if (!skill) {
|
|
70
|
+
renderNotFound({
|
|
71
|
+
entityType: "Skill",
|
|
72
|
+
entityId: params.id,
|
|
73
|
+
backPath: "/skill",
|
|
74
|
+
backText: "← Back to Skills",
|
|
75
|
+
});
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Use DOM formatter - it handles transformation internally
|
|
80
|
+
render(
|
|
81
|
+
skillToDOM(skill, {
|
|
82
|
+
disciplines: data.disciplines,
|
|
83
|
+
tracks: data.tracks,
|
|
84
|
+
drivers: data.drivers,
|
|
85
|
+
capabilities: data.capabilities,
|
|
86
|
+
}),
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Format capability for display
|
|
92
|
+
* @param {string} capability
|
|
93
|
+
* @param {Array} capabilities
|
|
94
|
+
* @returns {string}
|
|
95
|
+
*/
|
|
96
|
+
function formatCapability(capability, capabilities) {
|
|
97
|
+
const capabilityLabels = {
|
|
98
|
+
delivery: "Delivery",
|
|
99
|
+
scale: "Scale",
|
|
100
|
+
reliability: "Reliability",
|
|
101
|
+
data: "Data",
|
|
102
|
+
ai: "AI",
|
|
103
|
+
process: "Process",
|
|
104
|
+
business: "Business",
|
|
105
|
+
people: "People",
|
|
106
|
+
documentation: "Documentation",
|
|
107
|
+
};
|
|
108
|
+
const label =
|
|
109
|
+
capabilityLabels[capability] ||
|
|
110
|
+
capability.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
111
|
+
const emoji = getCapabilityEmoji(capabilities, capability);
|
|
112
|
+
return `${emoji} ${label}`;
|
|
113
|
+
}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stages pages
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { render, div, h1, h2, p, span, a, section } from "../lib/render.js";
|
|
6
|
+
import { getState } from "../lib/state.js";
|
|
7
|
+
import { createCardList } from "../components/list.js";
|
|
8
|
+
import { createDetailHeader } from "../components/detail.js";
|
|
9
|
+
import { renderNotFound } from "../components/error-page.js";
|
|
10
|
+
import {
|
|
11
|
+
prepareStagesList,
|
|
12
|
+
prepareStageDetail,
|
|
13
|
+
getStageEmoji,
|
|
14
|
+
} from "../formatters/stage/index.js";
|
|
15
|
+
import { createBadge } from "../components/card.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Map stage to card configuration
|
|
19
|
+
* @param {Object} stage - Prepared stage item (includes emoji)
|
|
20
|
+
* @returns {Object} Card configuration
|
|
21
|
+
*/
|
|
22
|
+
function stageToCardConfig(stage) {
|
|
23
|
+
return {
|
|
24
|
+
title: `${stage.emoji || "🔄"} ${stage.name}`,
|
|
25
|
+
description: stage.truncatedDescription,
|
|
26
|
+
href: `/stage/${stage.id}`,
|
|
27
|
+
meta: [createBadge(`${stage.tools.length} tools`, "default")],
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Create lifecycle flow visualization
|
|
33
|
+
* @param {Array} stages - Array of stage items (each includes emoji)
|
|
34
|
+
* @returns {HTMLElement}
|
|
35
|
+
*/
|
|
36
|
+
function createLifecycleFlow(stages) {
|
|
37
|
+
const flowItems = stages.map((stage, index) => {
|
|
38
|
+
const emoji = stage.emoji || "🔄";
|
|
39
|
+
const isLast = index === stages.length - 1;
|
|
40
|
+
|
|
41
|
+
return div(
|
|
42
|
+
{ className: "lifecycle-flow-item" },
|
|
43
|
+
a(
|
|
44
|
+
{ href: `#/stage/${stage.id}`, className: "lifecycle-stage" },
|
|
45
|
+
span({ className: "lifecycle-emoji" }, emoji),
|
|
46
|
+
span({ className: "lifecycle-name" }, stage.name),
|
|
47
|
+
),
|
|
48
|
+
!isLast ? span({ className: "lifecycle-arrow" }, "→") : null,
|
|
49
|
+
);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return div({ className: "lifecycle-flow" }, ...flowItems);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Render stages list page
|
|
57
|
+
*/
|
|
58
|
+
export function renderStagesList() {
|
|
59
|
+
const { data } = getState();
|
|
60
|
+
const stages = data.stages || [];
|
|
61
|
+
|
|
62
|
+
// Transform data for list view
|
|
63
|
+
const { items } = prepareStagesList(stages);
|
|
64
|
+
|
|
65
|
+
const page = div(
|
|
66
|
+
{ className: "stages-page" },
|
|
67
|
+
// Header
|
|
68
|
+
div(
|
|
69
|
+
{ className: "page-header" },
|
|
70
|
+
h1({ className: "page-title" }, "🔄 Stages"),
|
|
71
|
+
p(
|
|
72
|
+
{ className: "page-description" },
|
|
73
|
+
"The engineering lifecycle stages. Each stage has specific tools, " +
|
|
74
|
+
"constraints, and handoffs to guide work from planning through review.",
|
|
75
|
+
),
|
|
76
|
+
),
|
|
77
|
+
|
|
78
|
+
// Lifecycle flow visualization
|
|
79
|
+
items.length > 0
|
|
80
|
+
? section(
|
|
81
|
+
{ className: "section section-detail" },
|
|
82
|
+
h2({ className: "section-title" }, "Lifecycle Flow"),
|
|
83
|
+
createLifecycleFlow(items),
|
|
84
|
+
)
|
|
85
|
+
: null,
|
|
86
|
+
|
|
87
|
+
// Stages list
|
|
88
|
+
createCardList(items, stageToCardConfig, "No stages found."),
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
render(page);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Render stage detail page
|
|
96
|
+
* @param {Object} params - Route params
|
|
97
|
+
*/
|
|
98
|
+
export function renderStageDetail(params) {
|
|
99
|
+
const { data } = getState();
|
|
100
|
+
const stages = data.stages || [];
|
|
101
|
+
const stage = stages.find((s) => s.id === params.id);
|
|
102
|
+
|
|
103
|
+
if (!stage) {
|
|
104
|
+
renderNotFound({
|
|
105
|
+
entityType: "Stage",
|
|
106
|
+
entityId: params.id,
|
|
107
|
+
backPath: "/stage",
|
|
108
|
+
backText: "← Back to Stages",
|
|
109
|
+
});
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Transform data for detail view
|
|
114
|
+
const view = prepareStageDetail(stage);
|
|
115
|
+
const emoji = getStageEmoji(stages, stage.id);
|
|
116
|
+
|
|
117
|
+
const page = div(
|
|
118
|
+
{ className: "stage-detail" },
|
|
119
|
+
createDetailHeader({
|
|
120
|
+
title: `${emoji} ${view.name}`,
|
|
121
|
+
description: view.description,
|
|
122
|
+
backLink: "/stage",
|
|
123
|
+
backText: "← Back to Stages",
|
|
124
|
+
}),
|
|
125
|
+
|
|
126
|
+
// Tools section
|
|
127
|
+
view.tools.length > 0
|
|
128
|
+
? section(
|
|
129
|
+
{ className: "section section-detail" },
|
|
130
|
+
h2({ className: "section-title" }, "Available Tools"),
|
|
131
|
+
div(
|
|
132
|
+
{ className: "tool-badges" },
|
|
133
|
+
...view.tools.map((tool) =>
|
|
134
|
+
span(
|
|
135
|
+
{ className: "badge badge-tool", title: tool.label },
|
|
136
|
+
`${tool.icon} ${tool.label}`,
|
|
137
|
+
),
|
|
138
|
+
),
|
|
139
|
+
),
|
|
140
|
+
)
|
|
141
|
+
: null,
|
|
142
|
+
|
|
143
|
+
// Entry/Exit Criteria
|
|
144
|
+
view.entryCriteria.length > 0 || view.exitCriteria.length > 0
|
|
145
|
+
? section(
|
|
146
|
+
{ className: "section section-detail" },
|
|
147
|
+
div(
|
|
148
|
+
{ className: "content-columns" },
|
|
149
|
+
// Entry criteria column
|
|
150
|
+
view.entryCriteria.length > 0
|
|
151
|
+
? div(
|
|
152
|
+
{ className: "column" },
|
|
153
|
+
h2({ className: "section-title" }, "Entry Criteria"),
|
|
154
|
+
div(
|
|
155
|
+
{ className: "criteria-list" },
|
|
156
|
+
...view.entryCriteria.map((item) =>
|
|
157
|
+
div({ className: "criteria-item" }, `✓ ${item}`),
|
|
158
|
+
),
|
|
159
|
+
),
|
|
160
|
+
)
|
|
161
|
+
: null,
|
|
162
|
+
// Exit criteria column
|
|
163
|
+
view.exitCriteria.length > 0
|
|
164
|
+
? div(
|
|
165
|
+
{ className: "column" },
|
|
166
|
+
h2({ className: "section-title" }, "Exit Criteria"),
|
|
167
|
+
div(
|
|
168
|
+
{ className: "criteria-list" },
|
|
169
|
+
...view.exitCriteria.map((item) =>
|
|
170
|
+
div({ className: "criteria-item" }, `✓ ${item}`),
|
|
171
|
+
),
|
|
172
|
+
),
|
|
173
|
+
)
|
|
174
|
+
: null,
|
|
175
|
+
),
|
|
176
|
+
)
|
|
177
|
+
: null,
|
|
178
|
+
|
|
179
|
+
// Constraints
|
|
180
|
+
view.constraints.length > 0
|
|
181
|
+
? section(
|
|
182
|
+
{ className: "section section-detail" },
|
|
183
|
+
h2({ className: "section-title" }, "Constraints"),
|
|
184
|
+
div(
|
|
185
|
+
{ className: "constraint-list" },
|
|
186
|
+
...view.constraints.map((item) =>
|
|
187
|
+
div({ className: "constraint-item" }, `⚠️ ${item}`),
|
|
188
|
+
),
|
|
189
|
+
),
|
|
190
|
+
)
|
|
191
|
+
: null,
|
|
192
|
+
|
|
193
|
+
// Handoffs
|
|
194
|
+
view.handoffs.length > 0
|
|
195
|
+
? section(
|
|
196
|
+
{ className: "section section-detail" },
|
|
197
|
+
h2({ className: "section-title" }, "Handoffs"),
|
|
198
|
+
div(
|
|
199
|
+
{ className: "handoff-list" },
|
|
200
|
+
...view.handoffs.map((handoff) => {
|
|
201
|
+
const targetStage = stages.find((s) => s.id === handoff.target);
|
|
202
|
+
const targetEmoji = getStageEmoji(stages, handoff.target);
|
|
203
|
+
return div(
|
|
204
|
+
{ className: "card handoff-card" },
|
|
205
|
+
div(
|
|
206
|
+
{ className: "handoff-header" },
|
|
207
|
+
targetStage
|
|
208
|
+
? a(
|
|
209
|
+
{
|
|
210
|
+
href: `#/stage/${handoff.target}`,
|
|
211
|
+
className: "handoff-link",
|
|
212
|
+
},
|
|
213
|
+
`${targetEmoji} ${handoff.label}`,
|
|
214
|
+
)
|
|
215
|
+
: span({}, `${targetEmoji} ${handoff.label}`),
|
|
216
|
+
),
|
|
217
|
+
handoff.prompt
|
|
218
|
+
? p(
|
|
219
|
+
{ className: "handoff-prompt text-muted" },
|
|
220
|
+
handoff.prompt,
|
|
221
|
+
)
|
|
222
|
+
: null,
|
|
223
|
+
);
|
|
224
|
+
}),
|
|
225
|
+
),
|
|
226
|
+
)
|
|
227
|
+
: null,
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
render(page);
|
|
231
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracks pages
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { render, div, h1, p } from "../lib/render.js";
|
|
6
|
+
import { getState } from "../lib/state.js";
|
|
7
|
+
import { createCardList } from "../components/list.js";
|
|
8
|
+
import { renderNotFound } from "../components/error-page.js";
|
|
9
|
+
import { prepareTracksList } from "../formatters/track/shared.js";
|
|
10
|
+
import { trackToDOM } from "../formatters/track/dom.js";
|
|
11
|
+
import { trackToCardConfig } from "../lib/card-mappers.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Render tracks list page
|
|
15
|
+
*/
|
|
16
|
+
export function renderTracksList() {
|
|
17
|
+
const { data } = getState();
|
|
18
|
+
const { framework } = data;
|
|
19
|
+
|
|
20
|
+
// Transform data for list view
|
|
21
|
+
const { items } = prepareTracksList(data.tracks);
|
|
22
|
+
|
|
23
|
+
const page = div(
|
|
24
|
+
{ className: "tracks-page" },
|
|
25
|
+
// Header
|
|
26
|
+
div(
|
|
27
|
+
{ className: "page-header" },
|
|
28
|
+
h1({ className: "page-title" }, framework.entityDefinitions.track.title),
|
|
29
|
+
p(
|
|
30
|
+
{ className: "page-description" },
|
|
31
|
+
framework.entityDefinitions.track.description.trim(),
|
|
32
|
+
),
|
|
33
|
+
),
|
|
34
|
+
|
|
35
|
+
// Tracks list
|
|
36
|
+
createCardList(items, trackToCardConfig, "No tracks found."),
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
render(page);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Render track detail page
|
|
44
|
+
* @param {Object} params - Route params
|
|
45
|
+
*/
|
|
46
|
+
export function renderTrackDetail(params) {
|
|
47
|
+
const { data } = getState();
|
|
48
|
+
const track = data.tracks.find((t) => t.id === params.id);
|
|
49
|
+
|
|
50
|
+
if (!track) {
|
|
51
|
+
renderNotFound({
|
|
52
|
+
entityType: "Track",
|
|
53
|
+
entityId: params.id,
|
|
54
|
+
backPath: "/track",
|
|
55
|
+
backText: "← Back to Tracks",
|
|
56
|
+
});
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Use DOM formatter - it handles transformation internally
|
|
61
|
+
render(
|
|
62
|
+
trackToDOM(track, {
|
|
63
|
+
skills: data.skills,
|
|
64
|
+
behaviours: data.behaviours,
|
|
65
|
+
disciplines: data.disciplines,
|
|
66
|
+
framework: data.framework,
|
|
67
|
+
}),
|
|
68
|
+
);
|
|
69
|
+
}
|