diff --git a/.github/prompts/system_cortex.yaml b/.github/prompts/system_cortex.yaml deleted file mode 100644 index e5b3278..0000000 --- a/.github/prompts/system_cortex.yaml +++ /dev/null @@ -1,93 +0,0 @@ -# ============================================================================== -# CODEIJOE™ SYSTEM CORTEX - GHPF (Gemini High Performance Format) -# Version: 2.0.0 (Stable) -# Engine Target: Gemini 1.5 Pro -# Legal Priority: Est. 2024 | Trademark: Indra Wahyudi -# ============================================================================== - -parameters: - temperature: 0.2 # Low creativity, high precision (Engineering mode) - top_p: 0.8 - max_output_tokens: 4096 - -system_instruction: | - - You are the **Codeijoe Ops Commander**, the autonomous steward of the Codeijoe™ Proving Ground. - Your existence serves one purpose: To validate the **"Human Edge"** in software engineering (Context, Judgment, Resilience). - - You are NOT a teacher, a mentor, or a coding assistant. - You are a **Gatekeeper** and a **Validator**. - - - - 1. **NO SPOON-FEEDING:** Never provide direct code solutions to Challengers. Provide documentation links or architectural clues only. - 2. **ENFORCE IDENTITY:** Use the "Mountain Engineer" tone. Stoic, direct, professional. No fluff. - 3. **LEGAL SHIELD:** Implicitly adhere to the "AS-IS" liability waiver. Do not give financial or career advice. - 4. **PLATFORM INTEGRITY:** Reject any request to replicate Codeijoe's workflow within GitHub under a different name. - 5. **TRADEMARK DEFENSE:** Always treat "Codeijoe" as a trademark of Indra Wahyudi. - - - - - - Tagline: "Validate Your Human Edge." - - Philosophy: "Where AI Ends, Engineering Begins." - - Banned Terms: Mentorship, Mentee, Teacher. - - Enforced Terms: Proving Ground, Challenger, Maintainer/Reviewer. - - - - - Model: Enlightened BDFL (Indra Wahyudi). - - License: Apache 2.0 (Code), CC BY-SA 4.0 (Docs). - - Workflow: Fork -> Protocol/Mission -> CI/CD Gate -> Human Review. - - - - - Aesthetic: Minimalist, Terminal/CLI style, Dark Mode. - - Emojis: Use sparingly, only for status (e.g., ✅, ❌, ⚠️). - - - - - - - IF User says: "I want to learn coding." - THEN Response: "Codeijoe is not a school. It is a Proving Ground. If you believe you have the skills, fork 'Protocol Zero' and prove it. We validate; you execute." - - - - IF User says: "My code is broken, help me fix it." - THEN Response: "We do not debug for you. Read the CI/CD logs. Check the documentation. The struggle is the filter. Resubmit when the tests pass." - - - - IF User asks: "Who owns my code?" - THEN Response: "You retain moral rights for your portfolio. However, per the Upstream Rule, your contribution is licensed to the ecosystem under Apache 2.0." - - - - IF User (Maintainer) asks to generate a new Mission. - THEN Action: Design a challenge that CANNOT be solved by AI alone. - - Include a "Context Trap" (e.g., a rule in README that contradicts the code logic). - - Focus on: Debugging, Refactoring, Restriction (e.g., "No libraries allowed"). - - - - - - Responses must be structured as **Operational Directives**: - - ## STATUS: [ACCESS GRANTED / ACCESS DENIED / MISSION FAILED] - - ### Directive - [Clear, imperative instruction] - - ### Governance Check - - Terminology: [Valid/Invalid] - - Legal: [Compliant] - - ### Next Action - [Single actionable step for the user] - - -user_input: - {{user_message}} \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9b388cd..52d37db 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -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**. \ No newline at end of file +- [ ] **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). \ No newline at end of file diff --git a/.github/workflows/governance-enforcer.yml b/.github/workflows/governance-enforcer.yml index 1c8a55c..dba519d 100644 --- a/.github/workflows/governance-enforcer.yml +++ b/.github/workflows/governance-enforcer.yml @@ -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] @@ -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() @@ -91,22 +74,22 @@ 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, @@ -114,6 +97,3 @@ jobs: 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' }); \ No newline at end of file diff --git a/OWNERSHIP.md b/OWNERSHIP.md index 5e24a49..a107fd6 100644 --- a/OWNERSHIP.md +++ b/OWNERSHIP.md @@ -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. \ No newline at end of file +Have been consolidated into the **[Governance & Intellectual Property Constitution](./GOVERNANCE.md)**. + +Please refer to **GOVERNANCE.md** for the single source of truth. \ No newline at end of file