Skip to content

docs(compensation): deduct bug hours from monthly retainer payout#5

Merged
markholdex merged 8 commits into
mainfrom
docs/aqpt-quality-adjustment
May 4, 2026
Merged

docs(compensation): deduct bug hours from monthly retainer payout#5
markholdex merged 8 commits into
mainfrom
docs/aqpt-quality-adjustment

Conversation

@zolotokrylin

@zolotokrylin zolotokrylin commented Apr 27, 2026

Copy link
Copy Markdown
Member

Adds a Quality Adjustment clause to the Compensation section.

Payout = (totalHours - bugHours) × hourlyRate. Bug hours are counted in the month the attribution is recorded, not when the original PR was merged. Attribution and dispute are handled in writing in the Holdex GitHub organisation.

Summary by CodeRabbit

  • Documentation
    • Added 90-day post-acceptance warranty for Project/Milestone deliverables with complimentary defect remediation for timely-reported issues
    • Introduced Quality Adjustment provision for Retainer engagements, adjusting monthly payments based on attributed bug metrics
    • Updated standard terms section numbering

@coderabbitai

coderabbitai Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@zolotokrylin has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 49 minutes and 8 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 00985442-4784-4884-9858-e0c7c4c5beca

📥 Commits

Reviewing files that changed from the base of the PR and between 92389f6 and 317a63e.

📒 Files selected for processing (1)
  • STANDARD_TERMS.md

Walkthrough

STANDARD_TERMS.md adds a Quality Adjustment clause for Retainer engagements that alters monthly payout based on bug-hours attribution and documents dispute/attribution via Wizard commands. Taxes and Finality of Payment clauses are renumbered; dispute timing and tax responsibilities remain unchanged.

Changes

Cohort / File(s) Summary
Terms Update
STANDARD_TERMS.md
Added “Quality Adjustment” clause applying a bugHours/totalHours ratio to Retainer monthly payouts and specifying attribution/dispute via Wizard commands (with doc link). Renumbered Taxes (8→9) and Finality of Payment (9→10); no substantive tax/dispute changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • markholdex
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title mentions 'deduct bug hours from monthly retainer payout' which aligns with the Quality Adjustment clause that modifies payout based on bugHours/totalHours ratio, but the PR objectives title references 'add AQPT quality adjustment clause' as the primary focus.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/aqpt-quality-adjustment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
STANDARD_TERMS.md (1)

148-154: ⚠️ Potential issue | 🔴 Critical

Reconcile Wizard “dispute” with the 14-day “written dispute” waiver in Finality of Payment.
You introduce disputes at the attribution level via the Wizard commands, but the Finality clause waives “any right to dispute” if no “written dispute is raised within 14 days after receipt.” It’s unclear:

  • whether a Wizard dispute counts as “written dispute” under this clause,
  • whether disputing AQPT prevents the payment from becoming “full and final” for that month, and
  • whether reductions are provisional/suspended until the dispute outcome.

This is the kind of drafting gap that can make a contractor’s dispute procedurally invalid.

Suggested clarifying language (example)
  10. **Finality of Payment.** Any payment made by the Company for approved hours,
   completed projects, or accepted milestones constitutes full and final settlement
   of all claims relating to the Services covered by that payment. The Contractor
-   waives any right to dispute or make further claims in respect of that payment
-   if no written dispute is raised within 14 days after receipt.
+   waives any right to dispute or make further claims in respect of that payment
+   if no written dispute is raised within 14 days after receipt. A dispute raised
+   via the Wizard dispute command (as referenced in the Quality Adjustment clause)
+   within that 14-day window shall qualify as a written dispute for this purpose,
+   and any AQPT adjustment shall be applied in accordance with the outcome of that
+   dispute.

