norn 0.0.1.pre.20260715154920 → 0.0.1.pre.20260715171657
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.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/bin/norn +0 -20
- data/docs/superpowers/plans/2026-07-15-silence-git-boot-warning.md +116 -0
- data/docs/superpowers/plans/2026-07-15-subprocess-execution-phase-1.md +548 -0
- data/docs/superpowers/specs/2026-07-15-silence-git-boot-warning-design.md +83 -0
- data/docs/superpowers/specs/2026-07-15-subprocess-execution-phase-1-design.md +242 -0
- data/lib/norn/version.rb +1 -1
- metadata +5 -4
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -253
- data/norn.gemspec +0 -43
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5f55614f47adcfb87469017e6179296eda16dffdab0ae4e1c8721cd95800fe19
|
|
4
|
+
data.tar.gz: 49be1d66f90d853fcd1b2c1e09fb62a829c0dabd1a90627603a192e28a8d7e25
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ebe38ef2729c87ff7467b9207b33a25f04bd85eca0668b191b1d758fc466eaca8bca51ab43e95969b23961388190211712413878157f038313b380d32aebe8b8
|
|
7
|
+
data.tar.gz: 8e0c5adca9c387a5394406d74e57e0dc330f9891c1aa56ef9090f4ff1edd19255400ab0d276a9f12240d393b1f241d99d384e3c660f27791a578e86a0e77be1f
|
data/README.md
CHANGED
|
@@ -65,20 +65,20 @@ NORN_PROVIDER=openai # or gemini
|
|
|
65
65
|
### 3. Start Chat Mode (Read-Only Code Exploration)
|
|
66
66
|
Use Chat mode to safely explore and query your codebase. It has strictly restricted read-only permissions (`[:sys_read, :vcs_read]`):
|
|
67
67
|
```bash
|
|
68
|
-
|
|
68
|
+
bundle exec bin/norn chat "Search for all ruby files and explain how Container works"
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
### 4. Start Dev Mode (Full Interactive Pairing)
|
|
72
72
|
Use Dev Mode for write-enabled pairing. Safe in-flight danger guards and diff prompts will protect your repository:
|
|
73
73
|
```bash
|
|
74
|
-
|
|
74
|
+
bundle exec bin/norn dev
|
|
75
75
|
```
|
|
76
76
|
Prompt: *`Write a new ruby file under lib/norn/version.rb containing VERSION = "1.0.0"`* (Watch the diff engine present the proposed file creation before asking for approval!).
|
|
77
77
|
|
|
78
78
|
### 5. Start Task Mode (Autonomous Execution)
|
|
79
79
|
Run single-turn autonomous tasks (blocks on capability escalations by default to prevent unintended actions):
|
|
80
80
|
```bash
|
|
81
|
-
|
|
81
|
+
bundle exec bin/norn task "Summarize ARCHITECTURE.md"
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
---
|
data/bin/norn
CHANGED
|
@@ -2,26 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
|
|
4
4
|
|
|
5
|
-
# If running directly from the cloned repository source without BUNDLE_GEMFILE being set,
|
|
6
|
-
# configure Bundler to use Norn's own Gemfile to ensure all dependencies are resolved.
|
|
7
|
-
if !defined?(Bundler) && File.exist?(File.expand_path("../norn.gemspec", __dir__)) && File.exist?(File.expand_path("../Gemfile", __dir__))
|
|
8
|
-
ENV["BUNDLE_GEMFILE"] = File.expand_path("../Gemfile", __dir__)
|
|
9
|
-
begin
|
|
10
|
-
require "bundler/setup"
|
|
11
|
-
rescue LoadError
|
|
12
|
-
# Bundler is not available, proceed anyway and rely on RubyGems
|
|
13
|
-
end
|
|
14
|
-
elsif !defined?(Bundler)
|
|
15
|
-
# When running as an installed gem, let RubyGems handle activation
|
|
16
|
-
else
|
|
17
|
-
# Already in a Bundler environment (e.g., bundle exec norn from another project)
|
|
18
|
-
# require bundler/setup is already done, or we do a graceful require if needed
|
|
19
|
-
begin
|
|
20
|
-
require "bundler/setup"
|
|
21
|
-
rescue LoadError
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
5
|
require "norn"
|
|
26
6
|
|
|
27
7
|
# Early detection of debug flag before booting core components
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Silence Git Boot Warning Implementation Plan
|
|
2
|
+
|
|
3
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
4
|
+
|
|
5
|
+
**Goal:** Silence the noisy `fatal: not a git repository` warning on stderr during CLI boot by introducing a robust git-detection check with a pure-Ruby glob fallback inside the gemspec, and locked with an integration spec.
|
|
6
|
+
|
|
7
|
+
**Architecture:** We will modify `norn.gemspec` to dynamically inspect if Norn's directory is a Git worktree. If it is, we find files via `git ls-files` with silenced stderr redirect (`2>#{File::NULL}`); if not (e.g. packaged or run from release zip), we fall back to standard `Dir.glob` for code, plugins, configurations, and documentation. We will verify the fix using a high-fidelity integration test that runs the binary from a clean non-git temporary directory.
|
|
8
|
+
|
|
9
|
+
**Tech Stack:** Pure Ruby, Bundler, RSpec, Open3.
|
|
10
|
+
|
|
11
|
+
## Global Constraints
|
|
12
|
+
|
|
13
|
+
- Must run cleanly on Ruby versions >= 3.0.0.
|
|
14
|
+
- No new external gem dependencies.
|
|
15
|
+
- Suppressed warning must not hide actual application boot failures.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
### Task 1: Update Gemspec File Discovery
|
|
20
|
+
|
|
21
|
+
**Files:**
|
|
22
|
+
- Modify: `norn.gemspec:18-22`
|
|
23
|
+
|
|
24
|
+
**Interfaces:**
|
|
25
|
+
- Produces: `spec.files` array containing source, libraries, bin directories, plugins, docs, and top-level configuration metadata.
|
|
26
|
+
|
|
27
|
+
- [ ] **Step 1: Modify `norn.gemspec` to use Approach 1 with fallback**
|
|
28
|
+
|
|
29
|
+
Replace lines 18-22 in `norn.gemspec` with the following:
|
|
30
|
+
|
|
31
|
+
```ruby
|
|
32
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
33
|
+
# Check if we are inside a Git worktree safely without printing anything to stderr
|
|
34
|
+
is_git_repo = File.exist?(".git") || system("git rev-parse --is-inside-work-tree >#{File::NULL} 2>&1")
|
|
35
|
+
|
|
36
|
+
if is_git_repo
|
|
37
|
+
`git ls-files -z 2>#{File::NULL}`.split("\x0").reject do |f|
|
|
38
|
+
f.match(%r{\A(?:test|spec|features)/})
|
|
39
|
+
end
|
|
40
|
+
else
|
|
41
|
+
# Fallback files listing for packaging/evaluating in non-git environments
|
|
42
|
+
files = Dir["{bin,lib,plugins,docs}/**/*"].select { |f| File.file?(f) }
|
|
43
|
+
files += Dir["*.md"]
|
|
44
|
+
files += ["Gemfile", "Gemfile.lock", "LICENSE", "norn.gemspec"]
|
|
45
|
+
files.uniq
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- [ ] **Step 2: Run current RSpec suite to ensure nothing is broken**
|
|
51
|
+
|
|
52
|
+
Run: `bundle exec rspec`
|
|
53
|
+
Expected: ALL tests pass.
|
|
54
|
+
|
|
55
|
+
- [ ] **Step 3: Commit gemspec change**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
git add norn.gemspec
|
|
59
|
+
git commit -m "chore(gemspec): silence git warning and fallback in non-git contexts"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### Task 2: Add Non-Git Environment Integration Spec
|
|
65
|
+
|
|
66
|
+
**Files:**
|
|
67
|
+
- Modify: `spec/norn/bin_norn_spec.rb`
|
|
68
|
+
|
|
69
|
+
**Interfaces:**
|
|
70
|
+
- Consumes: `bin/norn` script entry point.
|
|
71
|
+
|
|
72
|
+
- [ ] **Step 1: Write integration spec verifying silence in a non-git directory**
|
|
73
|
+
|
|
74
|
+
Modify `spec/norn/bin_norn_spec.rb` to add a new `it` block inside the `RSpec.describe "bin/norn executable"` block:
|
|
75
|
+
|
|
76
|
+
```ruby
|
|
77
|
+
it "silences git stderr warnings when booting outside of a git repository" do
|
|
78
|
+
require "tmpdir"
|
|
79
|
+
require "fileutils"
|
|
80
|
+
|
|
81
|
+
Dir.mktmpdir do |temp_dir|
|
|
82
|
+
# Copy minimum required boot assets to the temp directory
|
|
83
|
+
FileUtils.cp_r(File.expand_path("../../bin", __dir__), temp_dir)
|
|
84
|
+
FileUtils.cp_r(File.expand_path("../../lib", __dir__), temp_dir)
|
|
85
|
+
FileUtils.cp_r(File.expand_path("../../plugins", __dir__), temp_dir)
|
|
86
|
+
FileUtils.cp(File.expand_path("../../Gemfile", __dir__), temp_dir)
|
|
87
|
+
FileUtils.cp(File.expand_path("../../Gemfile.lock", __dir__), temp_dir)
|
|
88
|
+
FileUtils.cp(File.expand_path("../../norn.gemspec", __dir__), temp_dir)
|
|
89
|
+
|
|
90
|
+
# Run the executable inside the temp directory (which lacks any parent .git)
|
|
91
|
+
temp_bin_path = File.join(temp_dir, "bin", "norn")
|
|
92
|
+
_stdout, stderr, _status = Open3.capture3(temp_bin_path)
|
|
93
|
+
|
|
94
|
+
# Assert that git complains are completely silenced
|
|
95
|
+
expect(stderr).not_to include("fatal: not a git repository")
|
|
96
|
+
expect(stderr).not_to include("Stopping at filesystem boundary")
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
- [ ] **Step 2: Run newly added test to verify it passes**
|
|
102
|
+
|
|
103
|
+
Run: `bundle exec rspec spec/norn/bin_norn_spec.rb`
|
|
104
|
+
Expected: PASS (2 examples, 0 failures)
|
|
105
|
+
|
|
106
|
+
- [ ] **Step 3: Run the entire test suite**
|
|
107
|
+
|
|
108
|
+
Run: `bundle exec rspec`
|
|
109
|
+
Expected: PASS (237 examples, 0 failures)
|
|
110
|
+
|
|
111
|
+
- [ ] **Step 4: Commit the test**
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
git add spec/norn/bin_norn_spec.rb
|
|
115
|
+
git commit -m "test(bin): add integration test verifying silence of git warning during boot"
|
|
116
|
+
```
|