jackherd 0.0.1 → 1.0.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/CHANGELOG.md +61 -0
- package/LICENSE +21 -0
- package/NOTICE +38 -0
- package/README.md +1121 -2
- package/assets/branding/README.md +62 -0
- package/assets/branding/jackherd-icon-256.png +0 -0
- package/assets/branding/jackherd-icon-512.png +0 -0
- package/assets/branding/jackherd-icon-64.png +0 -0
- package/assets/branding/jackherd-icon-small-32.png +0 -0
- package/assets/branding/jackherd-icon-small-64.png +0 -0
- package/assets/branding/jackherd-icon-small.svg +1 -0
- package/assets/branding/jackherd-icon.svg +1 -0
- package/assets/branding/jackherd-logo-1024.png +0 -0
- package/assets/branding/jackherd-logo-512.png +0 -0
- package/assets/branding/jackherd-logo-dark-1024.png +0 -0
- package/assets/branding/jackherd-logo-dark-512.png +0 -0
- package/assets/branding/jackherd-logo-dark.svg +1 -0
- package/assets/branding/jackherd-logo-mark-1024.png +0 -0
- package/assets/branding/jackherd-logo-mark-512.png +0 -0
- package/assets/branding/jackherd-logo-mark.svg +1 -0
- package/assets/branding/jackherd-logo.svg +1 -0
- package/dist/chunk-R6MGHCD7.js +93 -0
- package/dist/config.d.ts +167 -0
- package/dist/config.js +401 -0
- package/dist/plan-format.d.ts +325 -0
- package/dist/plan-format.js +636 -0
- package/docs/lanes.mmd +9 -0
- package/docs/lanes.svg +1 -0
- package/docs/skills.mmd +10 -0
- package/docs/skills.svg +1 -0
- package/docs/workflow.svg +172 -0
- package/herdr-plugin/herdr-plugin.toml +22 -0
- package/herdr-plugin/open-plans.ts +43 -0
- package/herdr-plugin/restore-plans.ts +107 -0
- package/install.sh +157 -0
- package/kit/hooks/hooks/git-guard/decision.ts +438 -0
- package/kit/hooks/hooks/git-guard/index.ts +38 -0
- package/kit/hooks/hooks/git-guard/shell.ts +407 -0
- package/kit/hooks/hooks/watch-guard/background.ts +36 -0
- package/kit/hooks/hooks/watch-guard/decision.ts +53 -0
- package/kit/hooks/hooks/watch-guard/index.ts +11 -0
- package/kit/hooks/hooks/watch-guard/shell-input.ts +32 -0
- package/kit/hooks/hooks/watch-guard/starts.ts +154 -0
- package/kit/hooks/hooks/watch-guard/text-fallback.ts +40 -0
- package/kit/hooks/hooks.json +30 -0
- package/kit/hooks/statusline.sh +72 -0
- package/kit/review/agents/devops.md +11 -0
- package/kit/review/agents/public-content.md +39 -0
- package/kit/review/agents/security-audit.md +11 -0
- package/kit/review/agents/uncle-bob.md +11 -0
- package/kit/review/skills/devops/SKILL.md +50 -0
- package/kit/review/skills/diagnose/SKILL.md +140 -0
- package/kit/review/skills/diagnose/references/feedback-loops.md +59 -0
- package/kit/review/skills/diagnose/scripts/hitl-loop.template.sh +71 -0
- package/kit/review/skills/pre-commit/SKILL.md +100 -0
- package/kit/review/skills/review/SKILL.md +43 -0
- package/kit/review/skills/security-audit/SKILL.md +65 -0
- package/kit/review/skills/uncle-bob/SKILL.md +43 -0
- package/kit/rules/rules/kit/arc42.md +89 -0
- package/kit/rules/rules/kit/architecture-files.md +87 -0
- package/kit/rules/rules/kit/code-style.md +159 -0
- package/kit/rules/rules/kit/pull-requests.md +59 -0
- package/kit/rules/rules/kit/testing.md +91 -0
- package/kit/rules/rules/kit/writing-for-agents.md +110 -0
- package/kit/workflow/agents/explore.md +25 -0
- package/kit/workflow/agents/implement.md +16 -0
- package/kit/workflow/agents/plan.md +13 -0
- package/kit/workflow/agents/spec-review.md +96 -0
- package/kit/workflow/skills/follow/SKILL.md +48 -0
- package/kit/workflow/skills/grill/SKILL.md +60 -0
- package/kit/workflow/skills/implement/SKILL.md +107 -0
- package/kit/workflow/skills/orchestrate/SKILL.md +565 -0
- package/kit/workflow/skills/orchestrate/handover/decision.ts +247 -0
- package/kit/workflow/skills/orchestrate/handover/index.ts +171 -0
- package/kit/workflow/skills/plan/SKILL.md +118 -0
- package/kit/workflow/skills/plan/references/template-English.md +92 -0
- package/kit/workflow/skills/plan/references/template-German.md +92 -0
- package/kit/workflow/skills/start/SKILL.md +47 -0
- package/package.json +63 -5
- package/schemas/jackherd.schema.json +601 -0
- package/src/check/changes.ts +45 -0
- package/src/check/command-line.ts +12 -0
- package/src/check/command.ts +136 -0
- package/src/check/deferral-arrows.ts +41 -0
- package/src/check/execute.ts +29 -0
- package/src/check/glob.ts +15 -0
- package/src/check/plan-structure-check.ts +135 -0
- package/src/check/plan.ts +106 -0
- package/src/check/public-content-check.ts +32 -0
- package/src/check/public-content-facts.ts +177 -0
- package/src/check/public-content.ts +216 -0
- package/src/check/report.ts +55 -0
- package/src/check/result.ts +42 -0
- package/src/check/roots.ts +36 -0
- package/src/check/routing.ts +22 -0
- package/src/check/schema.ts +83 -0
- package/src/check/settings.ts +44 -0
- package/src/claude/paths.ts +14 -0
- package/src/cli.ts +46 -0
- package/src/config/command.ts +45 -0
- package/src/config/detect.ts +196 -0
- package/src/config/index.ts +2 -0
- package/src/config/json-schema.ts +5 -0
- package/src/config/legacy-names.ts +56 -0
- package/src/config/link-kinds.ts +25 -0
- package/src/config/location.ts +46 -0
- package/src/config/read-config.ts +42 -0
- package/src/config/repository-facts.ts +19 -0
- package/src/config/repository-values.ts +46 -0
- package/src/config/schema.ts +302 -0
- package/src/context/command.ts +39 -0
- package/src/context/coordinator-name.ts +16 -0
- package/src/context/fill.ts +69 -0
- package/src/context/index.ts +10 -0
- package/src/context/level.ts +22 -0
- package/src/context/options.ts +29 -0
- package/src/context/report.ts +42 -0
- package/src/context/session-log.ts +91 -0
- package/src/plan-format/drift.ts +69 -0
- package/src/plan-format/header.ts +27 -0
- package/src/plan-format/index.ts +9 -0
- package/src/plan-format/lanes.ts +128 -0
- package/src/plan-format/markdown.ts +98 -0
- package/src/plan-format/phase-tally.ts +55 -0
- package/src/plan-format/phases.ts +224 -0
- package/src/plan-format/plan-structure.ts +150 -0
- package/src/plan-format/progress.ts +202 -0
- package/src/plan-format/sprint-document.ts +69 -0
- package/src/plan-format/terminal-text.ts +28 -0
- package/src/plans/board-choice.ts +60 -0
- package/src/plans/board-pick.ts +72 -0
- package/src/plans/board-rows.ts +62 -0
- package/src/plans/command.ts +60 -0
- package/src/plans/ensure-panes.ts +71 -0
- package/src/plans/error-text.ts +5 -0
- package/src/plans/fetch.ts +96 -0
- package/src/plans/git.ts +145 -0
- package/src/plans/github.ts +35 -0
- package/src/plans/lane-discovery.ts +34 -0
- package/src/plans/lane-plans.ts +80 -0
- package/src/plans/layout.ts +881 -0
- package/src/plans/link-chips.ts +74 -0
- package/src/plans/live.ts +336 -0
- package/src/plans/markdown-html.ts +140 -0
- package/src/plans/options.ts +15 -0
- package/src/plans/phase-source.ts +71 -0
- package/src/plans/plan-chips.ts +75 -0
- package/src/plans/plan-panes.ts +206 -0
- package/src/plans/planned.ts +117 -0
- package/src/plans/pull-requests.ts +107 -0
- package/src/plans/restart-decision.ts +42 -0
- package/src/plans/selection.ts +352 -0
- package/src/plans/settings.ts +68 -0
- package/src/plans/single-flight.ts +25 -0
- package/src/plans/snapshot.ts +300 -0
- package/src/plans/sprint-export.ts +103 -0
- package/src/plans/sprint-html.ts +301 -0
- package/src/plans/sprint-page.ts +287 -0
- package/src/plans/supervisor.ts +124 -0
- package/src/plans/symbols.ts +54 -0
- package/src/plans/texts.ts +103 -0
- package/src/plans/unlisted-lanes.ts +45 -0
- package/src/plans/view.ts +68 -0
- package/src/plans/worked-phases.ts +53 -0
- package/src/sync/checksum.ts +13 -0
- package/src/sync/choice.ts +14 -0
- package/src/sync/command-context.ts +113 -0
- package/src/sync/command.ts +94 -0
- package/src/sync/error-message.ts +1 -0
- package/src/sync/gitignore.ts +45 -0
- package/src/sync/global-kit.ts +176 -0
- package/src/sync/herdr-plugin.ts +175 -0
- package/src/sync/if-changed.ts +109 -0
- package/src/sync/init-command.ts +239 -0
- package/src/sync/init.ts +136 -0
- package/src/sync/kit-hooks.ts +18 -0
- package/src/sync/kit-path.ts +77 -0
- package/src/sync/kit-source.ts +169 -0
- package/src/sync/kit.ts +9 -0
- package/src/sync/legacy-files.ts +116 -0
- package/src/sync/manifest.ts +44 -0
- package/src/sync/next-steps.ts +42 -0
- package/src/sync/plan-file.ts +154 -0
- package/src/sync/plan-hooks.ts +165 -0
- package/src/sync/project-fs.ts +132 -0
- package/src/sync/render.ts +60 -0
- package/src/sync/report.ts +96 -0
- package/src/sync/settings-hooks.ts +90 -0
- package/src/sync/settings-migration.ts +94 -0
- package/src/sync/settings-offer.ts +168 -0
- package/src/sync/setup-questions.ts +70 -0
- package/src/sync/setup.ts +52 -0
- package/src/sync/sync-plan.ts +120 -0
- package/src/sync/sync-result.ts +9 -0
- package/src/sync/sync.ts +307 -0
- package/src/sync/tools.ts +52 -0
- package/src/terminal/herdr.ts +91 -0
- package/src/terminal/index.ts +13 -0
- package/src/terminal/none.ts +7 -0
- package/src/terminal/open.ts +39 -0
- package/src/terminal/text.ts +159 -0
- package/src/terminal/types.ts +30 -0
- package/src/terminal/width.ts +90 -0
- package/src/update/command.ts +65 -0
- package/src/update/package-manager.ts +56 -0
- package/src/update/update.ts +105 -0
- package/src/version/installed-version.ts +32 -0
- package/src/version/release.ts +22 -0
- package/src/version/skill-diff.ts +63 -0
- package/src/version/started-kit.ts +14 -0
- package/src/vocabulary/index.ts +132 -0
- package/src/watch/base-tip.ts +18 -0
- package/src/watch/command.ts +919 -0
- package/src/watch/coordinator-fill.ts +76 -0
- package/src/watch/feedback-read.ts +73 -0
- package/src/watch/feedback.ts +308 -0
- package/src/watch/gh.ts +22 -0
- package/src/watch/github-read.ts +175 -0
- package/src/watch/herdr.ts +11 -0
- package/src/watch/json-guards.ts +9 -0
- package/src/watch/kit-update.ts +18 -0
- package/src/watch/lane-fill.ts +36 -0
- package/src/watch/lane-message.ts +99 -0
- package/src/watch/lane-progress.ts +44 -0
- package/src/watch/lane-report-file.ts +53 -0
- package/src/watch/lane-report.ts +270 -0
- package/src/watch/lane-search.ts +41 -0
- package/src/watch/lane-sources.ts +46 -0
- package/src/watch/lane-watch.ts +121 -0
- package/src/watch/monitor-tool.ts +19 -0
- package/src/watch/options.ts +79 -0
- package/src/watch/plan-badges-read.ts +30 -0
- package/src/watch/plan-badges.ts +66 -0
- package/src/watch/plan-views.ts +59 -0
- package/src/watch/preview-read.ts +60 -0
- package/src/watch/previews.ts +234 -0
- package/src/watch/pull-requests.ts +117 -0
- package/src/watch/single-report.ts +15 -0
- package/src/watch/skill-change.ts +61 -0
- package/src/watch/source-dry-run-command.ts +35 -0
- package/src/watch/source-dry-run.ts +124 -0
- package/src/watch/source-fields.ts +9 -0
- package/src/watch/source-path.ts +40 -0
- package/src/watch/source-run.ts +90 -0
- package/src/watch/sources.ts +344 -0
- package/src/watch/stream-output.ts +14 -0
- package/src/watch/texts.ts +76 -0
- package/src/watch/watch-events.ts +399 -0
- package/src/watch/watcher-lock.ts +145 -0
- package/src/watch/workflow-runs.ts +96 -0
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
declare const PLAN_LANGUAGE: {
|
|
2
|
+
readonly de: "de";
|
|
3
|
+
readonly en: "en";
|
|
4
|
+
};
|
|
5
|
+
type PlanLanguage = (typeof PLAN_LANGUAGE)[keyof typeof PLAN_LANGUAGE];
|
|
6
|
+
/** The language's name as a reply or a question says it. */
|
|
7
|
+
declare const LANGUAGE_NAME: Record<PlanLanguage, string>;
|
|
8
|
+
declare const isPlanLanguage: (value: string) => value is PlanLanguage;
|
|
9
|
+
declare const PLAN_STATUS: {
|
|
10
|
+
readonly done: "done";
|
|
11
|
+
readonly abandoned: "abandoned";
|
|
12
|
+
readonly inProgress: "inProgress";
|
|
13
|
+
readonly draft: "draft";
|
|
14
|
+
readonly other: "other";
|
|
15
|
+
readonly none: "none";
|
|
16
|
+
};
|
|
17
|
+
type PlanStatus = (typeof PLAN_STATUS)[keyof typeof PLAN_STATUS];
|
|
18
|
+
type StatusWord = {
|
|
19
|
+
label: string;
|
|
20
|
+
/** Lower-case words a `Status:` line starts with; empty for `other` and `none`. */
|
|
21
|
+
leading: readonly string[];
|
|
22
|
+
/** Lower-case fragments that classify a `Status:` line wherever they appear. */
|
|
23
|
+
anywhere: readonly string[];
|
|
24
|
+
};
|
|
25
|
+
type PlanVocabulary = {
|
|
26
|
+
header: {
|
|
27
|
+
date: string;
|
|
28
|
+
status: string;
|
|
29
|
+
scope: string;
|
|
30
|
+
};
|
|
31
|
+
sections: {
|
|
32
|
+
decisions: string;
|
|
33
|
+
implementation: string;
|
|
34
|
+
modelRecommendations: string;
|
|
35
|
+
dependencies: string;
|
|
36
|
+
documentation: string;
|
|
37
|
+
lanes: string;
|
|
38
|
+
goal: string;
|
|
39
|
+
history: string;
|
|
40
|
+
plans: string;
|
|
41
|
+
};
|
|
42
|
+
columns: {
|
|
43
|
+
dependsOn: string;
|
|
44
|
+
writes: string;
|
|
45
|
+
serialMarker: string;
|
|
46
|
+
};
|
|
47
|
+
phase: string;
|
|
48
|
+
/** Opens the line by which a phase says it has no review gate on purpose: `**Kein Review-Gate:** <reason>`. */
|
|
49
|
+
noReviewGate: string;
|
|
50
|
+
/** Marks a lane as closed when its name cell contains it. */
|
|
51
|
+
laneClosed: string;
|
|
52
|
+
/** Words that may stand between two phases of one entry (`P1 Rule und P2 Monitor`). */
|
|
53
|
+
phaseConnectors: readonly string[];
|
|
54
|
+
statusWords: Record<PlanStatus, StatusWord>;
|
|
55
|
+
};
|
|
56
|
+
declare const PLAN_VOCABULARY: Record<PlanLanguage, PlanVocabulary>;
|
|
57
|
+
/** Classifies a free-text `Status:` line; the first matching status in precedence order wins. */
|
|
58
|
+
declare const classifyStatus: (language: PlanLanguage, statusText: string) => PlanStatus;
|
|
59
|
+
/** `### Phase 3: Title` as the plan spells it in `language`. */
|
|
60
|
+
declare const phaseHeading: (language: PlanLanguage, id: string, title: string) => string;
|
|
61
|
+
declare const sectionHeading: (language: PlanLanguage, section: keyof PlanVocabulary["sections"]) => string;
|
|
62
|
+
|
|
63
|
+
type DriftFinding = {
|
|
64
|
+
file: string;
|
|
65
|
+
reason: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Plans whose own status text or closing documentation phase admits unfinished architecture work.
|
|
69
|
+
* Plans in flight are skipped: open items there are expected, not drift.
|
|
70
|
+
*/
|
|
71
|
+
declare const findDrift: (file: string, content: string, language: PlanLanguage) => DriftFinding[];
|
|
72
|
+
|
|
73
|
+
type PlanHeader = {
|
|
74
|
+
title: string;
|
|
75
|
+
date: string;
|
|
76
|
+
status: string;
|
|
77
|
+
statusWord: PlanStatus;
|
|
78
|
+
scope: string;
|
|
79
|
+
};
|
|
80
|
+
declare const readPlanHeader: (markdown: string, language: PlanLanguage, fallbackTitle: string) => PlanHeader;
|
|
81
|
+
/** Rows of the decision table, counted by their `D<number>` first cell. */
|
|
82
|
+
declare const countDecisions: (markdown: string) => number;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* `namedPhaseIds` holds every id the row names when `withoutRepeats` dropped some because an earlier row of the lane
|
|
86
|
+
* named them; `withoutRow` marks a step no board row wrote: the phases a lane worked on without a row of their own.
|
|
87
|
+
*/
|
|
88
|
+
type PlanStep = {
|
|
89
|
+
planTitle: string;
|
|
90
|
+
planHref: string | null;
|
|
91
|
+
phaseIds: string[];
|
|
92
|
+
label: string;
|
|
93
|
+
startsAfter: string;
|
|
94
|
+
model: string;
|
|
95
|
+
namedPhaseIds?: string[];
|
|
96
|
+
withoutRow?: true;
|
|
97
|
+
};
|
|
98
|
+
/** A lane of the sprint table; `closed` when its name cell says the lane was cleaned up. */
|
|
99
|
+
type SprintLane = {
|
|
100
|
+
name: string;
|
|
101
|
+
port: number | null;
|
|
102
|
+
steps: PlanStep[];
|
|
103
|
+
closed: boolean;
|
|
104
|
+
};
|
|
105
|
+
/** Sprint tables name a phase `P4`; the sidebar title prints it the same way. */
|
|
106
|
+
declare const PHASE_ID_PREFIX = "P";
|
|
107
|
+
/** The phase ids a phases cell of the lanes table names, read as `parseSprintLanes` reads them. */
|
|
108
|
+
declare const phaseIdsOfCell: (cell: string, language: PlanLanguage) => string[];
|
|
109
|
+
declare const laneNameOf: (cell: string, previous: string | null) => string | null;
|
|
110
|
+
/** The step without the phases an earlier step of the lane already named from the same plan, which `namedPhaseIds` keeps. */
|
|
111
|
+
declare const withoutRepeats: (lane: SprintLane, step: PlanStep) => PlanStep;
|
|
112
|
+
/**
|
|
113
|
+
* The lanes of the sprint document's lanes table (`## Spuren` in `de`) in table order. A row whose
|
|
114
|
+
* first cell names a lane in backticks belongs to that lane; a `↳` row without a name continues
|
|
115
|
+
* the lane above it.
|
|
116
|
+
*/
|
|
117
|
+
declare const parseSprintLanes: (markdown: string, language: PlanLanguage) => SprintLane[];
|
|
118
|
+
declare const sprintTitleOf: (markdown: string, fallback: string) => string;
|
|
119
|
+
/** The repository path of a plan link, relative to the sprint document's directory. */
|
|
120
|
+
declare const resolvePlanPath: (sprintDirectory: string, href: string) => string;
|
|
121
|
+
|
|
122
|
+
/** Per heading that carries checkboxes or table status cells: how many are done and open. */
|
|
123
|
+
type PhaseTally = {
|
|
124
|
+
title: string;
|
|
125
|
+
done: number;
|
|
126
|
+
open: number;
|
|
127
|
+
model: string | undefined;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Every level-2 or level-3 section whose heading starts with a number (optionally after the phase
|
|
131
|
+
* word) and that holds at least one checkbox or ✅/⬜ table cell, with the model its recommendation
|
|
132
|
+
* table names for that phase. An open checkbox moved on with `→ P<n>` counts as open in the section
|
|
133
|
+
* of phase `<n>` instead of its own; with no such section it stays open where it is, as in `parsePlanPhases`.
|
|
134
|
+
*/
|
|
135
|
+
declare const tallyPhases: (markdown: string, language: PlanLanguage) => PhaseTally[];
|
|
136
|
+
|
|
137
|
+
/** A checkbox of a plan. `gate` is set on the ones listed under the phase's review gate, and only on those. */
|
|
138
|
+
type ChecklistItem = {
|
|
139
|
+
done: boolean;
|
|
140
|
+
text: string;
|
|
141
|
+
gate?: true;
|
|
142
|
+
};
|
|
143
|
+
/** An open checkbox that ends in `→ P<n>`: moved on purpose to phase `target`, its text without the marker. */
|
|
144
|
+
type DeferredItem = {
|
|
145
|
+
text: string;
|
|
146
|
+
target: string;
|
|
147
|
+
};
|
|
148
|
+
/** An open checkbox whose phase arrow is not at the end of its line (1-based), with the form the parser reads. */
|
|
149
|
+
type MisplacedDeferral = {
|
|
150
|
+
line: number;
|
|
151
|
+
target: string;
|
|
152
|
+
corrected: string;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* `touched` is set by the phase source when the worktree's ticks differ from the base branch's. `deferred` holds
|
|
156
|
+
* the checkboxes moved to another phase; they are not among `items`, so they count neither as open nor as done.
|
|
157
|
+
*/
|
|
158
|
+
type PlanPhase = {
|
|
159
|
+
id: string;
|
|
160
|
+
title: string;
|
|
161
|
+
items: ChecklistItem[];
|
|
162
|
+
deferred?: DeferredItem[];
|
|
163
|
+
touched?: true;
|
|
164
|
+
};
|
|
165
|
+
/** The line that opens a phase's review gate: `**Review-Gate:**`, `**Review gate** (…)`. */
|
|
166
|
+
declare const isReviewGateLine: (line: string) => boolean;
|
|
167
|
+
/** A heading of level three or higher, which ends the section of a phase. */
|
|
168
|
+
declare const endsPhase: (line: string) => boolean;
|
|
169
|
+
declare const isCheckboxLine: (line: string) => boolean;
|
|
170
|
+
declare const isOpenCheckboxLine: (line: string) => boolean;
|
|
171
|
+
declare const phaseHeadingPattern: (language: PlanLanguage) => RegExp;
|
|
172
|
+
/**
|
|
173
|
+
* The phase an open checkbox line is moved to with `→ P<n>` at its end; null for any other line, a ticked box,
|
|
174
|
+
* a ✅/⬜ table row, and an arrow to the box's own phase `phaseId`. The one rule the parser and the tally share.
|
|
175
|
+
*/
|
|
176
|
+
declare const deferralTarget: (line: string, phaseId: string) => string | null;
|
|
177
|
+
/**
|
|
178
|
+
* Open checkboxes that carry `→ P<n>` somewhere other than at the end of the line. `deferralTarget` reads the arrow
|
|
179
|
+
* only there, so such a box counts as open in its own phase without a word; `jh check` refuses it. In an
|
|
180
|
+
* open checkbox the phase arrow stands only at the end, also where it would be meant as prose (`→ P2 prüfen`).
|
|
181
|
+
*/
|
|
182
|
+
declare const misplacedDeferrals: (markdown: string) => MisplacedDeferral[];
|
|
183
|
+
/**
|
|
184
|
+
* Every `### Phase <id>` section, and every `## <id> — title` section, with its checkboxes. A
|
|
185
|
+
* section runs to the next heading of level three or higher, so a review-gate list or a `####`
|
|
186
|
+
* sub-heading inside the phase still counts. A phase without checkboxes of its own that points at
|
|
187
|
+
* a section (``Siehe `## Dokumentation` ``) counts that section's items, so it is done when the
|
|
188
|
+
* section is. An open checkbox ending in `→ P<n>` is kept under `deferred` and listed in phase `<n>` as open.
|
|
189
|
+
*/
|
|
190
|
+
declare const parsePlanPhases: (markdown: string, language: PlanLanguage) => PlanPhase[];
|
|
191
|
+
|
|
192
|
+
/** A `### Phase` heading (1-based line) whose section has tasks and neither a review gate nor the line saying why not. */
|
|
193
|
+
type PhaseWithoutGate = {
|
|
194
|
+
line: number;
|
|
195
|
+
id: string;
|
|
196
|
+
title: string;
|
|
197
|
+
};
|
|
198
|
+
/** A row of the lanes table (1-based line) whose phases cell names no phase id. */
|
|
199
|
+
type RowWithoutPhase = {
|
|
200
|
+
line: number;
|
|
201
|
+
lane: string;
|
|
202
|
+
phases: string;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* A `### Phase` heading (1-based line) whose tasks are all ticked on the base branch while its own section still
|
|
206
|
+
* has open checkboxes not moved on with `→ P<n>` (`openLines`, 1-based).
|
|
207
|
+
*/
|
|
208
|
+
type MergedPhaseWithOpenBoxes = PhaseWithoutGate & {
|
|
209
|
+
openLines: number[];
|
|
210
|
+
};
|
|
211
|
+
/** The ids of the `### Phase` headings of a plan. */
|
|
212
|
+
declare const phaseIdsOfPlan: (markdown: string, language: PlanLanguage) => Set<string>;
|
|
213
|
+
/**
|
|
214
|
+
* The phases a plan gained against `previousIds` (its phase ids before the change) that have checkboxes but
|
|
215
|
+
* neither a review gate nor a `**Kein Review-Gate:** <reason>` line. A phase without checkboxes of its own (one
|
|
216
|
+
* that points at `## Dokumentation`) has nothing to gate; phases the plan already had are not read, so an old
|
|
217
|
+
* plan does not turn red when it is touched.
|
|
218
|
+
*/
|
|
219
|
+
declare const newPhasesWithoutReviewGate: (markdown: string, language: PlanLanguage, previousIds: ReadonlySet<string>) => PhaseWithoutGate[];
|
|
220
|
+
/** Whether the document has a lanes table (`## Spuren`): a board, not a plan. */
|
|
221
|
+
declare const hasLanesTable: (markdown: string, language: PlanLanguage) => boolean;
|
|
222
|
+
/**
|
|
223
|
+
* The phases of `markdown` that are merged but not closed: on the base branch (`base`, the plan there) every task
|
|
224
|
+
* before the review gate is ticked, the change does not tick the phase further, and its own section still has open
|
|
225
|
+
* checkboxes, gate boxes included, that no `→ P<n>` at their end moves on. A phase the base branch lacks, or one
|
|
226
|
+
* with an open task there, is still being worked on.
|
|
227
|
+
*/
|
|
228
|
+
declare const mergedPhasesWithOpenBoxes: (markdown: string, base: string, language: PlanLanguage) => MergedPhaseWithOpenBoxes[];
|
|
229
|
+
/**
|
|
230
|
+
* The rows of the lanes table (`## Spuren`) that are not in `previousLines` word for word and whose phases cell
|
|
231
|
+
* names no phase id (`P10c`), so neither the view nor the watcher can tie that step to a phase. The table is read
|
|
232
|
+
* as `parseSprintLanes` reads it (its first table, a lane closed when any of its rows says so); rows of a closed
|
|
233
|
+
* lane are history and stay out.
|
|
234
|
+
*/
|
|
235
|
+
declare const boardRowsWithoutPhase: (markdown: string, language: PlanLanguage, previousLines: ReadonlySet<string>) => RowWithoutPhase[];
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* `title` is null when the sprint names a phase the plan does not have; `touched` and `deferred` carry the plan
|
|
239
|
+
* phase's own, and the deferred checkboxes are in neither `done` nor `total`.
|
|
240
|
+
*/
|
|
241
|
+
type PhaseProgress = {
|
|
242
|
+
id: string;
|
|
243
|
+
title: string | null;
|
|
244
|
+
done: number;
|
|
245
|
+
total: number;
|
|
246
|
+
items: ChecklistItem[];
|
|
247
|
+
deferred?: DeferredItem[];
|
|
248
|
+
touched?: true;
|
|
249
|
+
};
|
|
250
|
+
type StepProgress = {
|
|
251
|
+
step: PlanStep;
|
|
252
|
+
phases: PhaseProgress[];
|
|
253
|
+
};
|
|
254
|
+
type LaneProgress = {
|
|
255
|
+
lane: SprintLane;
|
|
256
|
+
steps: StepProgress[];
|
|
257
|
+
current: {
|
|
258
|
+
stepIndex: number;
|
|
259
|
+
phaseId: string;
|
|
260
|
+
} | null;
|
|
261
|
+
done: number;
|
|
262
|
+
total: number;
|
|
263
|
+
};
|
|
264
|
+
/** Parsed phases per plan link, as the sprint table spells the link; a missing key is an unread plan. */
|
|
265
|
+
type PlansByHref = Record<string, PlanPhase[]>;
|
|
266
|
+
declare const sumPhases: (phases: readonly PhaseProgress[]) => {
|
|
267
|
+
done: number;
|
|
268
|
+
total: number;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* The ids of a step that show a phase of their own. An id the plan lacks (`5b`) falls back to its
|
|
272
|
+
* base phase (`5`); when the step already names that phase by its own id, or an earlier id fell
|
|
273
|
+
* back to it, the fallback would list the same tasks twice, so it is dropped. A lone fallback
|
|
274
|
+
* stays: the sprint line `P4a` finds phase 4 in the plans that have no `4a`.
|
|
275
|
+
*/
|
|
276
|
+
declare const keptPhaseIds: (phases: PlanPhase[], ids: readonly string[]) => string[];
|
|
277
|
+
/**
|
|
278
|
+
* A phase the lane ticked to the end in its worktree while the base branch does not carry those ticks yet: still
|
|
279
|
+
* the lane's work until it is merged, not a finished phase.
|
|
280
|
+
*/
|
|
281
|
+
declare const isTickedUnmerged: (phase: PhaseProgress) => boolean;
|
|
282
|
+
/**
|
|
283
|
+
* The phase a lane works on: the one its newest board row names (`newestRowPhase`), so ticks the lane set in older
|
|
284
|
+
* phases while tidying the plan do not take over; when that row decides nothing, the ticks do (`phaseFromTicks`).
|
|
285
|
+
* A phase ticked to the end stays current until the base branch carries its ticks.
|
|
286
|
+
*/
|
|
287
|
+
declare const currentPhaseOf: (steps: readonly StepProgress[]) => LaneProgress["current"];
|
|
288
|
+
/** Progress of a lane over the phases its steps name; `currentPhaseOf` picks the current phase. */
|
|
289
|
+
declare const laneProgress: (lane: SprintLane, plans: PlansByHref) => LaneProgress;
|
|
290
|
+
declare const currentPhase: (progress: LaneProgress) => PhaseProgress | null;
|
|
291
|
+
/** The item being worked on: the first open checkbox of a phase in plan order, a review-gate item included; null when none is open. */
|
|
292
|
+
declare const activeItem: (phase: Pick<PhaseProgress, "items">) => ChecklistItem | null;
|
|
293
|
+
/** The sidebar title of a lane, e.g. `P4 · 7/12` or `P4 · 12/12` while ticked and not merged; null when nothing of the lane could be counted. */
|
|
294
|
+
declare const shortTitle: (progress: LaneProgress) => string | null;
|
|
295
|
+
|
|
296
|
+
/** What a sprint document says around its lanes table: its goal and its history. */
|
|
297
|
+
type SprintPlanRow = {
|
|
298
|
+
cells: string[];
|
|
299
|
+
title: string | null;
|
|
300
|
+
href: string | null;
|
|
301
|
+
};
|
|
302
|
+
/** One table of the plans section: the line above it (`**Folgepläne …:**`), its header and its rows. */
|
|
303
|
+
type SprintPlanTable = {
|
|
304
|
+
caption: string | null;
|
|
305
|
+
header: string[];
|
|
306
|
+
rows: SprintPlanRow[];
|
|
307
|
+
};
|
|
308
|
+
type SprintDocument = {
|
|
309
|
+
/** The tables of the plans section (core plans, follow-up plans), each row with the plan it names. */
|
|
310
|
+
planTables: SprintPlanTable[];
|
|
311
|
+
/** The paragraphs of the goal section, or of the text before the first section when there is none. */
|
|
312
|
+
goal: string[];
|
|
313
|
+
history: {
|
|
314
|
+
header: string[];
|
|
315
|
+
rows: string[][];
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
declare const readSprintDocument: (markdown: string, language: PlanLanguage) => SprintDocument;
|
|
319
|
+
/**
|
|
320
|
+
* The `Depends on` cell of each phase from the plan's dependency table, by phase id (`4`, `4b`). The
|
|
321
|
+
* first cell of a row starts with the id (`3 — Sync-Engine`); a plan without the table gives an empty map.
|
|
322
|
+
*/
|
|
323
|
+
declare const readPhaseDependencies: (planMarkdown: string, language: PlanLanguage) => Record<string, string>;
|
|
324
|
+
|
|
325
|
+
export { type ChecklistItem, type DeferredItem, type DriftFinding, LANGUAGE_NAME, type LaneProgress, type MergedPhaseWithOpenBoxes, type MisplacedDeferral, PHASE_ID_PREFIX, PLAN_LANGUAGE, PLAN_STATUS, PLAN_VOCABULARY, type PhaseProgress, type PhaseTally, type PhaseWithoutGate, type PlanHeader, type PlanLanguage, type PlanPhase, type PlanStatus, type PlanStep, type PlanVocabulary, type PlansByHref, type RowWithoutPhase, type SprintDocument, type SprintLane, type SprintPlanRow, type SprintPlanTable, type StatusWord, type StepProgress, activeItem, boardRowsWithoutPhase, classifyStatus, countDecisions, currentPhase, currentPhaseOf, deferralTarget, endsPhase, findDrift, hasLanesTable, isCheckboxLine, isOpenCheckboxLine, isPlanLanguage, isReviewGateLine, isTickedUnmerged, keptPhaseIds, laneNameOf, laneProgress, mergedPhasesWithOpenBoxes, misplacedDeferrals, newPhasesWithoutReviewGate, parsePlanPhases, parseSprintLanes, phaseHeading, phaseHeadingPattern, phaseIdsOfCell, phaseIdsOfPlan, readPhaseDependencies, readPlanHeader, readSprintDocument, resolvePlanPath, sectionHeading, shortTitle, sprintTitleOf, sumPhases, tallyPhases, withoutRepeats };
|