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
19 changes: 17 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# Only the Founder can approve changes to core governance
* @itwahjoedi
# Codeijoe Proving Ground - Chain of Command

# Global Fallback: Core Maintainers
* @.github/prompts/system_cortex.yaml

# The Constitution (Only Founder can change)
GOVERNANCE.md @.github/prompts/system_cortex.yaml
BRANDING.md @.github/prompts/system_cortex.yaml
OWNERSHIP.md @.github/prompts/system_cortex.yaml
LICENSE @.github/prompts/system_cortex.yaml

# The Gatekeeper Robots (Critical Infra)
.github/ @.github/prompts/system_cortex.yaml
**/*.yml @.github/prompts/system_cortex.yaml

# Mission Specs (Tests define the truth)
tests/ @.github/prompts/system_cortex.yaml
35 changes: 35 additions & 0 deletions .github/evidence/legal-proof-organization-metadata-2024.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"login": "codeijoe",
"id": 187354376,
"node_id": "O_kgDOCyrNCA",
"avatar_url": "https://avatars.githubusercontent.com/u/187354376?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/codeijoe",
"html_url": "https://github.com/codeijoe",
"followers_url": "https://api.github.com/users/codeijoe/followers",
"following_url": "https://api.github.com/users/codeijoe/following{/other_user}",
"gists_url": "https://api.github.com/users/codeijoe/gists{/gist_id}",
"starred_url": "https://api.github.com/users/codeijoe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/codeijoe/subscriptions",
"organizations_url": "https://api.github.com/users/codeijoe/orgs",
"repos_url": "https://api.github.com/users/codeijoe/repos",
"events_url": "https://api.github.com/users/codeijoe/events{/privacy}",
"received_events_url": "https://api.github.com/users/codeijoe/received_events",
"type": "Organization",
"user_view_type": "public",
"site_admin": false,
"name": "Codeijoe",
"company": null,
"blog": "http://ijoe.eu.org",
"location": null,
"email": "iw@ijoe.eu.org",
"hireable": null,
"bio": "Empowering you to build your software engineering experiences while AI cannot help",
"twitter_username": "codeijoe",
"public_repos": 9,
"public_gists": 0,
"followers": 6,
"following": 0,
"created_at": "2024-11-05T02:59:27Z",
"updated_at": "2024-11-28T03:27:05Z"
}
93 changes: 93 additions & 0 deletions .github/prompts/system_cortex.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# ==============================================================================
# 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: |
<role_definition>
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**.
</role_definition>

<prime_directives>
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.
</prime_directives>

<knowledge_base>
<branding>
- Tagline: "Validate Your Human Edge."
- Philosophy: "Where AI Ends, Engineering Begins."
- Banned Terms: Mentorship, Mentee, Teacher.
- Enforced Terms: Proving Ground, Challenger, Maintainer/Reviewer.
</branding>

<governance>
- 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.
</governance>

<visual_style>
- Aesthetic: Minimalist, Terminal/CLI style, Dark Mode.
- Emojis: Use sparingly, only for status (e.g., ✅, ❌, ⚠️).
</visual_style>
</knowledge_base>

<interaction_protocols>

<scenario_1_onboarding>
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."
</scenario_1_onboarding>

<scenario_2_help_request>
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."
</scenario_2_help_request>

<scenario_3_legal_check>
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."
</scenario_3_legal_check>

<scenario_4_challenge_design>
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").
</scenario_4_challenge_design>

</interaction_protocols>

<output_format>
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]
</output_format>

user_input:
{{user_message}}
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Mission Report
**Challenger:** @[your-username]
**Mission ID:** [e.g., Protocol Zero]

## 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.)*


---
### ⚖️ Legal & Governance Agreement (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**.
125 changes: 125 additions & 0 deletions .github/workflows/gatekeeper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Codeijoe Gatekeeper

# Trigger hanya saat ada Pull Request ke branch main
on:
pull_request:
branches: [ "main" ]
paths:
- 'src/**' # Hanya jalan jika folder src disentuh
- 'tests/**' # Monitor folder test untuk deteksi kecurangan

permissions:
contents: read
pull-requests: write # Izin untuk bot komen di PR

jobs:
validate-submission:
name: Verify Challenger's Work
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

# ---------------------------------------------------------
# STEP 1: ANTI-CHEAT CHECK
# Cek apakah Challenger mengubah file di folder tests/
# ---------------------------------------------------------
- name: Detect Cheating (Test Modification)
id: anti_cheat
uses: tj-actions/changed-files@v41
with:
files: tests/**

- name: Block Cheaters
if: steps.anti_cheat.outputs.any_changed == 'true'
run: |
echo "::error::VIOLATION DETECTED: You modified the test files!"
echo "Do not touch files in 'tests/'. Only edit files in 'src/'."
exit 1

# ---------------------------------------------------------
# STEP 2: SETUP & TEST
# Jalankan environment (misal Node.js) dan Test Runner
# ---------------------------------------------------------
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install Dependencies
run: npm ci

- name: Run The Gauntlet (Unit Tests)
id: run_tests
# Pastikan script 'test' ada di package.json
run: npm test > test-results.txt 2>&1
continue-on-error: true # Supaya kita bisa handle error message di step berikutnya

# ---------------------------------------------------------
# STEP 3: AUTOMATED JUDGMENT
# Bot memberi feedback langsung
# ---------------------------------------------------------
- name: Judge The Result
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
// Cek apakah file hasil test ada, jika tidak, anggap fail
let testResult = '';
try {
testResult = fs.readFileSync('test-results.txt', 'utf8');
} catch (e) {
testResult = 'Test execution failed completely (No output generated).';
}

const outcome = '${{ steps.run_tests.outcome }}';

let body = '';

if (outcome === 'success') {
body = '### ✅ MISSION ACCOMPLISHED\n\n' +
'System status: **PASSED**.\n' +
'Great job, Challenger. The automated gate is open.\n' +
'@codeijoe/maintainers will now review your code quality/style.\n\n' +
'*(Wait for final Merge approval)*';

// Tambah label otomatis
try {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['status:passed', 'ready-for-review']
});
} catch (e) { console.log('Label error:', e); }

} else {
body = '### ❌ MISSION FAILED\n\n' +
'System status: **REJECTED**.\n' +
'Your code did not pass the automated tests. Check the logs below:\n\n' +
'<details><summary>Expand Test Logs</summary>\n\n' +
'```\n' + testResult.slice(0, 2000) + '...\n```\n' +
'\n</details>\n' +
'\n**Action Required:** Fix your code and push again. Do not ask for review until this turns Green.';

// Hapus label passed jika ada (re-submit kasus)
try {
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: 'status:passed'
});
} catch (e) {} // Ignore error if label doesn't exist
}

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

- name: Fail Workflow if Tests Failed
if: steps.run_tests.outcome != 'success'
run: exit 1
Loading
Loading