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
118 changes: 118 additions & 0 deletions .credo.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Credo Configuration
#
# Strict configuration for Valence Shell.
# Run with: mix credo --strict

%{
configs: [
%{
name: "default",
files: %{
included: [
"lib/",
"test/"
],
excluded: [
~r"/_build/",
~r"/deps/",
~r"/priv/",
~r"/proofs/"
]
},
plugins: [],
requires: [],
strict: true,
parse_timeout: 5000,
color: true,
checks: %{
enabled: [
# Consistency
{Credo.Check.Consistency.ExceptionNames, []},
{Credo.Check.Consistency.LineEndings, []},
{Credo.Check.Consistency.ParameterPatternMatching, []},
{Credo.Check.Consistency.SpaceAroundOperators, []},
{Credo.Check.Consistency.SpaceInParentheses, []},
{Credo.Check.Consistency.TabsOrSpaces, []},

# Design
{Credo.Check.Design.AliasUsage, [priority: :low, if_nested_deeper_than: 2]},
{Credo.Check.Design.DuplicatedCode, [priority: :normal]},
{Credo.Check.Design.TagTODO, [exit_status: 0]}, # Warn but don't fail
{Credo.Check.Design.TagFIXME, []},

# Readability
{Credo.Check.Readability.AliasOrder, []},
{Credo.Check.Readability.FunctionNames, []},
{Credo.Check.Readability.LargeNumbers, []},
{Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 120]},
{Credo.Check.Readability.ModuleAttributeNames, []},
{Credo.Check.Readability.ModuleDoc, []},
{Credo.Check.Readability.ModuleNames, []},
{Credo.Check.Readability.ParenthesesInCondition, []},
{Credo.Check.Readability.ParenthesesOnZeroArityDefs, []},
{Credo.Check.Readability.PipeIntoAnonymousFunctions, []},
{Credo.Check.Readability.PredicateFunctionNames, []},
{Credo.Check.Readability.PreferImplicitTry, []},
{Credo.Check.Readability.RedundantBlankLines, []},
{Credo.Check.Readability.Semicolons, []},
{Credo.Check.Readability.SpaceAfterCommas, []},
{Credo.Check.Readability.StringSigils, []},
{Credo.Check.Readability.TrailingBlankLine, []},
{Credo.Check.Readability.TrailingWhiteSpace, []},
{Credo.Check.Readability.UnnecessaryAliasExpansion, []},
{Credo.Check.Readability.VariableNames, []},
{Credo.Check.Readability.WithSingleClause, []},

# Refactoring
{Credo.Check.Refactor.Apply, []},
{Credo.Check.Refactor.CondStatements, []},
{Credo.Check.Refactor.CyclomaticComplexity, [max_complexity: 10]},
{Credo.Check.Refactor.FunctionArity, [max_arity: 6]},
{Credo.Check.Refactor.LongQuoteBlocks, []},
{Credo.Check.Refactor.MatchInCondition, []},
{Credo.Check.Refactor.MapJoin, []},
{Credo.Check.Refactor.NegatedConditionsInUnless, []},
{Credo.Check.Refactor.NegatedConditionsWithElse, []},
{Credo.Check.Refactor.Nesting, [max_nesting: 3]},
{Credo.Check.Refactor.UnlessWithElse, []},
{Credo.Check.Refactor.WithClauses, []},

# Warnings
{Credo.Check.Warning.BoolOperationOnSameValues, []},
{Credo.Check.Warning.ExpensiveEmptyEnumCheck, []},
{Credo.Check.Warning.IExPry, []},
{Credo.Check.Warning.IoInspect, []},
{Credo.Check.Warning.OperationOnSameValues, []},
{Credo.Check.Warning.OperationWithConstantResult, []},
{Credo.Check.Warning.RaiseInsideRescue, []},
{Credo.Check.Warning.SpecWithStruct, []},
{Credo.Check.Warning.UnusedEnumOperation, []},
{Credo.Check.Warning.UnusedFileOperation, []},
{Credo.Check.Warning.UnusedKeywordOperation, []},
{Credo.Check.Warning.UnusedListOperation, []},
{Credo.Check.Warning.UnusedPathOperation, []},
{Credo.Check.Warning.UnusedRegexOperation, []},
{Credo.Check.Warning.UnusedStringOperation, []},
{Credo.Check.Warning.UnusedTupleOperation, []},
{Credo.Check.Warning.UnsafeExec, []}
],
disabled: [
# These are optional extras
{Credo.Check.Readability.StrictModuleLayout, []},
{Credo.Check.Refactor.ABCSize, []},
{Credo.Check.Refactor.AppendSingleItem, []},
{Credo.Check.Refactor.DoubleBooleanNegation, []},
{Credo.Check.Refactor.ModuleDependencies, []},
{Credo.Check.Refactor.NegatedIsNil, []},
{Credo.Check.Refactor.PipeChainStart, []},
{Credo.Check.Refactor.VariableRebinding, []},
{Credo.Check.Warning.LazyLogging, []},
{Credo.Check.Warning.LeakyEnvironment, []},
{Credo.Check.Warning.MapGetUnsafePass, []},
{Credo.Check.Warning.MixEnv, []},
{Credo.Check.Warning.UnsafeToAtom, []}
]
}
}
]
}
67 changes: 39 additions & 28 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,49 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Bug]: "
labels: 'bug, priority: unset, triage'
name: Bug Report
about: Report a bug in Valence Shell
title: '[BUG] '
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.
## Bug Description

<!-- A clear description of what the bug is -->

## To Reproduce

Steps to reproduce:
1.
2.
3.

## Expected Behavior

<!-- What you expected to happen -->

## Actual Behavior

<!-- What actually happened -->

## Environment

- OS:
- Elixir version:
- Erlang/OTP version:
- Valence Shell version:

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
## Logs/Error Messages

**Expected behavior**
A clear and concise description of what you expected to happen.
\`\`\`
<!-- Paste any relevant logs or error messages -->
\`\`\`

**Screenshots**
If applicable, add screenshots to help explain your problem.
## Additional Context

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
<!-- Any other context about the problem -->

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
## Checklist

**Additional context**
Add any other context about the problem here.
- [ ] I have searched existing issues for duplicates
- [ ] I have provided reproduction steps
- [ ] I have included version information
47 changes: 34 additions & 13 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,41 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement, priority: unset, triage'
name: Feature Request
about: Suggest a new feature for Valence Shell
title: '[FEATURE] '
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
## Feature Description

<!-- Clear description of the feature you'd like -->

## Use Case

<!-- Why is this feature needed? What problem does it solve? -->

## Proposed Solution

<!-- How do you think this should work? -->

## Alternatives Considered

<!-- Any alternative solutions you've considered -->

## Reversibility Considerations

<!-- For shell commands: How would this operation be reversed? -->

- Can this operation be undone?
- What state needs to be captured for compensation?
- Any edge cases for reversibility?

## Additional Context

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
<!-- Any other context, mockups, or examples -->

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
## Checklist

**Additional context**
Add any other context or screenshots about the feature request here.
- [ ] I have searched existing issues for duplicates
- [ ] I have considered reversibility implications
- [ ] This aligns with the project's goals (reversible, POSIX-compatible shell)
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/proof_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Proof Request
about: Request a new formal proof or verification
title: '[PROOF] '
labels: formal-verification
assignees: ''
---

## Theorem Description

<!-- What property needs to be proven? -->

## Formal Statement

<!-- If possible, provide a formal statement in Coq/Lean/Agda syntax -->

```coq
(* Example: *)
Theorem new_property :
forall x, P(x) -> Q(x).
```

## Motivation

<!-- Why is this proof important? What does it guarantee? -->

## Scope

- [ ] Core reversibility property
- [ ] Composition theorem
- [ ] Independence/non-interference
- [ ] Error handling correctness
- [ ] Other:

## Target Proof Systems

<!-- Which systems should this be proven in? -->

- [ ] Coq (required)
- [ ] Lean 4
- [ ] Agda
- [ ] Isabelle/HOL
- [ ] Mizar
- [ ] Z3 (SMT)

## Prerequisites

<!-- Any existing theorems this depends on -->

## Additional Context

<!-- References, related work, etc. -->
51 changes: 51 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## Summary

<!-- Brief description of what this PR does -->

## Type of Change

- [ ] Bug fix (non-breaking change fixing an issue)
- [ ] New feature (non-breaking change adding functionality)
- [ ] Breaking change (fix or feature causing existing functionality to change)
- [ ] Documentation update
- [ ] Proof addition/modification
- [ ] Refactoring (no functional changes)

## Checklist

### Code Quality
- [ ] Code follows the project style guidelines (`mix format`)
- [ ] Credo passes without errors (`mix credo --strict`)
- [ ] Tests pass (`mix test`)
- [ ] New code has appropriate tests

### Reversibility (for command implementations)
- [ ] Implements `Valence.Command` behaviour
- [ ] `execute/2` returns proper compensation
- [ ] `compensate/2` correctly reverses the operation
- [ ] `verify/1` detects drift

### Formal Verification (if modifying proofs)
- [ ] Coq proofs compile (`just prove`)
- [ ] No new `Admitted` or `sorry`
- [ ] Cross-validation in at least 2 proof systems

### Documentation
- [ ] README updated (if needed)
- [ ] CHANGELOG updated
- [ ] Docstrings added for new public functions

### Sacred Files
- [ ] I have NOT modified sacred files (README.adoc, STATE.adoc, ARCHITECTURE.md, META.scm) without explicit approval

## Related Issues

<!-- Link any related issues: Fixes #123, Relates to #456 -->

## Testing

<!-- Describe how you tested this change -->

## Screenshots (if applicable)

<!-- Add screenshots for UI changes -->
Loading
Loading