@jesdi/skills 0.0.10 → 0.0.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jesdi/skills",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "jesdi's agent skills (content package consumed by @jesdi/skills-cli)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,7 +20,7 @@ from pathlib import Path
20
20
  import crap_git
21
21
  import crap_python
22
22
  import crap_typescript
23
- from crap_config import CODE_SUFFIXES, Config, Target, find_config, load, matches
23
+ from crap_config import CODE_SUFFIXES, CONFIG_NAME, Config, Target, find_config, load, matches
24
24
  from crap_coverage import Report, load_report
25
25
  from crap_model import Func, ToolError
26
26
  from crap_report import Result, TargetRun, render_json, render_text
@@ -192,6 +192,12 @@ def main(argv: list[str] | None = None) -> int:
192
192
  config_path,
193
193
  {"base": args.base, "threshold_existing": args.threshold_existing, "threshold_new": args.threshold_new},
194
194
  )
195
+ toplevel = crap_git.toplevel(cfg.root).resolve()
196
+ if toplevel != cfg.root:
197
+ raise ToolError(
198
+ f"{CONFIG_NAME} must live at the git repository root; it is in "
199
+ f"{cfg.root}, but the root is {toplevel}"
200
+ )
195
201
  result = run(cfg, run_mode=args.run_mode, all_functions=args.all)
196
202
  except ToolError as exc:
197
203
  print(f"crap: {exc}", file=sys.stderr)
@@ -138,3 +138,15 @@ def test_failing_coverage_command_that_still_writes_a_report_warns(repo, capsys)
138
138
  def test_unknown_base_is_a_tool_error(repo, capsys):
139
139
  assert crap.main(["--base", "nope"]) == 2
140
140
  assert "nope" in capsys.readouterr().err
141
+
142
+
143
+ def test_config_not_at_git_toplevel_is_a_tool_error(tmp_path, monkeypatch, capsys):
144
+ git(tmp_path, "init", "-q", "-b", "main")
145
+ sub = tmp_path / "sub"
146
+ sub.mkdir()
147
+ (sub / ".crap-gate.json").write_text(json.dumps(CONFIG))
148
+ git(tmp_path, "add", ".")
149
+ git(tmp_path, "commit", "-q", "-m", "base")
150
+ monkeypatch.chdir(sub)
151
+ assert crap.main([]) == 2
152
+ assert "git repository root" in capsys.readouterr().err
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-08-30T14:16:24.650Z",
3
+ "generatedAt": "2026-08-30T22:42:44.950Z",
4
4
  "skills": [
5
5
  {
6
6
  "name": "backlog",
@@ -22,8 +22,8 @@
22
22
  },
23
23
  {
24
24
  "name": "crap-gate",
25
- "version": "0.1.0",
26
- "hash": "sha256-15a410b845b5346ed6ad1a0fa15c33add9e82acb7f1b7bbf8fdf83ab485bc741",
25
+ "version": "0.1.1",
26
+ "hash": "sha256-c4d66903f2d8b3d17b65e193f75ee0eea6dff9b8f47bd04a520a4f10778d895c",
27
27
  "description": "Score every function a branch changed with CRAP (cyclomatic complexity × untested fraction), fail on existing functions > 15 and new functions > 9, and drive a fixer + independent reviewer loop until the gate passes. Use when implementation is done and before pushing, when the user says \"run the crap gate\", \"check CRAP\", \"is this change tested enough\", or when a push gate reports CRAP violations."
28
28
  },
29
29
  {