@davidbyoung/software-factory 0.1.3 → 0.1.5

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 (80) hide show
  1. package/README.md +12 -11
  2. package/actions/factory-agent/action.yml +1 -1
  3. package/agents/factory-e2e-reviewer.md +102 -0
  4. package/agents/factory-test-reviewer.md +26 -64
  5. package/agents/factory-ticket-readiness.md +14 -6
  6. package/dist/cli.mjs +28 -1
  7. package/dist/code-host/github-setup.mjs +1 -1
  8. package/dist/commands.d.mts +16 -0
  9. package/dist/commands.mjs +129 -0
  10. package/dist/config.d.mts +61 -13
  11. package/dist/config.mjs +271 -69
  12. package/dist/deps.d.mts +7 -4
  13. package/dist/deps.mjs +20 -9
  14. package/dist/doctor.d.mts +3 -2
  15. package/dist/doctor.mjs +19 -4
  16. package/dist/explain.d.mts +4 -2
  17. package/dist/explain.mjs +70 -23
  18. package/dist/guard-commit.d.mts +7 -2
  19. package/dist/guard-commit.mjs +58 -21
  20. package/dist/init.d.mts +4 -2
  21. package/dist/init.mjs +18 -8
  22. package/dist/lib/default-branch.d.mts +35 -0
  23. package/dist/lib/default-branch.mjs +117 -0
  24. package/dist/lib/refined-check.d.mts +7 -0
  25. package/dist/lib/refined-check.mjs +76 -0
  26. package/dist/lib/work-status.d.mts +2 -2
  27. package/dist/lib/work-status.mjs +4 -4
  28. package/dist/parts.d.mts +1 -1
  29. package/dist/parts.mjs +2 -2
  30. package/dist/patch-coverage.d.mts +13 -0
  31. package/dist/patch-coverage.mjs +73 -0
  32. package/dist/pr-watch.d.mts +3 -2
  33. package/dist/pr-watch.mjs +22 -5
  34. package/dist/pr.mjs +34 -2
  35. package/dist/review-cost.mjs +1 -1
  36. package/dist/review-tools.mjs +3 -3
  37. package/dist/session-start.d.mts +23 -13
  38. package/dist/session-start.mjs +56 -44
  39. package/dist/site/servers.d.mts +6 -2
  40. package/dist/site/servers.mjs +14 -9
  41. package/dist/site.mjs +2 -2
  42. package/dist/sync.d.mts +8 -2
  43. package/dist/sync.mjs +41 -7
  44. package/dist/ticket.mjs +19 -1
  45. package/docs/builds.md +8 -8
  46. package/docs/cli.md +82 -45
  47. package/docs/configuration.md +838 -565
  48. package/docs/design.md +17 -4
  49. package/docs/developing.md +44 -8
  50. package/docs/existing-repo.md +9 -7
  51. package/docs/github/by-hand.md +27 -14
  52. package/docs/github/reference.md +21 -16
  53. package/docs/github/setup.md +14 -11
  54. package/docs/glossary.md +14 -5
  55. package/docs/limitations.md +27 -2
  56. package/docs/plugins.md +307 -52
  57. package/docs/quick-start.md +37 -9
  58. package/docs/removing.md +2 -2
  59. package/docs/skills.md +103 -54
  60. package/docs/updating.md +149 -3
  61. package/docs/workflow.md +13 -10
  62. package/package.json +1 -1
  63. package/review.md +20 -11
  64. package/rules.md +23 -19
  65. package/settings.schema.json +292 -72
  66. package/skills/factory-address-review/SKILL.md +50 -30
  67. package/skills/factory-build/SKILL.md +76 -23
  68. package/skills/factory-deps/SKILL.md +46 -21
  69. package/skills/factory-design/SKILL.md +18 -9
  70. package/skills/factory-diagnose/SKILL.md +22 -20
  71. package/skills/factory-mutate/SKILL.md +38 -24
  72. package/skills/factory-refine/SKILL.md +55 -31
  73. package/skills/factory-resolve-conflicts/SKILL.md +76 -34
  74. package/skills/factory-trace/SKILL.md +3 -2
  75. package/workflows/factory-build.yml +1 -1
  76. package/workflows/factory-claude-review.yml +1 -1
  77. package/workflows/factory-conflicts.yml +8 -8
  78. package/workflows/factory-deps.yml +1 -1
  79. package/workflows/factory-review.yml +1 -1
  80. package/skills/factory-address-review/patch-coverage.py +0 -68
@@ -1,68 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Lines a branch adds or changes that its tests leave uncovered.
3
-
4
- Codecov's PR comment names files and counts, not lines. This reads the same
5
- lcov report CI uploads and keeps only the lines in the diff against the base.
6
-
7
- python3 patch-coverage.py [base] [lcov]
8
-
9
- Run the project's coverage command first. Defaults: origin/main and
10
- coverage/lcov.info. MISS is a line never run; PART is a line with a branch
11
- never taken.
12
- """
13
-
14
- import os
15
- import re
16
- import subprocess
17
- import sys
18
-
19
- base = sys.argv[1] if len(sys.argv) > 1 else "origin/main"
20
- lcov = sys.argv[2] if len(sys.argv) > 2 else "coverage/lcov.info"
21
-
22
- coverage = {}
23
- current = None
24
- for line in open(lcov):
25
- line = line.strip()
26
- if line.startswith("SF:"):
27
- current = os.path.relpath(line[3:])
28
- coverage[current] = {"miss": set(), "part": set()}
29
- elif line.startswith("DA:"):
30
- number, hits = line[3:].split(",")[:2]
31
- if hits == "0":
32
- coverage[current]["miss"].add(int(number))
33
- elif line.startswith("BRDA:"):
34
- number, _, _, taken = line[5:].split(",")
35
- if taken in ("0", "-"):
36
- coverage[current]["part"].add(int(number))
37
-
38
- diff = subprocess.run(
39
- ["git", "diff", "-U0", f"{base}...HEAD"],
40
- capture_output=True,
41
- text=True,
42
- check=True,
43
- ).stdout
44
- changed = {}
45
- path = None
46
- for line in diff.splitlines():
47
- if line.startswith("+++ "):
48
- path = line[6:] if line.startswith("+++ b/") else None
49
- if path:
50
- changed[path] = set()
51
- hunk = re.match(r"@@ .* \+(\d+)(?:,(\d+))? @@", line)
52
- if hunk and path:
53
- start, count = int(hunk[1]), int(hunk[2] or 1)
54
- changed[path].update(range(start, start + count))
55
-
56
- for path, lines in sorted(changed.items()):
57
- report = coverage.get(path)
58
- if not report:
59
- continue
60
- missed = report["miss"] & lines
61
- partial = (report["part"] & lines) - missed
62
- if not missed and not partial:
63
- continue
64
- source = open(path).read().splitlines()
65
- print(f"=== {path}")
66
- for number in sorted(missed | partial):
67
- kind = "MISS" if number in missed else "PART"
68
- print(f"{kind} {number}: {source[number - 1].strip()[:110]}")