-
Notifications
You must be signed in to change notification settings - Fork 0
Implement KNU token distribution system with v6.0 nomenclature compliance #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AmedeoPelliccia
merged 10 commits into
main
from
copilot/implement-knu-token-distribution
Feb 25, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a5e5364
Initial plan
Copilot fcb351e
Implement KNU token distribution system with config, schema, template…
Copilot eaba2a1
Add comprehensive documentation for KNU token distribution system
Copilot 5194321
Rename schema file to comply with v6.0 nomenclature standard
Copilot 110d4d1
Actualizar knu_token_distribution.py
AmedeoPelliccia f126796
Actualizar 00_AMPEL360_SPACET_Q10_GEN_PLUS_BB_GEN_SB90_K06_DATA__knu-…
AmedeoPelliccia fb647b7
Actualizar 00_AMPEL360_SPACET_Q10_GEN_PLUS_BB_GEN_SB90_K06_DATA__knu-…
AmedeoPelliccia ba8a93c
Actualizar knu_token_distribution.py
AmedeoPelliccia 88582cc
Actualizar knu-reward-ledger.csv
AmedeoPelliccia 413c839
Actualizar knu_token_distribution.py
AmedeoPelliccia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
275 changes: 275 additions & 0 deletions
275
...EL360_SPACET_Q10_GEN_PLUS_BB_GEN_SB90_K06_DATA__knu-reward-record_SCH_I01-R01_ACTIVE.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,275 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "$id": "https://ampel360.space/schemas/knu-reward-record-v01.json", | ||
| "title": "KNU Reward Record Schema", | ||
| "description": "Schema for KNU (Known Non-Unknowns / Uncertainty Resolution Unit) token reward records in the AMPEL360 Space-T project.", | ||
| "version": "v01", | ||
| "type": "object", | ||
| "definitions": { | ||
| "KNURewardEntry": { | ||
| "type": "object", | ||
| "description": "A single KNU reward entry with effort, impact, and token allocation", | ||
| "properties": { | ||
| "knot_id": { | ||
| "type": "string", | ||
| "description": "KNOT identifier (K01-K14)", | ||
| "pattern": "^K(0[1-9]|1[0-4])$", | ||
| "examples": ["K01", "K06", "K14"] | ||
| }, | ||
| "knu_id": { | ||
| "type": "string", | ||
| "description": "Unique identifier for the KNU entry. Format: KNU-{KNOT}-{PARTITION}-{SEQUENCE}", | ||
| "pattern": "^KNU-K(0[1-9]|1[0-4])-[A-Z0-9]{2,6}-\\d{3}$", | ||
| "examples": ["KNU-K06-00-001", "KNU-K01-CERT-042", "KNU-K14-MRO-003"] | ||
| }, | ||
| "owner": { | ||
| "type": "string", | ||
| "minLength": 1, | ||
| "maxLength": 100, | ||
| "description": "Person or team responsible for the KNU resolution" | ||
| }, | ||
| "E_pred": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "description": "Predicted effort score (normalized across entries)" | ||
| }, | ||
| "dR_primary": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "maximum": 100, | ||
| "description": "Direct residue reduction in primary KNOT (0-100%)" | ||
| }, | ||
| "dR_adj_sum": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "maximum": 100, | ||
| "description": "Sum of residue reductions in adjacent KNOTs (0-100%)" | ||
| }, | ||
| "status": { | ||
| "type": "string", | ||
| "enum": ["draft", "submitted", "in_review", "accepted", "merged", "rejected"], | ||
| "description": "Current status of the KNU entry" | ||
| }, | ||
| "artifacts": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string", | ||
| "minLength": 1 | ||
| }, | ||
| "minItems": 0, | ||
| "description": "List of artifact references or URLs produced by this KNU" | ||
| }, | ||
| "anyOf": [ | ||
| { | ||
| "type": "string", | ||
| "minLength": 1, | ||
| "maxLength": 100 | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ], | ||
| "description": "Validator who confirmed the KNU impact" | ||
| }, | ||
| "validated_at": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "string", | ||
| "format": "date-time" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ], | ||
| "description": "Timestamp when validation occurred (ISO 8601 format)" | ||
| }, | ||
| "weight": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "maximum": 1, | ||
| "description": "Calculated weight for token distribution (0.0-1.0)" | ||
| }, | ||
| "tokens_awarded": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "description": "Number of KNU tokens awarded to this entry" | ||
| } | ||
| }, | ||
| "required": ["knot_id", "knu_id", "owner", "E_pred", "dR_primary", "status"], | ||
| "additionalProperties": false | ||
| }, | ||
| "KNOTPool": { | ||
| "type": "object", | ||
| "description": "Token pool configuration for a specific KNOT", | ||
| "properties": { | ||
| "knot_id": { | ||
| "type": "string", | ||
| "pattern": "^K(0[1-9]|1[0-4])$", | ||
| "description": "KNOT identifier (K01-K14)" | ||
| }, | ||
| "pool_amount": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "description": "Total tokens available for distribution in this KNOT" | ||
| }, | ||
| "residue_before": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "maximum": 100, | ||
| "description": "Residue level before KNU resolutions (0-100%)" | ||
| }, | ||
| "residue_after": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "maximum": 100, | ||
| "description": "Residue level after KNU resolutions (0-100%)" | ||
| } | ||
| }, | ||
| "required": ["knot_id", "pool_amount"], | ||
| "additionalProperties": false | ||
| }, | ||
| "DistributionReport": { | ||
| "type": "object", | ||
| "description": "Complete token distribution report for a KNOT", | ||
| "properties": { | ||
| "generated_at": { | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "description": "Timestamp when the report was generated" | ||
| }, | ||
| "knot_id": { | ||
| "type": "string", | ||
| "pattern": "^K(0[1-9]|1[0-4])$", | ||
| "description": "KNOT identifier for this distribution" | ||
| }, | ||
| "pool": { | ||
| "$ref": "#/definitions/KNOTPool", | ||
| "description": "Pool configuration and residue metrics" | ||
| }, | ||
| "parameters": { | ||
| "type": "object", | ||
| "properties": { | ||
| "alpha": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "maximum": 1, | ||
| "description": "Effort weight parameter (α)" | ||
| }, | ||
| "lambda_spillover": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "maximum": 1, | ||
| "description": "Spillover multiplier (λ)" | ||
| } | ||
| }, | ||
| "required": ["alpha", "lambda_spillover"] | ||
| }, | ||
| "entries": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/KNURewardEntry" | ||
| }, | ||
| "description": "List of KNU reward entries in this distribution" | ||
| }, | ||
| "total_tokens_distributed": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "description": "Total tokens distributed to all entries" | ||
| }, | ||
| "eligible_entries": { | ||
| "type": "integer", | ||
| "minimum": 0, | ||
| "description": "Number of eligible KNU entries" | ||
| } | ||
| }, | ||
| "required": ["generated_at", "knot_id", "pool", "parameters", "entries", "total_tokens_distributed"], | ||
| "additionalProperties": false | ||
| } | ||
| }, | ||
| "properties": { | ||
| "schema_version": { | ||
| "type": "string", | ||
| "const": "v01", | ||
| "description": "Version of the KNU reward record schema" | ||
| }, | ||
| "rewards": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/KNURewardEntry" | ||
| }, | ||
| "description": "List of KNU reward entries" | ||
| } | ||
| }, | ||
| "required": ["schema_version", "rewards"], | ||
| "additionalProperties": false, | ||
| "examples": [ | ||
| { | ||
| "schema_version": "v01", | ||
| "rewards": [ | ||
| { | ||
| "knot_id": "K06", | ||
| "knu_id": "KNU-K06-00-001", | ||
| "owner": "CM WG", | ||
| "E_pred": 5.0, | ||
| "dR_primary": 30.0, | ||
| "dR_adj_sum": 20.0, | ||
| "status": "merged", | ||
| "artifacts": ["schema_v2.json", "migration_guide.md"], | ||
| "validated_by": "Lead Architect", | ||
| "validated_at": "2026-01-10T12:00:00Z", | ||
| "weight": 0.421, | ||
| "tokens_awarded": 421.0 | ||
| }, | ||
| { | ||
| "knot_id": "K06", | ||
| "knu_id": "KNU-K06-00-002", | ||
| "owner": "AI/ML Engineering", | ||
| "E_pred": 3.0, | ||
| "dR_primary": 15.0, | ||
| "dR_adj_sum": 10.0, | ||
| "status": "accepted", | ||
| "artifacts": ["trace_validator.py"], | ||
| "validated_by": "QA Team", | ||
| "validated_at": "2026-01-10T14:00:00Z", | ||
| "weight": 0.298, | ||
| "tokens_awarded": 298.0 | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "_documentation": { | ||
| "distribution_formula": { | ||
| "description": "KNU token distribution uses a weighted combination of effort and impact", | ||
| "formulas": { | ||
| "weight": "w_i = α·Ê_i + (1-α)·Î_i", | ||
| "tokens": "T_i = P_k · w_i", | ||
| "normalized_effort": "Ê_i = E_i / Σ E_i", | ||
| "effective_impact": "I_i = ΔR_k,i + λ·S_i", | ||
| "normalized_impact": "Î_i = I_i / Σ I_i", | ||
| "spillover": "S_i = Σ(a_k→j · ΔR_j,i)" | ||
| }, | ||
| "parameters": { | ||
| "α (alpha)": "Effort weight (default: 0.30 = 30% effort, 70% impact)", | ||
| "λ (lambda)": "Spillover multiplier (default: 0.50 = 50% of direct impact)", | ||
| "P_k": "Prize pool for KNOT k (total tokens to distribute)", | ||
| "E_i": "Predicted effort for entry i", | ||
| "ΔR_k,i": "Direct residue reduction in KNOT k by entry i", | ||
| "ΔR_j,i": "Residue reduction in adjacent KNOT j by entry i", | ||
| "a_k→j": "Adjacency weight from KNOT k to KNOT j" | ||
| } | ||
| }, | ||
| "eligibility_criteria": { | ||
| "status": "Must be 'accepted' or 'merged'", | ||
| "artifacts": "Must have associated artifacts", | ||
| "validation": "Must be validated by authorized reviewer" | ||
| }, | ||
| "status_values": { | ||
| "draft": "Initial draft, not ready for review", | ||
| "submitted": "Submitted for review", | ||
| "in_review": "Under active review", | ||
| "accepted": "Accepted, ready for merge", | ||
| "merged": "Merged and deployed", | ||
| "rejected": "Rejected, not eligible for rewards" | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing property name
"validated_by":before the anyOf definition. This is a JSON syntax error that makes the schema invalid. The property name was accidentally omitted when the anyOf structure was added based on the resolved review feedback.Add the property name "validated_by": before the anyOf definition on line 62.