@wistantkode/dotfiles 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.6.0] - 2026-04-05 - [Vellum & Void Integrity]
6
+
7
+ ### Added
8
+
9
+ - **Formal Governance**: Integrated professional `CONTRIBUTING.md` and `SECURITY.md` root-level guides, transitioning from internal metaphors to standard engineering contracts.
10
+ - **Community Infrastructure**: Added a dedicated Community section with a high-fidelity contributor avatar grid and refined attribution.
11
+
12
+ ### Changed
13
+
14
+ - **Architectural Mapping**: Migrated the CLI entry point from `bin/` to `cli/` to align with modern package distribution standards.
15
+ - **Technical Sanitization**: Purged all metaphorical terminology (Rodin, Socratic, Audit) from public-facing documentation in favor of professional engineering nomenclature.
16
+ - **Visual Engineering**: Redesigned the `README.md` signature header and updated the technical verification workflow diagram (Mermaid).
17
+ - **Hardening**: Refined the implementation of Zero-Trust principles in the root security policy.
18
+
19
+ ## [1.5.0] - 2026-04-05 - [Iron Gate & Neon Dash]
20
+
21
+ ### Added
22
+
23
+ - **Protocol Hardening**: Integrated strict "Zero-Initiative" and "Separation of Concerns" rules into `RODIN.md` and `COMMIT.md`. AI is now formally forbidden from touching release artifacts outside of Release mode.
24
+ - **Elite UI Overhaul**: Complete refactor of `github.sh` and `bin/cli.mjs` with premium 256-color aesthetics, box-drawing tables, and animated progress bars.
25
+ - **Enhanced Gatekeeping**: `github.sh` now performs a silent tag-delta audit and forces manual confirmation on production branches.
26
+
5
27
  ## [1.4.0] - 2026-04-05 - [Community-Grade Governance]
6
28
 
7
29
  ### Added
@@ -0,0 +1,51 @@
1
+ # Contributing to Dotfiles Infrastructure
2
+
3
+ This repository is governed by strict **Architectural Validation**. To maintain technical excellence, every contribution must align with our core engineering baseline. Precision and structural integrity are non-negotiable.
4
+
5
+ ---
6
+
7
+ ## ⚡ Technical Pillars
8
+
9
+ ### 1. Atomic Integrity
10
+
11
+ We maintain a linear, pure history. PRs must represent a single, isolated logical intention.
12
+
13
+ - **Manual Staging**: The use of `git add .` is prohibited. Every staging must be targeted (`git add <file>`).
14
+ - **No Hybrid Commits**: Do not mix refactoring (`refactor`) with functional additions (`feat`) in the same commit.
15
+ - **Separation of Powers**: Release manifests (`package.json`, `CHANGELOG.md`) and Git Tags are strictly reserved for the **Release Protocol**. They must never be part of a standard code commit.
16
+
17
+ ### 2. Architectural Governance
18
+
19
+ Your interaction with the codebase is a technical review, not a service.
20
+
21
+ - **Critical Assessment**: Contributors (Human or AI) must provide technical justification for every change. Blind validation is a protocol failure.
22
+ - **Zero-Initiative**: Decision-making is limited to the explicit scope of the requested task. Unauthorized modification of non-cited components is forbidden.
23
+ - **Impact-Based SemVer**: Versioning must be mathematically justified by the code impact analyzed during the release phase.
24
+
25
+ ### 3. AI-Pairing Standards
26
+
27
+ We recognize AI as a technical peer. Contributions co-authored by an agent must:
28
+
29
+ - Maintain a direct, technical, and objective tone.
30
+ - Be verified by the **Architect (Human)** at every execution gate.
31
+ - **The Verification Barrier**: The agent must prompt for human confirmation of the versioning logic before final execution.
32
+
33
+ ---
34
+
35
+ ## Development Lifecycle
36
+
37
+ ### Phase 1: Code Implementation
38
+
39
+ Follow the **Commit Convention**. Use strict prefixes (`feat`, `fix`, `refactor`, `style`, `ui`, `docs`).
40
+
41
+ ### Phase 2: Infrastructure Deployment
42
+
43
+ Deployment follows the **Architectural Release** flow. Every release must be sealed with a unique identifier: `vX.Y.Z - [MOTTO]`.
44
+
45
+ ---
46
+
47
+ ## 👥 Maintenance
48
+
49
+ Managed by **Wistant** — Lead Architect.
50
+
51
+ ---
package/README.md CHANGED
@@ -1,22 +1,10 @@
1
- # [@wistantkode/dotfiles](https://www.npmjs.com/package/@wistantkode/dotfiles)
2
-
3
1
  <div align="center">
4
- <table border="0" cellpadding="0" cellspacing="0">
5
- <tr>
6
- <td align="center" valign="middle">
7
- <img src="./assets/wistant-logo.png" alt="Wistant Logo" width="100" />
8
- </td>
9
- <td align="center" valign="middle" style="padding: 0 40px;">
10
- <img src="./assets/memoji.png" alt="Memoji" width="120" />
11
- </td>
12
- <td align="center" valign="middle">
13
- <img src="./assets/dotfiles.png" alt="Dotfiles Logo" width="100" />
14
- </td>
15
- </tr>
16
- </table>
17
- <br />
18
- <p><b>Precision AI-Pairing Infrastructure & Architectural Protocols</b></p>
19
-
2
+ <img src="./assets/logo.png" alt="Dotfiles Logo" width="180" />
3
+
4
+ # Precision Dotfiles Infrastructure
5
+
6
+ [ Automated Orchestration • AI-Driven Logic • Governance Protocols • CLI Distribution ]
7
+
20
8
  <p>
21
9
  <a href="https://www.npmjs.com/package/@wistantkode/dotfiles">
22
10
  <img src="https://img.shields.io/npm/v/@wistantkode/dotfiles?style=for-the-badge&color=CC0000&logo=npm" alt="npm version" />