</!-- review_comment_end -->

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@STANDARD_TERMS.md` around lines 148 - 154, The Finality of Payment clause
conflicts with the Reconcile Wizard's attribution-level "dispute" flow: clarify
whether a Wizard "dispute" counts as a "written dispute" for the 14-day waiver
in the "Finality of Payment" section, whether raising a dispute via the Wizard
suspends or preserves payment status (i.e., prevents the payment from becoming
"full and final"), and whether any reductions (AQPT adjustments) are provisional
pending dispute resolution; update STANDARD_TERMS.md by adding explicit language
to the "Finality of Payment" paragraph that (1) defines "written dispute" to
include disputes submitted through the Reconcile Wizard (or excludes them, if
intended), (2) states whether a properly filed Wizard dispute tolls the 14-day
period and suspends finality of payment for that invoice/month, and (3) explains
treatment of provisional reductions/withholdings during dispute resolution
(e.g., suspended, held, or final), referencing the terms "Reconcile Wizard",
"dispute", "AQPT", and the "14 days" waiver so readers can locate and reconcile
both mechanisms.
🧹 Nitpick comments (1)
STANDARD_TERMS.md (1)

139-146: Optional: make the dispute timeline/cut-off explicit (which bugs count “for that month”).
The clause says AQPT is for “that month” but doesn’t specify the attribution cut-off (e.g., bugs blamed during the month, or effective as of the invoice processing date). That can cause off-by-one-month payment adjustments.

Consider adding one line like: “Only bug attributions effective in that calendar month are included (cut-off: end of month, per Wizard processing time).”

Also consider adding a small worked example (1–2 lines) to reduce ambiguity.

</!-- review_comment_end -->

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@STANDARD_TERMS.md` around lines 139 - 146, Clarify the monthly AQPT cutoff by
adding a sentence after the AQPT calculation (referencing "Absolute Quality
Percentile (AQPT)" and the "Wizard bug blame command"/"Wizard dispute command")
that only bug attributions effective within the calendar month count toward that
month's AQPT (cut-off: end of month as processed by Wizard), and add a one-line
worked example using the payout formula `payout = (AQPT / 100) × base_salary`
showing a sample AQPT and resulting payout to illustrate the timing (e.g., bugs
blamed on or before 2026-04-30 affect April's AQPT; disputes resolved after
cut-off apply to the next month).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@STANDARD_TERMS.md`:
- Around line 139-145: Add explicit boundaries and initial value for AQPT: state
that AQPT defaults to 100 at month start, specify how bug attributions map to
reductions (for example, define a per-attribution reduction unit or refer to a
severity-to-percentage table used by the Wizard bug blame command), and require
clamping after all adjustments so AQPT is constrained to the closed interval [0,
100]; update the payout formula paragraph (the line with "payout = (AQPT / 100)
× base_salary") to reference this clamping rule and the starting value and the
dispute process via the Wizard dispute command so negative or >100 payouts
cannot occur.
- Around line 139-145: The payout formula uses an undefined term `base_salary`,
causing ambiguity for Retainer engagements; update the text to explicitly define
the retainer calculation (e.g., replace `base_salary` with a defined term such
as `monthly_retainer = hourly_rate × approved_hours` or `approved_PR_hours ×
hourly_rate` and clarify whether caps/withholdings apply) and then use that term
in the formula (e.g., `payout = (AQPT / 100) × monthly_retainer`); ensure the
section referencing AQPT and the Wizard commands (Wizard bug blame and dispute)
remains unchanged but add a short parenthetical pointing to the “hourly rate in
the Special Terms” mapping so readers know which hourly_rate to use.

---

Outside diff comments:
In `@STANDARD_TERMS.md`:
- Around line 148-154: The Finality of Payment clause conflicts with the
Reconcile Wizard's attribution-level "dispute" flow: clarify whether a Wizard
"dispute" counts as a "written dispute" for the 14-day waiver in the "Finality
of Payment" section, whether raising a dispute via the Wizard suspends or
preserves payment status (i.e., prevents the payment from becoming "full and
final"), and whether any reductions (AQPT adjustments) are provisional pending
dispute resolution; update STANDARD_TERMS.md by adding explicit language to the
"Finality of Payment" paragraph that (1) defines "written dispute" to include
disputes submitted through the Reconcile Wizard (or excludes them, if intended),
(2) states whether a properly filed Wizard dispute tolls the 14-day period and
suspends finality of payment for that invoice/month, and (3) explains treatment
of provisional reductions/withholdings during dispute resolution (e.g.,
suspended, held, or final), referencing the terms "Reconcile Wizard", "dispute",
"AQPT", and the "14 days" waiver so readers can locate and reconcile both
mechanisms.

---

Nitpick comments:
In `@STANDARD_TERMS.md`:
- Around line 139-146: Clarify the monthly AQPT cutoff by adding a sentence
after the AQPT calculation (referencing "Absolute Quality Percentile (AQPT)" and
the "Wizard bug blame command"/"Wizard dispute command") that only bug
attributions effective within the calendar month count toward that month's AQPT
(cut-off: end of month as processed by Wizard), and add a one-line worked
example using the payout formula `payout = (AQPT / 100) × base_salary` showing a
sample AQPT and resulting payout to illustrate the timing (e.g., bugs blamed on
or before 2026-04-30 affect April's AQPT; disputes resolved after cut-off apply
to the next month).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 928d6578-face-475f-b424-0f21af4d463c

📥 Commits

Reviewing files that changed from the base of the PR and between 2adc2e7 and 46d2ba2.

📒 Files selected for processing (1)
  • STANDARD_TERMS.md

Comment thread STANDARD_TERMS.md Outdated
@holdex

holdex Bot commented Apr 27, 2026

Copy link
Copy Markdown

Time Submission Status

Member Status Time Action Last Update
zolotokrylin ✅ Submitted 2h Update time May 4, 2026, 8:37 PM
markholdex ✅ Submitted 30min Update time May 4, 2026, 8:37 PM

You can submit time with the command. Example:

@holdex pr submit-time 15m

See available commands to help comply with our Guidelines.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
STANDARD_TERMS.md (2)

141-141: ⚠️ Potential issue | 🟠 Major

Define base_salary (or replace with a defined retainer base).

Line 141 uses base_salary, but the document’s retainer model is hourly-rate × approved hours. This leaves payout basis ambiguous in disputes.

Proposed wording
-   `payout = (1 - bugHours / totalHours) × base_salary`.
+   `payout = (1 - bugHours / totalHours) × base_pay`, where `base_pay`
+   is the monthly Retainer amount otherwise payable under this section
+   (approved hours × hourly rate from the Special Terms, subject to any Monthly Hours Cap).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@STANDARD_TERMS.md` at line 141, The formula uses an undefined term
base_salary in "payout = (1 - bugHours / totalHours) × base_salary"; either add
a clear definition for base_salary in the terms (e.g., "base_salary: the agreed
retainer amount, equal to hourly_rate × approved_hours") or replace base_salary
in the formula with the existing retainer expression (hourly_rate ×
approved_hours) and update any related glossary/definitions to reference the
chosen symbol (e.g., retainer_base or hourly_rate and approved_hours) so the
payout basis is unambiguous.

140-142: ⚠️ Potential issue | 🟠 Major

Add bounds and zero-hours handling to prevent invalid payout math.

As written, totalHours can be 0 and bugHours can exceed totalHours, which makes the multiplier undefined or negative. Define constraints/clamping in the clause.

Proposed wording
-   adjusted based on bug hours attributed to the Contractor that month:
-   `payout = (1 - bugHours / totalHours) × base_salary`.
+   adjusted based on bug hours attributed to the Contractor that month.
+   For this calculation, `totalHours` is approved Retainer hours for that month and must be > 0;
+   `bugHours` is clamped to `[0, totalHours]`.
+   `payout = max(0, (1 - bugHours / totalHours)) × base_pay`.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@STANDARD_TERMS.md` around lines 140 - 142, Summary: The payout formula can
produce undefined or negative values when totalHours is 0 or bugHours >
totalHours; clamp and handle zero to keep the multiplier valid. Fix: update the
clause around the payout = (1 - bugHours / totalHours) × base_salary language to
(1) define that if totalHours = 0 the multiplier defaults to 1 (no reduction),
(2) clamp bugHours to the range [0, totalHours] prior to computing
bugHours/totalHours, and (3) state the resulting multiplier is bounded to [0,1]
(i.e., payout = max(0, min(1, 1 - (clampedBugHours / totalHoursOrOne))) ×
base_salary) so the payout cannot be negative or undefined; refer to the terms
bugHours, totalHours, payout, and base_salary when making these edits.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@STANDARD_TERMS.md`:
- Around line 143-145: The paragraph that currently states "counted in the month
the blame is recorded..." lacks a cutoff window; update the sentence after "Bug
attribution is made via the Wizard bug blame command; the Contractor may dispute
an attribution using the Wizard dispute command." to add a clear attribution
deadline — for example: "Attribution must be recorded by the end of the calendar
month in which the PR was merged plus 30 days; attributions submitted after this
window will not be counted." Edit the sentence in STANDARD_TERMS.md (the
paragraph containing "Bug attribution is made via the Wizard bug blame command"
and "Contractor may dispute an attribution using the Wizard dispute command") to
include this cutoff or replace 30 with your chosen N-day window.

---

Duplicate comments:
In `@STANDARD_TERMS.md`:
- Line 141: The formula uses an undefined term base_salary in "payout = (1 -
bugHours / totalHours) × base_salary"; either add a clear definition for
base_salary in the terms (e.g., "base_salary: the agreed retainer amount, equal
to hourly_rate × approved_hours") or replace base_salary in the formula with the
existing retainer expression (hourly_rate × approved_hours) and update any
related glossary/definitions to reference the chosen symbol (e.g., retainer_base
or hourly_rate and approved_hours) so the payout basis is unambiguous.
- Around line 140-142: Summary: The payout formula can produce undefined or
negative values when totalHours is 0 or bugHours > totalHours; clamp and handle
zero to keep the multiplier valid. Fix: update the clause around the payout = (1
- bugHours / totalHours) × base_salary language to (1) define that if totalHours
= 0 the multiplier defaults to 1 (no reduction), (2) clamp bugHours to the range
[0, totalHours] prior to computing bugHours/totalHours, and (3) state the
resulting multiplier is bounded to [0,1] (i.e., payout = max(0, min(1, 1 -
(clampedBugHours / totalHoursOrOne))) × base_salary) so the payout cannot be
negative or undefined; refer to the terms bugHours, totalHours, payout, and
base_salary when making these edits.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bb28b4e9-d584-4c17-bf5c-668197bfe4ab

📥 Commits

Reviewing files that changed from the base of the PR and between 46d2ba2 and 92389f6.

📒 Files selected for processing (1)
  • STANDARD_TERMS.md

Comment thread STANDARD_TERMS.md Outdated
@zolotokrylin zolotokrylin marked this pull request as draft April 28, 2026 01:25
@zolotokrylin zolotokrylin changed the title docs(compensation): add AQPT quality adjustment clause docs(compensation): deduct bug hours from monthly retainer payout Apr 28, 2026
@zolotokrylin zolotokrylin marked this pull request as ready for review April 28, 2026 16:47
@zolotokrylin zolotokrylin requested a review from markholdex April 28, 2026 16:48
@zolotokrylin

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@zolotokrylin

Copy link
Copy Markdown
Member Author

@holdex pr submit-time 2h 15m

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
STANDARD_TERMS.md (2)

150-156: ⚠️ Potential issue | 🟠 Major

Prevent negative payout by defining a floor at 0.

If bugHours > totalHours, payout becomes negative. Add an explicit floor rule (and whether any excess bug hours carry forward).

Suggested edit
-`payout = (totalHours - bugHours) × hourlyRate`
+`payout = max(0, totalHours - bugHours) × hourlyRate`
+- If `bugHours` exceeds `totalHours` in a month, payout is floored at 0 for that month.
+- Excess `bugHours` do not carry forward unless expressly agreed in writing.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@STANDARD_TERMS.md` around lines 150 - 156, Define that payout = max(0,
(totalHours - bugHours) × hourlyRate) and explicitly state whether excess
bugHours carry forward; update the definitions around `payout`, `totalHours`,
`bugHours`, and `hourlyRate` to include a non-negative floor (i.e., payouts
cannot be negative) and add a sentence clarifying the treatment of any excess
`bugHours` (e.g., "excess bugHours do not carry forward" or "excess bugHours may
be carried forward to the next month") so the contract behavior is unambiguous.

162-165: ⚠️ Potential issue | 🟠 Major

Add an attribution cutoff window.

Attribution timing is defined by record month, but there is no deadline for how late attribution can be raised. Add a cutoff (e.g., merge month + 30 days) to avoid open-ended retroactive deductions.

Suggested edit
 Attributions are recorded in writing in the Holdex GitHub organisation. The
 Contractor may dispute any attribution in writing within 14 days of receiving
 notification of that attribution. A successfully disputed attribution is
 excluded from the bug hours calculation.
+Attribution must be recorded no later than 30 days after the end of the
+calendar month in which the relevant PR was merged; later attributions do not
+count toward bug hours.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@STANDARD_TERMS.md` around lines 162 - 165, Update the "Attributions are
recorded in writing in the Holdex GitHub organisation..." clause to add a firm
cutoff for raising attributions: specify that attributions must be raised within
a fixed window (for example, "within 30 days after the merge month") or similar
(e.g., "merge month + 30 days"); ensure the sentence that begins "The Contractor
may dispute any attribution in writing within 14 days..." is amended to
reference this cutoff window (so late attributions beyond the cutoff are not
accepted) and add a short clarifying sentence that attributions submitted after
the cutoff will be ineligible for adjustments to the bug hours calculation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@STANDARD_TERMS.md`:
- Around line 150-156: Define that payout = max(0, (totalHours - bugHours) ×
hourlyRate) and explicitly state whether excess bugHours carry forward; update
the definitions around `payout`, `totalHours`, `bugHours`, and `hourlyRate` to
include a non-negative floor (i.e., payouts cannot be negative) and add a
sentence clarifying the treatment of any excess `bugHours` (e.g., "excess
bugHours do not carry forward" or "excess bugHours may be carried forward to the
next month") so the contract behavior is unambiguous.
- Around line 162-165: Update the "Attributions are recorded in writing in the
Holdex GitHub organisation..." clause to add a firm cutoff for raising
attributions: specify that attributions must be raised within a fixed window
(for example, "within 30 days after the merge month") or similar (e.g., "merge
month + 30 days"); ensure the sentence that begins "The Contractor may dispute
any attribution in writing within 14 days..." is amended to reference this
cutoff window (so late attributions beyond the cutoff are not accepted) and add
a short clarifying sentence that attributions submitted after the cutoff will be
ineligible for adjustments to the bug hours calculation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 284c3c55-7a75-4897-ac53-bc22db94c9e7

📥 Commits

Reviewing files that changed from the base of the PR and between 92389f6 and 39120f7.

📒 Files selected for processing (1)
  • STANDARD_TERMS.md

@markholdex

Copy link
Copy Markdown

@holdex pr submit-time 30m

@markholdex markholdex merged commit abd6aac into main May 4, 2026
4 checks passed
@markholdex markholdex deleted the docs/aqpt-quality-adjustment branch May 4, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants