featureparity 0.0.30 → 0.0.31

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b3bad4ccc28e0695bdb790ecc37d6836d5477a84de09442c5255df871d98444
4
- data.tar.gz: 67fcd3d1ac1a1a7bd41197ae674942fea80d20bbea22d856075face50ad87007
3
+ metadata.gz: 2f0f78517e010302b866caf565d5327e7c98929a82230ecf98da1bac55d51d9f
4
+ data.tar.gz: 956d1c46e86711b37653f387044709d76e0a4e83161ca3f49f12d555ce1309e2
5
5
  SHA512:
6
- metadata.gz: b276bc10363baf2fe27e843e0824ed205ed62f7836f4671cf53db15fc92ddc6a579a2fb1f5da34c4f34e672ffe2c14c418d10239e55066aa1a4b5806f078b930
7
- data.tar.gz: 2769c008ecac2bdd2f02c13ef34cdc91619085709965138dc8750ab4127ebd22d119eae646a89202217db47235ddc4e75e1efae24528feeed1b1a7d53ec20f80
6
+ metadata.gz: 8c6252c44e1a635cb54b9044dd9b3f9037e405811913f100dedbcac598dfebb57432842856481b1dc943989b44c84350a9559433c110d9ab31d19b266389b967
7
+ data.tar.gz: c28eb89f74bc8e205e855df172621aac1f79dca7c2f30a3232c8072fd1a6acf4a9cf1898efb581699732b885f9ac872fa7ccf7aa83471d80fd2c47eebaaaa306
@@ -148,6 +148,7 @@ module Fp
148
148
  'status' => requirement['status'],
149
149
  'action' => action,
150
150
  'verdict' => analysis && analysis['verdict'],
151
+ 'verdict_reasons' => (analysis && analysis['verdict_reasons']) || [],
151
152
  'failed_checks' => analysis ? failed_legitimacy_checks(analysis) : [],
152
153
  'issues' => issues,
153
154
  'duplicate_of' => issues.find { |i| i['type'] == 'duplicate' }&.dig('duplicate_of'),
@@ -202,12 +203,14 @@ module Fp
202
203
  puts " issues: #{entry['issues'].map { |i| i['type'] }.join(', ')}" unless entry['issues'].empty?
203
204
  warrants = warrants_line(entry['warrants_requirement'])
204
205
  puts " #{warrants}" if warrants && entry['warrants_requirement']['judgment'] == false
206
+ print_verdict_reasons(entry, indent: ' ')
205
207
  puts " error: #{entry['error']}" if entry['error']
206
208
  end
207
209
 
208
210
  def print_detail(entry)
209
211
  puts "#{entry['slug']} — #{entry['title']}"
210
212
  puts " verdict: #{entry['verdict'] || '(none)'} suggested: #{ACTIONS[entry['action']]}"
213
+ print_verdict_reasons(entry, indent: ' ')
211
214
  puts " superseded by: #{entry['duplicate_of']}" if entry['duplicate_of']
212
215
  warrants = warrants_line(entry['warrants_requirement'])
213
216
  puts " #{warrants}" if warrants
@@ -220,6 +223,18 @@ module Fp
220
223
  puts " error: #{entry['error']}" if entry['error']
221
224
  end
222
225
 
226
+ # Why the verdict is what it is (Fizzy #1896). The server decides the verdict as a
227
+ # gate — an issue means needs work, a weakness means acceptable — and sends the
228
+ # reasons; the CLI only prints them, so an agent reading "acceptable" knows what
229
+ # to fix before it asks a human to look.
230
+ def print_verdict_reasons(entry, indent:)
231
+ reasons = entry['verdict_reasons'] || []
232
+ return if reasons.empty? || entry['verdict'].nil? || entry['verdict'] == 'good'
233
+
234
+ puts "#{indent}why #{entry['verdict'].tr('_', ' ')}:"
235
+ reasons.each { |reason| puts "#{indent} - #{reason}" }
236
+ end
237
+
223
238
  # The analyzer's yes/no on whether the concept deserves to be a requirement at all.
224
239
  # A "no" carries its reason so a human can decide to withdraw it — the CLI only
225
240
  # reports it; nothing is withdrawn or proposed on the strength of the judgment.
@@ -503,6 +503,9 @@ module Fp
503
503
 
504
504
  analysis = feedback[:analysis]
505
505
  puts "Quality feedback: #{analysis['verdict'] || 'no verdict'}"
506
+ # The server decides the verdict as a gate and says what decided it (Fizzy
507
+ # #1896); an agent reading "acceptable" learns what to fix without asking.
508
+ Array(analysis['verdict_reasons']).each { |reason| puts " why: #{reason}" }
506
509
  Array(analysis['issues']).each do |issue|
507
510
  puts " - #{issue['type'].to_s.tr('_', ' ')}"
508
511
  end
@@ -23,6 +23,7 @@ module Fp
23
23
  help_flag :parent, "Set the parent requirement's slug"
