agent-concepts 0.0.0-stage → 0.4.1

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.
Files changed (139) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +773 -2
  3. package/concepts/bc-brainstorming/body/SKILL.md +43 -0
  4. package/concepts/bc-code-review/body/SKILL.md +120 -0
  5. package/concepts/bc-codebase-design/body/SKILL.md +54 -0
  6. package/concepts/bc-codebase-docs/body/SKILL.md +150 -0
  7. package/concepts/bc-council-audit-security/body/SKILL.md +72 -0
  8. package/concepts/bc-council-chain/body/SKILL.md +71 -0
  9. package/concepts/bc-council-challenge-plan/body/SKILL.md +78 -0
  10. package/concepts/bc-council-find-bugs/body/SKILL.md +70 -0
  11. package/concepts/bc-council-improve-architecture/body/SKILL.md +52 -0
  12. package/concepts/bc-council-mode/body/SKILL.md +56 -0
  13. package/concepts/bc-council-mode/body/examples/agents/README.md +11 -0
  14. package/concepts/bc-council-mode/body/examples/agents/council-change.md +14 -0
  15. package/concepts/bc-council-mode/body/examples/agents/council-compat.md +14 -0
  16. package/concepts/bc-council-mode/body/examples/agents/council-risk.md +14 -0
  17. package/concepts/bc-council-mode/body/references/pass-contracts.md +133 -0
  18. package/concepts/bc-delegate-investigation/body/SKILL.md +119 -0
  19. package/concepts/bc-delegate-investigation/body/examples/pi-settings-snippet.json +8 -0
  20. package/concepts/bc-delegate-investigation/body/pi.md +170 -0
  21. package/concepts/bc-design/body/SKILL.md +49 -0
  22. package/concepts/bc-design/body/design-framework.md +39 -0
  23. package/concepts/bc-design/body/existing-app.md +9 -0
  24. package/concepts/bc-design/body/new-work.md +22 -0
  25. package/concepts/bc-design/body/principles.md +34 -0
  26. package/concepts/bc-design/body/surfaces.md +13 -0
  27. package/concepts/bc-diagnosing-bugs/body/SKILL.md +83 -0
  28. package/concepts/bc-dispatching-parallel-agents/body/SKILL.md +63 -0
  29. package/concepts/bc-domain-modeling/body/SKILL.md +40 -0
  30. package/concepts/bc-executing-plans/body/SKILL.md +50 -0
  31. package/concepts/bc-explain-visually/body/SKILL.md +167 -0
  32. package/concepts/bc-find-bugs/body/SKILL.md +90 -0
  33. package/concepts/bc-finishing-development-branch/body/SKILL.md +73 -0
  34. package/concepts/bc-grilling/body/SKILL.md +22 -0
  35. package/concepts/bc-handoff/body/SKILL.md +104 -0
  36. package/concepts/bc-handoff/body/pickup.md +107 -0
  37. package/concepts/bc-handoff/body/writing.md +217 -0
  38. package/concepts/bc-improve-codebase-architecture/body/SKILL.md +101 -0
  39. package/concepts/bc-json-canvas/body/SKILL.md +40 -0
  40. package/concepts/bc-json-canvas/body/references/EXAMPLES.md +71 -0
  41. package/concepts/bc-json-canvas/body/references/SPEC.md +55 -0
  42. package/concepts/bc-json-canvas/body/references/VALIDATION.md +26 -0
  43. package/concepts/bc-minimal-solution-ladder/body/SKILL.md +120 -0
  44. package/concepts/bc-obsidian-bases/body/SKILL.md +59 -0
  45. package/concepts/bc-obsidian-bases/body/references/EXAMPLES.md +80 -0
  46. package/concepts/bc-obsidian-bases/body/references/FUNCTIONS.md +49 -0
  47. package/concepts/bc-obsidian-bases/body/references/SYNTAX.md +82 -0
  48. package/concepts/bc-obsidian-bases/body/references/TROUBLESHOOTING.md +41 -0
  49. package/concepts/bc-obsidian-markdown/body/SKILL.md +47 -0
  50. package/concepts/bc-obsidian-markdown/body/references/CALLOUTS.md +40 -0
  51. package/concepts/bc-obsidian-markdown/body/references/EMBEDS.md +35 -0
  52. package/concepts/bc-obsidian-markdown/body/references/PROPERTIES.md +37 -0
  53. package/concepts/bc-optimize-code/body/SKILL.md +41 -0
  54. package/concepts/bc-performance-guardrails/body/SKILL.md +53 -0
  55. package/concepts/bc-performance-guardrails/body/measuring.md +29 -0
  56. package/concepts/bc-performance-guardrails/body/targets.md +20 -0
  57. package/concepts/bc-pipeline-to-done/body/SKILL.md +205 -0
  58. package/concepts/bc-pipeline-to-done/body/agents/bc-drain-auditor.md +19 -0
  59. package/concepts/bc-pipeline-to-done/body/agents/bc-drain-reviewer.md +19 -0
  60. package/concepts/bc-pipeline-to-done/body/agents/bc-drain-worker.md +19 -0
  61. package/concepts/bc-pipeline-to-done/body/execute-issue.md +71 -0
  62. package/concepts/bc-pipeline-to-done/body/recovery-bundle.md +79 -0
  63. package/concepts/bc-pipeline-to-done/body/review-contract.md +105 -0
  64. package/concepts/bc-pipeline-to-done/body/roles.md +13 -0
  65. package/concepts/bc-pipeline-to-done/body/scripts/publish-check.py +172 -0
  66. package/concepts/bc-pipeline-to-done/body/source-issues.md +86 -0
  67. package/concepts/bc-pipeline-to-done/body/source-work-items.md +76 -0
  68. package/concepts/bc-plain-language/body/SKILL.md +134 -0
  69. package/concepts/bc-plan-slicing/body/SKILL.md +56 -0
  70. package/concepts/bc-plan-to-pipeline/body/SKILL.md +89 -0
  71. package/concepts/bc-prd-drafting/body/SKILL.md +43 -0
  72. package/concepts/bc-prompting-agents/body/SKILL.md +278 -0
  73. package/concepts/bc-prototype/body/SKILL.md +40 -0
  74. package/concepts/bc-qmd/body/SKILL.md +64 -0
  75. package/concepts/bc-research/body/SKILL.md +26 -0
  76. package/concepts/bc-security-audit/body/AI-AND-LLM.md +25 -0
  77. package/concepts/bc-security-audit/body/ATTACK-CLASSES.md +35 -0
  78. package/concepts/bc-security-audit/body/DESKTOP-MOBILE-AND-LOCAL-IPC.md +28 -0
  79. package/concepts/bc-security-audit/body/RECONNAISSANCE.md +49 -0
  80. package/concepts/bc-security-audit/body/SKILL.md +117 -0
  81. package/concepts/bc-security-audit/body/SUPPLY-CHAIN-AND-RELEASE.md +28 -0
  82. package/concepts/bc-security-audit/body/VALIDATION-AND-REPORTING.md +124 -0
  83. package/concepts/bc-security-audit/body/WEB-PROTOCOL-AND-AUTH.md +27 -0
  84. package/concepts/bc-security-audit/body/validate_audit.py +151 -0
  85. package/concepts/bc-self-improve/body/SKILL.md +104 -0
  86. package/concepts/bc-seo/body/CITATIONS.md +23 -0
  87. package/concepts/bc-seo/body/IMAGE-SEO.md +350 -0
  88. package/concepts/bc-seo/body/SKILL.md +453 -0
  89. package/concepts/bc-setup-project/body/SKILL.md +252 -0
  90. package/concepts/bc-setup-project/body/scaffold.py +2751 -0
  91. package/concepts/bc-setup-project/body/starter-items.md +157 -0
  92. package/concepts/bc-setup-project/body/work-data.md +114 -0
  93. package/concepts/bc-setup-project/body/work_index.py +626 -0
  94. package/concepts/bc-setup-project/body/work_spent.py +220 -0
  95. package/concepts/bc-subagent-driven-development/body/SKILL.md +61 -0
  96. package/concepts/bc-tdd/body/SKILL.md +184 -0
  97. package/concepts/bc-tdd/body/formal.md +77 -0
  98. package/concepts/bc-tdd/body/mocking.md +49 -0
  99. package/concepts/bc-tdd/body/properties.md +59 -0
  100. package/concepts/bc-tdd/body/refactoring.md +12 -0
  101. package/concepts/bc-tdd/body/scripts/confirm-red.py +136 -0
  102. package/concepts/bc-tdd/body/tests.md +59 -0
  103. package/concepts/bc-teach/body/GLOSSARY-FORMAT.md +36 -0
  104. package/concepts/bc-teach/body/LEARNING-RECORD-FORMAT.md +60 -0
  105. package/concepts/bc-teach/body/MISSION-FORMAT.md +34 -0
  106. package/concepts/bc-teach/body/RESOURCES-FORMAT.md +53 -0
  107. package/concepts/bc-teach/body/REVIEW-FORMAT.md +48 -0
  108. package/concepts/bc-teach/body/SKILL.md +281 -0
  109. package/concepts/bc-teach/body/WIKI-FORMAT.md +58 -0
  110. package/concepts/bc-teach/body/scripts/due.py +65 -0
  111. package/concepts/bc-to-spec/body/SKILL.md +21 -0
  112. package/concepts/bc-to-tickets/body/SKILL.md +21 -0
  113. package/concepts/bc-triage/body/AGENT-BRIEF.md +38 -0
  114. package/concepts/bc-triage/body/OUT-OF-SCOPE.md +51 -0
  115. package/concepts/bc-triage/body/SKILL.md +81 -0
  116. package/concepts/bc-unslop/body/SKILL.md +269 -0
  117. package/concepts/bc-using-git-worktrees/body/SKILL.md +91 -0
  118. package/concepts/bc-wiki-maintain/body/SKILL.md +361 -0
  119. package/concepts/bc-wiki-maintain/body/runner/README.md +552 -0
  120. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-lint.service +24 -0
  121. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-lint.timer +15 -0
  122. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain-all.service +29 -0
  123. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain-all.timer +16 -0
  124. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain.service +28 -0
  125. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain.timer +12 -0
  126. package/concepts/bc-wiki-maintain/body/runner/bc-wiki-notify@.service +15 -0
  127. package/concepts/bc-wiki-maintain/body/runner/notify-failure.sh +92 -0
  128. package/concepts/bc-wiki-maintain/body/runner/run-lint.sh +69 -0
  129. package/concepts/bc-wiki-maintain/body/runner/run-promotion-all.sh +103 -0
  130. package/concepts/bc-wiki-maintain/body/runner/run-promotion.sh +270 -0
  131. package/concepts/bc-wiki-maintain/body/wiki_lint.py +958 -0
  132. package/concepts/bc-wiki-maintain/body/wiki_search.py +206 -0
  133. package/concepts/bc-work-sync/body/PLAN.md +46 -0
  134. package/concepts/bc-work-sync/body/SKILL.md +71 -0
  135. package/concepts/bc-writing-plans/body/SKILL.md +79 -0
  136. package/package.json +130 -4
  137. package/packages/agent-kernel-pi/AGENT-KERNEL.md +109 -0
  138. package/packages/agent-kernel-pi/index.js +8 -0
  139. package/packages/agent-kernel-pi/package.json +12 -0
