@rt-tools/agent-kit 0.24.0 → 0.27.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/assets/agents/business-analyst.md +51 -50
- package/assets/agents/cargo-writer.md +54 -0
- package/assets/agents/conscience.md +37 -35
- package/assets/agents/project-manager.md +49 -48
- package/assets/agents/prose-editor.md +31 -29
- package/assets/agents/qa-engineer.md +50 -48
- package/assets/agents/rules-reviewer.md +63 -58
- package/assets/agents/skill-curator.md +83 -78
- package/assets/agents/spec-critic.md +34 -29
- package/assets/agents/spec-writer.md +35 -32
- package/assets/agents/strict-teacher.md +39 -37
- package/assets/checks/archive-age.mjs +48 -28
- package/assets/checks/archive-prune.mjs +16 -14
- package/assets/checks/board-epic-link.github.mjs +29 -0
- package/assets/checks/board-epics.github.mjs +286 -49
- package/assets/checks/board-folders.mjs +61 -0
- package/assets/checks/board-gh.github.mjs +35 -26
- package/assets/checks/board-long-work.github.mjs +29 -25
- package/assets/checks/board-paths.github.mjs +21 -16
- package/assets/checks/board-pull-state.github.mjs +168 -0
- package/assets/checks/board-runs.github.mjs +45 -43
- package/assets/checks/board-task-dirs.github.mjs +98 -0
- package/assets/checks/board-titles.github.mjs +19 -17
- package/assets/checks/board.github.mjs +133 -194
- package/assets/checks/check-archive-age.mjs +23 -19
- package/assets/checks/check-board.github.mjs +131 -263
- package/assets/checks/check-descriptions.mjs +30 -29
- package/assets/checks/check-doc-paths.mjs +91 -88
- package/assets/checks/check-dupes.mjs +84 -80
- package/assets/checks/check-file-size.mjs +74 -71
- package/assets/checks/check-glossary.mjs +47 -37
- package/assets/checks/check-hook-scope.mjs +30 -27
- package/assets/checks/check-lib-layers.mjs +22 -21
- package/assets/checks/check-profile-drift.mjs +48 -43
- package/assets/checks/check-prose-style.mjs +138 -39
- package/assets/checks/check-push-gate.mjs +53 -50
- package/assets/checks/check-reuse.mjs +50 -40
- package/assets/checks/check-schema-drift.mjs +104 -84
- package/assets/checks/check-specs.mjs +155 -134
- package/assets/checks/check-state-next.mjs +66 -52
- package/assets/checks/check-states.mjs +32 -30
- package/assets/checks/check-styles.mjs +52 -51
- package/assets/checks/check-turn-map.mjs +54 -46
- package/assets/checks/epic-table.github.mjs +268 -0
- package/assets/checks/lib-boundaries.mjs +32 -30
- package/assets/checks/lib-common.mjs +30 -29
- package/assets/checks/lib-domains.mjs +34 -34
- package/assets/checks/lib-manifests.mjs +17 -15
- package/assets/checks/lib-reexports.mjs +18 -18
- package/assets/checks/rt-kit-checks.config.mjs +187 -142
- package/assets/checks/signals.mjs +43 -39
- package/assets/checks/spec-anchors.mjs +114 -87
- package/assets/checks/spec-common.mjs +128 -84
- package/assets/checks/spec-contract.mjs +30 -30
- package/assets/checks/spec-proposed.mjs +27 -24
- package/assets/checks/spec-scenarios.mjs +51 -28
- package/assets/checks/specs-for.mjs +214 -0
- package/assets/checks/task-new.github.mjs +315 -61
- package/assets/commands/feedback.md +65 -59
- package/assets/commands/next-session.md +64 -57
- package/assets/commands/night.md +115 -0
- package/assets/commands/skill-curator.md +83 -79
- package/assets/defaults/gate-map.sh +108 -97
- package/assets/defaults/project.sh +232 -185
- package/assets/defaults/shell.sh +73 -68
- package/assets/defaults/turn-map.md +47 -44
- package/assets/docs/GLOSSARY.md +142 -65
- package/assets/hooks/browser-device-id.sh +16 -12
- package/assets/hooks/browser-guard-device-id.sh +34 -28
- package/assets/hooks/browser-guard-no-asking.sh +5 -4
- package/assets/hooks/browser-guard-no-listing.sh +12 -11
- package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
- package/assets/hooks/browser-guard-require-select.sh +34 -23
- package/assets/hooks/claim-guard.sh +62 -56
- package/assets/hooks/commit-msg.sh +14 -10
- package/assets/hooks/conscience-guard.sh +91 -45
- package/assets/hooks/constitution-index.sh +16 -16
- package/assets/hooks/deny-tail.sh +28 -26
- package/assets/hooks/dev-server-guard.sh +50 -43
- package/assets/hooks/dispatch.sh +60 -46
- package/assets/hooks/docs-guard.sh +100 -91
- package/assets/hooks/epic-over.sh +49 -0
- package/assets/hooks/epic-stop-guard.sh +108 -0
- package/assets/hooks/exam-guard.sh +105 -93
- package/assets/hooks/git-guard-delivery-conflict.sh +41 -36
- package/assets/hooks/git-guard-delivery-draft.sh +48 -38
- package/assets/hooks/git-guard-delivery-epic.sh +167 -0
- package/assets/hooks/git-guard-delivery-folder.sh +50 -43
- package/assets/hooks/git-guard-delivery-signature.sh +119 -53
- package/assets/hooks/git-guard-delivery.sh +223 -183
- package/assets/hooks/git-guard-main.sh +38 -34
- package/assets/hooks/git-guard-push-tests.sh +99 -87
- package/assets/hooks/glossary-load.sh +23 -22
- package/assets/hooks/grill-gate-ask.sh +12 -11
- package/assets/hooks/grill-gate.sh +94 -87
- package/assets/hooks/guard-note.sh +20 -19
- package/assets/hooks/handoff-entry-guard.sh +45 -25
- package/assets/hooks/handoff-write.sh +74 -67
- package/assets/hooks/hook-input.sh +67 -58
- package/assets/hooks/lint-after-edit.sh +95 -61
- package/assets/hooks/observe.sh +28 -26
- package/assets/hooks/override-write-guard.sh +23 -21
- package/assets/hooks/postmortem-guard.sh +42 -39
- package/assets/hooks/profile-check.sh +22 -20
- package/assets/hooks/proposal-guard.sh +57 -49
- package/assets/hooks/prose-style-guard.sh +49 -24
- package/assets/hooks/qa-dataid-guard.sh +83 -58
- package/assets/hooks/rerun-guard.sh +31 -30
- package/assets/hooks/reuse-first-guard.sh +108 -87
- package/assets/hooks/roles.sh +14 -14
- package/assets/hooks/rule-article.sh +39 -34
- package/assets/hooks/rule-source-guard.sh +47 -42
- package/assets/hooks/skill-gate-layers.sh +63 -57
- package/assets/hooks/skill-gate-rearm.sh +15 -8
- package/assets/hooks/skill-gate.sh +89 -81
- package/assets/hooks/skill-loaded.sh +10 -6
- package/assets/hooks/sql-guard-parse.sh +71 -66
- package/assets/hooks/sql-guard-request.sh +51 -46
- package/assets/hooks/sql-guard-target.sh +60 -51
- package/assets/hooks/sql-guard-write.sh +87 -79
- package/assets/hooks/sql-guard.sh +52 -47
- package/assets/hooks/stand-login-guard.sh +43 -37
- package/assets/hooks/task-context-load.sh +60 -55
- package/assets/hooks/task-flow-context.sh +87 -69
- package/assets/hooks/task-flow-draft-guard.sh +55 -48
- package/assets/hooks/task-flow-guard.sh +67 -64
- package/assets/hooks/turn-entry-load.sh +39 -32
- package/assets/hooks/turn-exit-guard.sh +260 -204
- package/assets/hooks/turn-exit-patterns.sh +63 -0
- package/assets/hooks/utf8.sh +14 -11
- package/assets/hooks/waiting-turn-guard.sh +104 -94
- package/assets/hooks/window-fill-guard.sh +70 -62
- package/assets/hooks/work-start-guard.sh +52 -49
- package/assets/hooks/write-targets.sh +99 -44
- package/assets/laws/autonomous-work.md +29 -27
- package/assets/laws/code-structure.md +31 -30
- package/assets/laws/delivery.md +170 -137
- package/assets/laws/entity-editing.md +52 -50
- package/assets/laws/entity-models.md +14 -13
- package/assets/laws/frontend-application.md +39 -38
- package/assets/laws/lib-imports.md +27 -27
- package/assets/laws/lists.md +31 -29
- package/assets/laws/navigation.md +37 -37
- package/assets/laws/observability.md +41 -40
- package/assets/laws/project-documentation.md +106 -99
- package/assets/laws/reuse-first.md +31 -29
- package/assets/laws/shared-code.md +27 -27
- package/assets/laws/verifiability.md +131 -124
- package/assets/laws/work-conduct.md +250 -244
- package/assets/patterns/admin-lists-screen.md +72 -69
- package/assets/patterns/admin-nav-item.md +51 -46
- package/assets/patterns/angular-patterns-state.md +32 -31
- package/assets/patterns/api-layer-pair.md +33 -31
- package/assets/patterns/autonomous-work-run.md +50 -49
- package/assets/patterns/browser-verification-measure.md +124 -88
- package/assets/patterns/browser-verification-stand.md +169 -157
- package/assets/patterns/component-structure-new.md +51 -42
- package/assets/patterns/dependencies-upgrade.md +55 -39
- package/assets/patterns/doc-style-human.md +55 -37
- package/assets/patterns/doc-style-sweep.md +82 -79
- package/assets/patterns/doc-style-trace.md +87 -81
- package/assets/patterns/doc-style-write.md +130 -122
- package/assets/patterns/entity-aside.md +77 -63
- package/assets/patterns/entity-models-new.md +37 -37
- package/assets/patterns/entity-store.md +33 -33
- package/assets/patterns/git-workflow-commit.azure.md +94 -87
- package/assets/patterns/git-workflow-commit.github.md +160 -142
- package/assets/patterns/git-workflow-commit.gitlab.md +96 -90
- package/assets/patterns/git-workflow-docker.md +165 -147
- package/assets/patterns/git-workflow-freshness.md +45 -45
- package/assets/patterns/git-workflow-merge.md +102 -94
- package/assets/patterns/git-workflow-migration.md +54 -52
- package/assets/patterns/git-workflow-pr-ready.md +57 -56
- package/assets/patterns/git-workflow-pr.azure.md +127 -122
- package/assets/patterns/git-workflow-pr.github.md +186 -177
- package/assets/patterns/git-workflow-pr.gitlab.md +139 -132
- package/assets/patterns/git-workflow-restart.md +35 -31
- package/assets/patterns/git-workflow-secrets.md +80 -73
- package/assets/patterns/git-workflow-stack.md +136 -107
- package/assets/patterns/lib-layers-move.md +62 -53
- package/assets/patterns/lib-layers-new.md +59 -45
- package/assets/patterns/observability-record.md +72 -67
- package/assets/patterns/platform-access-di.md +31 -29
- package/assets/patterns/reuse-first-extend.md +66 -61
- package/assets/patterns/shared-code-new.md +39 -38
- package/assets/patterns/spec-driven-domain.md +161 -151
- package/assets/patterns/spec-driven-rule.md +179 -168
- package/assets/patterns/spec-driven-sweep.md +41 -39
- package/assets/patterns/status-report-table.github.md +48 -36
- package/assets/patterns/styling-bem-component.md +42 -42
- package/assets/patterns/styling-bem-layout.md +39 -34
- package/assets/patterns/styling-bem-sheet.md +59 -58
- package/assets/patterns/task-flow-archive.md +222 -215
- package/assets/patterns/task-flow-close.md +234 -203
- package/assets/patterns/task-flow-handoff.md +154 -145
- package/assets/patterns/task-flow-resume.md +138 -133
- package/assets/patterns/task-flow-start.md +228 -202
- package/assets/patterns/testing-e2e.md +102 -101
- package/assets/patterns/testing-unit.md +77 -70
- package/assets/patterns/ts-procedure.md +32 -29
- package/assets/patterns/turn-entry-map.md +50 -48
- package/assets/pitfalls/agent-kit.md +172 -142
- package/assets/pitfalls/doc-style.md +96 -91
- package/assets/pitfalls/git-workflow.azure.md +49 -46
- package/assets/pitfalls/git-workflow.github.md +270 -234
- package/assets/pitfalls/git-workflow.gitlab.md +49 -45
- package/assets/pitfalls/spec-driven.md +73 -71
- package/assets/pitfalls/styling-bem.md +46 -40
- package/assets/pitfalls/task-flow.md +262 -246
- package/assets/pitfalls/testing.md +99 -92
- package/assets/pitfalls/turn-conduct.md +96 -81
- package/assets/rules/angular-patterns.md +81 -80
- package/assets/rules/api-layer.md +77 -74
- package/assets/rules/autonomous-work.md +87 -74
- package/assets/rules/browser-verification.md +223 -214
- package/assets/rules/component-structure.md +72 -69
- package/assets/rules/dependencies.md +74 -67
- package/assets/rules/deploy-flow.azure.md +118 -108
- package/assets/rules/deploy-flow.github.md +145 -135
- package/assets/rules/deploy-flow.gitlab.md +120 -110
- package/assets/rules/doc-style.md +201 -173
- package/assets/rules/entity-conventions.needs-admin.md +81 -79
- package/assets/rules/entity-models.md +73 -70
- package/assets/rules/git-workflow.azure.md +224 -228
- package/assets/rules/git-workflow.github.md +268 -239
- package/assets/rules/git-workflow.gitlab.md +218 -217
- package/assets/rules/lib-layers.md +85 -86
- package/assets/rules/lists.md +101 -97
- package/assets/rules/navigation.md +78 -78
- package/assets/rules/observability.needs-app.md +165 -153
- package/assets/rules/platform-access.md +76 -75
- package/assets/rules/reuse-first.md +153 -143
- package/assets/rules/shared-code.md +82 -79
- package/assets/rules/spec-driven.md +279 -260
- package/assets/rules/status-report.md +62 -58
- package/assets/rules/styling-bem.md +81 -77
- package/assets/rules/task-flow.md +303 -270
- package/assets/rules/testing.md +224 -209
- package/assets/rules/turn-conduct.md +262 -258
- package/assets/rules/turn-entry.md +92 -87
- package/assets/rules/typescript-conventions.md +94 -88
- package/assets/samples/specs/_template/spec.md +47 -47
- package/assets/samples/tasks/_template/grill.md +20 -20
- package/assets/samples/tasks/_template/plan.md +32 -30
- package/assets/samples/tasks/_template/progress.md +16 -16
- package/assets/skills/agent-kit-extend.md +129 -113
- package/assets/skills/agent-kit.md +259 -233
- package/assets/skills/write-a-skill.md +76 -71
- package/assets/templates/findings.md +19 -19
- package/assets/templates/gate-map.sh +16 -14
- package/assets/templates/implementation.md +28 -27
- package/assets/templates/pattern.md +17 -17
- package/assets/templates/pitfalls.md +6 -6
- package/assets/templates/postmortem.md +24 -23
- package/assets/templates/project.sh +24 -24
- package/assets/templates/proposal.md +62 -60
- package/assets/templates/rule.md +38 -38
- package/assets/workflows/feature.js +46 -46
- package/assets/workflows/plan.js +54 -54
- package/bin/agent-kit.d.ts.map +1 -1
- package/bin/agent-kit.js +8 -1
- package/bin/agent-kit.js.map +1 -1
- package/lib/cargo-prose.d.ts +41 -0
- package/lib/cargo-prose.d.ts.map +1 -0
- package/lib/cargo-prose.js +88 -0
- package/lib/cargo-prose.js.map +1 -0
- package/lib/cargo.d.ts +12 -1
- package/lib/cargo.d.ts.map +1 -1
- package/lib/cargo.js +8 -2
- package/lib/cargo.js.map +1 -1
- package/lib/catalog.d.ts +2 -0
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +4 -3
- package/lib/catalog.js.map +1 -1
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +5 -2
- package/lib/commands.js.map +1 -1
- package/lib/companion.js +3 -2
- package/lib/companion.js.map +1 -1
- package/lib/enroll.d.ts +7 -1
- package/lib/enroll.d.ts.map +1 -1
- package/lib/enroll.js +12 -3
- package/lib/enroll.js.map +1 -1
- package/lib/fate.d.ts +29 -0
- package/lib/fate.d.ts.map +1 -0
- package/lib/fate.js +147 -0
- package/lib/fate.js.map +1 -0
- package/lib/override-marks.d.ts +7 -0
- package/lib/override-marks.d.ts.map +1 -1
- package/lib/override-marks.js +14 -0
- package/lib/override-marks.js.map +1 -1
- package/lib/plan.d.ts +11 -0
- package/lib/plan.d.ts.map +1 -1
- package/lib/plan.js +10 -1
- package/lib/plan.js.map +1 -1
- package/lib/ship.d.ts +29 -9
- package/lib/ship.d.ts.map +1 -1
- package/lib/ship.js +44 -2
- package/lib/ship.js.map +1 -1
- package/lib/shipment.d.ts.map +1 -1
- package/lib/shipment.fixture.d.ts +8 -1
- package/lib/shipment.fixture.d.ts.map +1 -1
- package/lib/shipment.fixture.js +9 -0
- package/lib/shipment.fixture.js.map +1 -1
- package/lib/shipment.js +38 -5
- package/lib/shipment.js.map +1 -1
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +45 -11
- package/lib/sync.js.map +1 -1
- package/package.json +1 -1
- package/rt-tools-agent-kit-0.27.0.tgz +0 -0
- package/rt-tools-agent-kit-0.24.0.tgz +0 -0
|
@@ -2,58 +2,59 @@
|
|
|
2
2
|
name: git-workflow-commit
|
|
3
3
|
kind: pattern
|
|
4
4
|
rule: git-workflow
|
|
5
|
-
description:
|
|
5
|
+
description: Pattern of rule git-workflow. Load for creating a task and a branch, commit and push — the creation command with all four steps, moving the column, merging two tasks into one, working as the machine account, skipping the document requirement. Opening a PR — pattern git-workflow-pr.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# Task, branch and commit
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Pattern of the rule `git-workflow`. What must be true meanwhile — the law
|
|
11
11
|
`docs/constitution/delivery.md`.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## When to use
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
15
|
+
- A task is being created, and the edit starts from it.
|
|
16
|
+
- A branch is being created for a task.
|
|
17
|
+
- A commit or a push is being prepared.
|
|
18
|
+
- The work moved to the next step, and the task moves to another column of the board.
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## First the task on the board, then the branch
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
Creation is four steps: the issue, the number in its title, adding to the board, the first
|
|
23
|
+
column. The board is not bound to the repository — its `projectsV2` is empty — so the third step
|
|
24
|
+
does not happen by itself, and without it the task is visible neither in the work queue nor to
|
|
25
|
+
the owner: two tasks stood that way for a month.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
All four steps are done by one tree command, not by hand: splitting them means forgetting the
|
|
28
|
+
third.
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
**A command that does not exist is not replaced by client calls in the pattern.** A tree that
|
|
31
|
+
takes the package for the first time gets the check files, but not the entries about them in its
|
|
32
|
+
manifest: the layout edits resources, and the consumer's manifest does not belong to it. Two ways
|
|
33
|
+
from here: create the command in the same turn, or repeat all its steps by name from the list
|
|
34
|
+
above. A bypass by client calls looks like execution up to the last step of the list: it is
|
|
35
|
+
forgotten first, because the previous ones have already given a visible result. So a card stood
|
|
36
|
+
outside the columns for the whole work — two commits and two closed stages.
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
**The local branches of this task are read before a new one is created.** The board does not see
|
|
39
|
+
branches, and a task whose work lies finished in a local branch looks open to everyone: the column
|
|
40
|
+
is moved by hand, there is no PR, and the branch is visible only on the machine where it was
|
|
41
|
+
created. So a second branch was created under one number, with its own task folder and its own
|
|
42
|
+
plan — that is, the work was planned a second time, and the owner had to choose between the two.
|
|
42
43
|
|
|
43
44
|
```bash
|
|
44
45
|
git branch --list '<КЛЮЧ>-<номер>-*'
|
|
45
46
|
```
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
One line of answer means the work is already started: its state is read in the progress of its
|
|
49
|
+
folder, not created anew. An empty answer speaks only about this machine — a branch created on
|
|
50
|
+
another and not handed to the host is invisible from here too.
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
**The work queue is asked before the task is created, not after.** What one's own audit found
|
|
53
|
+
feels new, and that feeling is the only thing behind the decision to create a task: the creation
|
|
54
|
+
command answers for its calls and knows nothing about the queue's contents. It is asked by a search
|
|
55
|
+
over the topic words, together with what was closed in the last month: a defect closed and back
|
|
56
|
+
again is the same work, not a new one. A duplicate costs a lot — the whole work goes through it,
|
|
57
|
+
and merging two tasks into one afterwards is done by hand.
|
|
57
58
|
|
|
58
59
|
```bash
|
|
59
60
|
/opt/homebrew/bin/gh issue list --state all --limit 200 --search '<слова темы>' \
|
|
@@ -62,79 +63,86 @@ git branch --list '<КЛЮЧ>-<номер>-*'
|
|
|
62
63
|
|
|
63
64
|
|
|
64
65
|
```bash
|
|
65
|
-
npm run task:new -- --title 'Письма владельцу не уходят молча' \
|
|
66
|
+
npm run task:new -- --epic-of <номер эпика> --title 'Письма владельцу не уходят молча' \
|
|
66
67
|
--label bug --label area:api --slug mail-owner-silence < описание.md
|
|
67
68
|
```
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
The body is read from standard input, `--slug` is optional and goes only into the hint with the
|
|
71
|
+
branch name. The epic is named by `--epic-of`, and the command writes the line about it into the
|
|
72
|
+
body itself and prints the branch line from the branch of the epic; work outside an epic goes by
|
|
73
|
+
`--outside-epic '<слово владельца>'`, and without either of the two the call is refused before the
|
|
74
|
+
card is created. The epic itself is created by the same command with `--epic`. Author and assignee — the machine account; the command reads the token itself, from
|
|
75
|
+
a file outside the repository.
|
|
72
76
|
|
|
73
|
-
|
|
77
|
+
The script under this command is created by the project — the package does not ship it. What it
|
|
78
|
+
does by `gh` calls:
|
|
74
79
|
|
|
75
80
|
```bash
|
|
76
81
|
gh issue create --title '[<КЛЮЧ>-<номер>] …' --label bug --assignee <бот> --body-file -
|
|
77
|
-
gh issue edit <номер> --title '[<КЛЮЧ>-<номер>] …' #
|
|
82
|
+
gh issue edit <номер> --title '[<КЛЮЧ>-<номер>] …' # the number is known only after creation
|
|
78
83
|
gh project item-add <номер борды> --owner <владелец> --url <адрес issue>
|
|
79
84
|
```
|
|
80
85
|
|
|
81
|
-
|
|
86
|
+
The last step is the one that gets forgotten: without it the task is created, but it is not in the
|
|
87
|
+
queue.
|
|
82
88
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
89
|
+
Creation ends not with the command's output but with the work queue's answer. The command asks
|
|
90
|
+
it itself and prints what it read — presence on the board, the column, the assignee; absence ends
|
|
91
|
+
it with a non-zero code. That answer goes into the comment, the PR body and the plan, not the
|
|
92
|
+
printed number: the number says "the call went through", not "the task is visible to whoever
|
|
93
|
+
works on it".
|
|
87
94
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
95
|
+
Creations that go one after another are checked not by the last one but by an audit of the whole
|
|
96
|
+
queue: their miss is shared, and by one task it is invisible. Sixteen tasks in a row printed a
|
|
97
|
+
number, and not one reached the queue so that the owner saw it.
|
|
91
98
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
99
|
+
A task created from the text of a document names a check in the tree in its body. A quote is
|
|
100
|
+
never the ground: a document speaks of intent, goes stale silently and stays true on the face of
|
|
101
|
+
it, while a task is created for what is in the tree now. The body holds the file and the symbol
|
|
102
|
+
where the miss is visible, or the command output that shows it. Neither found — the task is not
|
|
103
|
+
created, and the document line is edited in the turn that read it.
|
|
97
104
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
105
|
+
The task title says what is wrong, not what to do: the PR turns it into the done later. The number
|
|
106
|
+
is not written into the title by hand — it is known only after creation, and the command appends
|
|
107
|
+
it itself.
|
|
101
108
|
|
|
102
|
-
|
|
109
|
+
What to check the work queue with:
|
|
103
110
|
|
|
104
111
|
```bash
|
|
105
112
|
npm run check:board
|
|
106
113
|
```
|
|
107
114
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
115
|
+
It looks only at what is open: the tasks on the board, the number and the assignee of every open
|
|
116
|
+
task, and for every open PR — the number in the title, the `Closes` line, the open task behind it
|
|
117
|
+
and that there is no second PR with the same number. It does not judge the branch name: an open PR
|
|
118
|
+
cannot have it renamed.
|
|
111
119
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
120
|
+
Closed tasks the audit does not look for on the board, and there is no need to add them there
|
|
121
|
+
after the fact: a closed task leaves the queue by merge, and the board has no column for it. Of a
|
|
122
|
+
closed task the audit remembers only one thing — its folder in `docs/tasks/`.
|
|
115
123
|
|
|
116
|
-
##
|
|
124
|
+
## Two tasks fixed by one edit
|
|
117
125
|
|
|
118
|
-
|
|
119
|
-
|
|
126
|
+
If it turned out along the way that the edit closes the neighbouring task too — that is one task,
|
|
127
|
+
not two. They can be merged while the edit has not reached the main branch:
|
|
120
128
|
|
|
121
129
|
```bash
|
|
122
130
|
GH=/opt/homebrew/bin/gh
|
|
123
|
-
#
|
|
131
|
+
# what the absorbing task lacked is appended to its body
|
|
124
132
|
$GH api -X PATCH repos/<владелец>/<репозиторий>/issues/<поглотившая> -f body="$(cat тело.md)"
|
|
125
|
-
#
|
|
133
|
+
# the absorbed one is erased with its number — two lines about one work are worse than a numbering gap
|
|
126
134
|
$GH api graphql -f query='mutation { deleteIssue(input: {issueId: "<node-id>"})
|
|
127
135
|
{ repository { name } } }'
|
|
128
136
|
```
|
|
129
137
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
138
|
+
Deletion is irreversible and takes away the `Closes #<номер>` links from other bodies with it — so
|
|
139
|
+
the absorbing task is edited first, and only then the absorbed one is erased. After the merge
|
|
140
|
+
there is no absorbing: the branch went in, and it is reverted whole.
|
|
133
141
|
|
|
134
|
-
##
|
|
142
|
+
## The branch is created by a separate call
|
|
135
143
|
|
|
136
|
-
|
|
137
|
-
|
|
144
|
+
The main branch guard parses the command text and looks at the branch at launch, so a compound
|
|
145
|
+
command is rejected whole — the branch does not exist in it yet:
|
|
138
146
|
|
|
139
147
|
```bash
|
|
140
148
|
✗ git checkout -b <КЛЮЧ>-85-guest-token && git commit -m 'feat(<область>): …'
|
|
@@ -142,38 +150,43 @@ $GH api graphql -f query='mutation { deleteIssue(input: {issueId: "<node-id>"})
|
|
|
142
150
|
✓ git commit -F -
|
|
143
151
|
```
|
|
144
152
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
исполнителя.
|
|
153
|
+
The base is the epic branch, not the main branch — `git checkout -b <КЛЮЧ>-85-guest-token
|
|
154
|
+
<ветка эпика>`. From the main branch only the epic branch itself is taken: a task branched from it
|
|
155
|
+
carries into it what the epic has not finished.
|
|
149
156
|
|
|
150
|
-
|
|
151
|
-
|
|
157
|
+
The name — `<КЛЮЧ>-<номер задачи>-<короткий-slug>`, the slug in lowercase Latin letters joined by
|
|
158
|
+
hyphens. The delivery guard parses it on the spot and refuses a miss in the form before the first
|
|
159
|
+
commit, and by the number it asks the board: the task must exist, be open, stand in the queue and
|
|
160
|
+
have an assignee.
|
|
152
161
|
|
|
153
|
-
|
|
162
|
+
A name without a number (`feat/…`, `fix/…`) is legitimate while the branch lives locally — for a
|
|
163
|
+
trial and an analysis. No PR opens from it: an edit that reaches the main branch starts with a
|
|
164
|
+
task.
|
|
154
165
|
|
|
155
|
-
|
|
156
|
-
|
|
166
|
+
## The task column moves together with the work
|
|
167
|
+
|
|
168
|
+
Branch created — the task is no longer in `📋 Backlog` but in progress. PR opened — it awaits
|
|
169
|
+
review. Both moves are done by one command, as a second call right after the one that caused it:
|
|
157
170
|
|
|
158
171
|
```bash
|
|
159
|
-
npm run task:move -- 86 in-progress #
|
|
160
|
-
npm run task:move -- 86 in-review #
|
|
172
|
+
npm run task:move -- 86 in-progress # right after git checkout -b <КЛЮЧ>-86-…
|
|
173
|
+
npm run task:move -- 86 in-review # right after gh pr create
|
|
161
174
|
```
|
|
162
175
|
|
|
163
|
-
|
|
164
|
-
`done`
|
|
165
|
-
|
|
166
|
-
|
|
176
|
+
The columns under their own names: `backlog`, `in-progress`, `in-review`, and also `new`,
|
|
177
|
+
`ready`, `done` and `deployed`, which the work does not pass through — a closed task leaves the
|
|
178
|
+
queue by merge. The command edits the board as the bot, reads the token itself and prints from
|
|
179
|
+
where to where it moved; it accepts neither tasks off the board nor an unknown column.
|
|
167
180
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
181
|
+
The move is not put off for later: the work queue is read between steps, not after them. A task
|
|
182
|
+
with an open PR stood in `📋 Backlog` until the audit itself — all that time it looked untouched,
|
|
183
|
+
and nobody was waiting to review it.
|
|
171
184
|
|
|
172
|
-
##
|
|
185
|
+
## The commit is signed by the bot
|
|
173
186
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
187
|
+
The token is read into a variable and not printed; author and committer are set by variables of
|
|
188
|
+
the same command. `git config` will not do — the config is shared with the main tree and would
|
|
189
|
+
rewrite the signature to the owner:
|
|
177
190
|
|
|
178
191
|
```bash
|
|
179
192
|
TOKEN=$(tr -d '\n' < ~/.config/<дерево>-bot-token)
|
|
@@ -183,9 +196,9 @@ GIT_COMMITTER_NAME="<бот>" GIT_COMMITTER_EMAIL="<номер>+<бот>@users.n
|
|
|
183
196
|
git commit -F -
|
|
184
197
|
```
|
|
185
198
|
|
|
186
|
-
|
|
187
|
-
`test`, `chore`, `perf`.
|
|
188
|
-
|
|
199
|
+
The subject — `type(scope): description`. Types: `feat`, `fix`, `refactor`, `docs`, `style`,
|
|
200
|
+
`test`, `chore`, `perf`. Scopes: `site`, `admin`, `api`, `common`, `proto`, `deploy`. A full stop
|
|
201
|
+
at the end of the subject is not accepted; the length — up to 150 characters.
|
|
189
202
|
|
|
190
203
|
```
|
|
191
204
|
feat(<область>): availability calendar with season prices
|
|
@@ -193,58 +206,63 @@ fix(<область>): reject overlapping booking dates
|
|
|
193
206
|
chore(deploy): docker-compose for vps
|
|
194
207
|
```
|
|
195
208
|
|
|
196
|
-
##
|
|
209
|
+
## The files of one's own work are named one by one
|
|
197
210
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
211
|
+
The working tree is one, and there can be several works in it: someone else's uncommitted folder,
|
|
212
|
+
a draft left behind, an edit of a neighbouring session. A directory added whole takes them along,
|
|
213
|
+
and what this work never asked for leaves for the main branch.
|
|
201
214
|
|
|
202
215
|
```bash
|
|
203
216
|
git add docs/tasks/<КЛЮЧ>-<номер>-<slug>/plan.md docs/tasks/<КЛЮЧ>-<номер>-<slug>/progress.md
|
|
204
|
-
git diff --cached --name-only #
|
|
217
|
+
git diff --cached --name-only # what actually got into the index
|
|
205
218
|
```
|
|
206
219
|
|
|
207
|
-
|
|
208
|
-
|
|
220
|
+
Checking the index after adding is not enough: a foreign file added once becomes tracked and goes
|
|
221
|
+
on silently — the next `git add` no longer asks about it.
|
|
209
222
|
|
|
210
|
-
##
|
|
223
|
+
## The document goes in the same commit
|
|
211
224
|
|
|
212
|
-
`docs-guard`
|
|
225
|
+
`docs-guard` demands the pair and names it itself. The bypass — a line in the body, the reason
|
|
226
|
+
is mandatory:
|
|
213
227
|
|
|
214
228
|
```
|
|
215
229
|
Docs-skip: правка только в тестах хука, зеркала у него нет
|
|
216
230
|
```
|
|
217
231
|
|
|
218
|
-
##
|
|
219
|
-
|
|
220
|
-
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
-
|
|
227
|
-
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
-
|
|
244
|
-
|
|
245
|
-
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
232
|
+
## Common misses
|
|
233
|
+
|
|
234
|
+
- **An audit right after adding answers "no" when the card already stands.** The work queue gives
|
|
235
|
+
out a new item not in the same second it was created, and the last step reads it by the next
|
|
236
|
+
call. The answer to this is to reread the whole queue, not to create the card a second time: two
|
|
237
|
+
records about one task are removed only by an administrator. The creation command itself needs
|
|
238
|
+
an edit here: the state is read right after the mutation, without a retry, and a false refusal
|
|
239
|
+
here costs more than a delay.
|
|
240
|
+
- `gh` in the user's shell is substituted — call `/opt/homebrew/bin/gh` directly.
|
|
241
|
+
- A directory added whole with someone else's uncommitted work next to it: a foreign task folder
|
|
242
|
+
left for the main branch and became tracked.
|
|
243
|
+
- `git add` with several paths adds nothing if even one path does not exist: the command breaks
|
|
244
|
+
off whole at the first miss instead of skipping it. The next `git commit --amend` then carries
|
|
245
|
+
into the commit everything left in the index — so a file deletion belonging to a neighbouring
|
|
246
|
+
branch went into the commit. The commit contents are read by `git show --stat` right after it,
|
|
247
|
+
not at PR review.
|
|
248
|
+
- The index contents are read by `git diff --cached --stat` **before** the commit, not only by
|
|
249
|
+
`git show --stat` after it. Tree commands put files into the index themselves: `npm run
|
|
250
|
+
task:new` adds the task folder, and everything lying next to it goes along — so a temporary
|
|
251
|
+
diagnostics directory ended up in the index.
|
|
252
|
+
- `gh project` with `--owner` answers `unknown owner type`: the board owner is another account,
|
|
253
|
+
and the edit goes only through GraphQL.
|
|
254
|
+
- A created task is not taken onto the board by itself: the repository is not linked to it, and
|
|
255
|
+
adding goes by a separate call. Two tasks stayed outside the work queue that way — which is why
|
|
256
|
+
all four steps are done by `npm run task:new`, not by hand.
|
|
257
|
+
- The assignee of a task is not set by itself either at creation through the web or at adding to
|
|
258
|
+
the board: of ninety-nine open tasks it stood on two.
|
|
259
|
+
- A task created through the web, past the command, does not reach the board and is not refused
|
|
260
|
+
by the guard — it looks at the command, not at the task. Only the queue audit catches this.
|
|
261
|
+
- The task column does not move by itself either from creating a branch or from opening a PR: the
|
|
262
|
+
board does not see the branch at all, and the link to the PR fills only the host's field of
|
|
263
|
+
linked PRs. The audit does not catch taking into work either — the branch is invisible to it
|
|
264
|
+
too.
|
|
265
|
+
- `gh api graphql --paginate` on a query of board items goes into repeating the first page: the
|
|
266
|
+
cursor is taken from the answer by hand, and completeness is checked against
|
|
267
|
+
`items(first: 1) { totalCount }`.
|
|
268
|
+
- The owner's edit takes neither the token nor the variables — they are only for machine work.
|