@@ -24,41 +12,40 @@
24
12
  <a href="https://pnpm.io">
25
13
  <img src="https://img.shields.io/badge/pnpm-4AB6FA?style=for-the-badge&logo=pnpm&logoColor=white" alt="pnpm" />
26
14
  </a>
27
- <a href="./LICENSE">
28
- <img src="https://img.shields.io/badge/License-Apache_2.0-F47023?style=for-the-badge" alt="License" />
15
+ <a href="https://github.com/wistant/dotfiles/releases">
16
+ <img src="https://img.shields.io/badge/Release-v1.6.0-blue?style=for-the-badge&logo=github" alt="GitHub release" />
29
17
  </a>
30
18
  </p>
31
- </div>
32
19
 
33
- ---
20
+ [![Commit Protocol](https://img.shields.io/badge/Protocol-COMMIT-black?style=flat-square&logo=gitbook&logoColor=white)](./protocols/COMMIT.md)
21
+ [![Release Protocol](https://img.shields.io/badge/Protocol-RELEASE-black?style=flat-square&logo=gitbook&logoColor=white)](./protocols/RELEASE.md)
22
+ [![Security Protocol](https://img.shields.io/badge/Protocol-SECURITY-black?style=flat-square&logo=gitbook&logoColor=white)](./protocols/SECURITY.md)
34
23
 
35
- ## Infrastructure Orchestration
36
-
37
- This is more than a dotfiles collection; it is a **System of Governance** for AI-driven development workflows. By treating your environment as **Versioned Infrastructure**, you establish the necessary guardrails to ensure that AI-pair-programming remains precise, atomic, and secure.
38
-
39
- ### The System Advantage
40
-
41
- - **AI-Driven Logic**: The system is designed to "pilot" your AI assistant. It provides the architectural context and socratic protocols (`.protocols/`) required for high-end decision making.
42
- - **Atomic Reliability**: Every modification is routed through a verification cycle that prevents history pollution and mixed intentions.
43
- - **Universal Staging**: Powered by **pnpm**, **JavaScript (ESM)**, and **Shell orchestration**, the entire ecosystem is instantly deployable via `npx` or `pnpm dlx`.
24
+ </div>
44
25
 
45
26
  ---
46
27
 
47
- ## Operational Workflow
28
+ ## Architectural Orchestration
29
+
30
+ This repository is not just a collection of configs; it is a **Living Governance System**. Every interaction between the Architect and the AI is filtered through a rigorous protocol stack.
48
31
 
49
32
  ```mermaid
50
33
  graph TD
51
- A[Socratic AI-Pairing] -- Atomic Audit --> B[Local Commit Sequence]
52
- B -- github.sh Gatekeeper --> C[GitHub Mirror]
53
- C -- Automated CI/CD --> D[GitHub Actions]
54
- D -- Security & Distribution --> E[NPM Global Registry]
55
- F[Remote Deployment] -- pnpm dlx --> E
34
+ A[Architect Request] --> B{Verification Cycle}
35
+ B -- Protocol Audit --> C[Technical Logic]
36
+ C -- Separation Mode --> D[Atomic Implementation]
37
+ D -- History Guard --> E[Versioned State]
38
+ E -- Sync Process --> F[NPM Distribution]
39
+ F -- CLI Engine --> G[System Deployment]
40
+
41
+ style B fill:#f9f,stroke:#333,stroke-width:2px
42
+ style G fill:#00ff,stroke:#fff,stroke-width:2px,color:#fff
56
43
  ```
57
44
 
58
45
  ### Core Automation Tools
59
46
 
60
47
  1. **Interactive Sync (`github.sh`)**: A specialized gatekeeper that performs a "Tag Delta" audit, ensuring local versions and remote states are synchronized before any projection.
61
- 2. **System Protocols**: A library of hidden guides that force the AI to maintain professional standards (Atomic commits, Socratic releases, Security first).
48
+ 2. **System Protocols**: A library of hidden guides that force the AI to maintain professional standards (Atomic commits, Protocol releases, Security first).
62
49
  3. **Automated Distribution**: GitHub Actions handle the security auditing and global NPM publication upon Every GitHub Release.
63
50
 
64
51
  ---
@@ -72,9 +59,10 @@ pnpm dlx @wistantkode/dotfiles
72
59
  ```
73
60
 
74
61
  ### Included Assets
62
+
75
63
  - **Professional `.gitignore`**: PRODUCTION-READY baseline for all modern stacks.
76
- - **`.gitmessage` Architectural Template**: Standardizes commit intentions across teams.
77
- - **Governance Library**: Injected `.protocols/` folder for immediate AI alignment.
64
+ - **Security & Integrity**: Injected `.protocols/` folder for immediate AI alignment.
65
+ - **Universal License**: Apache 2.0 baseline for all technical distributions.
78
66
 
79
67
  ---
80
68
 
@@ -82,9 +70,31 @@ pnpm dlx @wistantkode/dotfiles
82
70
 
83
71
  | Standard | Role | Reference |
84
72
  | :--- | :--- | :--- |
85
- | **Integrity Audit** | High-level engineering and architectural philosophy. | [RODIN.md](./protocols/RODIN.md) |
73
+ | **Audit Philosophy** | Protocol auditing and architectural integrity. | [RODIN.md](./protocols/RODIN.md) |
86
74
  | **Commit Protocol** | Strict atomic formatting and zero-entropy staging. | [COMMIT.md](./protocols/COMMIT.md) |
87
- | **Release Flow** | Socratic versioning and manual sealing logic. | [RELEASE.md](./protocols/RELEASE.md) |
75
+ | **Release Flow** | Technical versioning and manual sealing logic. | [RELEASE.md](./protocols/RELEASE.md) |
76
+ | **Security First** | Vulnerability audits and secret scanning protocols. | [SECURITY.md](./protocols/SECURITY.md) |
77
+
78
+ > See [_INDEX.md](./protocols/_INDEX.md) for the full library of orchestration protocols.
79
+
80
+ ---
81
+
82
+ ## Contributors
83
+
84
+ The project is currently orchestrated by its lead architect. New contributions are welcome to expand the baseline.
85
+
86
+ <p align="left">
87
+ <a href="https://github.com/wistant">
88
+ <img src="https://github.com/wistant.png?size=100" width="100" height="100" alt="wistant" title="Lead Architect"/>
89
+ </a>
90
+ </p>
91
+
92
+ ---
93
+
94
+ ## Community
95
+
96
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to join the **clawtributors** and submit PRs.
97
+ AI/vibe-coded PRs welcome! 🤖
88
98
 
89
99
  ---
90
100
 
@@ -95,5 +105,5 @@ Copyright © 2026 **Wistant**. Distributed under the **Apache License 2.0**.
95
105
  ---
96
106
 
97
107
  <div align="center">
98
- <p>Engineered for professional AI-Pairing by <b>@wistantkode</b></p>
108
+ <b>Designed for the 0.1% — Engineered by @wistant</b>
99
109
  </div>
package/SECURITY.md ADDED
@@ -0,0 +1,39 @@
1
+ # Security Policy
2
+
3
+ This repository follows a **Zero-Trust** security model. We prioritize the integrity of the infrastructure and the protection of sensitive architectural data.
4
+
5
+ ## Supported Versions
6
+
7
+ We only provide security updates for the current major version.
8
+
9
+ | Version | Supported |
10
+ | ------- | ------------------ |
11
+ | v1.x | :white_check_mark: |
12
+ | < v1.0 | :x: |
13
+
14
+ ## Reporting a Vulnerability
15
+
16
+ If you discover a security vulnerability, please do NOT open a public issue. We take security seriously and prefer a coordinated disclosure.
17
+
18
+ Please report vulnerabilities directly to the maintainer:
19
+ - **Contact**: [@wistant](https://github.com/wistant)
20
+ - **Encryption**: If possible, encrypt your report using a secure channel.
21
+
22
+ ## Our Security Principles
23
+
24
+ ### 1. Silent Guardian Audit
25
+ Every interaction with the codebase (commits, refactors, releases) triggers a scan for:
26
+ - Exposed secrets (tokens, API keys, private keys).
27
+ - Context leaks (internal paths, IPs, machine names).
28
+ - Insecure API logic or missing sanitization.
29
+
30
+ ### 2. Dependency Integrity
31
+ We use strictly audited dependencies.
32
+ - All packages are scanned via `pnpm audit`.
33
+ - Critical CVEs in core libraries results in an immediate suspension of the release flow until resolved.
34
+
35
+ ### 3. Isolation by Design
36
+ Sensitive configuration files and release manifests are strictly isolated from the standard development cycle to prevent accidental leakage.
37
+
38
+ ---
39
+ **Architectural Integrity • Security First • @wistant dotfiles baseline**
Binary file
package/cli/cli.mjs ADDED
@@ -0,0 +1,153 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * ═══════════════════════════════════════════════════════════════════════
5
+ * DOTFILES INSTALLER · Elite Orchestration · @wistantkode/dotfiles
6
+ * ════════════════════════════════════════───────────────────────════════
7
+ */
8
+
9
+ import { copyFile, mkdir, readdir, lstat } from 'node:fs/promises';
10
+ import { join, dirname } from 'node:path';
11
+ import { fileURLToPath } from 'node:url';
12
+
13
+ // ── UI Configuration (256-color) ──────────────────────────────────────
14
+ const RESET = '\x1b[0m';
15
+ const BOLD = '\x1b[1m';
16
+ const DIM = '\x1b[2m';
17
+ const CYAN = '\x1b[38;5;117m';
18
+ const GREEN = '\x1b[38;5;114m';
19
+ const YELLOW = '\x1b[38;5;221m';
20
+ const RED = '\x1b[38;5;203m';
21
+ const GRAY = '\x1b[38;5;244m';
22
+ const WHITE = '\x1b[38;5;255m';
23
+ const DGRAY = '\x1b[38;5;238m';
24
+ const BLUE = '\x1b[38;5;75m';
25
+
26
+ const __dirname = dirname(fileURLToPath(import.meta.url));
27
+ const pkgRoot = join(__dirname, '..');
28
+
29
+ // ── Asset Mapping ─────────────────────────────────────────────────────
30
+ const ASSETS = [
31
+ { src: 'gitignore', dest: '.gitignore', label: 'Ignore patterns' },
32
+ { src: 'LICENSE', dest: 'LICENSE', label: 'License' },
33
+ { src: 'protocols', dest: '.protocols', label: 'Governance protocols', isDir: true }
34
+ ];
35
+
36
+ // ── Layout Components ─────────────────────────────────────────────────
37
+
38
+ const _rep = (n, char = ' ') => char.repeat(Math.max(0, n));
39
+ const sep = () => console.log(`${DGRAY}${_rep(64, '─')}${RESET}`);
40
+
41
+ const renderLogo = () => {
42
+ // Ultra-High-Fidelity "Full Block" Style
43
+ console.log(`\n ${CYAN}██████╗ ██████╗ ████████╗███████╗██╗██╗ ███████╗███████╗`);
44
+ console.log(` ${CYAN}██╔══██╗██╔═══██╗╚══██╔══╝██╔════╝██║██║ ██╔════╝██╔════╝`);
45
+ console.log(` ${CYAN}██║ ██║██║ ██║ ██║ █████╗ ██║██║ █████╗ ███████╗`);
46
+ console.log(` ${CYAN}██║ ██║██║ ██║ ██║ ██╔══╝ ██║██║ ██╔══╝ ╚════██║`);
47
+ console.log(` ${CYAN}██████╔╝╚██████╔╝ ██║ ██║ ██║███████╗███████╗███████║`);
48
+ console.log(` ${CYAN}╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝${RESET}`);
49
+ console.log(`\n ${GRAY}${BOLD}[ PRECISION AI ORCHESTRATION ]${RESET}\n`);
50
+ };
51
+
52
+ const progress = async (label) => {
53
+ process.stdout.write(` ${GRAY}[${RESET}`);
54
+ for (let i = 0; i < 28; i++) {
55
+ process.stdout.write(`${CYAN}█${RESET}`);
56
+ await new Promise(r => setTimeout(r, 10));
57
+ }
58
+ process.stdout.write(`${GRAY}]${RESET} ${GREEN}${label}${RESET}\n`);
59
+ };
60
+
61
+ const renderSignature = () => {
62
+ const width = 44;
63
+ const stripAnsi = (str) => str.replace(/\x1b\[[0-9;]*m/g, '');
64
+ const pad = (text, len) => text + _rep(len - stripAnsi(text).length);
65
+
66
+ console.log(`\n ${WHITE}${BOLD}SOURCE & AUTHORSHIP${RESET}`);
67
+ console.log(` ${DGRAY}┌${_rep(width, '──')}┐${RESET}`);
68
+
69
+ const label = (txt, col) => `${col}${BOLD}${txt}${RESET}`;
70
+ const info = (txt) => `${GRAY}${txt}${RESET}`;
71
+
72
+ console.log(` ${DGRAY}│${RESET} ${pad(`${label('REPOSITORY', BLUE)} ${BOLD}https://github.com/wistant/dotfiles${RESET}`, width + 17)} ${DGRAY}│${RESET}`);
73
+ console.log(` ${DGRAY}├${_rep(width, '──')}┤${RESET}`);
74
+ console.log(` ${DGRAY}│${RESET} ${pad(`${label('ARCHITECT ', WHITE)} ${BOLD}Wistant${RESET} ${GRAY}(DevOps Architect)${RESET}`, width + 28)} ${DGRAY}│${RESET}`);
75
+ console.log(` ${DGRAY}│${RESET} ${pad(`${label('GITHUB ', BLUE)} ${GRAY}https://github.com/wistant${RESET}`, width + 26)} ${DGRAY}│${RESET}`);
76
+ console.log(` ${DGRAY}│${RESET} ${pad(`${label('X ', CYAN)} ${GRAY}https://x.com/wistant${RESET}`, width + 26)} ${DGRAY}│${RESET}`);
77
+ console.log(` ${DGRAY}│${RESET} ${pad(`${label('LINKEDIN ', BLUE)} ${GRAY}https://linkedin.com/in/wistant${RESET}`, width + 26)} ${DGRAY}│${RESET}`);
78
+ console.log(` ${DGRAY}└${_rep(width, '──')}┘${RESET}\n`);
79
+ };
80
+
81
+ // ── Core Engine ───────────────────────────────────────────────────────
82
+
83
+ async function copyRecursive(src, dest, onFile) {
84
+ const stat = await lstat(src);
85
+ if (stat.isDirectory()) {
86
+ await mkdir(dest, { recursive: true });
87
+ const children = await readdir(src);
88
+ for (const child of children) {
89
+ await copyRecursive(join(src, child), join(dest, child), onFile);
90
+ }
91
+ } else {
92
+ await copyFile(src, dest);
93
+ if (onFile) onFile(dest);
94
+ }
95
+ }
96
+
97
+ async function run() {
98
+ process.stdout.write('\x1Bc'); // Clear screen
99
+ renderLogo();
100
+ sep();
101
+
102
+ const targetDir = process.cwd();
103
+ console.log(`\n ${GRAY}System Target:${RESET} ${WHITE}${BOLD}${targetDir}${RESET}\n`);
104
+
105
+ sep();
106
+ console.log(`\n ${BOLD}▶ Initiating deployment sequence...${RESET}\n`);
107
+
108
+ await progress('Validating package integrity');
109
+
110
+ const deployedFiles = [];
111
+
112
+ for (const asset of ASSETS) {
113
+ try {
114
+ const srcPath = join(pkgRoot, asset.src);
115
+ const destPath = join(targetDir, asset.dest);
116
+
117
+ if (asset.isDir) {
118
+ await copyRecursive(srcPath, destPath, (f) => {
119
+ deployedFiles.push(f.replace(targetDir, ''));
120
+ });
121
+ } else {
122
+ await copyFile(srcPath, destPath);
123
+ deployedFiles.push('/' + asset.dest);
124
+ }
125
+ } catch (err) {
126
+ console.error(` ${RED}✘${RESET} Failed to deploy ${asset.src}: ${err.message}`);
127
+ }
128
+ }
129
+
130
+ await progress('Finalizing system orchestration');
131
+
132
+ // Detailed Audit Logs
133
+ console.log(`\n ${BOLD}DEPLOYMENT AUDIT${RESET}`);
134
+ console.log(` ${DGRAY}${_rep(45, '─')}${RESET}`);
135
+ for (const file of deployedFiles.sort()) {
136
+ console.log(` ${GREEN}✔${RESET} ${GRAY}${file}${RESET}`);
137
+ }
138
+ console.log(` ${DGRAY}${_rep(45, '─')}${RESET}`);
139
+
140
+ console.log(`\n ${GREEN}${BOLD}✔ INFRASTRUCTURE DEPLOYED SUCCESSFULLY.${RESET}`);
141
+ console.log(` ${GRAY}Your environment is now optimized for professional AI pairing.${RESET}`);
142
+
143
+ renderSignature();
144
+
145
+ console.log(` ${DIM}Thank you for choosing high-end architectural standards.${RESET}\n`);
146
+ sep();
147
+ console.log('');
148
+ }
149
+
150
+ run().catch(err => {
151
+ console.error(`\n ${RED}${BOLD}✗ FATAL ERROR${RESET} ${err.message}\n`);
152
+ process.exit(1);
153
+ });
package/github.sh CHANGED
@@ -1,107 +1,206 @@
1
1
  #!/bin/bash
2
2
 
3
- # --- GITHUB SYNC (SYSTEM PROTOCOL) ---
4
-
5
- # Colors & Style
6
- GRAY='\033[90m'
7
- BOLD='\033[1m'
8
- RED='\033[31m'
9
- GREEN='\033[32m'
10
- YELLOW='\033[33m'
11
- CYAN='\033[36m'
12
- RESET='\033[0m'
13
-
14
- # Utilities
15
- print_banner() {
16
- echo -e "${GRAY}--------------------------------------------------${RESET}"
17
- echo -e "${BOLD} INTEGRITY AUDIT : GITHUB SYNC${RESET}"
18
- echo -e "${GRAY}--------------------------------------------------${RESET}"
3
+ # ═══════════════════════════════════════════════════════════════════════
4
+ # GITHUB SYNC · Integrity Gate · @wistantkode/dotfiles
5
+ # ═══════════════════════════════════════════════════════════════════════
6
+
7
+ # ── Color palette (256-color) ─────────────────────────────────────────
8
+ RESET='\033[0m'; BOLD='\033[1m'; DIM='\033[2m'
9
+ RED='\033[38;5;203m'; GREEN='\033[38;5;114m'; YELLOW='\033[38;5;221m'
10
+ CYAN='\033[38;5;117m'; BLUE='\033[38;5;75m'; GRAY='\033[38;5;244m'
11
+ DGRAY='\033[38;5;238m'; WHITE='\033[38;5;255m'; ORANGE='\033[38;5;215m'
12
+
13
+ # ── Table dimensions ──────────────────────────────────────────────────
14
+ HASH_W=8 # hash column display width
15
+ MSG_W=52 # message column display width
16
+
17
+ # ── Layout helpers ────────────────────────────────────────────────────
18
+ _rep() { printf "%${1}s" | tr ' ' "${2}"; }
19
+ _sep() { echo -e "${DGRAY}$(_rep 68 '─')${RESET}"; }
20
+ _sep2() { echo -e "${DGRAY} $(_rep 64 '·')${RESET}"; }
21
+
22
+ _header() {
23
+ echo -e "${DGRAY} ╭$(_rep $((HASH_W+2)) '─')┬$(_rep $((MSG_W+2)) '─')╮${RESET}"
24
+ printf "${DGRAY} │${RESET} ${BOLD}${GRAY}%-${HASH_W}s${RESET} ${DGRAY}│${RESET} ${BOLD}${GRAY}%-${MSG_W}s${RESET} ${DGRAY}│${RESET}\n" "HASH" "COMMIT"
25
+ echo -e "${DGRAY} ├$(_rep $((HASH_W+2)) '─')┼$(_rep $((MSG_W+2)) '─')┤${RESET}"
19
26
  }
20
27
 
28
+ _row() {
29
+ local hash msg
30
+ hash=$(printf "%-${HASH_W}s" "${1:0:$HASH_W}")
31
+ local raw="$2"
32
+ [ ${#raw} -gt $((MSG_W-1)) ] && raw="${raw:0:$((MSG_W-3))}..."
33
+ msg=$(printf "%-${MSG_W}s" "$raw")
34
+ printf "${DGRAY} │${RESET} ${CYAN}%s${RESET} ${DGRAY}│${RESET} %s ${DGRAY}│${RESET}\n" "$hash" "$msg"
35
+ }
36
+
37
+ _footer() {
38
+ echo -e "${DGRAY} ╰$(_rep $((HASH_W+2)) '─')┴$(_rep $((MSG_W+2)) '─')╯${RESET}"
39
+ }
40
+
41
+ # ── Progress bar animation ────────────────────────────────────────────
42
+ _progress() {
43
+ local label="$1"
44
+ local total=28
45
+ printf " ${GRAY}[${RESET}"
46
+ for ((i=1; i<=total; i++)); do
47
+ printf "${CYAN}█${RESET}"
48
+ sleep 0.018
49
+ done
50
+ printf "${GRAY}]${RESET} ${GREEN}${label}${RESET}\n"
51
+ }
52
+
53
+ # ── Core utilities ────────────────────────────────────────────────────
21
54
  abort() {
22
- echo -e "\n${RED}${BOLD}[ABORT]${RESET} $1"
23
- echo -e "${GRAY}Infrastructure integrity takes precedence over speed.${RESET}"
24
- echo -e "${GRAY}--------------------------------------------------${RESET}"
55
+ echo ""
56
+ _sep
57
+ echo -e " ${RED}${BOLD}✗ ABORTED${RESET} ${GRAY}$1${RESET}"
58
+ _sep
59
+ echo ""
25
60
  exit 1
26
61
  }
27
62
 
28
- ask_confirm() {
29
- echo -ne "${YELLOW}${BOLD}[CONFIRM]${RESET} $1 [y/N] "
30
- read -r response
31
- if [[ ! "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
32
- return 1
33
- fi
34
- return 0
63
+ ask() {
64
+ echo -ne "\n ${YELLOW}${BOLD}?${RESET} $1 ${GRAY}[y/N]${RESET} "
65
+ read -r _r
66
+ [[ "$_r" =~ ^([yY][eE][sS]|[yY])$ ]]
35
67
  }
36
68
 
37
- # --- AUDIT START ---
38
- print_banner
69
+ # ── Phase 0 · Silent data collection ─────────────────────────────────
70
+ CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null) \
71
+ || { echo -e "\n ${RED}✗${RESET} Not a git repository."; exit 1; }
72
+
73
+ REMOTE="origin/${CURRENT_BRANCH}"
74
+ COMMITS_RAW=$(git log "${REMOTE}..HEAD" --oneline 2>/dev/null)
75
+ COMMIT_COUNT=0
76
+ [ -n "$COMMITS_RAW" ] && COMMIT_COUNT=$(echo "$COMMITS_RAW" | wc -l | tr -d ' ')
77
+
78
+ LOCAL_ONLY_TAGS=$(
79
+ git log --tags --simplify-by-decoration --pretty="format:%D" 2>/dev/null \
80
+ | grep "tag: " \
81
+ | sed 's/.*tag: \([^,)]*\).*/\1/' \
82
+ | while read -r t; do
83
+ git ls-remote --tags origin 2>/dev/null | grep -q "refs/tags/$t" || echo "$t"
84
+ done | sort -u
85
+ )
86
+ TAG_COUNT=0
87
+ [ -n "$LOCAL_ONLY_TAGS" ] && TAG_COUNT=$(echo "$LOCAL_ONLY_TAGS" | grep -c .)
88
+ PUSH_TAGS=""
89
+ [ "$TAG_COUNT" -gt 0 ] && PUSH_TAGS="--follow-tags"
39
90
 
40
- # 1. Working Tree Audit
41
- if ! git diff-index --quiet HEAD --; then
42
- echo -e "${YELLOW}[WARNING]${RESET} Uncommitted changes detected in the working tree."
43
- git status -s
44
- abort "History is not clean. Remote projection requires a pure commit history."
91
+ case "$CURRENT_BRANCH" in
92
+ main|master) BLABEL="${RED}${BOLD}⬡ PRODUCTION${RESET}" ;;
93
+ dev|develop) BLABEL="${YELLOW}◈ INTEGRATION${RESET}" ;;
94
+ feat/*) BLABEL="${GREEN}◈ FEATURE${RESET}" ;;
95
+ fix/*) BLABEL="${CYAN}◈ BUGFIX${RESET}" ;;
96
+ refactor/*) BLABEL="${BLUE}◈ REFACTOR${RESET}" ;;
97
+ *) BLABEL="${GRAY}◈ BRANCH${RESET}" ;;
98
+ esac
99
+
100
+ # ── Phase 1 · Working tree check ─────────────────────────────────────
101
+ clear
102
+ echo ""
103
+ echo -e " ${WHITE}${BOLD}◆ GITHUB SYNC${RESET} ${DGRAY}· Integrity Gate · @wistantkode/dotfiles${RESET}"
104
+ echo ""
105
+ _sep
106
+
107
+ if ! git diff-index --quiet HEAD -- 2>/dev/null; then
108
+ echo ""
109
+ echo -e " ${YELLOW}${BOLD}⚠ DIRTY WORKING TREE${RESET}"
110
+ echo ""
111
+ git status -s | sed 's/^/ /'
112
+ abort "Stage and commit all changes before syncing."
45
113
  fi
46
114
 
47
- # 2. Branch Detection
48
- CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
49
- echo -e "${BOLD}[CONTEXT]${RESET} Current branch: ${CYAN}${BOLD}${CURRENT_BRANCH}${RESET}"
50
-
51
- # 3. Tag Delta Audit (Local vs Remote)
52
- echo -e "${GRAY}[AUDIT] Scanning tag versions...${RESET}"
53
- LOCAL_ONLY_TAGS=$(git log --tags --simplify-by-decoration --pretty="format:%D" | grep "tag: " | sed 's/.*tag: \([^,)]*\).*/\1/' | while read tag; do
54
- if ! git ls-remote --tags origin 2>/dev/null | grep -q "refs/tags/$tag"; then
55
- echo $tag
56
- fi
57
- done | sort -u)
58
-
59
- if [ -n "$LOCAL_ONLY_TAGS" ]; then
60
- echo -e "${YELLOW}${BOLD}[DELTA]${RESET} Local tags not yet sealed on remote:"
61
- for tag in $LOCAL_ONLY_TAGS; do
62
- echo -e " - ${BOLD}$tag${RESET}"
63
- done
115
+ # ── Phase 2 · Summary panel ───────────────────────────────────────────
116
+ echo ""
117
+ printf " ${GRAY}%-14s${RESET} ${CYAN}${BOLD}%s${RESET} %b\n" "Branch" "$CURRENT_BRANCH" "$BLABEL"
118
+ printf " ${GRAY}%-14s${RESET} ${BOLD}%s${RESET} commit(s) ahead of remote\n" "Ahead" "$COMMIT_COUNT"
119
+ printf " ${GRAY}%-14s${RESET} ${BOLD}%s${RESET} to publish\n" "Tags" "$TAG_COUNT"
120
+ echo ""
121
+ _sep
64
122
 
65
- if ask_confirm "Propagate these tags with this push?"; then
66
- PUSH_TAGS="--tags"
67
- fi
68
- else
69
- echo -e "${GRAY}[OK] No unpublished local tags detected.${RESET}"
123
+ # Commits table
124
+ if [ "$COMMIT_COUNT" -gt 0 ]; then
125
+ echo ""
126
+ _header
127
+ while IFS= read -r line; do
128
+ h=$(echo "$line" | awk '{print $1}')
129
+ m=$(echo "$line" | cut -d' ' -f2-)
130
+ _row "$h" "$m"
131
+ done <<< "$COMMITS_RAW"
132
+ _footer
70
133
  fi
71
134
 
72
- # 4. Branch Gate Logic
135
+ # Tags list
136
+ if [ "$TAG_COUNT" -gt 0 ]; then
137
+ echo ""
138
+ echo -e " ${GRAY}Unpublished tags:${RESET}"
139
+ while IFS= read -r tag; do
140
+ echo -e " ${GREEN}+${RESET} ${BOLD}$tag${RESET}"
141
+ done <<< "$LOCAL_ONLY_TAGS"
142
+ fi
143
+
144
+ echo ""
145
+ _sep
146
+
147
+ # ── Phase 3 · Branch gate ─────────────────────────────────────────────
148
+ echo ""
73
149
  case "$CURRENT_BRANCH" in
74
- "main" | "master")
75
- echo -e "${RED}${BOLD}[GATE]${RESET} Production branch. Full integrity required."
76
- if ! ask_confirm "Seal these changes to the public repository?"; then
77
- abort "Push cancelled by operator."
78
- fi
79
- ;;
80
- "dev" | "develop")
81
- echo -e "${YELLOW}[GATE]${RESET} Integration branch."
82
- if ! ask_confirm "Push to integration upstream?"; then
83
- abort "Push cancelled by operator."
84
- fi
150
+ main|master)
151
+ echo -e " ${RED}${BOLD}⚠ PRODUCTION BRANCH${RESET}"
152
+ echo -e " ${DIM}Every push to this branch triggers the public release pipeline.${RESET}"
153
+ ask "You are on ${BOLD}${CURRENT_BRANCH}${RESET}. Proceed to final review?" \
154
+ || abort "Cancelled by operator."
85
155
  ;;
86
- feat/* | fix/* | refactor/*)
87
- echo -e "${GREEN}[GATE]${RESET} Feature branch."
88
- if ! ask_confirm "Push to remote?"; then
89
- abort "Push cancelled by operator."
90
- fi
156
+ dev|develop)
157
+ echo -e " ${YELLOW}${BOLD}◈ INTEGRATION BRANCH${RESET}"
158
+ ask "Push to ${BOLD}${REMOTE}${RESET}?" || abort "Cancelled by operator."
91
159
  ;;
92
160
  *)
93
- if ! ask_confirm "Push current branch to upstream?"; then
94
- abort "Push cancelled by operator."
95
- fi
161
+ ask "Push ${BOLD}${CURRENT_BRANCH}${RESET} to remote?" || abort "Cancelled by operator."
96
162
  ;;
97
163
  esac
98
164
 
99
- # 5. Remote Projection
100
- echo -e "\n${BOLD}[PUSH]${RESET} Initiating remote sync..."
101
- if git push $PUSH_TAGS; then
102
- echo -e "\n${GREEN}${BOLD}[OK]${RESET} Infrastructure successfully synchronized."
165
+ # ── Phase 4 · Final confirmation ──────────────────────────────────────
166
+ echo ""
167
+ _sep
168
+ echo ""
169
+ SUMMARY="${BOLD}${COMMIT_COUNT}${RESET} commit(s)"
170
+ [ "$TAG_COUNT" -gt 0 ] && SUMMARY+=" ${DGRAY}+${RESET} ${BOLD}${TAG_COUNT}${RESET} tag(s)"
171
+ printf " ${GRAY}%-14s${RESET} %b\n" "Will push" "$SUMMARY"
172
+ printf " ${GRAY}%-14s${RESET} ${BOLD}%s${RESET}\n" "Target" "$REMOTE"
173
+ echo ""
174
+ echo -e " ${DIM}SSH key passphrase will be required by git if not cached.${RESET}"
175
+
176
+ ask "${BOLD}Confirm push?${RESET} ${GRAY}This cannot be undone.${RESET}" \
177
+ || abort "Final gate: push cancelled."
178
+
179
+ # ── Phase 5 · Remote projection ───────────────────────────────────────
180
+ echo ""
181
+ _sep
182
+ echo ""
183
+ _progress "Initializing..."
184
+ _progress "Verifying integrity state..."
185
+ _progress "Ready — handing off to git."
186
+ echo ""
187
+ echo -e " ${DGRAY}$(_rep 64 '─')${RESET}"
188
+ echo -e " ${BOLD}▶ git push${RESET} ${DGRAY}(passphrase prompt appears below if required)${RESET}"
189
+ echo -e " ${DGRAY}$(_rep 64 '─')${RESET}"
190
+ echo ""
191
+
192
+ if git push --quiet $PUSH_TAGS; then
193
+ echo ""
194
+ _sep
195
+ echo ""
196
+ echo -e " ${GREEN}${BOLD}✔ SUCCESS${RESET} Infrastructure synchronized with ${BOLD}${REMOTE}${RESET}."
197
+ [ "$TAG_COUNT" -gt 0 ] && \
198
+ echo -e " ${GRAY}Tags published. GitHub Actions pipeline may now be triggered.${RESET}"
199
+ echo ""
200
+ _sep
103
201
  else
104
- abort "Remote push failed. Check your credentials or network connectivity."
202
+ echo ""
203
+ abort "Git push failed. Check your SSH key or network connectivity."
105
204
  fi
106
205
 
107
- echo -e "${GRAY}--------------------------------------------------${RESET}"
206
+ echo ""
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@wistantkode/dotfiles",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "High-End Linux Infrastructure & AI-Driven Orchestration Protocols",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "bin": {
8
- "dotfiles": "bin/cli.mjs"
8
+ "dotfiles": "cli/cli.mjs"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
@@ -10,8 +10,9 @@
10
10
 
11
11
  You are a **Technical Assistant & Engineering Partner**. You facilitate excellence and ensure architectural integrity.
12
12
 
13
- - **Integrity Guard** : If a suboptimal solution is proposed, challenge it (`RODIN.md`).
14
- - **Architect** : When producing code or configuration, enforce professional standards.
13
+ - **Communication First** : Tu réponds toujours aux questions posées **AVANT** de commencer à coder. La communication prime sur l'exécution.
14
+ - **Integrity Guard** : Si une solution sous-optimale est proposée, challenge-la (`RODIN.md`).
15
+ - **Architect** : Quand tu produis du code ou de la config, applique les standards professionnels sans prendre d'initiatives non validées sur le périmètre.
15
16
  - **Context-Aware** : Adapt your methodology to the project type (library, monorepo, CLI, web app).
16
17
 
17
18
  ---
@@ -6,14 +6,18 @@
6
6
 
7
7
  ---
8
8
 
9
- ## Regle d'Or : Zero "git add ."
9
+ ### Règle d'Or 1 : Zéro "git add ."
10
10
 
11
11
  Il est **STRICTEMENT INTERDIT** d'utiliser `git add .` ou `git commit -a`.
12
- Chaque modification doit etre atomique. On ne melange pas la logique métier (`core/`) et le style (`ui/`).
12
+ Chaque modification doit être atomique. On ne mélange pas la logique métier (`core/`) et le style (`ui/`).
13
13
 
14
- > [!CAUTION]
15
- > **Pas de Push Automatique** : L'IA ne doit jamais exécuter `git push` ou `./github.sh`.
16
- > Après le commit, l'IA s'arrête. Le USER valide et pousse manuellement.
14
+ ### Règle d'Or 2 : Isolation des Commits (STRICTE)
15
+
16
+ L'IA ne doit **JAMAIS** modifier ou inclure les fichiers de release (`package.json`, `CHANGELOG.md`, `pom.xml`, etc.) ni manipuler les `git tags` lors d'une phase de commit classique. Toute interaction avec le versioning est réservée **EXCLUSIVEMENT** au protocole `RELEASE.md`.
17
+
18
+ ### Règle d'Or 3 : Zéro Initiative de Versioning
19
+
20
+ Si l'utilisateur demande un commit, fais uniquement le commit du code demandé. Ne propose pas de bump de version ou de mise à jour du changelog de ton propre chef. Ne prends aucune décision sur le périmètre de la tâche sans validation préalable.
17
21
 
18
22
  ---
19
23
 
@@ -24,11 +24,11 @@ You operate in English. You address the operator directly and professionally.
24
24
  - If you disagree, say so directly: *"No. This is structurally inconsistent, and here is why."*
25
25
  - **You are an engineering sparring partner.**
26
26
 
27
- ### Socratic Audit (Engagement)
27
+ ### Zéro-Initiative & Anti-Dérapage (CRITIQUE)
28
28
 
29
- - Before any mutation (Phase 4 of the protocols), you must go through interrogation (Phase 2).
30
- - Reformulate the request to verify its coherence.
31
- - Surface the flaws before they pollute the Git history.
29
+ - **Interdiction de Décision Autonome** : Tu n'as pas le droit de modifier des fichiers ou des composants qui n'ont pas été explicitement cités dans la demande de l'utilisateur. Toute modification "pour aider" ou "pour faire propre" est une violation de protocole.
30
+ - **Réponse avant Action** : Si l'utilisateur te pose une question, tu y réponds **AVANT** de lancer la moindre commande de code ou de modification de fichier. La communication prime sur l'exécution.
31
+ - **Séparation des Pouvoirs** : Ne confonds jamais un commit de code avec une release. Durant un commit, les fichiers `package.json`, `CHANGELOG.md` ou les Git Tags sont **sanctuarisés**. Seule la phase de Release (RELEASE.md) peut y toucher.
32
32
 
33
33
  ## Quality Standards
34
34
 
Binary file
package/assets/memoji.png DELETED
Binary file
Binary file
package/bin/cli.mjs DELETED
@@ -1,66 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { copyFile, mkdir, readdir, lstat } from 'node:fs/promises';
4
- import { join, dirname, basename } from 'node:path';
5
- import { fileURLToPath } from 'node:url';
6
-
7
- const __dirname = dirname(fileURLToPath(import.meta.url));
8
- const pkgRoot = join(__dirname, '..');
9
-
10
- const FILES_TO_INSTALL = [
11
- 'gitignore',
12
- 'gitmessage',
13
- 'myKDEshorcuts.kksrc'
14
- ];
15
-
16
- const DIRECTORIES_TO_INSTALL = [
17
- 'protocols'
18
- ];
19
-
20
- async function copyRecursive(src, dest) {
21
- const stat = await lstat(src);
22
- if (stat.isDirectory()) {
23
- await mkdir(dest, { recursive: true });
24
- const children = await readdir(src);
25
- for (const child of children) {
26
- await copyRecursive(join(src, child), join(dest, child));
27
- }
28
- } else {
29
- await copyFile(src, dest);
30
- }
31
- }
32
-
33
- async function run() {
34
- console.log('\x1b[36m%s\x1b[0m', '--- Dotfiles Installer ---');
35
-
36
- const targetDir = process.cwd();
37
- console.log(`Installing dotfiles to: ${targetDir}`);
38
-
39
- for (const file of FILES_TO_INSTALL) {
40
- try {
41
- const destName = file === 'gitignore' ? '.gitignore' : file;
42
- await copyFile(join(pkgRoot, file), join(targetDir, destName));
43
- console.log(` [OK] ${destName}`);
44
- } catch (err) {
45
- console.error(` [ERROR] Failed to copy ${file}: ${err.message}`);
46
- }
47
- }
48
-
49
- for (const dir of DIRECTORIES_TO_INSTALL) {
50
- try {
51
- const destName = dir === 'protocols' ? '.protocols' : dir;
52
- await copyRecursive(join(pkgRoot, dir), join(targetDir, destName));
53
- console.log(` [OK] ${destName}/`);
54
- } catch (err) {
55
- console.error(` [ERROR] Failed to copy ${dir}: ${err.message}`);
56
- }
57
- }
58
-
59
- console.log('\x1b[32m%s\x1b[0m', '\nDone! Dotfiles and protocols added.');
60
- console.log('Installation complete.');
61
- }
62
-
63
- run().catch(err => {
64
- console.error('Fatal error:', err);
65
- process.exit(1);
66
- });