@@ -0,0 +1,172 @@
1
+ #!/usr/bin/env python3
2
+ """Answer the objective part of the publish policy: may this push be allowed?
3
+
4
+ Usage:
5
+ publish-check.py --repo PATH --remote URL --branch NAME [--changed-file F]...
6
+
7
+ Checks path/remote/branch against the user-owned policy at
8
+ ~/.config/agent-concepts/publish.yaml and enforces self-amendment immunity (a
9
+ commit touching the policy file is never publishable by rule). The subjective
10
+ `when` conditions (agent-authored-only, after-agent-commit) remain the agent's
11
+ judgment — this script cannot see them.
12
+
13
+ The policy is deliberately read from outside the repository, and there is no
14
+ in-repo fallback: a private authorization file living inside a public checkout
15
+ is one `git add -f` away from being published. See policies/publish.example.yaml.
16
+
17
+ Exit codes: 0 = rule matches, or the repo has no remote so publishing cannot
18
+ apply (verify `when` conditions yourself before any push), 2 = no rule matches
19
+ (ask the user; if asking is impossible, do not publish).
20
+ """
21
+
22
+ from __future__ import annotations
23
+
24
+ import argparse
25
+ import fnmatch
26
+ import os
27
+ import subprocess
28
+ import sys
29
+ from pathlib import Path
30
+
31
+ try:
32
+ import yaml
33
+ except ImportError:
34
+ print("ASK: PyYAML unavailable, cannot evaluate policy — treat as no matching rule")
35
+ sys.exit(2)
36
+
37
+ CONFIG_HOME = Path(os.environ.get("XDG_CONFIG_HOME", "~/.config")).expanduser()
38
+ POLICY = CONFIG_HOME / "agent-concepts" / "publish.yaml"
39
+
40
+
41
+ def norm(p: str) -> Path:
42
+ return Path(p).expanduser().resolve()
43
+
44
+
45
+ def configured_remotes(repo: Path) -> list[str] | None:
46
+ """Remote names for repo, or None when git cannot answer.
47
+
48
+ Asks git rather than trusting --remote: a wrong flag value must not be able
49
+ to make a repo that does have a remote look unpublishable.
50
+ """
51
+ try:
52
+ done = subprocess.run(
53
+ ["git", "-C", str(repo), "remote"],
54
+ stdout=subprocess.PIPE,
55
+ stderr=subprocess.DEVNULL,
56
+ text=True,
57
+ timeout=15,
58
+ check=True,
59
+ )
60
+ except (OSError, subprocess.SubprocessError):
61
+ return None
62
+ return done.stdout.split()
63
+
64
+
65
+ def push_after_commit_clause(policy_text: str) -> str | None:
66
+ """Return the policy's contiguous PUSH AFTER COMMIT comment block."""
67
+ lines = policy_text.splitlines()
68
+ start = next(
69
+ (i for i, line in enumerate(lines)
70
+ if line.lstrip().startswith("#") and "PUSH AFTER COMMIT:" in line),
71
+ None,
72
+ )
73
+ if start is None:
74
+ return None
75
+
76
+ block: list[str] = []
77
+ for line in lines[start:]:
78
+ stripped = line.lstrip()
79
+ if not stripped.startswith("#"):
80
+ break
81
+ content = stripped[1:]
82
+ if content.startswith(" "):
83
+ content = content[1:]
84
+ block.append(content)
85
+ return "\n".join(block)
86
+
87
+
88
+ def policy_path_within(repo: Path) -> str | None:
89
+ """Repo-relative path of the policy file, if it lives inside this repo.
90
+
91
+ Self-amendment immunity has to follow the actual file rather than a fixed
92
+ string: the policy usually sits outside any repository, but a user may sync
93
+ their config directory through one (via a symlink), in which case pushing
94
+ that repo could carry a policy change.
95
+ """
96
+ try:
97
+ return str(POLICY.resolve().relative_to(repo))
98
+ except (ValueError, OSError):
99
+ return None
100
+
101
+
102
+ def main() -> int:
103
+ ap = argparse.ArgumentParser()
104
+ ap.add_argument("--repo", required=True)
105
+ ap.add_argument("--remote", required=True)
106
+ ap.add_argument("--branch", required=True)
107
+ ap.add_argument("--changed-file", action="append", default=[],
108
+ help="repo-relative path changed by the commits to be pushed (repeatable)")
109
+ args = ap.parse_args()
110
+
111
+ if not POLICY.is_file():
112
+ print(f"ASK: no policy at {POLICY} — no rule can match; ask the user or do not publish")
113
+ print("PUSH AFTER COMMIT clause: could not be found because the policy file is unavailable; do not infer it.")
114
+ return 2
115
+
116
+ try:
117
+ policy_text = POLICY.read_text()
118
+ except OSError:
119
+ print(f"ASK: policy at {POLICY} could not be read — no rule can match; ask the user or do not publish")
120
+ print("PUSH AFTER COMMIT clause: could not be found because the policy file could not be read; do not infer it.")
121
+ return 2
122
+
123
+ policy = yaml.safe_load(policy_text)
124
+ repo = norm(args.repo)
125
+
126
+ if configured_remotes(repo) == []:
127
+ print("N/A: repo has no git remote — there is nothing to publish to, so no "
128
+ "publish authorization is needed or granted. Leave the commits local.")
129
+ print("If a remote is added later, this check applies again and denies by default.")
130
+ return 0
131
+
132
+ for rule in policy.get("rules", []):
133
+ scope = rule.get("scope", {})
134
+ paths = [norm(p) for p in scope.get("paths", [])]
135
+ if not any(repo == p or p in repo.parents for p in paths):
136
+ continue
137
+ if args.remote not in scope.get("remotes", []):
138
+ continue
139
+ # Branch patterns support glob wildcards (fnmatch); a plain name with no
140
+ # wildcards still matches only itself. Lets rules authorize families like
141
+ # `bc-drain-claims/issue-*` without listing every issue number.
142
+ if not any(fnmatch.fnmatch(args.branch, b) for b in rule.get("branches", [])):
143
+ continue
144
+ excluded = list(rule.get("exclude_changes_under", []))
145
+ own_path = policy_path_within(repo)
146
+ if own_path:
147
+ excluded.append(own_path)
148
+ hits = [f for f in args.changed_file
149
+ if any(f.startswith(e.rstrip("/") + "/") or f == e.rstrip("/") for e in excluded)]
150
+ if hits:
151
+ print(f"ASK: rule '{rule.get('id')}' matches repo/remote/branch, but these changes "
152
+ f"are excluded from rule-based publishing: {', '.join(hits)} — "
153
+ "policy changes require current explicit user instruction")
154
+ return 2
155
+ when = ", ".join(rule.get("when", [])) or "none"
156
+ print(f"MATCH: rule '{rule.get('id')}' allows {', '.join(rule.get('allow', []))} here.")
157
+ print(f"Before pushing, verify these conditions yourself (not machine-checkable): {when}.")
158
+ print("PUSH AFTER COMMIT clause from policy:")
159
+ clause = push_after_commit_clause(policy_text)
160
+ if clause is None:
161
+ print("Could not find the PUSH AFTER COMMIT clause in the policy file; do not infer it.")
162
+ else:
163
+ print(clause)
164
+ return 0
165
+
166
+ print("ASK: no allow rule matches this repo/remote/branch — "
167
+ "publishing requires current explicit user instruction; if asking is impossible, do not publish")
168
+ return 2
169
+
170
+
171
+ if __name__ == "__main__":
172
+ sys.exit(main())
@@ -0,0 +1,86 @@
1
+ # Issue source
2
+
3
+ The GitHub issue source of [bc-pipeline-to-done](SKILL.md). The unit of work is one issue, its claim key is `issue-<n>`, and its contract is the issue body or latest `## Agent Brief`. Everything here is specific to issues; the claim protocol, packets, review, landing, recovery and safety live in [SKILL.md](SKILL.md).
4
+
5
+ ## Where issues and work items meet
6
+
7
+ When the project has no "Where things go" table, there are no work items: the issue tracker alone carries status and the project keeps its existing bookkeeping. Ideas and observations then go to `.bc-agent/research/architecture-observations.md` or the path the project instructions declare (see [Optional architecture observation](SKILL.md#optional-architecture-observation)).
8
+
9
+ With a table, work items are the source of truth and GitHub issues are optional pointers to them: an item records its issue on its `Issue:` line, and a large item's `plan.md` names each slice's issue in its step. The drain still selects work from issues; an item without an issue is not drained. Find an issue's item by searching the work stage folders for `#<n>` on an `Issue:` line or in a step.
10
+
11
+ ## Cloud-lane provenance gate
12
+
13
+ Before selection, recovery, rework, or any claim/label mutation, read the issue's current labels. If `automated` is present, skip the issue: `automated` is the repo's cloud-lane provenance label, and cloud-build consumes both owner and automated issues. An issue without `automated` is still cloud-lane work — skipped, reported, and never released, deleted, reused, or relabelled, exactly like `automated` — when any of: its held claim tip (a non-marker claim commit) names `branch=cloud-build/issue-<n>` in its body; the issue carries `in-progress-agent` with a `cloud-build-run` comment; it has an open PR from head branch `cloud-build/issue-<n>`. A `cloud-build-run` comment alone, with a valid released-marker or absent ref, no `in-progress-agent`, and no open cloud PR, is history, not a live claim — the issue follows the normal owner path. Check labels first, then the read-only claim-tip body, then comments and PRs, before any recovery disposition or mutation; the read-only tip read for provenance authorizes no adoption, restore, release, or cleanup. Report any active claim (a held ref or `in-progress-agent`) on an `automated` issue; likewise, on an issue that is cloud-lane under the three live signals above, report any cloud-lane claim, `cloud-build-run` comment, or PR and never release, delete, reuse, or relabel that claim, including marker cleanup. It is cloud-lane work, not untouched or abandoned local work, even when local state is absent. If provenance (labels, claim tip, comments, or PRs) cannot be read, report and skip without mutation. Why: shared claim refs do not prove local ownership, and restart cleanup must not steal cloud work.
14
+
15
+ Leave pre-existing in-flight local bundles exactly as they are: no migration or deletion. Skipping automated or other cloud-lane work never authorizes cleanup of its surviving worktrees or recovery evidence. Non-automated issues without a held cloud-claim tip, without `in-progress-agent` with a `cloud-build-run` comment, and without an open `cloud-build/issue-<n>` PR retain the claim fences, recovery, review, owned-claim release, and attended driver landing below. A valid Released Claim Marker tip is still FREE, but an issue with an open `cloud-build/issue-<n>` PR or `in-progress-agent` with a `cloud-build-run` comment is still cloud-lane for selection.
16
+
17
+ ## States
18
+
19
+ - `READY`: open and eligible (`ready-for-agent`).
20
+ - `IN_PROGRESS`: claimed build/review/rework (`ready-for-agent` + `in-progress-agent`; the remote claim branch is authoritative).
21
+ - `LANDED`: approved, committed, pushed, and closed.
22
+ - `HUMAN_BLOCKED`: requires a human decision, unavailable access/resource, contract clarification, or irreparable issue-local environment repair that only a human can perform (remove ready/in-progress; add `needs-human`).
23
+ - `REWORK_DEFERRED`: findings remain agent-fixable but the rework-round limit or no-progress rule is exhausted (keep ready, remove in-progress, add `rework-for-agent`, and post an Agent Rework Brief).
24
+ - `SYSTEMIC_FAILURE`: repeated tooling/base/environment failure; stop the run and explicitly classify affected issues.
25
+
26
+ A review rejection is not by itself a human blocker. Preserve useful fixable work through recovery rather than relabeling it `needs-human` or discarding its worktree.
27
+
28
+ ## Preflight
29
+
30
+ Add these to the core preflight:
31
+
32
+ - Check for `ready-for-agent`, `rework-for-agent`, `needs-human`, and `in-progress-agent`; create missing labels only with separate issue-mutation authorization and never in local-only mode.
33
+ - Confirm the ability to read issues, comments and PRD parent/children. In local-only mode, or when issue mutations are not separately authorized (including a no-policy yes in single-driver mode), use GitHub read-only: skip mutation-access checks and record claim, blocker and deferral notes locally. Otherwise confirm issue/comment/close access. A blocked, claimed, deferred, or open child keeps its parent open.
34
+
35
+ ## Resuming an interrupted run
36
+
37
+ Apply the cloud-lane provenance gate above — labels, then the read-only claim-tip body, then comments and PRs — before marker classification and before any adoption, restore, release, or cleanup. The read-only claim-tip body read for cloud-claim provenance is part of that gate, not a recovery disposition. Also check issues carrying `in-progress-agent` even when their ref is absent, so active automated or other cloud-lane work is reported rather than treated as free local work. Only non-automated issues enter the recovery dispositions below, and never an issue with cloud-lane provenance.
38
+
39
+ For the core's untouched disposition:
40
+
41
+ - **Neither, and the issue is untouched** — release the claim and `in-progress-agent`, then treat it as `READY`. This disposition never applies to a cloud-lane claim: an untouched issue has no held cloud-claim tip naming `branch=cloud-build/issue-<n>`, no `in-progress-agent` with a `cloud-build-run` comment, and no open `cloud-build/issue-<n>` PR.
42
+
43
+ ## Select
44
+
45
+ Exclude `automated` before classification or claim, and likewise any cloud-lane issue (held cloud-claim tip, `in-progress-agent` with a `cloud-build-run` comment, or open `cloud-build/issue-<n>` PR), for fresh, deferred, and `rework-for-agent` candidates alike; apply the cloud-lane provenance gate before any recovery or mutation, not after bundle restore or marker reuse. List oldest open candidates and parse dependencies from issue bodies and comments, including dependency headings and inline `blocked by` / `depends on` / `requires` / `after` / `prerequisite` references. Select only when every dependency is closed and neither claimed nor in flight. Skip `needs-human`, live claims (not valid marker refs), in-flight issues, and unresolved dependencies.
46
+
47
+ With a table, skip an issue whose work item is still in work-planned without a `Planned:` line, before claim, and report it as "needs planning"; file one note naming the item and that it needs `bc-plan-to-pipeline` where the owner sees questions (check the project's or machine's instructions). If no place is named or the named place cannot be used, park the work item by recording `Waiting on owner: <question>` in its header (for example, ask whether the owner can plan the item with `bc-plan-to-pipeline`). Keep an existing waiting question rather than overwrite it with this reminder. Remove any `Ready for agent:` line, refresh the work index and include the note in the run report. Leave the issue unclaimed. Do not run that planning yourself: it asks the owner questions, and this run is AFK. Why: the project's pickup rule requires every planned item to be planned before it starts, and a drain must never stall waiting on it.
48
+
49
+ Prioritize `rework-for-agent` candidates with a valid local recovery bundle. Otherwise prefer a concrete latest `## Agent Brief`; vague or decision-incomplete work becomes `HUMAN_BLOCKED`, not guessed work.
50
+
51
+ ## Claim marks
52
+
53
+ After the claim ref proves ownership, add `in-progress-agent` and leave a run-id breadcrumb on the issue.
54
+
55
+ ## Deferral
56
+
57
+ Post a portable comment:
58
+
59
+ ```text
60
+ ## Agent Rework Brief
61
+ Base SHA: <sha>
62
+ Unresolved findings: <compact list>
63
+ Validation: <summary and durable evidence references>
64
+ Next agent: <specific next actions>
65
+ ```
66
+
67
+ Keep `ready-for-agent`, add `rework-for-agent`, remove `in-progress-agent`, mark it ineligible for the rest of this run, and release only after the bundle validates. If safe capture fails, retain evidence and follow the recovery contract's fail-safe handling—never silently delete useful work.
68
+
69
+ ## Landing
70
+
71
+ Only after the core landing steps commit and push, and only with separate authorization for issue mutations, the driver:
72
+
73
+ 6. closes the issue with commit and validation evidence;
74
+ 7. releases worktree, local branch, and claim, and removes both `in-progress-agent` and `ready-for-agent` from the closed issue (closing does not clear labels); then evaluates PRD closeout.
75
+
76
+ **Work-item update in the landing commit.** With a table, show the issue's progress by where its item sits and which steps are checked, in the same commit as the work: check the issue's step in the item; if the item is still in work-planned, `git mv` it to work-active; if this landing completes the item, fill its `## Outcome` with what landed (issue numbers, earlier commits, validation; the commit that moves the item is the landing commit, so it cannot cite its own SHA) and `git mv` it into the work-done month folder `<year>-<month>/` (create the month folder when missing). Never write a `Status:` line or a live-cursor page such as `.bc-agent/tasks/active.md`. Why: the folder is the status, so a written status can only disagree with it, and a separate bookkeeping commit leaves a window in which the tree shows finished work as active. This update is the only content in the landing commit outside the reviewed diff; it touches nothing but the item. If no item names `#<n>`, change no work file and report "no work item" for that issue; do not create one in the landing commit, because creating an item is planning, outside the reviewed diff. Without a table, skip it.
77
+
78
+ Close a parent PRD only when every child is completed and none is open, blocked, deferred, claimed, or in flight.
79
+
80
+ ## Blocked
81
+
82
+ For `HUMAN_BLOCKED`, post a comment the human who will unblock can act on: the decision or missing access first, the options and what happens if they pick each, then the exact evidence. Leave SHAs, paths, and commands untouched. Do not load `bc-plain-language`. Then remove ready/in-progress and add `needs-human`. For `SYSTEMIC_FAILURE`, stop new launches, let active children reach a safe boundary, preserve/classify each issue, and report stale resources rather than guessing or destructive cleanup.
83
+
84
+ ## Report
85
+
86
+ Also report parent PRDs closed/open. Report active automated claims separately as cloud-lane work left untouched, including `in-progress-agent` without a held ref. In local-only mode, name the review branch and do not close issues.
@@ -0,0 +1,76 @@
1
+ # Work-item source
2
+
3
+ The work-item source of [bc-pipeline-to-done](SKILL.md). The unit of work is one work item, its claim key is `item-<slug>` (the item's file or folder name without `.md`), and its contract is the item: its `plan.md` steps and `requirements.md` for a large item, its steps for a small one. Resolve the work-planned, work-active and work-done folders and the ideas file through the project's "Where things go" table, and follow the work-item rules in `.bc-agent/AGENTS.md`. Everything here is specific to work items; the claim protocol, packets, review, landing, recovery and safety live in [SKILL.md](SKILL.md).
4
+
5
+ ## Eligibility
6
+
7
+ An item is eligible when all three hold:
8
+
9
+ - it carries the line `Ready for agent: yes` and no `Waiting on owner:` line;
10
+ - every item named on its `Blocked by:` line is in work-done;
11
+ - it is next in pipeline order: the generated table in `work/README.md` (run the project's work index script first so it is current), or the project's order rules when the project has no generated table. Take the first eligible item; never jump an item the order puts ahead of it. Why: an unattended drain has no one to say which item matters more, so the owner's order is the only priority it has.
12
+
13
+ When the user's request names an item ("build 003-whitespace", "build the item I just planned"), that naming is the order decision for this run: build that item without asking about the order, provided the other two conditions hold. Record the change the project's way in the claim commit — for example move the item to the top of `work/order.md` — and rerun the work index script. Why: the user has already chosen; asking again whether to skip the items ahead stalls a run the user started on purpose.
14
+
15
+ Skip an item without the ready line, even when it looks fully planned. Why: `Planned:` proves the item was planned, not that the owner agreed to let it run unattended; the ready line is that consent, and `bc-plan-to-pipeline` writes it only when every step states what "done" means and what is out of scope. An eligible item whose steps still lack done-criteria or out-of-scope is parked (see [Park](#park)), not guessed.
16
+
17
+ An item already in work-active is either a live claim (see [Claim](#claim)) or interrupted work for the core's resume rules; never start a second run on it.
18
+
19
+ ## Claim
20
+
21
+ The claim unit is the whole item: one builder works through all its steps. Different items may run at the same time, one builder each.
22
+
23
+ **When preflight permits remote claims**, claim the item with the same no-force protocol the core uses for issues, on `refs/heads/bc-drain-claims/item-<slug>`: create-if-absent without force, ownership proven by the push update plus `git ls-remote` equality, a lost race skipped before dispatch. Released Claim Marker reuse applies only to a valid marker whose body names `item=<slug>` in place of `issue=<n>`; any other existing tip is held. Then `git mv` the item to work-active, add the driver's `Held by:` line (below), run the work index script, and commit the move on the recorded target branch and push it there before the builder starts. Why: the folder move shows the owner the item is running, but two drivers can both move it; only the ref is atomic.
24
+
25
+ **Without a Git remote, or when the core preflight records single-driver or local-only mode**, the committed move to work-active is the claim. Start the builder's worktree from that local claim commit, not a fetched tip, and do not push the move before the builder starts. Only with no Git remote, skip the core preflight's publish check and claim-ref authorization (steps 2 and 3) and run every other preflight step. In local-only mode all commits stay local. Since only one driver may run in the repository, use `max-parallel=1`: if parallel building was requested, build one item at a time and report why. Stop and report if another driver's session, worktree or branch for the item exists. Why: a local commit is not atomic across drivers, so a second driver could build the same item.
26
+
27
+ ## Held by line
28
+
29
+ The driver holds the item, not its builder: in the commit that moves the item to work-active, or the first commit when it resumes an item already there, it writes `Held by: <tool> <session> since <YYYY-MM-DD HH:MM> <UTC or +HH:MM>` under the item's header lines (its agent tool, its session name or id without spaces, the time it started), replacing any line a stopped driver left. It removes the line in the commit that parks, defers or finishes the item, and before ending a run that leaves the item in work-active. The builder in its worktree never writes it. Why: the owner's dashboard shows who holds each active item and since when, and a line left behind looks like a live run.
30
+
31
+ ## Build
32
+
33
+ The item gets one builder, which works its steps in order in one worktree for the whole item, with the item and step as its contract in place of an issue and Agent Brief. For each step:
34
+
35
+ 1. the builder implements the step as the core's build contract says and returns `READY_FOR_REVIEW` for that step;
36
+ 2. the driver runs the deterministic pre-review gate and full review on the step's diff, with rework as the core says;
37
+ 3. on approval the driver lands the step (core landing): it commits the step's reviewed diff, and in the same commit ticks the step's checkbox in the item, records the step's `Review:` and `Gate:` lines (below) and reruns the project's work index script to regenerate the work index;
38
+ 4. the next step starts from that commit in the same worktree.
39
+
40
+ A step whose `Blocked by:` names an earlier unfinished step waits for it; the order of the steps is the build order. A step deferred under the core's rework rules defers the whole item: record the Agent Rework Brief in the item under the step and remove its `Held by:` line, keep the item in work-active, and release the claim only after the recovery bundle validates.
41
+
42
+ ## Review and Gate lines
43
+
44
+ Every review verdict and gate run on a step is one line in that step's Notes, each on its own indented line under the step, oldest first, kept when a later round passes:
45
+
46
+ - `Review: <approved | changes requested> by <reviewer> <YYYY-MM-DD>`, one per reviewer verdict, where `<reviewer>` names who reviewed (the reviewer role or agent, `tier-1`, or `owner`);
47
+ - `Gate: <pass | fail> <command> at <commit> <YYYY-MM-DD>`, one per run of the deterministic pre-review gate or the project's check command, where `<commit>` is the short SHA the checked tree was built on (`HEAD` when the gate ran).
48
+
49
+ The driver writes them, in the landing commit for a passed step and in the deferring commit for a deferred one; reviewers and the builder never edit the item. Why: the owner's dashboard reads these lines to show whether each step passed review and the gate, and a result kept only in the run's artifacts is gone once the run is cleaned up.
50
+
51
+ ## Park
52
+
53
+ When the item needs an owner decision (`HUMAN_BLOCKED`), park it in one commit. A decision that blocks only a later step does not stop the steps before it: claim the item, build and land those steps, and park when the build reaches the blocked step. Why: landed steps are useful work the owner's answer does not change. To park:
54
+
55
+ - move it back to work-planned;
56
+ - add the line `Waiting on owner: <question>`, phrased so the owner can answer it: the decision first, the options and what each leads to, then the evidence;
57
+ - remove its `Ready for agent:` line;
58
+ - tick only steps that landed and keep their commits;
59
+ - remove its `Held by:` line;
60
+ - run the work index script.
61
+
62
+ File the question where the owner sees questions: the project's or machine's instructions name the place, and the private overlay may name the tool. If no place is named or the named place cannot be used, the parked item's `Waiting on owner: <question>` line is the fallback; include the exact question and item in the run report. Then release the claim and its worktree as the core says for a blocked unit without useful local work, or keep a recovery bundle when the step has useful work. Why: the work item shows it is waiting even without a separate question destination.
63
+
64
+ ## Resume
65
+
66
+ When the owner answers, write the answer into the item, next to the step it settles or under its requirements, delete the `Waiting on owner:` line, and restore `Ready for agent: yes`; run the work index script and commit. The item is then eligible again and resumes at its first unticked step. Only the owner's answer restores the ready line; a driver never restores it on its own judgement.
67
+
68
+ ## Finish
69
+
70
+ After the last step lands, finish the item in one commit: fill its `## Outcome` with what landed (the step commits and the validation; this commit cannot cite its own SHA) and end it with the `Spent:` line, remove its `Held by:` line, `git mv` it into the work-done month folder `<YYYY-MM>/` (create it when missing), regenerate the work index, and commit and push as the core's landing does. Then release the claim and worktree.
71
+
72
+ The `Spent:` line comes from the spent script beside the work index script: run `python3 .bc-agent/scripts/work_spent.py <item-name>` in the main checkout and paste the line it prints, unchanged, as the last line of `## Outcome`, for example `Spent: 2h 10m active, 3.4M tokens, $5.20 (estimated; pi 3 sessions, claude-code no files, codex 0 sessions; other tools not counted)`. It estimates the item's active time, tokens and cost from the agent tools' session files; never write or adjust the figures yourself. A project without the script gets no `Spent:` line. Why: the owner's dashboard shows what each item cost, and a guessed figure is worse than none.
73
+
74
+ ## Report
75
+
76
+ Report, per item: steps landed with commits, the item finished or parked (with its question and where it was filed), and any step deferred.
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: bc-plain-language
3
+ description: >
4
+ Write or review human-facing prose so the intended readers can find what they
5
+ need, understand it, and act on it. Use for docs, UI copy, emails,
6
+ announcements, explanations, public pages, and research notes written for
7
+ people. Triggers: plain language, ISO 24495, make this clearer, de-jargon,
8
+ rewrite for readers, too dense, bureaucratic, readers will not get this.
9
+ Review first; rewrite only when asked. Not for agent-facing skills,
10
+ AGENTS.md, gates, kernels, code, or choosing explanation visuals.
11
+ ---
12
+
13
+ # Plain Language
14
+
15
+ A document is plain when its **intended readers** can get what they need,
16
+ find it, understand it, and use it. That is a reader outcome, not a style
17
+ and not a grade level.
18
+
19
+ This skill follows the publicly documented principles behind
20
+ ISO 24495-1:2023. It is unofficial. It does not reproduce the standard,
21
+ and following it is never a claim of ISO conformance.
22
+
23
+ ## When this applies
24
+
25
+ Use it on **human-facing** text: help pages, UI strings, announcements,
26
+ emails, explanations, teach notes, marketing/SEO copy, and research notes
27
+ written for people.
28
+
29
+ **Do not apply it to agent-facing instructions** — skill bodies, kernels,
30
+ gates, AGENTS.md, or other text whose reader is a coding agent — unless
31
+ the user explicitly asks. Why: those documents carry hard-won failure
32
+ modes and reasons a capable agent needs; "familiar words" is the wrong
33
+ optimization and will strip the why. Domain controlled languages such as
34
+ ASD-STE100 serve human readers with a fixed dictionary and numeric
35
+ sentence caps: a narrower tool. This skill borrows only their procedure
36
+ and warning conventions.
37
+
38
+ Leave code, commands, logs, diffs, and quoted file contents untouched.
39
+
40
+ On a mixed task, apply this skill only to the human-facing part.
41
+
42
+ ## Identify the reader first
43
+
44
+ Name the intended reader and what they must do or decide. If the user
45
+ did not name one, assume a busy, intelligent, non-specialist adult and
46
+ state that assumption only when it changes the work.
47
+
48
+ Jargon is relative to that reader. A term the reader already uses is
49
+ plain; a synonym invented for "simplicity" is not.
50
+
51
+ ## Four principles, in order
52
+
53
+ 1. **Relevant** — the text contains what this reader needs for this
54
+ purpose, and little else. Cutting unused content is a rewrite, not a
55
+ failure to be thorough. Do not hide or drop anything the reader must
56
+ know to act safely.
57
+ 2. **Findable** — the reader can locate the part they need without
58
+ reading everything. Order by the reader's priority, not the author's
59
+ chronology. Put the main point first. Use informative headings, one
60
+ topic per paragraph, and lists for parallel items.
61
+ 3. **Understandable** — the reader gets it on first reading. Prefer
62
+ words they already know, one idea per sentence, active constructions,
63
+ and one term for one concept. Define a necessary term once, then keep
64
+ it. Address the reader directly when you can.
65
+ 4. **Usable** — the reader can act. If they must do something, write an
66
+ actor, the action, and the next step. If only a test with real readers
67
+ could prove usability, say so rather than declaring the text done.
68
+
69
+ Word choice is a small part of this. Structure and design do most of the
70
+ work. A sentence polish that leaves author-centric structure has applied
71
+ half the skill.
72
+
73
+ ## Procedures and warnings
74
+
75
+ For human-facing steps or risk notices:
76
+ - Address the reader with imperative steps, one action each unless actions must happen together; this makes execution trackable.
77
+ - Put a needed condition before its action ("If the service is running, stop it."); readers need the limit before acting.
78
+ - Keep notes informational, not instructional; an action hidden in a note is easy to miss.
79
+ - Open a warning with the command or condition, then name the specific consequence of ignoring it ("Back up the database before you continue. Without a backup, the deleted records cannot be recovered."), not what the action itself does; readers need to know what is at stake. Include one for data loss or irreversible operations.
80
+ - Unpack long noun stacks into phrases with prepositions; readers should not have to guess how the terms relate.
81
+
82
+ ## Modes
83
+
84
+ **Review is the default.** Report findings against the four principles.
85
+ Do not rewrite the source unless the user asks.
86
+
87
+ **Rewrite only on request** ("rewrite this", "make this plain", "apply
88
+ plain language"). Keep every fact, number, condition, negation, actor,
89
+ deadline, and honest hedge. If plainness would cost precision, keep the
90
+ precision and flag the trade-off in one line.
91
+
92
+ When the user asks what changed, return a before/after table that names
93
+ the principle behind each change. Otherwise return the rewritten text,
94
+ not a lecture.
95
+
96
+ ## Never
97
+
98
+ These fail by rationalization — the moment they are inconvenient is when
99
+ they matter.
100
+
101
+ - **Never claim ISO compliance, certification, or "ISO-aligned" as a
102
+ stamp.** Part 1 is guidance, not a certifiable scheme. Why: a false
103
+ conformance claim is worse than an unofficial rewrite.
104
+ - **Never treat a readability score as a pass.** Flesch, Hemingway, and
105
+ word-count caps do not test relevance, findability, or whether this
106
+ reader can act. Why: the public standard literature rejects formulas
107
+ as the measure; score-worship punishes necessary terms.
108
+ - **Never drop a condition to sound simpler.** Why: that is a meaning
109
+ change dressed up as clarity. Part 2 exists because legal and
110
+ technical precision must survive plainness.
111
+ - **Never collapse this into Easy Language / Easy-to-Read** unless the
112
+ user asked for that audience. Why: those registers serve readers with
113
+ different access needs and much tighter constraints.
114
+
115
+ ## Output
116
+
117
+ - Review: short findings, tagged `relevant` / `findable` /
118
+ `understandable` / `usable`. Name the assumed reader.
119
+ - Rewrite: the rewritten text. Append `Kept as-is:` only when something
120
+ was deliberately left unsimplified.
121
+ - If the reader must act: reader-addressed steps with conditions first
122
+ and warnings where needed; say when a reader test is still required.
123
+
124
+ ## Where this stops
125
+
126
+ - Visual form of how-it-works explanations → `bc-explain-visually`; this skill owns the
127
+ words around the visual.
128
+ - Agent-instruction authoring → `bc-prompting-agents`.
129
+ - Visual UI beyond the words → `bc-design`.
130
+ - Evidence and citations → `bc-research`. This skill can make a human-facing
131
+ note scannable; it does not change what counts as a source.
132
+ - Live grill questions, the architecture-review HTML report, and a drain
133
+ `needs-human` comment already carry a thin reader-outcome clause in
134
+ those skills. Do not load this skill on top of them.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: bc-plan-slicing
3
+ description: Break a plan, spec, or PRD into independently-grabbable vertical tracer-bullet slices — dependency-ordered and finalized by the agent without waiting for human approval. Use when splitting resolved work into agent-ready tickets.
4
+ ---
5
+
6
+ # Slicing into tickets
7
+
8
+ Break a plan into independently-grabbable units using **vertical slices (tracer bullets)**. This is the reusable **slicing discipline** — it does NOT publish anywhere and does NOT touch any parent ticket. The caller publishes the final slices: `/bc-to-tickets` creates GitHub issues; `/bc-plan-to-pipeline` publishes them as part of the planning run.
9
+
10
+ ## Process
11
+
12
+ ### 1. Gather context
13
+ Work from whatever is already in the conversation. If the caller passes a ticket reference (number, URL, or path), fetch it (`gh issue view <n> --comments`) and read the full body and comments.
14
+
15
+ ### 2. Explore the codebase (optional)
16
+ If you haven't already, explore the code. Slice titles and descriptions should use the project's `glossary.md` glossary vocabulary, and respect ADRs in the area you're touching. Look for **prefactoring** opportunities: "Make the change easy, then make the easy change."
17
+
18
+ ### 3. Draft vertical slices
19
+ Break the plan into tracer-bullet slices. Each slice is a thin vertical slice that cuts through **all** integration layers end-to-end — NOT a horizontal slice of one layer.
20
+
21
+ <vertical-slice-rules>
22
+ - Each slice delivers a narrow but COMPLETE path through every layer (schema, API, UI, tests).
23
+ - A completed slice is demoable or verifiable on its own.
24
+ - An ordinary slice fits one fresh agent context window; split it before it needs a handoff.
25
+ - Size for the executor's whole ticket lifecycle, not implementation alone: consider audit + build + independent review + likely rework and explain fit in qualitative scope/risk terms. When risk or interaction breadth makes an end-to-end slice implausible to verify and rework safely, split at independently verifiable behavior boundaries; never hand back work you judge unsafe to verify and rework as one slice as agent-ready. This is a sizing judgment, not a numeric drain-readiness gate: child-token totals and former token thresholds do not determine whether work is drain-ready. Do not invent per-slice token estimates; classify fit qualitatively from scope, compatibility surface, external semantics, migration risk, and likely rework.
26
+ - Any prefactoring is its own first slice.
27
+ </vertical-slice-rules>
28
+
29
+ ### 4. Check the breakdown yourself, then finalize
30
+ Do not stop to ask the user to approve the slices; the owner trusts the agent's slicing, so no human gate sits here. Review the draft yourself before finalizing: Is the granularity right (too coarse / too fine)? Are the dependency relationships correct? Should any slices merge or split? Revise until the answers hold, then finalize and continue.
31
+
32
+ Show the final breakdown in your reply so the user can see what was decided — for each slice: **Title**, **Blocked by** (which slices must finish first), **User stories covered**, and **Lifecycle fit** (a brief qualitative scope/risk reason; never an invented token estimate). This is a report, not a question: do not wait for an answer.
33
+
34
+ Exception: when the user asked in this request to review the slices before they are finalized, present them as a numbered **draft** and wait for approval.
35
+
36
+ ### 5. Hand back the final slices
37
+ **Wide-refactor exception.** When one mechanical change has a codebase-wide blast radius and no vertical slice can stay green, use expand–contract instead: first add the new form beside the old; then migrate callers in green batches sized by blast radius; finally remove the old form only after every batch lands. Each migration batch is blocked by the expand step, and the contract step is blocked by all batches. Do not disguise a wide refactor as a fake vertical slice.
38
+
39
+ Return the final breakdown in **dependency order** (blockers first), each slice in the template below, so the caller can publish them and fill real "Blocked by" references. Do not publish; do not create, close, or modify any parent ticket.
40
+
41
+ <ticket-template>
42
+ ## Parent
43
+ A reference to the parent ticket (e.g. `#42`), if the source was an existing ticket — otherwise omit.
44
+
45
+ ## What to build
46
+ A concise description of this vertical slice — the end-to-end behavior, not layer-by-layer implementation. Avoid file paths or code snippets (they go stale). Prototype-snippet exception as in `bc-prd-drafting`.
47
+
48
+ ## Acceptance criteria
49
+ - [ ] Criterion 1
50
+ - [ ] Criterion 2
51
+
52
+ ## Blocked by
53
+ - `#NN` (the blocking ticket/slice), or "None — can start immediately".
54
+ </ticket-template>
55
+
56
+ For glossary discovery in legacy projects, follow `bc-domain-modeling`’s legacy glossary rule.