Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 0 additions & 93 deletions .github/prompts/system_cortex.yaml

This file was deleted.

27 changes: 13 additions & 14 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
## Mission Report
**Challenger:** @[your-username]
**Mission ID:** [e.g., Protocol Zero]
### 📜 Change Type
- [ ] 📝 Typo / Grammar Fix
- [ ] ⚖️ Policy Update (RFC)
- [ ] 🚨 Security Advisory

## Proof of Work
- [ ] My code passes all local tests (`npm test`).
- [ ] I have not modified any files in the `tests/` directory.
- [ ] I have refactored my code for readability, not just functionality.

## Context & Decisions
*(Explain "Why" you solved it this way. Show your engineering judgment.)*
### 🔍 Context
*(Explain WHY this change is necessary. Link to relevant Issues or RFCs.)*

### ⚖️ Impact Analysis
*(Who does this affect? Challengers? Maintainers? The Brand?)*

---
### ️ Legal & Governance Agreement (Mandatory)
### 🛡️ Legal & Liability Waiver (Mandatory)
By submitting this Pull Request, I certify that:
- [ ] I have read and agree to the [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md).
- [ ] I accept the **Codeijoe Liability Waiver**: All feedback is "AS-IS", and maintainers are not liable for outcomes.
- [ ] I license this contribution under the **Apache License 2.0**.
- [ ] **I certify that this code/doc is my own logic/writing** (Human Verified).
- [ ] I understand that if I used AI to generate this without review, I will be **permanently banned** (The Voight-Kampff Rule).
- [ ] I accept the **Codeijoe Liability Waiver** (AS-IS Provision) as defined in `GOVERNANCE.md`.
- [ ] I license this contribution under the **Apache License 2.0** (Code) or **CC BY-NC-ND 4.0** (Docs).
88 changes: 34 additions & 54 deletions .github/workflows/governance-enforcer.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Codeijoe Governance Enforcer"
name: "Codeijoe Governance Enforcer v3.0"

# Trigger pada setiap aktivitas PR
# Trigger pada setiap aktivitas PR (Text Check)
on:
pull_request:
types: [opened, edited, synchronize, reopened]
Expand All @@ -11,77 +11,60 @@ permissions:
contents: read

jobs:
enforce-protocol:
name: "🛡️ Protocol & Integrity Check"
enforce-policy:
name: "⚖️ Policy & Legal Compliance"
runs-on: ubuntu-latest
steps:
- name: Checkout Code
- name: Checkout Context
uses: actions/checkout@v4
with:
fetch-depth: 0 # Penting untuk cek history file

# ========================================================
# 1. THE TERMINOLOGY POLICE (Polisi Bahasa)
# Memastikan tidak ada mental "gratisan manja" (Mentor/Help Me)
# 1. THE TERMINOLOGY POLICE (Polisi Bahasa v3.0)
# Memastikan mindset "Auditor" bukan "Student"
# ========================================================
- name: Enforce Proving Ground Terminology
- name: Enforce Audit Terminology
id: term_check
env:
TITLE: ${{ github.event.pull_request.title }}
BODY: ${{ github.event.pull_request.body }}
run: |
# Daftar kata terlarang (Case Insensitive)
BANNED_REGEX="mentorship|mentee|mentor|teacher|student|help me|teach me|guide me"
# Update v3: Menambah 'homework', 'tutorial', 'lesson'
BANNED_REGEX="mentorship|mentee|mentor|teacher|student|help me|teach me|guide me|homework|tutorial|lesson"

if echo "$TITLE $BODY" | grep -iEq "$BANNED_REGEX"; then
echo "::error title=Terminology Violation::Forbidden terms detected. This is a Proving Ground, not a School."
echo "::error title=Terminology Violation::Forbidden terms detected. This is an Audit Authority, not a School."
echo "violation=true" >> $GITHUB_OUTPUT
exit 1
fi

