Skip to content

Commit 9db5b76

Browse files
NiveditJainclaude
andauthored
[luv-18] Remove failproofai install steps (#17)
* [luv-18] Remove failproofai install steps Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * Add prefer-package-manager and require-no-conflicts-before-stop policies Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 1976f5b commit 9db5b76

2 files changed

Lines changed: 5 additions & 40 deletions

File tree

‎.failproofai/policies-config.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
"require-commit-before-stop",
3030
"require-push-before-stop",
3131
"require-pr-before-stop",
32-
"require-ci-green-before-stop"
32+
"require-ci-green-before-stop",
33+
"prefer-package-manager",
34+
"require-no-conflicts-before-stop"
3335
],
3436
"policyParams": {
3537
"block-force-push": {

‎luv/__init__.py‎

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -145,34 +145,6 @@ def docker_env_flags(env_vars: dict[str, str]) -> list[str]:
145145
return flags
146146

147147

148-
def ensure_failproofai_installed() -> None:
149-
"""Install failproofai globally via npm — skip if already on PATH."""
150-
if shutil.which("failproofai") is not None:
151-
return
152-
if shutil.which("npm") is None:
153-
die("'npm' not found in PATH; install Node.js to use failproofai")
154-
print("luv: installing failproofai globally...")
155-
r = subprocess.run(["npm", "install", "-g", "failproofai"])
156-
if r.returncode != 0:
157-
die("'npm install -g failproofai' failed")
158-
159-
160-
def run_failproofai_project(clone_dir: Path) -> None:
161-
"""Run failproofai project-scope initialization in the cloned repo.
162-
163-
On failure, remove the clone_dir so the next run re-clones and retries
164-
cleanly instead of short-circuiting to a half-initialized folder.
165-
"""
166-
print(f"luv: running failproofai project setup in {clone_dir.name}...")
167-
r = subprocess.run(
168-
["npx", "-y", "failproofai", "p", "-i", "all", "--scope", "project"],
169-
cwd=str(clone_dir),
170-
)
171-
if r.returncode != 0:
172-
shutil.rmtree(clone_dir, ignore_errors=True)
173-
die("'npx -y failproofai p -i all --scope project' failed")
174-
175-
176148
def ensure_pr_rules() -> None:
177149
claude_dir = Path.home() / ".claude"
178150
claude_md = claude_dir / "CLAUDE.md"
@@ -550,8 +522,6 @@ def open_existing(org: str, repo: str, number: int, prompt: str | None, nav_mode
550522
if r.returncode != 0:
551523
die(f"git checkout {branch} failed (exit {r.returncode})")
552524

553-
run_failproofai_project(clone_dir)
554-
555525
print(f"luv: ready — {clone_dir.name}, branch {branch}")
556526
ensure_pr_rules()
557527
if nav_mode:
@@ -594,8 +564,6 @@ def open_pr(org: str, repo: str, number: int, prompt: str | None, nav_mode: bool
594564
if r.returncode != 0:
595565
die(f"git checkout {branch} failed (exit {r.returncode})")
596566

597-
run_failproofai_project(clone_dir)
598-
599567
print(f"luv: ready — {clone_dir.name}, branch {branch}")
600568
ensure_pr_rules()
601569
if nav_mode:
@@ -654,8 +622,6 @@ def main() -> None:
654622
cmd_init()
655623
return
656624

657-
ensure_failproofai_installed()
658-
659625
# luv -l <PR URL>
660626
if args[0] == "-l":
661627
if len(args) < 2:
@@ -745,16 +711,13 @@ def main() -> None:
745711
if r.returncode != 0:
746712
die(f"git checkout -b failed (exit {r.returncode})")
747713

748-
# 6. Run failproofai project setup in the fresh clone
749-
run_failproofai_project(clone_dir)
750-
751-
# 7. Ensure PR rules in ~/.claude/CLAUDE.md and bypass-permissions default
714+
# 6. Ensure PR rules in ~/.claude/CLAUDE.md and bypass-permissions default
752715
ensure_pr_rules()
753716
ensure_default_permission_mode()
754717

755718
print(f"luv: ready — {clone_dir.name}, branch {branch}")
756719

757-
# 8. Launch claude, resume session, or open shell (replace this process)
720+
# 7. Launch claude, resume session, or open shell (replace this process)
758721
if nav_mode:
759722
navigate(clone_dir, extra_env=extra_env)
760723
elif resume_mode:

0 commit comments

Comments
 (0)