24
24
  help_flag :no_parent, 'Propose un-nesting the requirement back to the top level (clears --parent)'
25
25
  help_flag :slug, 'Proposed new slug (evidence follows; markers still need updating)'
26
+ help_flag :tags, 'Proposed new tags, in order (comma-separated; replaces the current list, "" clears it)'
26
27
  help_flag :reason, 'What prompted this change, in words (recorded on the change)'
27
28
  help_flag :removal, 'Propose deleting the requirement instead of changing it'
28
29
  help_flag :withdraw, 'Take back the open proposal you authored, restoring the requirement as it was'
@@ -31,6 +32,7 @@ module Fp
31
32
  help_flag :source_context, 'Free-form note about what prompted this proposal'
32
33
  help_flag :source_ref, 'A place in the repo that prompted it, e.g. app/models/order.rb:42 (repeatable)'
33
34
  help_example 'fp propose-change print_qr --project stowzilla --acceptance "QR scans after 24h at -20C" --reason "Cold-chain rollout"'
35
+ help_example 'fp propose-change summon_can_be_undone --tags rules,units --reason "Rulebook check reads the first tag"'
34
36
  help_example 'fp propose-change print_qr --removal --reason "Superseded by print_container_label"'
35
37
  help_note "Applies the change and drops the requirement to draft for a human to review. --reason and\n" \
36
38
  "--source-* record what prompted the proposal in its history; the requirement's own origin is unchanged."
@@ -38,6 +40,7 @@ module Fp
38
40
  KNOWN_FLAGS = {
39
41
  project: :string, name: :string, why: :string, acceptance: :string,
40
42
  required: :string, required_types: :string, category: :string, parent: :string, slug: :string,
43
+ tags: :string,
41
44
  no_parent: :boolean,
42
45
  reason: :string, source_type: :string, source_url: :string, source_context: :string,
43
46
  removal: :boolean, withdraw: :boolean
@@ -80,7 +83,7 @@ module Fp
80
83
 
81
84
  if !removal && params.keys.none? { |k| proposed_field?(k) }
82
85
  output.error('Nothing to propose. Pass at least one of --name/--slug/--why/--acceptance/' \
83
- '--required/--required-types/--category/--parent/--no-parent, or --removal to ' \
86
+ '--required/--required-types/--category/--tags/--parent/--no-parent, or --removal to ' \
84
87
  'propose deletion.')
85
88
  exit 1
86
89
  end
@@ -175,6 +178,11 @@ module Fp
175
178
  exit 1
176
179
  end
177
180
 
181
+ if opts[:tags] == true
182
+ output.error('--tags needs a value, e.g. --tags rules,units (or --tags "" to clear them).')
183
+ exit 1
184
+ end
185
+
178
186
  return unless opts[:withdraw] && opts[:removal]
179
187
 
180
188
  output.error('--withdraw cancels an open proposal; it cannot be combined with --removal.')
@@ -214,6 +222,7 @@ module Fp
214
222
  if opts[:required_types]
215
223
  params[:required_test_types] = opts[:required_types].split(',').map { |t| t.strip.downcase }.reject(&:empty?)
216
224
  end
225
+ params[:tags] = opts[:tags].split(',').map(&:strip).reject(&:empty?) unless opts[:tags].nil?
217
226
  params[:parent_id] = resolve_parent_id(project_id, opts[:parent]) if opts[:parent]
218
227
  # --no-parent un-nests a child back to top level: an empty parent_id. The server
219
228
  # treats "" as "no parent" and diffs it against the current parent (Fizzy #1492).
@@ -230,7 +239,7 @@ module Fp
230
239
  end
231
240
 
232
241
  def proposed_field?(key)
233
- %i[title why acceptance category slug required_surfaces required_test_types parent_id].include?(key)
242
+ %i[title why acceptance category slug tags required_surfaces required_test_types parent_id].include?(key)
234
243
  end
235
244
 
236
245
  def resolve_parent_id(project_id, parent_slug)
data/lib/fp/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fp
4
- VERSION = '0.0.30'
4
+ VERSION = '0.0.31'
5
5
  end
@@ -447,6 +447,7 @@ fp propose-change print_container_qr --project stowzilla \
447
447
  | `--acceptance` | No | Proposed acceptance criteria |
448
448
  | `--required` | No | Proposed surfaces (comma-separated; agents cannot remove existing ones) |
449
449
  | `--category` | No | Proposed category |
450
+ | `--tags` | No | Proposed tags, in order (comma-separated). Replaces the whole list; `--tags ""` clears it. A reject restores the old list in its old order |
450
451
  | `--parent` | No | Proposed parent requirement, by slug |
451
452
  | `--slug` | No | Proposed new key; evidence follows it, but existing `fp:<slug>` markers must be updated |
452
453
  | `--reason` | No | Why the change is needed |
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: featureparity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.30
4
+ version: 0.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stowzilla
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-05 00:00:00.000000000 Z
11
+ date: 2026-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-http