# ========================================================
# 2. THE INTEGRITY GUARD (Anti-Cheat)
# Memastikan Challenger tidak mengubah Soal Ujian (Tests)
# ========================================================
- name: Detect Illegal File Modifications
id: integrity_check
uses: tj-actions/changed-files@v41
with:
files: |
.github/**
tests/**
GOVERNANCE.md
BRANDING.md
OWNERSHIP.md
LICENSE

- name: Block Tampering
if: steps.integrity_check.outputs.any_changed == 'true' && github.actor != 'itwahjoedi'
run: |
echo "::error title=Platform Integrity Violated::You modified restricted files (tests/ or .github/). Revert these changes immediately."
exit 1

# ========================================================
# 3. THE LAWYER (Legal Sign-off)
# Memastikan 'Liability Waiver' dicentang di PR Template
# 2. THE LAWYER (Legal Sign-off v3.0)
# Memastikan 'Liability Waiver' dicentang sesuai PR Template Baru
# ========================================================
- name: Verify Liability Waiver
id: legal_check
env:
BODY: ${{ github.event.pull_request.body }}
run: |
# Mencari string checkbox yang sudah dicentang [x]
REQUIRED_AGREEMENT="- \[x\] I accept the Codeijoe Liability Waiver"
# v3.0 Template Requirement:
# - [x] I certify that this code is my own logic...
# - [x] I understand that if I cheated...

if ! echo "$BODY" | grep -Fq "$REQUIRED_AGREEMENT"; then
echo "::error title=Legal Compliance::You must accept the Liability Waiver in the PR description."
# Kita cek salah satu string kunci yang unik untuk memastikan user baca
REQUIRED_KEYWORD="certify that this code is my own logic"
CHECKBOX_PATTERN="- \[x\]"

# Cek apakah ada pola [x] ... certify ...
if ! echo "$BODY" | grep -i "$REQUIRED_KEYWORD" | grep -Fq "$CHECKBOX_PATTERN"; then
echo "::error title=Legal Compliance::You must accept the Liability Waiver (Check the box: I certify that this code is my own logic)."
echo "legal_missing=true" >> $GITHUB_OUTPUT
exit 1
fi

# ========================================================
# 4. AUTOMATED REJECTION (The Bouncer)
# Bot memberi feedback otomatis jika ada pelanggaran
# 3. AUTOMATED FEEDBACK (The Clerk)
# Memberi tahu user cara memperbaiki bahasa/legal
# ========================================================
- name: Reject Violation
if: failure()
Expand All @@ -91,29 +74,26 @@ jobs:
const termViolation = '${{ steps.term_check.outputs.violation }}' === 'true';
const legalMissing = '${{ steps.legal_check.outputs.legal_missing }}' === 'true';

let msg = '### 🛑 PROTOCOL VIOLATION DETECTED\n\n';
let msg = '### ⚖️ GOVERNANCE VIOLATION\n\n';

if (termViolation) {
msg += '**🚫 Terminology Check Failed:**\n';
msg += 'Codeijoe is a **Proving Ground**, not a mentorship program.\n';
msg += 'Please remove words like "Mentor", "Mentee", or "Help me" from your PR title/body.\n';
msg += '- Use **"Challenger"** instead of Student/Mentee.\n';
msg += '- Use **"Reviewer"** instead of Teacher/Mentor.\n\n';
msg += '**🚫 Terminology Error:**\n';
msg += 'Codeijoe is an **Audit Authority**. We do not use academic terms.\n';
msg += '- ❌ Bad: Student, Mentor, Homework, Help Me.\n';
msg += '- ✅ Good: Auditor, System, Mission, Trade-off.\n\n';
}

if (legalMissing) {
msg += '**⚖️ Legal Check Failed:**\n';
msg += 'You strictly must accept the **Liability Waiver**. Update your PR description to check the box: `[x] I accept...`\n\n';
msg += '**📝 Legal Waiver Missing:**\n';
msg += 'You must accept the **Liability Waiver** in the PR description.\n';
msg += 'Please edit your PR and mark the checkbox: `[x] I certify that this code is my own logic...`\n\n';
}

msg += 'Please edit this Pull Request to comply. The automated gate will remain closed until resolved.';
msg += '**Action Required:** Update your PR description to comply. The Audit Gate will remain closed until resolved.';

await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: msg
});

// Tutup PR otomatis jika pelanggaran berat (opsional, saat ini kita biarkan open tapi fail)
// await github.rest.pulls.update({ ... state: 'closed' });
29 changes: 11 additions & 18 deletions OWNERSHIP.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
# Intellectual Property & Liability

## 1. The "Upstream" Rule (Code Ownership)
By submitting a Pull Request (PR) to any Codeijoe repository:
* You agree that your contribution is licensed under the **Apache License 2.0**.
* You grant Codeijoe™ and the community a perpetual, world-wide, royalty-free license to use, modify, and distribute the code.
* **Patent Grant:** You provide an implicit patent grant, preventing future litigation over contributed logic.
> **Status:** Redirected
> **Reference:** [GOVERNANCE.md](./GOVERNANCE.md)

## 2. Portfolio Rights (Moral Rights)
Codeijoe acknowledges that the **credit** belongs to the Challenger.
* You retain the moral right to claim your work as part of your personal portfolio ("Proof of Work").
* You are encouraged to fork your successful missions to your personal profile to showcase your competency.
## Notice of Consolidation
To ensure legal consistency and stronger enforcement under the **Codeijoe™ Audit Authority** framework, all definitions regarding:

## 3. Content Licensing
* **Code:** Apache 2.0.
* **Documentation/Specs/Missions:** Creative Commons Attribution-ShareAlike 4.0 (**CC BY-SA 4.0**). This ensures that Codeijoe's curriculum cannot be walled off or sold without attribution.
1. **Intellectual Property (IP) Rights**
2. **Licensing (Commercial vs. Non-Commercial)**
3. **Liability Waivers**
4. **Trademark Usage**

## 4. Liability Waiver (The "As-Is" Clause)
**WARNING:**
The Codeijoe Proving Ground is a simulation of real-world engineering challenges.
* All materials, automated feedback, and code reviews are provided **"AS IS"** without warranty of any kind.
* The Codeijoe Founder and Maintainers are **NOT LIABLE** for any direct, indirect, incidental, or consequential damages arising from your participation.
* There is **NO** employment, agency, or contractor relationship established between Codeijoe and any Challenger.
Have been consolidated into the **[Governance & Intellectual Property Constitution](./GOVERNANCE.md)**.

Please refer to **GOVERNANCE.md** for the single source of truth.
Loading